/* Banque de Photos - Styles */

/* Grille des photos */
.photo-bank-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 20px;
    margin-top: 20px;
}

.photo-bank-item {
    background: white;
    border-radius: 8px;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
    overflow: hidden;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.photo-bank-item:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

/* Prévisualisation de l'image */
.photo-preview {
    width: 100%;
    height: 200px;
    overflow: hidden;
    background: var(--color-light);
    display: flex;
    align-items: center;
    justify-content: center;
}

.photo-preview img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.3s ease;
}

.photo-bank-item:hover .photo-preview img {
    transform: scale(1.05);
}

.photo-placeholder {
    color: #ccc;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    height: 100%;
}

.photo-placeholder svg {
    width: 48px;
    height: 48px;
}

/* Informations de la photo */
.photo-info {
    padding: 15px;
}

.photo-info h4 {
    margin: 0 0 8px 0;
    color: var(--color-primary);
    font-size: 16px;
    font-weight: 600;
    line-height: 1.3;
}

.photo-meta {
    font-size: 12px;
    color: #666;
    margin: 0 0 10px 0;
    line-height: 1.4;
}

.photo-description {
    font-size: 13px;
    color: #555;
    margin: 8px 0;
    line-height: 1.4;
}

.photo-copyright {
    font-size: 12px;
    color: #777;
    margin: 8px 0;
    padding: 8px;
    background: #f9f9f9;
    border-radius: 4px;
    border-left: 3px solid var(--color-accent);
}

.photo-tags {
    font-size: 12px;
    color: #888;
    margin: 8px 0 0 0;
}

/* Statuts */
.status {
    padding: 2px 8px;
    border-radius: 12px;
    font-size: 11px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.status-approved {
    background: #d1fae5;
    color: var(--color-primary);
}

.status-pending {
    background: #fef3c7;
    color: #d97706;
}

.status-rejected {
    background: #fee2e2;
    color: var(--color-cta);
}

/* Actions des photos */
.photo-actions {
    padding: 15px;
    border-top: 1px solid #f0f0f0;
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
}

.btn-sm {
    padding: 6px 12px;
    font-size: 12px;
    border-radius: 4px;
    border: none;
    cursor: pointer;
    font-weight: 600;
    transition: all 0.3s ease;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.btn-success {
    background: var(--color-primary);
    color: white;
}

.btn-success:hover {
    background: var(--color-secondary);
    transform: translateY(-1px);
}

.btn-danger {
    background: var(--color-cta);
    color: white;
}

.btn-danger:hover {
    background: #d63916;
    transform: translateY(-1px);
}

.btn-secondary {
    background: #6c757d;
    color: white;
}

.btn-secondary:hover {
    background: #5a6268;
    transform: translateY(-1px);
}

/* File input styling */
.file-input-wrapper {
    margin: 10px 0;
}

.file-input-display {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    padding: 20px;
    border: 2px dashed #ddd;
    border-radius: 8px;
    background: var(--color-light);
    cursor: pointer;
    transition: all 0.3s ease;
    color: #666;
}

.file-input-display:hover {
    border-color: var(--color-primary);
    background: #f0f9f7;
    color: var(--color-primary);
}

.file-input-display.has-file {
    border-color: var(--color-primary);
    background: #f0f9f7;
    color: var(--color-primary);
}

.file-input-display svg {
    width: 24px;
    height: 24px;
}

.file-input-text {
    font-weight: 600;
}

.hidden {
    display: none;
}

/* Responsive */
@media (max-width: 768px) {
    .photo-bank-grid {
        grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
        gap: 15px;
    }

    .photo-preview {
        height: 150px;
    }

    .photo-info {
        padding: 12px;
    }

    .photo-actions {
        padding: 12px;
        gap: 6px;
    }

    .btn-sm {
        padding: 5px 10px;
        font-size: 11px;
    }
}

@media (max-width: 480px) {
    .photo-bank-grid {
        grid-template-columns: 1fr;
        gap: 12px;
    }

    .photo-actions {
        flex-direction: column;
    }

    .btn-sm {
        width: 100%;
        text-align: center;
    }
}

/* Animations */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.photo-bank-item {
    animation: fadeInUp 0.3s ease-out;
}

/* Loading states */
.btn-sm:disabled {
    opacity: 0.6;
    cursor: not-allowed;
    transform: none !important;
}

.btn-sm:disabled:hover {
    transform: none !important;
}

/* Alerts spéciaux pour la banque de photos */
.photo-bank-alert {
    margin: 20px 0;
    padding: 15px 20px;
    border-radius: 8px;
    border-left: 4px solid;
    display: flex;
    align-items: flex-start;
    gap: 12px;
}

.photo-bank-alert.info {
    background: #e0f2fe;
    border-color: #0288d1;
    color: #01579b;
}

.photo-bank-alert.success {
    background: #e8f5e8;
    border-color: var(--color-primary);
    color: #1b5e20;
}

.photo-bank-alert.warning {
    background: #fff8e1;
    border-color: #ff8f00;
    color: #e65100;
}

.photo-bank-alert svg {
    width: 20px;
    height: 20px;
    flex-shrink: 0;
    margin-top: 2px;
}

/* Modal styles */
.modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.5);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 9999;
    padding: 20px;
    animation: fadeIn 0.3s ease-out;
}

