/**
 * Styles du modal de sélection d'animaux
 * Liste scrollable avec boutons fixes
 */

.faca-selection-modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 10000;
}

.faca-selection-modal.active {
    display: flex;
    align-items: center;
    justify-content: center;
}

.faca-modal-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.7);
    backdrop-filter: blur(5px);
}

.faca-selection-modal .faca-modal-content {
    position: relative;
    background: white;
    border-radius: 20px;
    max-width: 500px;
    width: 90%;
    max-height: 80vh;
    display: flex;
    flex-direction: column;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
    z-index: 10001;
    animation: faca-modal-appear 0.3s ease;
}

@keyframes faca-modal-appear {
    from {
        opacity: 0;
        transform: scale(0.9) translateY(-20px);
    }
    to {
        opacity: 1;
        transform: scale(1) translateY(0);
    }
}

.faca-modal-header {
    padding: 20px 25px;
    border-bottom: 2px solid #ecf0f1;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.faca-modal-title {
    font-size: 1.4rem;
    color: #2c3e50;
    margin: 0;
}

.faca-modal-close {
    background: none;
    border: none;
    font-size: 2rem;
    color: #95a5a6;
    cursor: pointer;
    width: 35px;
    height: 35px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    transition: all 0.2s ease;
}

.faca-modal-close:hover {
    background: #ecf0f1;
    color: #2c3e50;
}

/* CORPS DU MODAL - Scrollable */
.faca-modal-body {
    flex: 1;
    overflow-y: auto;
    padding: 20px 25px;
}

/* LISTE DES ANIMAUX */
.faca-animals-list {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(120px, 1fr));
    gap: 15px;
}

.faca-animal-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 15px;
    border-radius: 12px;
    border: 3px solid #ecf0f1;
    cursor: pointer;
    transition: all 0.3s ease;
    position: relative;
    background: white;
}

.faca-animal-item:hover {
    border-color: #3498db;
    transform: translateY(-3px);
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
}

.faca-animal-item.selected {
    border-color: #27ae60;
    background: #e8f8f5;
}

.faca-animal-item.disabled {
    opacity: 0.4;
    cursor: not-allowed;
}

.faca-animal-item.disabled:hover {
    transform: none;
    border-color: #ecf0f1;
}

.faca-animal-item-image {
    width: 70px;
    height: 70px;
    object-fit: cover;
    margin-bottom: 8px;
    border-radius: 50%;
}

.faca-animal-item-name {
    font-size: 0.9rem;
    font-weight: 600;
    color: #2c3e50;
    text-align: center;
}

.faca-animal-item-check {
    position: absolute;
    top: 5px;
    right: 5px;
    width: 25px;
    height: 25px;
    background: #27ae60;
    color: white;
    border-radius: 50%;
    display: none;
    align-items: center;
    justify-content: center;
    font-weight: bold;
    font-size: 0.9rem;
}

.faca-animal-item.selected .faca-animal-item-check {
    display: flex;
}

/* FOOTER DU MODAL - Fixe */
.faca-modal-footer {
    padding: 20px 25px;
    border-top: 2px solid #ecf0f1;
    display: flex;
    justify-content: flex-end;
    gap: 10px;
    background: white;
}