/* =========================================================
   GALERIE – page galerie.php
   Emplacement :
   /assets/css/front/pages/galerie.css
========================================================= */

/* Grille photos */
/* =========================================================
   Galerie – grille justified
========================================================= */

.page-galerie .gallery-grid {
    display: block;           /* important : pas grid/flex */
    padding: 0 12px;
    box-sizing: border-box;
}

.page-galerie .gallery-row {
    display: flex;
    gap: 8px;
    margin-bottom: 8px;
    align-items: stretch;
}

.page-galerie .photo-card {
    display: block;
    position: relative;
}

.page-galerie .photo-media {
    position: relative;
    display: inline-block;
    max-width: 100%;
}

.page-galerie .photo-card img {
    display: block;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.18);
}



.page-galerie .gallery-row img {
    display: block;
    cursor: pointer;
    height: auto;   /* laissé au JS */
    width: auto;    /* laissé au JS */
}



/* Modal preview */
.modal {
    position: fixed;
    inset: 0;
    background: rgba(0,0,0,0.8);
    display: none;
    align-items: center;
    justify-content: center;
    padding: 20px;
    z-index: 10000;
}

.modal .modal-backdrop {
    position: fixed;
    inset: 0;
    background: transparent;
    z-index: 10001;
}

.modal.open {
    display: flex;
}

.modal.is-soft-fullscreen {
    padding: 0;
}

.modal .modal-image-wrap {
    position: relative;
    display: flex;
    align-items: stretch;
    justify-content: flex-start;
    width: 100vw;
    height: 100vh;
    touch-action: pan-y;
    overflow: hidden;
    z-index: 10002;
}

.modal.is-soft-fullscreen .modal-image-wrap,
.modal.is-soft-fullscreen .modal-track,
.modal.is-soft-fullscreen .modal-slide {
    height: 100dvh;
}

.modal-soft-fullscreen {
    overflow: hidden;
}

.modal.is-soft-fullscreen .modal-actions,
.modal.is-soft-fullscreen .modal-nav {
    display: none !important;
}

.modal .modal-fullscreen-hint {
    position: fixed;
    left: 50%;
    bottom: 18px;
    transform: translateX(-50%);
    padding: 8px 12px;
    border-radius: 999px;
    background: rgba(0, 0, 0, 0.7);
    color: #fff;
    font-size: 13px;
    z-index: 10004;
    display: none;
    pointer-events: none;
}

.modal .modal-track {
    display: flex;
    width: 200vw;
    height: 100vh;
    transform: translateX(0);
}

.modal .modal-slide {
    flex: 0 0 100vw;
    height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
}

.modal img {
    display: block;
    max-width: 92vw;
    max-height: 92vh;
    will-change: transform;
}

.modal img.modal-image--slide-out-next {
    animation: modalImageSlideOutNext 0.2s ease-in forwards;
}

.modal img.modal-image--slide-in-next {
    animation: modalImageSlideInNext 0.22s ease-out forwards;
}

.modal img.modal-image--slide-out-prev {
    animation: modalImageSlideOutPrev 0.2s ease-in forwards;
}

.modal img.modal-image--slide-in-prev {
    animation: modalImageSlideInPrev 0.22s ease-out forwards;
}

@keyframes modalImageSlideOutNext {
    from {
        transform: translateX(0);
    }
    to {
        transform: translateX(-100%);
    }
}

@keyframes modalImageSlideInNext {
    from {
        transform: translateX(100%);
    }
    to {
        transform: translateX(0);
    }
}

@keyframes modalImageSlideOutPrev {
    from {
        transform: translateX(0);
    }
    to {
        transform: translateX(100%);
    }
}

@keyframes modalImageSlideInPrev {
    from {
        transform: translateX(-100%);
    }
    to {
        transform: translateX(0);
    }
}

.modal #modal-close {
    position: absolute;
    top: 10px;
    right: 10px;
    width: 44px;
    height: 44px;
    border-radius: 999px;
    display: flex;
    align-items: center;
    justify-content: center;
    border: 1px solid rgba(255, 255, 255, 0.55);
    background: rgba(0, 0, 0, 0.62);
    color: #fff;
    font-size: 30px;
    font-family: Arial, sans-serif;
    font-weight: 700;
    line-height: 1;
    cursor: pointer;
    z-index: 10003;
    pointer-events: auto;
    -webkit-tap-highlight-color: transparent;
    user-select: none;
}

.modal .modal-nav {
    position: fixed;
    top: 50%;
    transform: translateY(-50%);
    width: 44px;
    height: 44px;
    border: none;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.2);
    color: #fff;
    font-size: 30px;
    line-height: 1;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 10004;
}

.modal .modal-nav--prev {
    left: 20px;
}

.modal .modal-nav--next {
    right: 20px;
}

.modal .modal-nav:hover,
.modal .modal-nav:focus-visible {
    background: rgba(255, 255, 255, 0.35);
}

.modal .modal-actions {
    position: absolute;
    right: 14px;
    bottom: 14px;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 10px;
    border-radius: 999px;
    background: rgba(17, 24, 39, 0.72);
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.35);
    z-index: 10002;
}

