/* Fichier: templates/assets/css/vg-collection.css */

/* Styles pour les boutons de collection */
.vg-collection-buttons {
    margin: 15px 0;
    text-align: center;
    padding: 10px;
    background-color: #f9f9f9;
    border-radius: 5px;
}

.vg-add-to-collection,
.vg-remove-from-collection,
.vg-collection-login-btn {
    display: inline-block;
    padding: 10px 20px;
    background-color: #0056b3;
    color: #fff !important;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    font-size: 16px;
    transition: background-color 0.3s;
    margin: 0 5px;
    text-decoration: none !important;
}

.vg-add-to-collection:hover {
    background-color: #004099;
}

.vg-remove-from-collection {
    background-color: #d9534f;
}

.vg-remove-from-collection:hover {
    background-color: #c9302c;
}

.vg-collection-status {
    display: block;
    margin-top: 10px;
    font-style: italic;
    color: #333;
}

.vg-collection-login-btn {
    text-decoration: none;
    background-color: #5cb85c;
}

.vg-collection-login-btn:hover {
    background-color: #4cae4c;
    color: #fff !important;
}

/* Styles pour la page de collection */
.remove-from-collection-btn {
    position: absolute;
    top: 0;
    left: 0;
    background-color: #d9534f;
    color: white;
    border: none;
    border-radius: 0 0 5px 0;
    width: 30px;
    height: 30px;
    font-size: 20px;
    line-height: 30px;
    text-align: center;
    cursor: pointer;
    z-index: 5;
    transition: background-color 0.3s;
}

.remove-from-collection-btn:hover {
    background-color: #c9302c;
}

.video-game {
    position: relative;
    overflow: hidden;
    margin-bottom: 15px;
    border-radius: 4px;
}

.video-game-image-wrapper {
    flex-shrink: 0;
    position:relative;
    aspect-ratio: 16 / 9;
    background: #eee;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
}
.video-game img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}
/* Overlay du titre avec effet de slide */
.video-game-title-overlay {
    position: absolute;
    top: 0;
    left: -100%; /* Position initiale hors de l'écran */
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.7);
    color: white;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: left 0.3s ease;
    z-index: 3;
}

.video-game:hover .video-game-title-overlay {
    left: 0; /* Slide à gauche pour devenir visible */
}

.video-game-title {
    font-weight: bold;
    text-align: center;
    font-size: 16px;
    padding: 15px;
    overflow: hidden;
    text-overflow: ellipsis;
    display: -webkit-box;
    -webkit-line-clamp: 3; /* Limite à 3 lignes */
    -webkit-box-orient: vertical;
    max-width: 90%;
}

.empty-collection {
    text-align: center;
    padding: 40px;
    background: #f9f9f9;
    border-radius: 5px;
    margin: 20px 0;
}

.vg-collection-login-message {
    text-align: center;
    padding: 40px;
    background: #f9f9f9;
    border-radius: 5px;
    margin: 20px 0;
    font-size: 18px;
}

.vg-collection-login-message a {
    color: #0056b3;
    text-decoration: underline;
}

/* Animations supplémentaires */
.video-game-link {
    display: block;
    height: 100%;
    text-decoration: none !important;
    color: inherit;
}


.video-game:hover img {
    transform: scale(1.05); /* Légère animation de zoom au survol */
}

/* Assurer que la grille s'affiche correctement */
.grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
    gap: 20px;
    margin-top: 20px;
}

@media (max-width: 768px) {
    .grid {
        grid-template-columns: repeat(auto-fill, minmax(140px, 1fr));
        gap: 15px;
    }
}
/* Styles pour l'indicateur de suppression */
.removing-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.7);
    z-index: 10;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
}

.removing-spinner {
    display: inline-block;
    width: 30px;
    height: 30px;
    border: 3px solid rgba(255, 255, 255, 0.3);
    border-radius: 50%;
    border-top-color: #fff;
    animation: spin 1s ease-in-out infinite;
    margin-bottom: 10px;
}

.removing-text {
    color: white;
    font-weight: bold;
    text-align: center;
}

.is-removing {
    background-color: #6c757d !important;
    cursor: not-allowed !important;
}

.is-removing span {
    display: inline-block;
    width: 15px;
    height: 15px;
    border: 2px solid rgba(255, 255, 255, 0.3);
    border-radius: 50%;
    border-top-color: #fff;
    animation: spin 1s ease-in-out infinite;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}