/* ============================================
   CHATRENCONTRE - Albums CSS
   Styles pour les albums privés
   ============================================ */

/* Albums Grid */
.albums-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 1.25rem;
}

/* Album Card */
.album-card {
    position: relative;
    background: linear-gradient(135deg, rgba(26, 26, 26, 0.8) 0%, rgba(15, 15, 15, 0.9) 100%);
    border: 1px solid rgba(255, 255, 255, 0.06);
    border-radius: 20px;
    overflow: hidden;
    transition: all 0.3s ease;
    cursor: pointer;
}

.album-card:hover {
    border-color: rgba(230, 57, 70, 0.3);
    transform: translateY(-4px);
    box-shadow: 0 20px 40px -15px rgba(0, 0, 0, 0.5);
}

.album-cover {
    position: relative;
    aspect-ratio: 4/3;
    background: linear-gradient(135deg, #1a1a1a, #252525);
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
}

.album-cover-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 2px;
    width: 100%;
    height: 100%;
}

.album-cover-grid img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.album-cover-placeholder {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    height: 100%;
    background: linear-gradient(135deg, rgba(230, 57, 70, 0.1), rgba(212, 168, 83, 0.1));
}

.album-cover-placeholder svg {
    width: 48px;
    height: 48px;
    color: rgba(255, 255, 255, 0.2);
}

.album-lock-badge {
    position: absolute;
    top: 0.75rem;
    right: 0.75rem;
    width: 32px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(0, 0, 0, 0.6);
    backdrop-filter: blur(10px);
    border-radius: 8px;
    color: #d4a853;
}

.album-media-count {
    position: absolute;
    bottom: 0.75rem;
    left: 0.75rem;
    padding: 0.375rem 0.75rem;
    background: rgba(0, 0, 0, 0.6);
    backdrop-filter: blur(10px);
    border-radius: 8px;
    font-size: 0.75rem;
    font-weight: 500;
    color: #fff;
}

.album-info {
    padding: 1.25rem;
}

.album-name {
    font-size: 1.125rem;
    font-weight: 600;
    color: #fff;
    margin-bottom: 0.375rem;
}

.album-description {
    font-size: 0.875rem;
    color: rgba(255, 255, 255, 0.5);
    line-height: 1.5;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.album-meta {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-top: 1rem;
    padding-top: 1rem;
    border-top: 1px solid rgba(255, 255, 255, 0.06);
}

.album-shares {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.8125rem;
    color: rgba(255, 255, 255, 0.4);
}

.album-actions {
    display: flex;
    gap: 0.5rem;
}

.album-action-btn {
    width: 32px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(255, 255, 255, 0.05);
    border: none;
    border-radius: 8px;
    color: rgba(255, 255, 255, 0.5);
    cursor: pointer;
    transition: all 0.2s ease;
}

.album-action-btn:hover {
    background: rgba(255, 255, 255, 0.1);
    color: #fff;
}

.album-action-btn.share:hover {
    background: rgba(230, 57, 70, 0.15);
    color: #e63946;
}

.album-action-btn.delete:hover {
    background: rgba(239, 68, 68, 0.15);
    color: #ef4444;
}

/* Create Album Button */
.album-create-card {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    min-height: 280px;
    background: rgba(255, 255, 255, 0.02);
    border: 2px dashed rgba(255, 255, 255, 0.1);
    border-radius: 20px;
    cursor: pointer;
    transition: all 0.3s ease;
}

.album-create-card:hover {
    background: rgba(255, 255, 255, 0.04);
    border-color: rgba(230, 57, 70, 0.3);
}

.album-create-card svg {
    width: 48px;
    height: 48px;
    color: rgba(255, 255, 255, 0.3);
    margin-bottom: 1rem;
}

.album-create-card span {
    font-size: 1rem;
    font-weight: 500;
    color: rgba(255, 255, 255, 0.5);
}

/* Album View Modal */
.album-modal-overlay {
    position: fixed;
    inset: 0;
    z-index: 100;
    display: flex;
    align-items: flex-start;
    justify-content: center;
    padding: 2rem 1rem;
    background: rgba(0, 0, 0, 0.9);
    backdrop-filter: blur(10px);
}

.album-modal {
    width: 100%;
    max-width: 900px;
    max-height: 90vh;
    background: #0f0f0f;
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 24px;
    overflow: hidden;
    display: flex;
    flex-direction: column;
}

.album-modal-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 1.25rem 1.5rem;
    background: rgba(0, 0, 0, 0.5);
    border-bottom: 1px solid rgba(255, 255, 255, 0.06);
}

.album-modal-title {
    font-size: 1.25rem;
    font-weight: 600;
    color: #fff;
}

.album-modal-close {
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(255, 255, 255, 0.05);
    border: none;
    border-radius: 12px;
    color: rgba(255, 255, 255, 0.5);
    cursor: pointer;
    transition: all 0.2s ease;
}

.album-modal-close:hover {
    background: rgba(255, 255, 255, 0.1);
    color: #fff;
}

.album-modal-body {
    flex: 1;
    overflow-y: auto;
    padding: 1.5rem;
}

/* Media Grid */
.media-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
    gap: 0.75rem;
}