.modal-container {
    background: white;
    border-radius: 12px;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.2);
    max-width: 600px;
    width: 100%;
    max-height: 90vh;
    overflow-y: auto;
    animation: slideUp 0.3s ease-out;
}

.modal-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 20px 24px;
    border-bottom: 1px solid #e5e7eb;
}

.modal-header h2 {
    margin: 0;
    font-size: 20px;
    font-weight: 600;
    color: var(--color-primary);
}

.modal-close {
    background: none;
    border: none;
    cursor: pointer;
    padding: 4px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #6b7280;
    transition: color 0.2s ease;
}

.modal-close:hover {
    color: var(--color-cta);
}

#edit-photo-form {
    padding: 24px;
}

#edit-photo-form .form-group {
    margin-bottom: 20px;
}

#edit-photo-form .form-actions {
    display: flex;
    gap: 12px;
    justify-content: flex-end;
    margin-top: 24px;
    padding-top: 20px;
    border-top: 1px solid #e5e7eb;
}

#edit-photo-form .btn {
    padding: 10px 20px;
    font-size: 14px;
}

@keyframes fadeIn {
    from {
        opacity: 0;
    }
    to {
        opacity: 1;
    }
}

@keyframes slideUp {
    from {
        transform: translateY(20px);
        opacity: 0;
    }
    to {
        transform: translateY(0);
        opacity: 1;
    }
}

/* Responsive modal */
@media (max-width: 768px) {
    .modal-container {
        max-width: 95%;
        margin: 20px;
    }

    #edit-photo-form {
        padding: 16px;
    }

    .modal-header {
        padding: 16px;
    }

    #edit-photo-form .form-actions {
        flex-direction: column;
    }

    #edit-photo-form .btn {
        width: 100%;
    }
}

/* Pagination Styles */
.pagination-container {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 1rem;
}

.pagination {
    display: flex;
    list-style: none;
    margin: 0;
    padding: 0;
    gap: 0.25rem;
    flex-wrap: wrap;
    justify-content: center;
}

.page-item {
    margin: 0;
    padding: 0;
}

.page-link {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.5rem 0.75rem;
    color: #0066cc;
    background-color: #fff;
    border: 1px solid #dee2e6;
    border-radius: 4px;
    text-decoration: none;
    transition: all 0.3s ease;
    font-weight: 500;
    font-size: 0.95rem;
}

.page-link:hover {
    color: #fff;
    background-color: #0066cc;
    border-color: #0066cc;
}

.page-item.active .page-link {
    color: #fff;
    background-color: #0066cc;
    border-color: #0066cc;
    cursor: default;
}

.page-link svg {
    width: 14px;
    height: 14px;
}

.pagination-info {
    font-size: 0.9rem;
    color: #666;
}