/* =======================================================
   ZeBox Space - Photos / Galeries
   Design moderne et élégant
   ======================================================= */

/* Variables CSS - Utilise les variables globales Elementor */
:root {
    --zebox-photos-primary: var(--e-global-color-primary, #DBAB6D);
    --zebox-photos-secondary: var(--e-global-color-secondary, #7E7A59);
    --zebox-photos-text: var(--e-global-color-text, #333333);
    --zebox-photos-text-light: var(--e-global-color-07aa9ec, #6B7280);
    --zebox-photos-text-lighter: #9b9b9b; /* À remplacer si besoin */
    --zebox-photos-white: var(--e-global-color-aa1090e, #FFFFFF);
    --zebox-photos-background: var(--e-global-color-de22e00, #FAECDF);
    --zebox-photos-border: var(--e-global-color-c807bea, #E5E7EB);
}

/* Layout principal en 2 colonnes */
.zebox-space-photos {
    padding: 2.5rem 0;
}

.zebox-space-photos_wrapper {
    display: flex;
    gap: 2rem;
}

/* ===== SECTION QR CODE (Gauche) ===== */
.zebox-space-photos__qr-section {
    position: sticky;
    top: 6.25rem;
    height: fit-content;
    width: max(350px, 30%);
}

.zebox-space-photos__qr-card {
    background: var(--zebox-photos-white);
    border-radius: 1.5rem;
    padding: 2.5rem 2rem;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.04);
    text-align: center;
}

.zebox-space-photos__qr-title {
    font-size: 1.75rem;
    font-weight: 600;
    color: var(--zebox-photos-text);
    margin: 0 0 1rem;
    line-height: 1.3;
}

.zebox-space-photos__qr-description {
    font-size: 0.9375rem;
    line-height: 1.6;
    color: var(--zebox-photos-text-light);
    margin: 0 0 2rem;
}

.zebox-space-photos__qr-scanner {
    background: linear-gradient(135deg, #fffcf9 0%, #fffcf9 100%);
    border: 2px dashed var(--zebox-photos-primary);
    border-radius: 1rem;
    padding: 3rem 1.5rem;
    margin: 0 0 1.5rem;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 9999;
}


.zebox-space-photos__qr-icon {
    width: 7.5rem;
    height: 7.5rem;
    color: var(--zebox-photos-primary);
    display: block;
}

.zebox-space-photos__qr-label {
    font-size: 0.875rem;
    font-weight: 500;
    color: var(--zebox-photos-text-light);
    margin: 0;
    line-height: 1.5;
}

.zebox-space-photos__qr-label span {
    font-weight: 400;
    color: var(--zebox-photos-text-lighter);
}

.zebox-space-photos__qr-button {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    background: var(--zebox-photos-primary);
    color: var(--zebox-photos-white);
    border: none;
    border-radius: 0.75rem;
    padding: 1rem 1rem !important;
    font-size: 0.9375rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    width: 100%;
    justify-content: center;
}

.zebox-space-photos__qr-button:hover {
    background: var(--zebox-photos-secondary);
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(212, 165, 116, 0.3);
}

.zebox-space-photos__qr-button:active {
    transform: translateY(0);
}

/* ===== SECTION GALERIES (Droite) ===== */
.zebox-space-photos__galleries {
    min-height: 37.5rem;
    flex: 1;
}

.zebox-space-photos__galleries-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 2rem;
}

.zebox-space-photos__galleries-title {
    font-size: 2.25rem;
    font-weight: 700;
    color: var(--zebox-photos-text);
    margin: 0;
}



/* Période temporelle */
.zebox-space-photos__period {
    margin-bottom: 2.5rem;
}

.zebox-space-photos__period-title {
    font-size: 1rem;
    font-weight: 600;
    color: var(--zebox-photos-text-light);
    margin: 0 0 1.25rem;
    padding-bottom: 0.75rem;
    border-bottom: 1px solid var(--zebox-photos-border);
}

/* Grille de galeries */
.zebox-space-photos__galleries-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(23.75rem, 1fr));
    gap: 1.5rem;
}

.zebox-space-photos__load-more {
    width: 100%;
    min-height: 2rem;
    display: flex;
    align-items: center;
    justify-content: center;
}

/* Carte de galerie */
.zebox-space-gallery-card {
    position: relative;
    background: var(--zebox-photos-white);
    border-radius: 1.25rem;
    overflow: visible;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.06);
    transition: all 0.3s ease;
    cursor: pointer;
    text-decoration: none;
    color: inherit;
    display: block;
}

.zebox-space-gallery-card:hover {

    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.12);
}

.zebox-space-gallery-card__image {
    position: relative;
    width: 100%;
    height: 15rem;
    overflow: hidden;
    border-radius: 1.25rem 1.25rem 0 0;
    background: linear-gradient(135deg, var(--zebox-photos-border) 0%, var(--zebox-photos-border) 100%);
}

.zebox-space-gallery-card__image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.3s ease;
}

.zebox-space-gallery-card:hover .zebox-space-gallery-card__image img {
    transform: scale(1.05);
}

.zebox-space-gallery-card__photo-count {
    position: absolute;
    bottom: 0.75rem;
    right: 0.75rem;
    background: rgba(0, 0, 0, 0.7);
    backdrop-filter: blur(8px);
    color: var(--zebox-photos-white);
    padding: 0.375rem 0.75rem;
    border-radius: 0.5rem;
    font-size: 0.8125rem;
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 0.375rem;
}

.zebox-space-gallery-card__photo-count::before {
    content: '📷';
    font-size: 0.875rem;
}

.zebox-space-gallery-card__content {
    position: relative;
    padding: 1.25rem;
    border-radius: 0 0 1.25rem 1.25rem;
    overflow: visible;
}

.zebox-space-gallery-card__content-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 0.75rem;
}