.modal .modal-actions .icon-btn,
.modal .modal-actions .modal-gift-btn {
    width: 42px;
    height: 42px;
    border-radius: 999px;
    padding: 0;
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

.modal .modal-actions .icon-btn {
    background: rgba(255, 255, 255, 0.97);
}

.modal .modal-actions .icon {
    width: 26px;
    height: 26px;
    color: #111827;
}

.modal .modal-actions .modal-gift-btn {
    position: static;
    right: auto;
    bottom: auto;
    background: rgba(17, 24, 39, 0.95);
}

.modal .modal-actions .modal-gift-btn svg {
    width: 22px;
    height: 22px;
}


@media (max-width: 640px) {
    .modal .modal-nav {
        display: none;
    }

    .modal .modal-actions {
        right: 8px;
        bottom: 8px;
        padding: 8px;
        gap: 6px;
    }

    .modal .modal-actions .icon-btn,
    .modal .modal-actions .modal-gift-btn {
        width: 38px;
        height: 38px;
    }

    .modal .modal-actions .icon {
        width: 23px;
        height: 23px;
    }
}
/* ============================
   Galerie privée – mot de passe
   ============================ */

.gallery-password-wrapper {
    min-height: calc(100vh - var(--header-height, 80px));
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 2rem;
}

.gallery-password-card {
    background: #fff;
    padding: 2rem 2.5rem;
    border-radius: 8px;
    box-shadow: 0 10px 30px rgba(0,0,0,0.08);
    max-width: 360px;
    width: 100%;
    text-align: center;
}

.gallery-password-card h1 {
    margin-bottom: 1.5rem;
}

.gallery-password-card form {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.gallery-password-card input[type="password"] {
    width: 100%;
    padding: 0.6rem 0.7rem;
}

.gallery-password-card button {
    padding: 0.6rem 1rem;
    cursor: pointer;
}

.gallery-password-error {
    color: #c0392b;
    margin-bottom: 1rem;
}



/* =========================================================
Bouton "Voir" – Rond + effet d’émission lumineuse
========================================================= */

.cover-scroll-btn {
    position: absolute;
    bottom: 25%;
    left: 50%;
    transform: translateX(-50%);

    /* Forme */
    width: 72px;
    height: 72px;
    padding: 0;
    border-radius: 50%;

    /* Centrage contenu */
    display: flex;
    align-items: center;
    justify-content: center;

    /* Typo */
    font-size: 18px;
    font-weight: 500;
    line-height: 1;

    /* Style */
    background: rgba(0, 0, 0, 0.65);
    color: #fff;
    border: none;
    cursor: pointer;

    /* Effet verre */
    backdrop-filter: blur(6px);

    /* Transitions interaction */
    transition:
            transform 0.2s ease,
            opacity 0.2s ease;

    /* Nécessaire pour le halo */
    isolation: isolate;
}

/* Hover / focus */
.cover-scroll-btn:hover,
.cover-scroll-btn:focus-visible {
    opacity: 0.96;
    transform: translateX(-50%) scale(1.05);
}

/* Active (feedback tactile mobile) */
.cover-scroll-btn:active {
    transform: translateX(-50%) scale(0.96);
}


/* =========================================================
   Halo lumineux (effet d’émission)
========================================================= */

.cover-scroll-btn::before {
    content: "";
    position: absolute;
    inset: -14px;
    border-radius: 50%;

    background: rgba(255, 255, 255, 0.45);
    filter: blur(18px);

    opacity: 0;
    z-index: -1;

    animation: coverBtnGlow 3s ease-in-out infinite;
}

/* Stop animation à l’interaction */
.cover-scroll-btn:hover::before,
.cover-scroll-btn:focus-visible::before {
    animation: none;
    opacity: 0.35;
}


/* =========================================================
   Animation – pulsation douce (opacité + respiration)
========================================================= */

@keyframes coverBtnGlow {
    0% {
        opacity: 0.15;
        transform: scale(0.95);
    }
    50% {
        opacity: 0.45;
        transform: scale(1.05);
    }
    100% {
        opacity: 0.15;
        transform: scale(0.95);
    }
}


#album-start {
    scroll-margin-top: 20px;
    display: block;
}

.album-empty-lock-screen {
    position: fixed;
    inset: 0;
    z-index: 30000;
    overflow: hidden;
    display: grid;
    place-items: center;
}

.album-empty-lock-screen__cover,
.album-empty-lock-screen__fallback {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
}

.album-empty-lock-screen__cover {
    object-fit: cover;
}

.album-empty-lock-screen__fallback {
    background: linear-gradient(135deg, #111827, #334155);
}

.album-empty-lock-screen__overlay {
    position: absolute;
    inset: 0;
    background: rgba(15, 23, 42, 0.72);
}

.album-empty-lock-screen__card {
    position: relative;
    z-index: 1;
    width: min(680px, calc(100% - 32px));
    border: 1px solid rgba(148, 163, 184, 0.45);
    border-radius: 16px;
    background: rgba(15, 23, 42, 0.7);
    backdrop-filter: blur(2px);
    box-shadow: 0 20px 50px rgba(0, 0, 0, 0.35);
    padding: clamp(20px, 3vw, 30px);
    text-align: center;
    color: #f8fafc;
}

.album-empty-lock-screen__kicker {
    margin: 0 0 8px;
    font-size: 12px;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    font-weight: 700;
    color: #cbd5e1;
}

.album-empty-lock-screen__title {
    margin: 0;
    font-size: clamp(1.7rem, 3.8vw, 2.6rem);
    font-weight: 800;
    line-height: 1.1;
}

.album-empty-lock-screen__message {
    margin: 12px 0 0;
    font-size: clamp(1rem, 1.8vw, 1.15rem);
    line-height: 1.5;
    color: #e2e8f0;
}

.album-empty-lock-screen__back-link {
    margin-top: 18px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 44px;
    padding: 10px 18px;
    border-radius: 999px;
    border: 1px solid rgba(125, 211, 252, 0.85);
    background: linear-gradient(180deg, rgba(56, 189, 248, 0.25), rgba(37, 99, 235, 0.3));
    color: #f8fafc;
    text-decoration: none;
    font-weight: 700;
    letter-spacing: 0.01em;
    transition: transform .14s ease, background .14s ease, box-shadow .14s ease;
}

.album-empty-lock-screen__back-link:hover,
.album-empty-lock-screen__back-link:focus-visible {
    background: linear-gradient(180deg, rgba(56, 189, 248, 0.4), rgba(37, 99, 235, 0.48));
    box-shadow: 0 10px 26px rgba(37, 99, 235, 0.3);
    transform: translateY(-1px);
}


.album-cover {
    position: relative;
}

.site-promo-banner ~ .album-cover {
    margin-top: 6px;
}

@media (max-width: 768px) {
    .site-promo-banner ~ .album-cover {
        margin-top: 55px;
    }
}

.album-cover img {
    display: block;
    width: 100%;
    height: auto;
}

.album-cover .cover-promo {
    position: absolute;
    inset: 0;
    padding: clamp(12px, 2vw, 24px);
    z-index: 500;
    display: flex;
    flex-direction: column-reverse;
    justify-content: flex-start;
    align-items: flex-start;
    gap: 0.75rem;
    pointer-events: none;
}

.cover-promo--inline {
    position: relative;
    inset: auto;
    padding: 0;
    pointer-events: auto;
    display: inline-flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 0.6rem;
}

.cover-promo-modal {
    position: fixed;
    inset: 0;
    z-index: 700;
    display: none;
    place-items: center;
    pointer-events: none;
}

.cover-promo-modal.is-open {
    display: grid;
    pointer-events: auto;
}

.cover-promo-modal[hidden] {
    display: none !important;
}

.cover-promo-overlay {
    position: absolute;
    inset: 0;
    background: rgba(15, 23, 42, 0.65);
    opacity: 0;
    transition: opacity 0.22s ease;
    pointer-events: none;
}

.cover-promo-modal.is-open .cover-promo-overlay {
    opacity: 1;
    pointer-events: auto;
}

.cover-promo-modal .cover-promo-collapse {
    position: relative;
    z-index: 1;
    max-height: min(80vh, 640px);
    overflow: auto;
    transform: translateY(8px) scale(0.98);
    opacity: 0;
    transition: transform 0.22s ease, opacity 0.22s ease;
}

.cover-promo-modal.is-open .cover-promo-collapse {
    transform: translateY(0) scale(1);
    opacity: 1;
}

.cover-promo-modal-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
}

.cover-promo-close {
    border: 0;
    background: transparent;
    color: #0f172a;
    font-size: 1.4rem;
    font-weight: 700;
    line-height: 1;
    cursor: pointer;
    padding: 4px 6px;
}

.cover-promo-collapse {
    pointer-events: auto;
}

.cover-promo-collapse {
    width: clamp(320px, 42vw, 640px);
    aspect-ratio: 4 / 3;
    max-height: min(70vh, 520px);
    background: rgba(255, 255, 255, 0.96);
    color: #111;
    border-radius: 14px;
    padding: 0.75rem 0.9rem;
    box-shadow: 0 18px 40px rgba(0, 0, 0, 0.22);
    border: 1px solid rgba(226, 232, 240, 0.9);
    transform-origin: left bottom;
    transform: translateY(8px) scale(0.98);
    opacity: 0;
    transition: transform 0.22s ease, opacity 0.22s ease;
    display: grid;
    align-content: start;
    overflow: auto;
}

.cover-promo-collapse.is-open {
    transform: translateY(0) scale(1);
    opacity: 1;
}

.gift-pack-modal {
    position: fixed;
    inset: 0;
    z-index: 1200;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.18s ease;
}

.gift-pack-modal.is-open {
    opacity: 1;
    pointer-events: auto;
}

.gift-pack-modal__overlay {
    position: absolute;
    inset: 0;
    background: rgba(15, 23, 42, 0.52);
    backdrop-filter: blur(2px);
}

.gift-pack-modal__panel {
    position: relative;
    width: min(94vw, 680px);
    max-height: min(88vh, 760px);
    overflow: auto;
    border-radius: 14px;
    border: 1px solid rgba(148, 163, 184, 0.35);
    background: linear-gradient(180deg, #ffffff, #f8fafc);
    box-shadow: 0 22px 46px rgba(15, 23, 42, 0.28);
    padding: 18px;
}

.gift-pack-modal__header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
}

.gift-pack-modal__title {
    margin: 0;
    font-size: 1.08rem;
    font-weight: 800;
    color: #0f172a;
}

.gift-pack-modal__close {
    border: 1px solid #cbd5e1;
    background: #fff;
    color: #334155;
    border-radius: 8px;
    width: 34px;
    height: 34px;
    line-height: 1;
    font-size: 18px;
    cursor: pointer;
}

.gift-pack-modal__subtitle {
    margin: 6px 0 12px;
    color: #475569;
    font-size: 0.92rem;
}

.gift-pack-modal__choices {
    display: grid;
    gap: 12px;
}

.gift-pack-modal__group {
    border: 1px solid #e2e8f0;
    border-radius: 10px;
    padding: 10px;
    background: #fff;
}

.gift-pack-modal__group-title {
    margin: 0 0 8px;
    font-size: 0.86rem;
    font-weight: 800;
    letter-spacing: 0.05em;
    text-transform: uppercase;
    color: #0f172a;
}

.gift-pack-modal__group-list {
    display: grid;
    gap: 8px;
}

.gift-pack-modal__choice {
    display: grid;
    grid-template-columns: auto 1fr auto;
    align-items: center;
    gap: 10px;
    padding: 8px 10px;
    border: 1px solid #e2e8f0;
    border-radius: 9px;
    background: #f8fafc;
    cursor: pointer;
}

.gift-pack-modal__choice:has(input:checked) {
    border-color: #16a34a;
    background: #f0fdf4;
}

.gift-pack-modal__choice-main {
    display: grid;
    gap: 2px;
}

.gift-pack-modal__choice-title {
    font-weight: 700;
    color: #0f172a;
}

.gift-pack-modal__choice-meta {
    font-size: 0.82rem;
    color: #64748b;
}

.gift-pack-modal__choice-price {
    font-weight: 800;
    color: #166534;
}

.gift-pack-modal__actions {
    margin-top: 14px;
    display: flex;
    justify-content: flex-end;
}

.cover-promo-collapse-title {
    margin: 0 0 0.35rem;
    font-size: 1.1rem;
    font-weight: 800;
    letter-spacing: 0.02em;
}

.cover-promo-collapse-text {
    margin: 0 0 6px;
    font-size: 0.95rem;
    line-height: 1.4;
    color: #475569;
}

.cover-promo-list {
    margin-top: 8px;
    padding: 8px 10px;
    border: 1px solid #e2e8f0;
    border-radius: 12px;
    background: #f8fafc;
}

.cover-promo-list-title {
    margin: 0 0 6px;
    font-weight: 800;
    font-size: 0.92rem;
    color: #0f172a;
    text-transform: uppercase;
    letter-spacing: 0.06em;
}

.cover-promo-list-items {
    margin: 0;
    padding: 0;
    list-style: none;
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 8px;
    color: #1f2937;
    font-size: 0.9rem;
    line-height: 1.4;
}

.cover-promo-list-items li {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    padding: 6px 8px;
    border-radius: 10px;
    background: #ffffff;
    border: 1px solid #e5e7eb;
}

.cover-promo-price {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 2px 8px;
    border-radius: 999px;
    background: #0f172a;
    color: #fff;
    font-weight: 700;
    font-size: 0.82rem;
    white-space: nowrap;
}


/* Overlay texte */
.album-cover-overlay {
    position: absolute;
    left: 50%;
    top: 55%;
    transform: translate(-50%, -50%);
    text-align: center;
    color: #fff;
    z-index: 2;
    padding: 0 1rem;
}

.album-cover-card {
    background: rgba(0, 0, 0, 0.45);
    border-radius: 14px;
    padding: 16px 22px;
    box-shadow: 0 16px 40px rgba(0, 0, 0, 0.25);
    backdrop-filter: blur(2px);
}

.album-cover-title {
    margin: 0;
    font-size: clamp(1.8rem, 4vw, 3rem);
    font-weight: 800;
    text-shadow: 0 2px 10px rgba(0,0,0,0.6);
}

.album-cover-heading {
    display: inline-flex;
    align-items: baseline;
    gap: 12px;
    justify-content: center;
    flex-wrap: wrap;
}

.album-cover-count {
    font-size: 1rem;
    opacity: 0.9;
    text-shadow: 0 2px 10px rgba(0,0,0,0.6);
    white-space: nowrap;
}

.album-cover-meta {
    margin-top: 0.5rem;
    font-size: 1rem;
    opacity: 0.9;
    text-shadow: 0 2px 10px rgba(0,0,0,0.6);
}

/* Bouton Voir au-dessus de l'image */
.cover-scroll-btn {
    position: absolute;
    left: 50%;
    bottom: 3rem;
    transform: translateX(-50%);
    z-index: 3;
}


/* =========================================================
   Variante BLEUE – Bouton "Voir"
========================================================= */

.cover-scroll-btn--blue {
    background: rgba(80, 170, 255, 0.65);
    color: #ffffff;
}

/* Hover / focus */
.cover-scroll-btn--blue:hover,
.cover-scroll-btn--blue:focus-visible {
    background: rgba(80, 170, 255, 0.85);
}

/* Halo lumineux BLEU */
.cover-scroll-btn--blue::before {
    background: rgba(120, 200, 255, 0.55);
}


:root {
    --accent-heart: #e11d48; /* rose-rouge */
}

/* Bouton icône */
.icon-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 4px;
    min-width: 32px;
    min-height: 32px;
    border-radius: 8px;
    text-decoration: none;
}

