/* Styles pour la grille d'enfants */
.enfants-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 20px;
    transition: all 0.3s ease-in-out; /* Ajout de la transition à la grille */
}

@media (max-width: 1024px) {
    .enfants-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 767px) {
    .enfants-grid {
        grid-template-columns: repeat(1, 1fr);
    }
    .enfants-grid .enfant-carte img {
        height: 250px!important;
        width: auto!important;
        aspect-ratio: unset!important;
    }

}

/* Styles pour chaque carte d'enfant */
.enfant-carte {
    text-align: center;
    border: 1px solid #efefef;
    padding: 1.5rem;
    background: white;
    border-radius: 0.25rem;
    box-shadow: 2px 2px 4px 0px rgba(163, 177, 198, 0.25);
    position: relative; /* Ajout de la position relative pour le positionnement absolu */
    overflow: hidden; /* Ajout de l'overflow hidden pour cacher l'overlay par défaut */
    transition: all 0.3s ease-in-out; /* Ajout de la transition à la carte d'enfant */
}

.enfant-carte img:hover {
    box-shadow: 4px 4px 8px 0px rgba(163, 177, 198, 0.25);
    transform: scale(1.05);
}

/* Styles pour l'image de mise en avant */
.enfants-grid .enfant-carte img {
    max-width: 100%;
    height: auto;
    margin-bottom: 10px;
    aspect-ratio: 1.61/1;
    object-fit: cover;
    border-radius: 0.165rem;
    transition: all 0.3s ease-in-out; /* Ajout de la transition à l'image */
}

/* Styles pour la superposition */
.enfants-grid .enfant-carte-link::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 103, 218, 0);
    transition: background 0.3s ease-in-out, transform 0.3s ease-in-out;
    transform: scale(1); /* Initialisation de l'échelle à 1 */
    transform-origin: center center; /* Définir l'origine de la transformation au centre */
    pointer-events: none;
}
/* Au survol de la carte, changez la couleur de fond de la superposition */
.enfant-carte:hover::after {
    background: rgba(0, 103, 218, 1);
}

/* Au survol de l'image, appliquez le filtre */
.enfant-carte img:hover {
    filter: brightness(80%); /* Ajustez la valeur de luminosité selon vos préférences */
}

/* Styles pour le titre de la page enfant */
.enfant-carte h3 {
    font-size: 1.25rem;
    margin: 0;
    position: relative;
    z-index: 1;
    transition: color 0.3s ease-in-out;
}

.enfant-carte-link:hover h3 {
    color: #0067DA !important;
}

/* Styles pour l'overlay */
/* Styles pour la superposition */
.enfant-carte-link .overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 103, 218, 0);
    transition: background 0.3s ease-in-out; /* Ajout de la transition à l'overlay */
}

/* Au survol de la carte, changez la couleur de fond de l'overlay */
.enfant-carte-link:hover .overlay {
    background: rgba(0, 103, 218, 0.05);
}

/* Styles pour le titre de la page enfant */
.enfant-carte h3 {
    font-size: 1.25rem;
    margin: 0;
    transition: color 0.3s ease-in-out; /* Ajout de la transition à la couleur du texte */
}


.enfants-grid .enfant-carte-link {
    text-decoration: none;
    position: relative;
}

.enfant-carte-link:hover h3 {
    color: #0067DA !important;
}

/* Ajout du style pour le conteneur de l'icône centrée */
.enfants-grid .enfant-carte-link .image-container {
    position: relative;
    display: inline-block;
}

.enfants-grid .enfant-carte-link .icon-container {
    display: none;
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    background-color: white;
    width: 60px;
    height: 60px;
    border-radius: 300px;
    padding: 12px 10px 10px 12px;
    box-shadow: 0px 0px 8px 0px rgba(0, 0, 0, 0.1);
    transition: all 0.3s ease-in-out; /* Ajout de la transition à l'icône */
    pointer-events: none;
}

/* Animation d'apparition */
@keyframes fadeIn {
    from {
        opacity: 0;
    }
    to {
        opacity: 1;
    }
}

.enfants-grid .enfant-carte-link:hover .icon-container {
    display: block;
    animation: fadeIn 0.3s ease-in-out;
}

.enfants-grid .enfant-carte-link .icon-container .material-icon {
    color: #0067DA !important;
    margin: auto;
}

/* Sous-enfant */


.grandchildren-list{
    padding-top: 10px;
}


.grandchild-title {
    color: var(--e-global-color-primary) !important;
    font-weight: 500 !important;
    transition: all 0.3s ease-in-out; /* Ajout de la transition au titre */
    text-align: left;
}

.material-icon {
    font-family: "Material Icons";
    font-size: 24px;
    color: var(--e-global-color-primary) !important;
    cursor: pointer;
    color: #0067DA !important;
    transition: all 0.3s ease-in-out; /* Ajout de la transition à l'icône */
}

.grandchild-link {
    text-decoration: none !important;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.grandchild-link:hover {
    background: rgba(0, 103, 218, 0.05) !important;
}

.grandchild-item:hover .grandchild-title,
.grandchild-item:hover .material-icon {
    color: #0067DA !important;
}

.grandchild-item a{
    padding: 0.375rem 0.75rem;
    transition: padding 0.2s ease-in-out;
}

.grandchild-item a:hover{
    padding: 0.375rem 1rem;
}