.zebox-space-gallery-card__date {
    font-size: 0.8125rem;
    color: var(--zebox-photos-text-lighter);
    margin: 0 0 0.5rem;
    font-weight: 500;
}

.zebox-space-gallery-card__title {
    font-size: 1.25rem;
    font-weight: 700;
    color: var(--zebox-photos-text);
    margin: 0 0 0.5rem;
    line-height: 1.3;
}

.zebox-space-gallery-card__location {
    font-size: 0.875rem;
    color: var(--zebox-photos-primary);
    margin: 0;
    font-weight: 500;
}

/* Icône trois points */
.zebox-space-gallery-card__menu-trigger {
    width: 2rem;
    height: 2rem;
    display: flex;
    align-items: center;
    justify-content: center;
    border: none;
    border-radius: 0.375rem;
    cursor: pointer;
    flex-shrink: 0;
    transition: all 0.2s ease;
    color: var(--zebox-photos-text);
    padding: 0;
    margin: 0;
    box-sizing: border-box;
}

.zebox-space-gallery-card__menu-trigger:hover {
    background: var(--zebox-photos-border);
    transform: scale(1.05);
}

.zebox-space-gallery-card__menu-trigger:focus {
    outline: 2px solid var(--zebox-photos-primary);
    outline-offset: 2px;
}

/* Menu déroulant */
.zebox-space-gallery-card__dropdown-menu {
    position: absolute;
    top: calc(100% - 2rem);
    left: calc(100% - 3rem);
    margin-top: 0.5rem;
    min-width: 10rem;
    background: var(--zebox-photos-white);
    border-radius: 0.5rem;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
    padding: 0.25rem;
    display: none;
    z-index: 50;
    overflow: hidden;
}

.zebox-space-gallery-card__dropdown-menu.is-open {
    display: block;
}

/* Items du menu */
.zebox-space-gallery-card__dropdown-item {
    width: 100%;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.625rem 0.875rem;
    background: none;
    border: none;
    text-align: left;
    cursor: pointer;
    color: var(--zebox-photos-text);
    font-size: 0.875rem;
    font-weight: 500;
    transition: background-color 0.2s ease;
    margin: 0;
    box-sizing: border-box;
}

.zebox-space-gallery-card__dropdown-item:hover {
    background: var(--zebox-photos-background);
}

.zebox-space-gallery-card__dropdown-item:focus {
    outline: 2px solid var(--zebox-photos-primary);
    outline-offset: -2px;
}

.zebox-space-gallery-card__dropdown-item svg {
    flex-shrink: 0;
}

/* Loading state */
.zebox-space-photos__loading {
    text-align: center;
    padding: 3.75rem 1.25rem;
    color: var(--zebox-photos-text-lighter);
}

.zebox-space-photos__loading .zebox-space-photos__loader {
    margin: 0 auto 1rem;
}