/* SVG */
.icon {
    width: 22px;
    height: 22px;
    display: block;
    color: #666;
}

/* ÉTAT ACTIF */
.icon-heart.is-on {
    color: var(--accent-heart);
    fill: var(--accent-heart);
}

/* ÉTAT INACTIF */
.icon-heart:not(.is-on) {
    fill: none;
    stroke: currentColor;
}

/* Panier (on garde neutre pour l’instant) */
.icon-cart.is-on {
    color: #111;
    fill: #111;
}

.icon-cart:not(.is-on) {
    fill: none;
    stroke: currentColor;
}


/* ==========================================================
   BOUTON FILTRE (checkbox déguisée en bouton)
   ========================================================== */

/* Le wrapper sert d'ancre si besoin */
.ui-filter-btn {
    position: relative;
    overflow: hidden;
    display: inline-flex;
    align-items: center;
}

/* Cache l'input visuellement SANS casser la mise en page */
.ui-filter-btn input[type="checkbox"] {
    position: absolute;
    width: 1px;
    height: 1px;
    margin: -1px;
    padding: 0;
    border: 0;
    overflow: hidden;
    clip: rect(0 0 0 0);
    clip-path: inset(50%);
    white-space: nowrap;
}


.btn-filter {
    display: inline-flex;
    align-items: center;
    gap: 6px;

    padding: 8px 14px;
    border-radius: 999px;

    font-size: 0.9rem;
    font-weight: 500;

    cursor: pointer;
    user-select: none;

    color: #444;
    background: #f2f2f2;
    border: 1px solid #ddd;

    transition:
            background 0.2s ease,
            color 0.2s ease,
            border-color 0.2s ease,
            box-shadow 0.2s ease;
}

.ui-filter-btn input:disabled + .btn-filter,
.btn-filter.is-disabled {
    opacity: 0.55;
    cursor: not-allowed;
    background: #f3f4f6;
    border-color: #e2e8f0;
    color: #94a3b8;
}

/* Hover */
.btn-filter:hover {
    background: #eaeaea;
}

/* ÉTAT ACTIF */
.ui-filter-btn input:checked + .btn-filter {
    background: #ffe6ec;
    border-color: #e63963;
    color: #e63963;
    box-shadow: 0 0 0 1px rgba(230,57,99,0.15);
}

.page-hero .album-heading {
    display: inline-flex;
    align-items: baseline;
    gap: 10px;
    flex-wrap: wrap;
}

.page-hero h1 {
    margin: 0;
    line-height: 1.1;
    font-weight: 800;
}