.media-item {
    position: relative;
    aspect-ratio: 1;
    border-radius: 12px;
    overflow: hidden;
    cursor: pointer;
    background: #1a1a1a;
}

.media-item img,
.media-item video {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.3s ease;
}

.media-item:hover img,
.media-item:hover video {
    transform: scale(1.05);
}

.media-item-overlay {
    position: absolute;
    inset: 0;
    background: linear-gradient(to top, rgba(0, 0, 0, 0.6), transparent);
    opacity: 0;
    transition: opacity 0.3s ease;
    display: flex;
    align-items: flex-end;
    padding: 0.75rem;
}

.media-item:hover .media-item-overlay {
    opacity: 1;
}

.media-video-badge {
    position: absolute;
    top: 0.5rem;
    right: 0.5rem;
    width: 28px;
    height: 28px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(0, 0, 0, 0.6);
    border-radius: 6px;
    color: #fff;
}

/* Password Prompt */
.password-prompt {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 3rem 2rem;
    text-align: center;
}

.password-prompt-icon {
    width: 80px;
    height: 80px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(212, 168, 83, 0.1);
    border-radius: 20px;
    margin-bottom: 1.5rem;
}

.password-prompt-icon svg {
    width: 40px;
    height: 40px;
    color: #d4a853;
}

.password-prompt h3 {
    font-size: 1.5rem;
    font-weight: 600;
    color: #fff;
    margin-bottom: 0.5rem;
}

.password-prompt p {
    font-size: 0.9375rem;
    color: rgba(255, 255, 255, 0.5);
    margin-bottom: 1.5rem;
    max-width: 300px;
}

.password-input-wrapper {
    display: flex;
    gap: 0.75rem;
    width: 100%;
    max-width: 320px;
}

.password-input-wrapper input {
    flex: 1;
    padding: 0.875rem 1rem;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 12px;
    color: #fff;
    font-size: 1rem;
    text-align: center;
    letter-spacing: 0.25em;
}

.password-input-wrapper input:focus {
    outline: none;
    border-color: #d4a853;
}

.password-input-wrapper button {
    padding: 0 1.5rem;
    background: linear-gradient(135deg, #d4a853, #f0c674);
    border: none;
    border-radius: 12px;
    color: #1a1a1a;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
}

.password-input-wrapper button:hover {
    transform: scale(1.02);
}

/* Share Modal */
.share-modal {
    padding: 2rem;
}

.share-password-display {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 1rem;
    padding: 1.5rem;
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 16px;
    margin: 1.5rem 0;
}

.share-password-display code {
    font-family: Arial, Helvetica, sans-serif;
    font-size: 1.5rem;
    letter-spacing: 0.25em;
    color: #d4a853;
}

.share-password-display button {
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(255, 255, 255, 0.05);
    border: none;
    border-radius: 10px;
    color: rgba(255, 255, 255, 0.5);
    cursor: pointer;
    transition: all 0.2s ease;
}

.share-password-display button:hover {
    background: rgba(255, 255, 255, 0.1);
    color: #fff;
}

/* Upload Zone */
.upload-zone {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 3rem 2rem;
    border: 2px dashed rgba(255, 255, 255, 0.1);
    border-radius: 16px;
    cursor: pointer;
    transition: all 0.3s ease;
}

.upload-zone:hover,
.upload-zone.dragover {
    border-color: rgba(230, 57, 70, 0.4);
    background: rgba(230, 57, 70, 0.05);
}

.upload-zone svg {
    width: 48px;
    height: 48px;
    color: rgba(255, 255, 255, 0.3);
    margin-bottom: 1rem;
}

.upload-zone-text {
    font-size: 1rem;
    color: rgba(255, 255, 255, 0.6);
    margin-bottom: 0.5rem;
}

.upload-zone-hint {
    font-size: 0.8125rem;
    color: rgba(255, 255, 255, 0.3);
}

/* Upload Progress Zone */
.upload-progress-zone {
    padding: 1.5rem;
    background: linear-gradient(135deg, rgba(230, 57, 70, 0.1), rgba(212, 168, 83, 0.05));
    border: 1px solid rgba(230, 57, 70, 0.2);
    border-radius: 16px;
    animation: pulse-border 2s ease-in-out infinite;
}

@keyframes pulse-border {

    0%,
    100% {
        border-color: rgba(230, 57, 70, 0.2);
    }

    50% {
        border-color: rgba(230, 57, 70, 0.5);
    }
}

/* Empty State */
.albums-empty {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 4rem 2rem;
    text-align: center;
}

.albums-empty-icon {
    width: 100px;
    height: 100px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(255, 255, 255, 0.03);
    border-radius: 24px;
    margin-bottom: 1.5rem;
}

.albums-empty-icon svg {
    width: 48px;
    height: 48px;
    color: rgba(255, 255, 255, 0.2);
}

.albums-empty h3 {
    font-size: 1.25rem;
    font-weight: 600;
    color: rgba(255, 255, 255, 0.7);
    margin-bottom: 0.5rem;
}

.albums-empty p {
    font-size: 0.9375rem;
    color: rgba(255, 255, 255, 0.4);
    max-width: 300px;
    margin-bottom: 1.5rem;
}

/* Responsive */
@media (max-width: 640px) {
    .albums-grid {
        grid-template-columns: 1fr;
    }

    .media-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}