.zebox-space-photos__loader {
    width: 2.5rem;
    height: 2.5rem;
    border-radius: 50%;
    border: 3px solid rgba(0, 0, 0, 0.12);
    border-top-color: var(--zebox-photos-primary);
    animation: zebox-photos-spin 0.8s linear infinite;
}

@keyframes zebox-photos-spin {
    to {
        transform: rotate(360deg);
    }
}

/* Empty state */
.zebox-space-photos__empty {
    text-align: center;
    padding: 5rem 1.25rem;
}

.zebox-space-photos__empty-icon {
    font-size: 4rem;
    margin-bottom: 1.25rem;
    opacity: 0.3;
}

.zebox-space-photos__empty-title {
    font-size: 1.25rem;
    font-weight: 600;
    color: var(--zebox-photos-text-light);
    margin: 0 0 0.5rem;
}

.zebox-space-photos__empty-text {
    font-size: 0.9375rem;
    color: var(--zebox-photos-text-lighter);
    margin: 0;
}

/* ===== RESPONSIVE ===== */
/* Tablette */
@media (max-width: 1024px) {
    .zebox-space-photos_wrapper {
        gap: 1.5rem;
    }
    
    .zebox-space-photos__galleries-grid {
        grid-template-columns: repeat(auto-fill, minmax(18.75rem, 1fr));
        gap: 1.25rem;
    }
    
    .zebox-space-photos__qr-section {
        min-width: max(18rem, 30%);
    }
}

/* Mobile */
@media (max-width: 768px) {
    .zebox-space-photos {
        padding: 1.5rem 0;
    }
    
    .zebox-space-photos_wrapper {
        flex-direction: column;
        gap: 2rem;
    }
    
    .zebox-space-photos__qr-section {
        position: static;
        min-width: 100%;
    }
    
    .zebox-space-photos__qr-card {
        padding: 2rem 1.5rem;
        border-radius: 1.25rem;
    }
    
    .zebox-space-photos__qr-title {
        font-size: 1.5rem;
    }
    
    .zebox-space-photos__qr-description {
        font-size: 0.875rem;
        margin-bottom: 1.5rem;
    }
    
    .zebox-space-photos__qr-scanner {
        padding: 2.5rem 1.5rem;
        border-radius: 0.875rem;
    }
    
    .zebox-space-photos__galleries-title {
        font-size: 1.75rem;
    }
    
    .zebox-space-photos__galleries-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 1rem;
        margin-bottom: 1.5rem;
    }
    
    .zebox-space-photos__period {
        margin-bottom: 2rem;
    }
    
    .zebox-space-photos__galleries-grid {
        grid-template-columns: 1fr;
        gap: 1.25rem;
    }
    
    .zebox-space-gallery-card__image {
        height: 12.5rem;
    }
    
    .zebox-space-gallery-card__dropdown-menu {
        left: auto;
        right: 0;
        max-width: calc(100vw - 1rem);
    }
}

/* Petit mobile */
@media (max-width: 480px) {
    .zebox-space-photos {
        padding: 1rem 0;
    }
    
    .zebox-space-photos__qr-card {
        padding: 1.5rem 1rem;
        border-radius: 1rem;
    }
    
    .zebox-space-photos__qr-title {
        font-size: 1.25rem;
        margin-bottom: 0.75rem;
    }
    
    .zebox-space-photos__qr-description {
        font-size: 0.8125rem;
        margin-bottom: 1.25rem;
    }
    
    .zebox-space-photos__qr-scanner {
        padding: 2rem 1rem;
        border-radius: 0.75rem;
        margin-bottom: 1.25rem;
    }
    
    .zebox-space-photos__qr-icon {
        width: 6.25rem;
        height: 6.25rem;
    }
    
    .zebox-space-photos__galleries-title {
        font-size: 1.5rem;
    }
    
    .zebox-space-photos__galleries-grid {
        gap: 1rem;
    }
    
    .zebox-space-gallery-card__image {
        height: 10rem;
    }
    
    .zebox-space-gallery-card__content {
        padding: 1rem;
    }
    
    .zebox-space-gallery-card__title {
        font-size: 1.125rem;
    }
}

