/* Style général de la modal */
.animaloos-collections-modal {
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 95%;
    max-width: 1400px;
    height: 90vh;
    max-height: 900px;
    background-color: white;
    border-radius: 10px;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.3);
    padding: 20px;
    overflow-y: auto;
    z-index: 999;
}

/* Bouton d'ouverture de la modale */
.animaloos-open-modal-btn {
    display: inline-block;
    padding: 10px 20px;
    background-color: #ffffff;
    color: #000000;
    border: 2px dashed #000000;
    border-radius: 6px;
    font-size: 16px;
    cursor: pointer;
    transition: background-color 0.3s;
    text-align: center;
    font-weight: 400;
    font-family: "Poppins", sans-serif;
    max-width: 100%;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

/* Style du bouton quand un produit est sélectionné */
.animaloos-open-modal-btn.product-selected {
    padding-right: 30px;
    position: relative;
}

.animaloos-open-modal-btn.product-selected:after {
    content: "✓";
    position: absolute;
    color: green;
    right: 10px;
    top: 50%;
    transform: translateY(-50%);
    font-weight: bold;
}

/* Bouton de fermeture */
.animaloos-close-btn {
    position: absolute;
    top: 15px;
    right: 15px;
    font-size: 24px;
    cursor: pointer;
    color: #333;
}

/* Titre principal */
.animaloos-title {
    text-align: center;
    font-size: 28px;
    margin-bottom: 20px;
    color: #333;
}

.animaloos-animal-name {
    border-bottom: 2px solid #bcd2ee;
    color: #333;
    font-style: italic;
}

/* Champ de recherche */
.animaloos-search-container {
    margin: 0 auto 30px;
    width: 80%;
    max-width: 600px;
}

.animaloos-search-input {
    width: 100%;
    padding: 12px 20px;
    border: 1px solid #ddd;
    border-radius: 25px;
    font-size: 16px;
}

/* Titres des étapes */
.animaloos-step-title {
    font-size: 20px;
    margin: 30px 0 20px;
    color: #333;
}

/* Grille des collections */
.animaloos-collections-grid {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 30px;
    margin-bottom: 30px;
    width: 100%;
}

/* Items de collection */
.animaloos-collection-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    cursor: pointer;
    transition: transform 0.2s;
    width: 170px;
}

.animaloos-collection-item:hover {
    transform: scale(1.05);
}

.animaloos-collection-item.selected .animaloos-collection-circle {
    border: 3px solid #333;
}

.animaloos-collection-circle {
    width: 140px;
    height: 140px;
    border-radius: 50%;
    overflow: hidden;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 10px;
}

.animaloos-collection-circle img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.animaloos-collection-name {
    text-align: center;
    font-size: 16px;
    font-weight: 600;
    text-transform: uppercase;
}

/* Grille des produits */
.animaloos-products-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
    gap: 25px;
    margin-bottom: 30px;
    width: 100%;
}

/* Items des produits */
.animaloos-product-item {
    border: 1px solid #eee;
    border-radius: 8px;
    overflow: hidden;
    cursor: pointer;
    transition: transform 0.2s, box-shadow 0.2s;
}

.animaloos-product-item:hover {
    transform: translateY(-5px);
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
}

.animaloos-product-image {
    width: 100%;
    height: 230px;
    object-fit: contain;
    background-color: #f9f9f9;
}

.animaloos-product-title {
    padding: 10px;
    font-size: 14px;
    text-align: center;
    font-weight: 600;
}

/* Messages d'état */
.animaloos-loading,
.animaloos-error,
.animaloos-no-products {
    padding: 20px;
    text-align: center;
    width: 100%;
    grid-column: 1 / -1;
}

.animaloos-loading {
    color: #666;
}

.animaloos-error {
    color: #d9534f;
}

.animaloos-no-products {
    color: #666;
}

/* Responsive */
@media (min-width: 1600px) {
    .animaloos-collection-item {
        width: 200px;
    }

    .animaloos-collection-circle {
        width: 160px;
        height: 160px;
    }

    .animaloos-products-grid {
        grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    }

    .animaloos-product-image {
        height: 250px;
    }
}

@media (max-width: 768px) {
    .animaloos-collections-grid {
        gap: 15px;
    }

    .animaloos-collection-item {
        width: 100px;
    }

    .animaloos-collection-circle {
        width: 80px;
        height: 80px;
    }

    .animaloos-collection-name {
        font-size: 12px;
    }

    .animaloos-products-grid {
        grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
    }
}

/* Information sur le produit sélectionné */
.animaloos-selected-product-info {
    font-size: 14px;
    color: #333;
    margin-top: 8px;
    padding: 8px 12px;
    background-color: #f1f8e9;
    border-radius: 4px;
    border-left: 3px solid #27ae60;
}

.animaloos-selected-product-info strong {
    color: #27ae60;
}

/* Bouton "Choisir" sous les produits */
.animaloos-product-cta {
    padding: 0 10px 15px;
    text-align: center;
}

.animaloos-choose-btn {
    background-color: #d08555;
    color: white;
    border: none;
    border-radius: 3px;
    padding: 6px 15px;
    font-size: 14px;
    cursor: pointer;
    transition: background-color 0.3s;
    font-weight: 600;
}

.animaloos-choose-btn:hover {
    background-color: #2a2a2b;
}