.page-hero .album-count {
    color: var(--text-muted);
    font-size: 0.95rem;
    white-space: nowrap;
}






.dossard-search {
    display: flex;
    flex-direction: column;   /* empile verticalement */
    align-items: flex-start;  /* aligné à gauche */
    gap: 0.5rem;
    margin-top: 1rem;
}

.dossard-submit-hidden {
    position: absolute;
    left: -9999px;
    width: 1px;
    height: 1px;
    opacity: 0;
}

.dossard-search.is-disabled input,
.dossard-search.is-disabled .btn-search,
.dossard-search.is-disabled .btn-reset,
.dossard-search.is-disabled label {
    opacity: 0.6;
}

.dossard-search.is-disabled .dossard-inline-actions,
.dossard-search.is-disabled .dossard-inline-actions .btn-filter {
    opacity: 1;
}

.dossard-search.is-disabled input,
.dossard-search.is-disabled .btn-search,
.dossard-search.is-disabled .btn-reset {
    cursor: not-allowed;
}

.dossard-search.is-disabled input {
    background: #f3f3f3;
    border-color: #d9d9d9;
    color: #888;
}

.dossard-search.is-disabled .btn-search {
    background: #f3f3f3;
    border-color: #d9d9d9;
    color: #888;
}


.dossard-actions {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}




.dossard-search label {
    display: flex;
    flex-direction: column;
    gap: 0.2rem; /* contrôle fin de l’espace label → input */
}

.dossard-hint {
    font-size: 0.85rem;
    color: #888;
    font-weight: 400;
}