/* ===== SCANNER QR CODE (Overlay) ===== */
.zebox-space-qr-scanner {
    position: fixed;
    inset: 0;
    display: none;
    align-items: center;
    justify-content: center;
    padding: 1.5rem;
    background: rgba(0, 0, 0, 0.85);
    z-index: 9999 !important;
}

.zebox-space-qr-scanner.is-visible {
    display: flex;
}

.zebox-space-qr-scanner__content {
    position: relative;
    width: min(90vw, 31.25rem);
    background: rgba(0, 0, 0, 0.7);
    border-radius: 1rem;
    padding: 1rem;
    box-shadow: 0 12px 40px rgba(0, 0, 0, 0.35);
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.zebox-space-qr-scanner__container {
    width: 100%;
    border-radius: 0.75rem;
    overflow: hidden;
    background: #000;
}

.zebox-space-qr-scanner__container video {
    width: 100%;
    border-radius: 0.75rem;
}

.zebox-space-qr-scanner__message {
    color: #fff;
    font-size: 0.95rem;
    text-align: center;
    margin: 0;
}

.zebox-space-qr-scanner button.zebox-space-qr-scanner__close {
    position: absolute;
    top: 0.5rem;
    right: 0.5rem;
    border: none;
    background: rgba(0, 0, 0, 0.45);
    width: 2.25rem;
    height: 2.25rem;
    border-radius: 50%;
    color: #fff;
    font-size: 1.3rem;
    cursor: pointer;
    z-index: 10;
    transition: background 0.2s ease;
    padding: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    line-height: 1;
}

.zebox-space-qr-scanner button.zebox-space-qr-scanner__close:hover {
    background: rgba(0, 0, 0, 0.7);
}

.zebox-space-qr-scanner__backdrop {
    position: absolute;
    inset: 0;
}

/* ===== RESPONSIVE SCANNER QR CODE ===== */
/* Tablette */
@media (max-width: 992px) {
    .zebox-space-qr-scanner {
        padding: 1rem;
    }

    .zebox-space-qr-scanner__content {
        width: min(95vw, 28.125rem);
        padding: 0.875rem;
        gap: 0.625rem;
        border-radius: 0.875rem;
    }

    .zebox-space-qr-scanner__container {
        border-radius: 0.625rem;
    }

    .zebox-space-qr-scanner__container video {
        border-radius: 0.625rem;
    }

    .zebox-space-qr-scanner__message {
        font-size: 0.875rem;
    }

    .zebox-space-qr-scanner button.zebox-space-qr-scanner__close {
        width: 2rem;
        height: 2rem;
        font-size: 1.2rem;
        top: 0.375rem;
        right: 0.375rem;
    }
}

/* Mobile */
@media (max-width: 768px) {

    .zebox-space-photos_wrapper {
        flex-direction: column;
    }

    .zebox-space-qr-scanner {
        padding: 0.75rem;
        align-items: center;
        justify-content: center;
    }

    .zebox-space-qr-scanner.is-visible {
        display: flex;
    }

    .zebox-space-qr-scanner__content {
        width: 100%;
        max-width: 100%;
        padding: 0.75rem;
        gap: 0.5rem;
        border-radius: 0.75rem;
        margin: 0;
    }

    .zebox-space-qr-scanner__container {
        width: 100%;
        border-radius: 0.5rem;
        aspect-ratio: 1;
        max-height: calc(100vh - 7.5rem);
        display: flex;
        align-items: center;
        justify-content: center;
    }

    .zebox-space-qr-scanner__container video {
        width: 100%;
        height: 100%;
        object-fit: cover;
        border-radius: 0.5rem;
    }

    .zebox-space-qr-scanner__message {
        font-size: 0.8125rem;
        padding: 0 0.5rem;
    }

    .zebox-space-qr-scanner button.zebox-space-qr-scanner__close {
        width: 2.5rem;
        height: 2.5rem;
        font-size: 1.5rem;
        top: 0.5rem;
        right: 0.5rem;
        background: rgba(0, 0, 0, 0.6);
    }

    .zebox-space-qr-scanner button.zebox-space-qr-scanner__close:active {
        background: rgba(0, 0, 0, 0.8);
    }
}

/* Mobile petit */
@media (max-width: 480px) {
    .zebox-space-qr-scanner {
        padding: 0.5rem;
    }

    .zebox-space-qr-scanner__content {
        padding: 0.625rem;
        gap: 0.5rem;
        border-radius: 0.625rem;
    }

    .zebox-space-qr-scanner__container {
        border-radius: 0.375rem;
        max-height: calc(100vh - 6.25rem);
    }

    .zebox-space-qr-scanner__container video {
        border-radius: 0.375rem;
    }

    .zebox-space-qr-scanner__message {
        font-size: 0.75rem;
        padding: 0 0.25rem;
    }

    .zebox-space-qr-scanner button.zebox-space-qr-scanner__close {
        width: 2.25rem;
        height: 2.25rem;
        font-size: 1.4rem;
        top: 0.375rem;
        right: 0.375rem;
    }
}

/* Orientation paysage sur mobile */
@media (max-width: 768px) and (orientation: landscape) {
    .zebox-space-qr-scanner__content {
        width: min(90vw, 31.25rem);
        max-height: 90vh;
    }

    .zebox-space-qr-scanner__container {
        max-height: calc(100vh - 6.25rem);
        aspect-ratio: 4/3;
    }
}

/* ===== MODAL DE COLLECTION ===== */
.zebox-space-collection-modal {
    position: fixed;
    inset: 0;
    display: none;
    align-items: center;
    justify-content: center;
    padding: 1.5rem;
    background: rgba(0, 0, 0, 0.85);
    z-index: 9999;
    overflow-y: auto;
}

.zebox-space-collection-modal.is-visible {
    display: flex;
}

.zebox-space-collection-modal__backdrop {
    position: absolute;
    inset: 0;
    cursor: pointer;
}

.zebox-space-collection-modal__content {
    position: relative;
    width: min(95vw, 75rem);
    max-height: 90vh;
    background: var(--zebox-photos-white);
    border-radius: 1.25rem;
    padding: 2rem;
    box-shadow: 0 12px 40px rgba(0, 0, 0, 0.35);
    overflow-y: auto;
    margin: auto;
}

.zebox-space-collection-modal__close {
    position: absolute;
    top: 1rem;
    right: 1rem;
    color: var(--zebox-photos-text);
    font-size: 2rem;
    cursor: pointer;
    z-index: 10;
    transition: all 0.2s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    line-height: 1;
}

.zebox-space-collection-modal__close:hover {

}

.zebox-space-collection-modal__body {
    width: 100%;
}

.zebox-space-collection-modal__header {
    margin-bottom: 2rem;
    padding-bottom: 1.5rem;
    border-bottom: 1px solid var(--zebox-photos-border);
}

.zebox-space-collection-modal__title-wrapper {
    display: flex;
    flex-direction: row;
    align-items: center;
    gap: 1rem;
    width: 100%;
    justify-content: space-between;
    flex-wrap: wrap;
}

.zebox-space-collection-modal__actions {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    position: relative;
    gap: 0.625rem;
    margin-left: auto;
    margin-right: 2.5rem;
}

.zebox-space-collection-modal__download-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0.75rem;
    width: 2.5rem;
    height: 2.5rem;
    background: var(--zebox-photos-primary);
    color: var(--zebox-photos-white);
    border: none;
    border-radius: 0.5rem;
    cursor: pointer;
    transition: all 0.2s ease;
    
}

