/* ============================================================
   SOGENTIS — CHILDREN SECTION
   Fichier : _children.css
   ------------------------------------------------------------
   - Grille responsive
   - Cartes enfant stylées
   - Modals modernes
   - Animations légères
   ============================================================ */


/* ===== GRID ===== */
.children-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
    gap: 2rem;
    padding: 1rem 0;
}


/* ===== CARD ===== */
.child-card {
    background: #fff;
    border-radius: 14px;
    box-shadow: 0 4px 12px rgba(0,0,0,0.08);
    padding: 1.5rem;
    text-align: center;
    transition: 0.25s;
    border: 1px solid #eee;
}

.child-card:hover {
    transform: translateY(-6px);
    box-shadow: 0 8px 20px rgba(0,0,0,0.15);
}


/* ===== PHOTO ===== */
.child-photo {
    width: 120px;
    height: 120px;
    margin: 0 auto 1rem;
    border-radius: 50%;
    overflow: hidden;
    border: 3px solid #e6e6e6;
}

.child-photo img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}


/* ===== NAME ===== */
.child-name {
    font-size: 1.25rem;
    font-weight: 700;
    margin-bottom: 0.5rem;
    color: #222;
}


/* ===== META INFO ===== */
.child-meta p {
    margin: 0.25rem 0;
    font-size: 0.9rem;
    color: #444;
}

.child-meta strong {
    color: #000;
}


/* ===== ACTIONS ===== */
.child-actions {
    margin-top: 1rem;
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}


/* Donation button */
.btn-support {
    display: inline-block;
    padding: 0.55rem 1rem;
    background: #1368ce;
    color: white;
    text-align: center;
    border-radius: 6px;
    font-size: 0.95rem;
    transition: 0.25s;
    text-decoration: none;
}

.btn-support:hover {
    background: #0f52a8;
}


/* Modal button */
.open-child-modal {
    padding: 0.5rem 1rem;
    border-radius: 6px;
    border: 1px solid #1368ce;
    color: #1368ce;
    background: transparent;
    font-size: 0.9rem;
    transition: 0.25s;
}

.open-child-modal:hover {
    background: #1368ce;
    color: white;
}


/* ===== MODAL OVERLAY ===== */
.child-modal {
    display: none; /* JS toggles this */
    position: fixed;
    inset: 0;
    background: rgba(0,0,0,0.55);
    z-index: 1050;
    justify-content: center;
    align-items: center;
    padding: 1rem;
}


/* ===== MODAL CONTENT ===== */
.child-modal-content {
    background: white;
    max-width: 520px;
    width: 100%;
    border-radius: 12px;
    padding: 1.5rem;
    position: relative;
    box-shadow: 0 8px 30px rgba(0,0,0,0.25);
    animation: fadeInUp 0.25s ease-out;
}

.modal-name {
    font-size: 1.4rem;
    font-weight: 700;
    margin-bottom: 1rem;
}

.modal-body p {
    margin: 0.4rem 0;
    font-size: 0.95rem;
    color: #444;
}

.modal-story {
    margin-top: 1rem;
    font-size: 0.95rem;
    line-height: 1.55;
    color: #333;
}


/* ===== CLOSE BUTTON ===== */
.close-modal {
    position: absolute;
    top: 12px;
    right: 12px;
    background: transparent;
    border: none;
    font-size: 1.6rem;
    cursor: pointer;
    color: #333;
}

.close-modal:hover {
    color: #000;
}


/* ===== MODAL FOOTER ===== */
.modal-footer {
    margin-top: 1.5rem;
    text-align: center;
}


/* ===== ANIMATIONS ===== */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}


/* ===== RESPONSIVE ===== */
@media (max-width: 768px) {
    .child-card {
        padding: 1.2rem;
    }

    .child-photo {
        width: 100px;
        height: 100px;
    }

    .children-grid {
        grid-template-columns: 1fr 1fr;
        gap: 1.2rem;
    }
}

@media (max-width: 480px) {
    .children-grid {
        grid-template-columns: 1fr;
    }

    .child-modal-content {
        max-width: 95%;
        padding: 1.2rem;
    }
}