.dossard-input-row {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.dossard-inline-actions {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
}

.dossard-inline-actions .ui-filter-btn {
    height: 40px;
    align-items: stretch;
    padding-bottom: 0.8rem;
}

.dossard-inline-actions .btn-filter {
    display: inline-flex;
    flex-direction: row;
    align-items: center;
    height: 40px;
    padding: 0 16px;
    line-height: 1;
    white-space: nowrap;
}

.btn-filter-label-mobile,
.favorite-count-mobile {
    display: none;
}

.dossard-inline-actions .btn-cart {
    height: 40px;
    padding: 0 16px;
    line-height: 1;
    align-items: center;
    align-self: stretch;
}

.gift-selection-hint {
    appearance: none;
    -webkit-appearance: none;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 12px;
    position: relative;
    z-index: 120;
    width: min(100%, 760px);
    min-height: 48px;
    margin: 0 auto 12px;
    padding: 10px 16px;
    border-radius: 14px;
    border: 1px solid rgba(14, 116, 144, 0.35);
    background: linear-gradient(180deg, rgba(248, 250, 252, 0.98), rgba(241, 245, 249, 0.98));
    color: #0f172a;
    font-size: 0.98rem;
    font-weight: 700;
    letter-spacing: 0.01em;
    text-align: center;
    user-select: none;
    -webkit-user-select: none;
    pointer-events: auto;
    cursor: default;
    box-shadow: 0 10px 24px rgba(15, 23, 42, 0.08);
    transition: background 0.2s ease, border-color 0.2s ease, box-shadow 0.2s ease, color 0.2s ease;
}

.gift-selection-hint[hidden] {
    display: none !important;
}

.gift-selection-hint > * {
    pointer-events: none;
    user-select: none;
    -webkit-user-select: none;
}

.gift-selection-hint.is-stuck {
    position: fixed;
    left: 50%;
    transform: translateX(-50%);
    top: 84px;
    z-index: 5000;
    margin: 0;
}

.gift-selection-hint-spacer[hidden] {
    display: none !important;
}

.gift-selection-hint__text {
    color: #0f172a;
}

.gift-selection-hint__count {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 58px;
    padding: 4px 10px;
    border-radius: 999px;
    border: 1px solid rgba(14, 116, 144, 0.3);
    background: rgba(255, 255, 255, 0.8);
    color: #0f172a;
    font-size: 0.9em;
    font-weight: 800;
    line-height: 1.1;
}

.gift-selection-hint__arrow {
    width: 28px;
    height: 28px;
    border-radius: 8px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    color: #0f172a;
    background: rgba(186, 230, 253, 0.55);
    border: 1px solid rgba(14, 116, 144, 0.35);
    font-size: 15px;
    line-height: 1;
    animation: giftSelectionArrowPulse 1.25s ease-in-out infinite;
}

.gift-selection-hint.is-pending {
    background: linear-gradient(
            180deg,
            rgba(255, 170, 0, 0.98),
            rgba(193, 93, 93, 0.98)
    );
    border-color: rgba(72, 120, 96, 0.35);
    cursor: default;
    color: #fff; !important;
}


.gift-selection-hint.is-ready {
    background: linear-gradient(135deg, #198754, #157347);
    border-color: #146c43;
    color: #fff;
    box-shadow: 0 12px 26px rgba(25, 135, 84, 0.35);
    cursor: pointer !important;
}

.gift-selection-hint.is-pending,
.gift-selection-hint.is-pending * {
    cursor: default !important;
}

.gift-selection-hint:disabled {
    cursor: default !important;
}

.gift-selection-hint.is-ready .gift-selection-hint__text {
    color: #fff;
}

.gift-selection-hint.is-ready .gift-selection-hint__count {
    border-color: rgba(255, 255, 255, 0.45);
    background: rgba(255, 255, 255, 0.16);
    color: #fff;
}

.gift-selection-hint.is-ready .gift-selection-hint__arrow {
    color: #fff;
    background: rgba(255, 255, 255, 0.16);
    border-color: rgba(255, 255, 255, 0.45);
    animation-name: giftSelectionArrowPulseRight;
}

@keyframes giftSelectionArrowPulse {
    0% {
        transform: translateY(0);
        opacity: 0.8;
    }
    50% {
        transform: translateY(3px);
        opacity: 1;
    }
    100% {
        transform: translateY(0);
        opacity: 0.8;
    }
}

@keyframes giftSelectionArrowPulseRight {
    0% {
        transform: translateX(0);
        opacity: 0.8;
    }
    50% {
        transform: translateX(3px);
        opacity: 1;
    }
    100% {
        transform: translateX(0);
        opacity: 0.8;
    }
}


.dossard-search input {
    min-width: 160px;
}

.dossard-search .btn-search {
    padding: 0.45em 0.9em;
    white-space: nowrap;   /* largeur = texte */
}

.dossard-search .btn-search--favorite {
    color: #fff;
    background: var(--accent-heart);
    border: 1px solid var(--accent-heart);
}

.dossard-search .btn-search--favorite:hover,
.dossard-search .btn-search--favorite:focus-visible {
    background: #be123c;
    border-color: #be123c;
}

.dossard-search input:disabled,
.dossard-search select:disabled,
.dossard-search button:disabled,
.dossard-search .btn-filter.is-disabled,
.dossard-search .btn-filter[disabled] {
    opacity: 0.6;
    cursor: not-allowed;
}

.dossard-search .btn-reset {
    display: inline-flex;
    align-items: center;
    justify-content: center;

    padding: 0.45em 0.9em;
    margin-left: 0.25rem;

    font-size: 0.85rem;
    font-weight: 500;
    text-decoration: none;
    white-space: nowrap;

    color: #666;
    background: transparent;
    border: 1px solid #ddd;
    border-radius: 6px;

    cursor: pointer;

    transition:
            color 0.2s ease,
            background 0.2s ease,
            border-color 0.2s ease;
}





.page-hero {
    position: relative;
}

.page.page-galerie {
    position: relative;
}

.cart-link {
    display: inline-flex;
    align-items: center;
    margin-top: 0.5rem;
    color: var(--text-muted);
}

.cart-link:hover {
    color: var(--text-main);
}

.cart-link .icon-cart {
    width: 24px;
    height: 24px;
}

/* =========================================================
   Bouton panier – galerie
========================================================= */

.gallery-actions {
    display: flex;
    align-items: start;
    gap: 0.75rem;
    overflow: visible;
}

@media (min-width: 601px) and (max-width: 768px) {
    .gallery-actions {
        display: grid;
        grid-template-columns: 1fr;
        gap: 10px;
        width: 100%;
        max-width: 100%;
        padding: 0 12px;
        box-sizing: border-box;
    }

    .gallery-actions .btn-filter,
    .gallery-actions .btn-cart,
    .gallery-actions .btn-album-pack,
    .gallery-actions .btn-action-pill,
    .gallery-actions .gift-collapse-trigger {
        width: 100% !important;
        max-width: 100% !important;
        white-space: normal;
        justify-content: center;
        box-sizing: border-box;
        display: flex;
    }

    .gallery-actions .ui-filter-btn {
        width: 100%;
    }

    .gallery-actions .btn-filter {
        width: 100%;
        justify-content: center;
    }

    .btn-cart {
        white-space: normal;
    }
}

@media (max-width: 600px) {
    .dossard-inline-actions .btn-filter,
    .dossard-inline-actions .btn-cart {
        gap: 6px;
        padding-left: 10px;
        padding-right: 10px;
    }

    .dossard-inline-actions .btn-filter .btn-filter-text,
    .dossard-inline-actions .btn-cart .btn-cart-text {
        display: none;
    }

    .gallery-actions {
        display: flex;
        flex-direction: column;
        align-items: center;
        margin-left: 0;
        gap: 10px;
        padding: 0;
    }

    .gallery-actions > * {
        width: auto;
        max-width: 100%;
    }

    .gallery-actions .btn-filter,
    .gallery-actions .btn-cart,
    .gallery-actions .btn-album-pack,
    .gallery-actions .btn-action-pill,
    .gallery-actions .gift-collapse-trigger {
        width: min(92vw, 320px) !important;
        max-width: 92vw !important;
        padding: 10px 12px;
        font-size: 0.92rem;
        white-space: normal;
        text-align: center;
        justify-content: center;
        box-sizing: border-box;
    }
}

@media (max-width: 768px) {
    .page-galerie .gallery-row {
        display: block;
        width: 100%;
        margin-bottom: 8px;
    }

    .page-galerie .photo-card,
    .page-galerie .photo-media,
    .page-galerie .photo-card img {
        width: 100% !important;
        max-width: 100% !important;
        height: auto !important;
        box-sizing: border-box;
    }
}

.gallery-actions .btn-filter,
.gallery-actions .btn-cart,
.gallery-actions .btn-album-pack,
.gallery-actions .btn-action-pill {
    height: 40px;
    padding: 0 16px;
    line-height: 1;
}

/* Bouton panier */
.btn-cart {
    display: inline-flex;
    align-items: center;
    gap: 6px;

    padding: 8px 14px;
    border-radius: 999px;

    font-size: 0.9rem;
    font-weight: 500;
    text-decoration: none;
    white-space: nowrap;

    color: #444;
    background: #f2f2f2;
    border: 1px solid #ddd;

    cursor: pointer;

    transition:
            background 0.2s ease,
            color 0.2s ease,
            border-color 0.2s ease,
            box-shadow 0.2s ease;
}

.btn-cart:hover {
    background: #eaeaea;
    color: #111;
    text-decoration: none;
}

/* Icône panier dans le bouton */
.btn-cart .icon-cart {
    width: 20px;
    height: 20px;
}

.btn-album-pack {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 8px 14px;
    border-radius: 999px;
    font-size: 0.9rem;
    font-weight: 600;
    white-space: nowrap;
    color: #ffffff;
    background: linear-gradient(135deg, #c9551f 0%, #e07a36 45%, #ffb154 100%);
    border: 1px solid #c9551f;
    box-shadow:
        0 8px 18px rgba(210, 103, 43, 0.35),
        0 0 0 rgba(255, 191, 115, 0);
    cursor: pointer;
    position: relative;
    overflow: hidden;
    transition:
        background 0.2s ease,
        border-color 0.2s ease,
        box-shadow 0.2s ease,
        transform 0.2s ease;
    animation: album-pack-pulse 5s ease-in-out infinite;
}

/* Override any generic button styles on galerie page */
.page-galerie .gallery-actions .btn-album-pack {
    color: #ffffff;
    background: #d2672b;
    border-color: #d2672b;
}

.btn-album-pack:hover,
.btn-album-pack:focus-visible {
    background: linear-gradient(135deg, #bf4f1c 0%, #dd6f2b 45%, #ffb154 100%);
    border-color: #bf4f1c;
    box-shadow:
        0 12px 24px rgba(185, 87, 35, 0.4),
        0 0 24px rgba(255, 183, 92, 0.45);
    transform: translateY(-2px) scale(1.01);
}

.btn-album-pack:active {
    transform: translateY(0) scale(0.99);
}

.btn-album-pack::after {
    content: "";
    position: absolute;
    inset: -60% -20%;
    background: linear-gradient(
        120deg,
        rgba(255, 255, 255, 0) 35%,
        rgba(255, 255, 255, 0.85) 50%,
        rgba(255, 255, 255, 0) 65%
    );
    transform: translateX(-180%) rotate(10deg);
    opacity: 0;
    mix-blend-mode: screen;
    pointer-events: none;
    animation: album-pack-flash 5s ease-in-out infinite;
}

@keyframes album-pack-pulse {
    0% {
        box-shadow:
            0 8px 18px rgba(210, 103, 43, 0.35),
            0 0 0 rgba(255, 191, 115, 0);
        transform: translateY(0) scale(1);
    }
    8% {
        box-shadow:
            0 16px 34px rgba(210, 103, 43, 0.55),
            0 0 28px rgba(255, 191, 115, 0.65);
        transform: translateY(-3px) scale(1.03);
    }
    16% {
        box-shadow:
            0 10px 22px rgba(210, 103, 43, 0.4),
            0 0 18px rgba(255, 191, 115, 0.35);
        transform: translateY(-1px) scale(1.01);
    }
    22% {
        box-shadow:
            0 8px 18px rgba(210, 103, 43, 0.35),
            0 0 0 rgba(255, 191, 115, 0);
        transform: translateY(0) scale(1);
    }
    100% {
        box-shadow:
            0 8px 18px rgba(210, 103, 43, 0.35),
            0 0 0 rgba(255, 191, 115, 0);
        transform: translateY(0) scale(1);
    }
}

@keyframes album-pack-flash {
    0%,
    65% {
        opacity: 0;
        transform: translateX(-180%) rotate(10deg);
    }
    72% {
        opacity: 1;
        transform: translateX(140%) rotate(10deg);
    }
    78% {
        opacity: 0;
        transform: translateX(220%) rotate(10deg);
    }
    100% {
        opacity: 0;
        transform: translateX(220%) rotate(10deg);
    }
}


/* =========================================================
   Mobile – masquer le bouton "Voir" sur la cover
========================================================= */

@media (max-width: 600px) {
    .cover-scroll-btn {
        display: none;
    }
}

@media (max-width: 600px) {
    .album-cover-overlay {
        display: none;
    }
}

@media (max-width: 600px) {
    .album-cover .cover-promo {
        display: none;
    }

    .album-cover .cover-promo {
        padding: 0.75rem;
        gap: 0.5rem;
    }

    .cover-promo-collapse {
        width: min(92vw, 420px);
        aspect-ratio: auto;
        max-height: 70vh;
    }

    .cover-promo-list-items {
        grid-template-columns: 1fr;
    }
}


/* =========================================================
   Nom de fichier sous vignette
========================================================= */

.photo-filename {
    margin-top: 4px;
    font-size: 11px;
    line-height: 1.3;
    color: rgba(0, 0, 0, 0.55);
    text-align: center;

    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}


/* =========================================================
   Sous-vignette : actions + nom
========================================================= */
.page-galerie .photo-dossards{
    display:flex;
    flex-wrap:wrap;
    justify-content:center;
    gap:3px;
    margin-top:4px;
    max-width:100%;
}

.page-galerie .photo-dossard-chip{
    display:inline-flex;
    align-items:center;
    justify-content:center;
    padding:1px 5px;
    border-radius:999px;
    border:1px solid #dbe4ee;
    background:#f8fafc;
    color:#334155;
    font-size:9px;
    line-height:1.2;
    font-weight:600;
    letter-spacing:.01em;
    min-width: 22px;
    min-height: 18px;
}

.page-galerie .photo-dossard-link{
    text-decoration:none;
    cursor:pointer;
}

.page-galerie .photo-dossard-link:hover,
.page-galerie .photo-dossard-link:focus-visible{
    background:#eef2f7;
    border-color:#cbd5e1;
    color:#0f172a;
}

.page-galerie .photo-dossard-link.is-active{
    background: #e0f2fe;
    border-color: #38bdf8;
    color: #0c4a6e;
    box-shadow: 0 0 0 1px rgba(56, 189, 248, 0.18);
}

.page-galerie .photo-dossard-link.is-active:hover,
.page-galerie .photo-dossard-link.is-active:focus-visible{
    background: #bae6fd;
    border-color: #0ea5e9;
    color: #082f49;
}

.page-galerie .photo-dossard-clear{
    display:inline-flex;
    align-items:center;
    justify-content:center;
    width:14px;
    height:14px;
    border-radius:999px;
    background:#dc2626;
    color:#fff;
    font-size:10px;
    line-height:1;
    font-weight:700;
    text-decoration:none;
    border:1px solid #b91c1c;
}

@media (max-width: 768px) {
    .page-galerie .icon-btn {
        min-width: 44px;
        min-height: 44px;
        padding: 8px;
    }

    .page-galerie .photo-dossard-chip {
        min-width: 44px;
        min-height: 44px;
        font-size: 12px;
        padding: 8px 10px;
    }

    .page-galerie .photo-dossard-clear {
        min-width: 44px;
        min-height: 44px;
        font-size: 16px;
    }
}

.page-galerie .photo-dossard-clear:hover,
.page-galerie .photo-dossard-clear:focus-visible{
    background:#b91c1c;
    border-color:#991b1b;
    color:#fff;
}

.page-galerie .photo-meta{
    display:flex;
    align-items:center;
    justify-content:center;
    gap:8px;
    margin-top:4px;
    min-width:0;
}

.page-galerie .photo-actions{
    display:inline-flex;
    align-items:center;
    gap:6px;
    flex:0 0 auto;
}

/* le texte doit être inline + tronqué si trop long */
.page-galerie .photo-filename-inline{
    display:inline-block;
    min-width:0;
    max-width:140px; /* ajuste si besoin */
    white-space:nowrap;
    overflow:hidden;
    text-overflow:ellipsis;
    font-size:11px;
    line-height:1.2;
    color:rgba(0,0,0,.55);
}

/* évite les décalages verticaux des SVG */
.page-galerie .photo-meta .icon{
    display:block;
}


/* =========================================================
   Galerie – actions visibles uniquement au survol
========================================================= */

/* état caché par défaut */
.page-galerie .photo-meta {
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
    transition: opacity 0.2s ease;
}

/* affichage au survol de la photo */
.page-galerie .photo-card:hover .photo-meta {
    opacity: 1;
    visibility: visible;
    pointer-events: auto;
}


@media (max-width: 600px) {
    .page-galerie .photo-meta {
        opacity: 1;
        visibility: visible;
        pointer-events: auto;
    }

    .page-galerie .photo-card[data-cart="1"][data-favorite="0"] .icon-heart,
    .page-galerie .photo-card[data-favorite="1"] .icon-cart {
        display: inline-block;
    }
}

/* =========================================================
   Galerie – photo présente dans le panier
========================================================= */

.page-galerie .photo-card[data-cart="1"] img {
    outline: 3px solid #5a5a5a; /* vert */
    outline-offset: -3px;      /* colle au bord de l’image */
    border-radius: 2px;        /* optionnel */
}

/* Si la photo est dans le panier : on affiche la meta */
.page-galerie .photo-card[data-cart="1"] .photo-meta {
    opacity: 1;
    visibility: visible;
    pointer-events: auto;
}

/* On garde la légende discrète hors hover */
.page-galerie .photo-card[data-cart="1"] .photo-filename-inline {
    opacity: 0;
}

.page-galerie .photo-card[data-cart="1"]:hover .photo-filename-inline {
    opacity: 1;
}

/* Si panier seul : on masque le coeur hors hover */
.page-galerie .photo-card[data-cart="1"][data-favorite="0"] .icon-heart {
    display: none;
}

.page-galerie .photo-card[data-cart="1"][data-favorite="0"]:hover .icon-heart {
    display: inline-block;
}

/* =========================================================
   Galerie – favori visible seul (sans panier)
========================================================= */

/* Si la photo est favorite : on affiche la meta */
.page-galerie .photo-card[data-favorite="1"] .photo-meta {
    opacity: 1;
    visibility: visible;
    pointer-events: auto;
}

/* MAIS on cache le panier hors hover */
.page-galerie .photo-card[data-favorite="1"] .icon-cart {
    display: none;
}

/* Le nom reste caché hors hover */
.page-galerie .photo-card[data-favorite="1"] .photo-filename-inline {
    opacity: 0;
}

/* Au survol : tout redevient visible */
.page-galerie .photo-card[data-favorite="1"]:hover .icon-cart,
.page-galerie .photo-card[data-favorite="1"]:hover .photo-filename-inline {
    display: inline-block;
    opacity: 1;
}

/* Si la photo est favorite ET dans le panier, on affiche aussi l'icône panier */
.page-galerie .photo-card[data-favorite="1"][data-cart="1"] .icon-cart {
    display: inline-block;
}


.gift-promo-box {
    border: 0;
    border-radius: 12px;
    padding: 0;
    margin: 12px 0;
    background: transparent;
}

.gift-promo-box.is-open {
    border: 1px solid #e2e8f0;
    padding: 12px;
    background: #f7f1f1;
}

.gift-promo-fields {
    display: grid;
    grid-template-columns: minmax(240px, 320px) minmax(180px, 240px);
    gap: 14px;
    margin: 10px 0;
    justify-content: start;
}

.gift-promo-fields label {
    display: grid;
    gap: 6px;
    font-size: 14px;
}

.gift-promo-field--code {
    margin-left: 15px;
}

.gift-promo-fields input {
    border: 1px solid #cbd5e1;
    border-radius: 8px;
    padding: 8px 10px;
    width: 100%;
}

.gift-promo-box.is-manual-pack-mode .gift-promo-fields {
    display: none;
}

.gift-mode-toggle {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    margin-top: 6px;
}

.icon-btn-gift {
    border: 1px solid #cbd5e1;
    background: #fff;
    color: #b45309;
    border-radius: 8px;
    width: 32px;
    height: 32px;
    align-items: center;
    justify-content: center;
    cursor: pointer;
}

.icon-btn-gift.is-selected {
    background: #fef3c7;
    border-color: #f59e0b;
}

.btn-search--gift {
    margin-top: 8px;
}

@media (max-width: 840px) {
    .gift-promo-fields {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 600px) {
    .btn-filter-label-desktop,
    #favorite-count {
        display: none !important;
    }

    .btn-filter-label-mobile,
    .favorite-count-mobile {
        display: inline-flex;
        align-items: center;
    }

    .favorite-count-mobile {
        font-weight: 700;
        margin-left: 2px;
    }

    .page.page-galerie {
        padding-left: 12px;
        padding-right: 12px;
    }

    .page-galerie .gallery-grid {
        padding-left: 0;
        padding-right: 0;
    }

    .gift-promo-box,
    .gift-promo-box.is-open {
        width: 100%;
        max-width: 320px;
        min-width: 0;
        margin-left: 0;
        margin-right: 0;
        box-sizing: border-box;
    }

    .gift-collapse-trigger {
        width: 100%;
        justify-content: center;
        text-align: center;
    }

    .gift-promo-box {
        margin: 12px 0 16px;
        padding: 0;
        max-width: 100%;
        box-sizing: border-box;
        border: 0;
        background: transparent;
    }

    .gift-promo-box.is-open {
        padding: 0;
        border: 0;
        background: transparent;
    }

    .gift-collapse-content {
        width: 100%;
        max-width: 100%;
        margin-top: 10px;
        padding: 12px;
        border-radius: 12px;
        border: 1px solid #e2e8f0;
        background: #f7f1f1;
        box-shadow: 0 8px 18px rgba(15, 23, 42, 0.08);
        overflow-x: hidden;
    }

    .gift-promo-fields {
        grid-template-columns: 1fr;
        gap: 10px;
        margin: 8px 0 10px;
        min-width: 0;
    }

    .gift-promo-field--code {
        margin-left: 0;
    }

    .gift-promo-fields label {
        font-size: 13px;
        min-width: 0;
    }

    .gift-promo-fields input {
        width: 100%;
        max-width: 100%;
        min-width: 0;
        box-sizing: border-box;
        padding: 10px 12px;
        font-size: 15px;
    }

    .gift-promo-validation {
        font-size: 13px;
        line-height: 1.4;
    }

    .gift-promo-summary {
        display: grid;
        grid-template-columns: 1fr;
        gap: 6px;
        align-items: start;
    }

    .gift-promo-actions {
        display: grid;
        grid-template-columns: 1fr;
        gap: 10px;
        width: 100%;
        margin-top: 12px;
    }

    .gift-selection-filter,
    .btn-search--gift {
        width: 100%;
        justify-content: center;
        text-align: center;
    }

    .gift-reset-btn {
        justify-self: start;
    }

    .gift-selection-hint {
        width: 100%;
        max-width: calc(100vw - 24px);
        min-height: 44px;
        padding: 8px 12px;
        font-size: 0.92rem;
    }

    .gift-selection-hint.is-stuck {
        top: 74px;
    }
}

.gift-collapse-trigger {
    width: auto;
    height: 40px;
    border: 1px solid transparent;
    border-radius: 999px;
    background: linear-gradient(135deg, #a9051f, #d11f3c 60%, #f0be55);
    color: #fff;
    font-weight: 700;
    padding: 0 16px;
    display: inline-flex;
    align-items: center;
    gap: 10px;
    cursor: pointer;
    line-height: 1;
    box-sizing: border-box;
    transition: filter 0.2s ease, background 0.2s ease;
}

.gallery-actions .gift-collapse-trigger {
    white-space: nowrap;
}

.gift-collapse-trigger:hover,
.gift-collapse-trigger:focus-visible {
    background: linear-gradient(135deg, #a9051f, #d11f3c 60%, #f0be55);
    box-shadow: 0 8px 20px rgba(169, 5, 31, 0.25);
    outline: none;
}

.gift-collapse-icon {
    width: 30px;
    height: 30px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 999px;
    background: rgba(255, 215, 0, 0.28);
}

.gift-collapse-content {
    margin-top: 0;
    max-height: 0;
    overflow: hidden;
    opacity: 0;
    padding-top: 0;
    pointer-events: none;
    transition: max-height .35s ease, opacity .25s ease, padding .25s ease;
}

.gift-collapse-content.is-open {
    opacity: 1;
    padding-top: 12px;
    pointer-events: auto;
    max-height: none !important;
    overflow: visible;
}

.gift-promo-caption {
    margin: 0 0 8px;
}

.gift-promo-validation {
    margin-top: 8px;
    font-size: 14px;
}

.gift-promo-summary {
    margin-top: 8px;
    display: flex;
    align-items: center;
    gap: 8px;
    flex-wrap: wrap;
}

.gift-floating-summary {
    position: fixed;
    right: 18px;
    bottom: 18px;
    z-index: 60;
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 10px 14px;
    border-radius: 999px;
    background: #b91c1c;
    color: #ffffff;
    border: 1px solid #fed7aa;
    box-shadow:
        0 10px 24px rgba(124, 45, 18, 0.18),
        0 0 0 1px rgba(255, 255, 255, 0.6) inset;
    font-size: 0.95rem;
    font-weight: 600;
    pointer-events: auto;
}

.gift-floating-summary #gift-floating-text,
.gift-floating-summary #gift-floating-count {
    display: inline-block;
}

.gift-floating-summary #gift-floating-count.is-animating {
    animation: giftCountPop 0.6s ease-out;
}

@keyframes giftCountPulse {
    0% {
        transform: scale(1);
    }
    35% {
        transform: scale(1.08);
    }
    100% {
        transform: scale(1);
    }
}

@keyframes giftCountFlash {
    0% {
        color: inherit;
        text-shadow: none;
        opacity: 1;
    }
    30% {
        color: #ea580c;
        text-shadow: 0 0 12px rgba(234, 88, 12, 0.45);
        opacity: 1;
    }
    100% {
        color: inherit;
        text-shadow: none;
        opacity: 0.85;
    }
}

@keyframes giftCountPop {
    0% {
        transform: scale(1);
        opacity: 1;
        text-shadow: none;
        color: inherit;
    }
    35% {
        transform: scale(1.8);
        opacity: 1;
        color: #ea580c;
        text-shadow: 0 0 14px rgba(234, 88, 12, 0.6);
    }
    100% {
        transform: scale(3.2);
        opacity: 0;
        color: #ea580c;
        text-shadow: 0 0 24px rgba(234, 88, 12, 0.7);
    }
}

.gift-floating-summary[hidden] {
    display: none !important;
}

.gift-floating-submit {
    border: 0;
    background: #7c2d12;
    color: #fff7ed;
    padding: 8px 14px;
    border-radius: 999px;
    font-size: 0.95rem;
    font-weight: 700;
    cursor: pointer;
    box-shadow: 0 8px 18px rgba(124, 45, 18, 0.35);
    transition: transform 0.15s ease, box-shadow 0.15s ease, background 0.15s ease;
}

.gift-floating-submit:hover,
.gift-floating-submit:focus-visible {
    background: #9a3412;
    box-shadow: 0 10px 22px rgba(124, 45, 18, 0.45);
    transform: translateY(-1px);
}

.gift-promo-actions {
    margin-top: 10px;
    display: inline-flex;
    align-items: center;
    gap: 10px;
    flex-wrap: wrap;
}

.gift-selection-filter {
    border: 1px solid #fdba74;
    background: #ffedd5;
    color: #7c2d12;
    padding: 8px 12px;
    border-radius: 999px;
    font-size: 0.95rem;
    font-weight: 700;
    cursor: pointer;
    transition: transform 0.15s ease, box-shadow 0.15s ease, background 0.15s ease;
}

.gift-selection-filter.is-active {
    background: #7c2d12;
    color: #fff7ed;
    border-color: #7c2d12;
}

.gift-selection-filter:hover,
.gift-selection-filter:focus-visible {
    background: #fed7aa;
    box-shadow: 0 8px 18px rgba(124, 45, 18, 0.2);
    transform: translateY(-1px);
}

.gift-selection-filter:disabled {
    opacity: 0.6;
    cursor: not-allowed;
    box-shadow: none;
    transform: none;
}


@media (max-width: 600px) {
    .gift-floating-summary {
        right: 12px;
        left: 12px;
        bottom: 12px;
        justify-content: center;
        text-align: center;
    }
}

.gift-reset-btn {
    border: 0;
    background: transparent;
    color: #0f172a;
    text-decoration: underline;
    cursor: pointer;
    font-size: 0.9rem;
    padding: 0;
}

.gift-select-all-btn {
    padding: 0.45em 0.9em;
    border-radius: 6px;
    border: 1px solid var(--accent-heart);
    background: var(--accent-heart);
    color: #fff;
    cursor: pointer;
    font-size: 0.9rem;
    white-space: nowrap;
}

.gift-select-all-btn:hover,
.gift-select-all-btn:focus-visible {
    background: #be123c;
    border-color: #be123c;
    color: #fff;
}

.gift-select-all-btn:disabled,
.gift-select-all-btn.is-disabled {
    background: #f1f5f9;
    border-color: #e2e8f0;
    color: #94a3b8;
    box-shadow: none;
    cursor: not-allowed;
}

.gift-reset-btn:hover,
.gift-reset-btn:focus-visible {
    color: #1e293b;
}

.gift-select-all-btn--favorite {
    box-shadow: 0 6px 14px rgba(225, 29, 72, 0.25);
}

.gift-select-all-text-mobile {
    display: none;
}

@media (max-width: 600px) {
    .gift-select-all-text-desktop {
        display: none;
    }

    .gift-select-all-text-mobile {
        display: inline;
    }
}

.gift-promo-validation--info { color: #334155; }
.gift-promo-validation--success { color: #166534; }
.gift-promo-validation--error { color: #b91c1c; }

.gift-download-notice {
    margin-top: 10px;
    padding: 12px 14px;
    border: 1px solid #f3d3d8;
    border-left: 4px solid #c91d38;
    border-radius: 10px;
    background: linear-gradient(135deg, #fff7f8, #fff3d9);
}

.gift-download-notice__title {
    margin: 0 0 8px;
    font-weight: 700;
    color: #7f1d1d;
}

.gift-download-notice__link {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    border-radius: 999px;
    background: #b91c1c;
    color: #ffffff;
    padding: 8px 14px;
    font-weight: 600;
    text-decoration: none;
}

.gift-download-notice__link:hover {
    background: #991b1b;
}

.gift-download-notice__link.is-used,
.gift-download-notice__link.is-used:hover {
    background: #9ca3af;
    cursor: not-allowed;
    pointer-events: none;
}

.gift-download-notice__hint {
    margin: 8px 0 0;
    font-size: 13px;
    color: #7f1d1d;
}

.gift-download-notice--success {
    border-color: #86efac;
    border-left-color: #15803d;
    background: linear-gradient(135deg, #f0fdf4, #dcfce7);
}

.gift-download-notice--success .gift-download-notice__title,
.gift-download-notice--success .gift-download-notice__hint {
    color: #14532d;
}

.gift-download-modal {
    position: fixed;
    inset: 0;
    z-index: 1400;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.18s ease;
}

.gift-download-modal.is-open {
    opacity: 1;
    pointer-events: auto;
}

.gift-download-modal__overlay {
    position: absolute;
    inset: 0;
    background: rgba(15, 23, 42, 0.48);
    backdrop-filter: blur(2px);
}

.gift-download-modal__panel {
    position: relative;
    width: min(92vw, 520px);
    border-radius: 16px;
    border: 1px solid rgba(148, 163, 184, 0.35);
    background: linear-gradient(180deg, #ffffff, #f8fafc);
    box-shadow: 0 22px 46px rgba(15, 23, 42, 0.3);
    padding: 22px 20px 18px;
    text-align: center;
}

.gift-download-modal__close {
    position: absolute;
    top: 12px;
    right: 12px;
    width: 36px;
    height: 36px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 10px;
    border: 1px solid rgba(148, 163, 184, 0.55);
    background: linear-gradient(180deg, #ffffff 0%, #f8fafc 100%);
    color: #0f172a;
    cursor: pointer;
    font-size: 20px;
    font-weight: 500;
    line-height: 1;
    box-shadow: 0 4px 10px rgba(15, 23, 42, 0.08);
    transition: background 0.18s ease, border-color 0.18s ease, box-shadow 0.18s ease, transform 0.18s ease;
}

.gift-download-modal__close:hover {
    background: linear-gradient(180deg, #f8fafc 0%, #eef2f7 100%);
    border-color: rgba(100, 116, 139, 0.7);
    box-shadow: 0 7px 14px rgba(15, 23, 42, 0.12);
    transform: translateY(-1px);
}

.gift-download-modal__close:focus-visible {
    outline: none;
    border-color: #0ea5b7;
    box-shadow: 0 0 0 3px rgba(14, 165, 183, 0.24), 0 8px 16px rgba(15, 23, 42, 0.14);
}

.gift-download-modal__close:active {
    transform: translateY(0);
    box-shadow: 0 3px 8px rgba(15, 23, 42, 0.12);
}

.gift-download-modal__eyebrow {
    margin: 0 0 6px;
    font-size: 0.78rem;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    font-weight: 700;
    color: #be123c;
}

.gift-download-modal__title {
    margin: 0 0 8px;
    font-size: 1.35rem;
    line-height: 1.2;
    color: #0f172a;
}

.gift-download-modal__text {
    margin: 0 0 14px;
    font-size: 0.95rem;
    color: #334155;
}

.gift-download-modal__link {
    display: inline-block;
    min-width: 220px;
    padding: 11px 16px;
    border-radius: 10px;
    text-decoration: none;
    font-weight: 700;
    font-size: 0.96rem;
    color: #fff;
    background: linear-gradient(135deg, #0f766e, #0ea5e9);
    box-shadow: 0 10px 20px rgba(14, 116, 144, 0.25);
}

.gift-download-modal__link:hover {
    filter: brightness(1.03);
}

.gift-download-modal__hint {
    margin: 12px 0 0;
    font-size: 0.82rem;
    color: #64748b;
}


.gift-photo-btn {
    position: absolute;
    right: 8px;
    bottom: 8px;
    z-index: 3;
    border: 0;
    background: var(--accent-heart);
    color: #fff;
    border-radius: 999px;
    width: 24px;
    height: 24px;
    padding: 0;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 1px 6px rgba(225, 29, 72, 0.45);
}

.gift-photo-btn svg {
    width: 14px;
    height: 14px;}

.gift-photo-btn[hidden] {
    display: none !important;
}

.gift-photo-btn.is-selected {
    background: #be123c;
    color: #ffffff;
}

.gift-photo-btn.is-disabled,
.gift-photo-btn:disabled {
    opacity: 0.45;
    cursor: not-allowed;
}

.photo-card--gift-selected img {
    outline: 3px solid #dc2626;
    outline-offset: -3px;
}

@media (max-width: 768px) {
    .album-cover .cover-promo {
        display: none;
    }

    .album-cover .cover-promo {
        padding: 1rem;
        gap: 0.5rem;
    }

    .btn-action-pill {
        padding: 0.55rem 0.85rem;
        font-size: 0.9rem;
    }

    .cover-promo-collapse {
        width: min(80vw, 520px);
        aspect-ratio: 5 / 4;
        max-height: 70vh;
    }
}

.gallery-back-to-top {
    position: fixed;
    right: 18px;
    bottom: 65px;
    width: 44px;
    height: 44px;
    border: 0;
    border-radius: 999px;
    background: rgba(15, 23, 42, 0.92);
    color: #ffffff;
    font-size: 22px;
    line-height: 1;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    box-shadow: 0 10px 24px rgba(15, 23, 42, 0.3);
    opacity: 0;
    pointer-events: none;
    transform: translateY(8px);
    transition: opacity .18s ease, transform .18s ease, background .18s ease;
    z-index: 1200;
}

.gallery-back-to-top:hover {
    background: #1e293b;
}

.gallery-back-to-top.is-visible {
    opacity: 1;
    pointer-events: auto;
    transform: translateY(0);
}