.zebox-space-collection-modal__download-btn svg {
    width: 1.25rem;
    height: 1.25rem;
    flex-shrink: 0;
}

.zebox-space-collection-modal__download-btn:hover:not(:disabled) {
    background: var(--zebox-photos-secondary);
    transform: translateY(-1px);
}

.zebox-space-collection-modal__download-btn:disabled,
.zebox-space-collection-modal__download-btn.is-loading {
    opacity: 0.6;
    cursor: not-allowed;
    pointer-events: none;
}

.zebox-space-collection-modal__download-btn.is-loading::after {
    content: '';
    position: absolute;
    width: 1rem;
    height: 1rem;
    border: 2px solid currentColor;
    border-top-color: transparent;
    border-radius: 50%;
    animation: spin 0.6s linear infinite;
}

.zebox-space-collection-modal__download-btn.is-loading svg {
    opacity: 0;
}

/*media query for mobile */
@media (max-width: 768px) {
    .zebox-space-collection-modal__download-btn {
        display: none !important;
    }
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

.zebox-space-collection-modal__title {
    font-size: 2rem;
    font-weight: 700;
    color: var(--zebox-photos-text);
    margin: 0 0 0.5rem;
    transition: all 0.2s ease;
}

.zebox-space-collection-modal__title--editable {
    cursor: pointer;
    position: relative;
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.25rem 0.5rem;
    border-radius: 6px;
    transition: all 0.2s ease;
}

.zebox-space-collection-modal__title--editable:hover {
    background-color: rgba(0, 0, 0, 0.03);
}

.zebox-space-collection-modal__title--editable:hover .zebox-space-collection-modal__edit-icon {
    opacity: 1;
}

.zebox-space-collection-modal__title--editing {
    opacity: 0;
    pointer-events: none;
}

.zebox-space-collection-modal__title--saving {
    opacity: 0.6;
}

.zebox-space-collection-modal__title-text {
    display: inline-block;
}

.zebox-space-collection-modal__edit-icon {
    font-size: 0.875rem;
    line-height: 1;
    opacity: 0;
    transition: opacity 0.2s ease;
    color: var(--zebox-photos-text-lighter, #666);
    flex-shrink: 0;
}

.zebox-space-collection-modal__title-input {
    font-size: 1.75rem;
    font-weight: 700;
    font-family: inherit;
    color: var(--zebox-photos-text);
    border: 2px solid var(--zebox-photos-primary, #0073aa);
    border-radius: 0.375rem;
    padding: 0.25rem 0.5rem;
    background: var(--zebox-photos-white, #fff);
    width: 100%;
    max-width: 37.5rem;
    text-align: center;
    outline: none;
    transition: all 0.2s ease;
    margin-bottom: 0.5rem;
}

.zebox-space-collection-modal__title-input:focus {
    border-color: var(--zebox-photos-primary-dark, #005a87);
    box-shadow: 0 0 0 3px rgba(0, 115, 170, 0.1);
}

.zebox-space-collection-modal__title-input:disabled {
    opacity: 0.6;
    cursor: wait;
}

.zebox-space-collection-modal__rename-message {
    margin-top: 0.5rem;
    padding: 0.5rem 1rem;
    border-radius: 0.375rem;
    font-size: 0.875rem;
    text-align: center;
    max-width: 37.5rem;
    margin-left: auto;
    margin-right: auto;
}

.zebox-space-collection-modal__rename-message--success {
    background: #d4edda;
    color: #155724;
    border: 1px solid #c3e6cb;
}

.zebox-space-collection-modal__rename-message--error {
    background: #f8d7da;
    color: #721c24;
    border: 1px solid #f5c6cb;
}

.zebox-space-collection-modal__date,
.zebox-space-collection-modal__location {
    font-size: 1.125rem;
    color: var(--zebox-photos-text-lighter);
    margin: 0.5rem 0;
}

.zebox-space-collection-modal__location {
    color: var(--zebox-photos-primary);
    font-weight: 500;
}

.zebox-space-collection-modal__description {
    font-size: 1rem;
    color: var(--zebox-photos-text-light);
    margin: 1rem 0 0;
    line-height: 1.6;
}

.zebox-space-collection-modal__grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(15.625rem, 1fr));
    gap: 1.5rem;
}

.zebox-space-collection-modal__photo {
    position: relative;
    width: 100%;
    aspect-ratio: 1;
    overflow: hidden;
    border-radius: 0.75rem;
    background: var(--zebox-photos-border);
    cursor: pointer;
    transition: transform 0.2s ease;
    display: block;
    text-decoration: none;
    color: inherit;
}

.zebox-space-collection-modal__photo:hover {
    transform: scale(1.02);
}

.zebox-space-collection-modal__photo img,
.zebox-space-collection-modal__image {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    cursor: pointer;
    transition: opacity 0.2s ease;
}

.zebox-space-collection-modal__image:hover {
    opacity: 0.9;
}

.zebox-space-collection-modal__loading,
.zebox-space-collection-modal__error {
    text-align: center;
    padding: 3.75rem 1.25rem;
    color: var(--zebox-photos-text-lighter);
}

.zebox-space-collection-modal__error {
    color: #d32f2f;
}

.zebox-space-collection-modal__empty {
    text-align: center;
    padding: 2.5rem 1.25rem;
    color: var(--zebox-photos-text-lighter);
    font-size: 1rem;
}

/* Style pour les cartes de collection (curseur pointer) */
.zebox-space-gallery-card--collection {
    cursor: pointer;
    transition: transform 0.2s ease;
}


/* ===== TOAST NOTIFICATIONS ===== */
.zebox-space-toast-container {
    position: fixed;
    top: 1.25rem;
    right: 1.25rem;
    z-index: 10000;
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
    max-width: 25rem;
}

.zebox-space-toast {
    display: flex;
    align-items: center;
    padding: 0.875rem 1.125rem;
    background: var(--zebox-photos-white);
    border-radius: 0.5rem;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
    opacity: 0;
    transform: translateX(100%);
    transition: all 0.3s ease;
    pointer-events: none;
}

.zebox-space-toast.is-visible {
    opacity: 1;
    transform: translateX(0);
    pointer-events: auto;
}

.zebox-space-toast--success {
    border-left: 4px solid #10b981;
}

.zebox-space-toast--error {
    border-left: 4px solid #ef4444;
}

.zebox-space-toast--info {
    border-left: 4px solid #3b82f6;
}

.zebox-space-toast__message {
    font-size: 0.875rem;
    color: var(--zebox-photos-text);
    line-height: 1.5;
}

@media (max-width: 768px) {
    .zebox-space-collection-modal__content {
        padding: 1.5rem;
        border-radius: 1rem;
    }

    .zebox-space-collection-modal__title {
        font-size: 1.5rem;
    }
    
    .zebox-space-collection-modal__title-input {
        font-size: 1.5rem;
    }

    .zebox-space-collection-modal__grid {
        grid-template-columns: repeat(auto-fill, minmax(9.375rem, 1fr));
        gap: 1rem;
    }

    .zebox-space-collection-modal__title-wrapper {
        flex-direction: column;
        align-items: flex-start;
    }

    .zebox-space-collection-modal__download-btn {
        margin-left: 0;
        width: 100%;
        justify-content: center;
    }

    .zebox-space-toast-container {
        right: 0.625rem;
        left: 0.625rem;
        max-width: none;
    }
}

@media (max-width: 480px) {
    .zebox-space-collection-modal__content {
        padding: 1rem;
        border-radius: 0.875rem;
    }
    
    .zebox-space-collection-modal__title {
        font-size: 1.25rem;
    }
    
    .zebox-space-collection-modal__title-input {
        font-size: 1.25rem;
    }
    
    .zebox-space-collection-modal__grid {
        gap: 0.75rem;
    }
}

/* ===== LIGHTBOX ===== */
/* Styles personnalisés pour l'intégration du lightbox */
/* vue-easy-lightbox gère déjà la plupart des styles, mais on peut personnaliser */

/* S'assurer que le lightbox est au-dessus du modal */
:deep(.vel-modal) {
    z-index: 10001 !important;
}

/* Améliorer l'apparence des boutons de navigation */
:deep(.vel-btn) {
    transition: opacity 0.2s ease;
}

:deep(.vel-btn:hover) {
    opacity: 0.8;
}

/* Responsive pour le lightbox sur mobile */
@media (max-width: 768px) {
    :deep(.vel-modal__wrapper) {
        padding: 0.625rem;
    }
}

/* ===== BOUTON DE TÉLÉCHARGEMENT LIGHTBOX ===== */
/* Intégration dans la barre d'outils native du lightbox */
:deep(.vel-toolbar) {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.zebox-lightbox-download-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 2.5rem;
    height: 2.5rem;
    background: transparent;
    border: none;
    color: rgba(255, 255, 255, 0.9);
    cursor: pointer;
    transition: all 0.2s ease;
    padding: 0;
    border-radius: 0.25rem;
}

.zebox-lightbox-download-btn:hover {
    background: rgba(255, 255, 255, 0.1);
    color: rgba(255, 255, 255, 1);
    transform: scale(1.05);
}

.zebox-lightbox-download-btn:active {
    transform: scale(0.95);
    background: rgba(255, 255, 255, 0.15);
}

.zebox-lightbox-download-btn svg {
    width: 1.25rem;
    height: 1.25rem;
    stroke: currentColor;
    fill: none;
}

/* Responsive pour le bouton de téléchargement sur mobile */
@media (max-width: 768px) {
    .zebox-lightbox-download-btn {
        width: 2.25rem;
        height: 2.25rem;
    }

    .zebox-lightbox-download-btn svg {
        width: 1.125rem;
        height: 1.125rem;
    }
}
