/* CSS Moderne pour le module d'inscription des enfants avec formulaire unique centré */

/* Conteneur principal - meilleure largeur adaptative et centrage */
.child_registration_container {
    max-width: 1200px;
    width: 100%;
    background-color: #fff;
    border-radius: 4px;
    box-shadow: 0 1px 5px rgba(0, 0, 0, 0.1);
    padding: 25px;
    margin: 0 auto 30px;
    box-sizing: border-box;
    display: flex;
    flex-direction: column;
    align-items: center;
}

/* Wrapper pour le décompte et le formulaire */
.child_count_wrapper {
    width: 100%;
    max-width: 800px;
    display: flex;
    flex-direction: column;
    align-items: center;
}

/* Meilleure structure pour la sélection du nombre d'enfants */
.child_count_container {
    max-width: 600px;
    width: 100%;
    margin: 0 auto 30px;
    padding: 20px;
    background: #f9f9f9;
    border-radius: 4px;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.05);
    text-align: center;
}

/* Titre principal */
.title-count-children {
    font-size: 18px;
    color: #333;
    margin-bottom: 15px;
    font-weight: 600;
    text-align: center;
}

/* Sélecteur de nombre d'enfants mieux positionné */
#child_count {
    width: 100%;
    max-width: 250px;
    height: 40px;
    border: 1px solid #d6d6d6;
    border-radius: 4px;
    padding: 5px 10px;
    font-size: 14px;
    color: #333;
    background-color: #fff;
    transition: border-color 0.2s ease;
    margin: 0 auto;
    display: block;
}

#child_count:focus {
    border-color: #6AC4CC;
    outline: none;
    box-shadow: 0 0 5px rgba(106, 196, 204, 0.3);
}

/* Formulaire d'inscription */
#children_registration_form {
    width: 100%;
    margin-top: 20px;
    display: flex;
    flex-direction: column;
    align-items: center;
}

/* Conteneur pour les formulaires individuels avec meilleure gestion des colonnes */
#children_forms_container {
    display: grid;
    grid-template-columns: 1fr;
    gap: 20px;
    margin-bottom: 30px;
    width: 100%;
    max-width: 600px;
}

/* Media queries pour gérer les colonnes en fonction de la largeur disponible */
@media (min-width: 768px) {
    #children_forms_container:not(.single-child) {
        grid-template-columns: repeat(2, 1fr);
        max-width: 800px;
    }
}

@media (min-width: 1200px) {
    #children_forms_container:not(.single-child) {
        grid-template-columns: repeat(3, 1fr);
        max-width: 1200px;
    }
}

/* Style pour chaque formulaire d'enfant */
.child_form {
    width: 100%;
    background-color: #f9f9f9;
    border-radius: 4px;
    padding: 20px;
    border: 1px solid #e9e9e9;
    box-sizing: border-box;
    position: relative;
    transition: all 0.3s ease;
}

.child_form:hover {
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.08);
    transform: translateY(-2px);
}

/* Titre du formulaire individuel */
.child_form h2 {
    font-size: 16px;
    color: #333;
    margin-bottom: 15px;
    font-weight: 600;
    padding-bottom: 10px;
    border-bottom: 1px solid #e9e9e9;
    position: relative;
}

.child_form h2:before {
    content: '';
    position: absolute;
    left: 0;
    bottom: -1px;
    width: 50px;
    height: 3px;
    background: #6AC4CC;
}

/* Structure améliorée pour les champs */
.child_form > div {
    margin-bottom: 15px;
    width: 100%;
}

.child_form label {
    display: block;
    margin-bottom: 5px;
    font-weight: 500;
    color: #555;
    font-size: 13px;
}

.child_form input[type="text"],
.child_form select {
    width: 100%;
    height: 36px;
    padding: 5px 10px;
    border: 1px solid #d6d6d6;
    border-radius: 4px;
    font-size: 14px;
    color: #333;
    background-color: #fff;
    box-sizing: border-box;
    transition: all 0.3s ease;
}

.child_form input[type="text"]:focus,
.child_form select:focus {
    border-color: #6AC4CC;
    box-shadow: 0 0 5px rgba(106, 196, 204, 0.3);
    outline: none;
}

/* Section sélecteur enfant existant */
.existing_child_selector {
    margin-bottom: 20px;
    padding-bottom: 15px;
    border-bottom: 1px solid #e9e9e9;
    width: 100%;
}

/* Section cascade avec meilleure structure */
.cascadeContainer {
    margin-top: 20px;
    background-color: #fff;
    border-radius: 4px;
    padding: 15px;
    border: 1px solid #e9e9e9;
    width: 100%;
    box-sizing: border-box;
}

.cascade-header {
    font-size: 15px;
    color: #333;
    margin-bottom: 15px;
    font-weight: 600;
    border-left: 3px solid #6AC4CC;
    padding-left: 10px;
}

.cascade-select {
    margin-bottom: 12px;
    width: 100%;
}

/* Lien "Modifier" */
a.modify {
    color: #6AC4CC;
    text-decoration: none;
    margin-left: 8px;
    font-size: 13px;
    font-weight: 500;
}

a.modify:hover {
    text-decoration: underline;
}

/* Affichage des sélections faites */
.cascadeContainer p {
    background-color: #f5f9fa;
    padding: 10px 12px;
    border-radius: 4px;
    margin-bottom: 10px;
    font-size: 14px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    border: 1px solid #e9ecef;
}

.cascadeContainer p strong {
    color: #555;
    margin-right: 5px;
}

/* Meilleur positionnement du bouton de validation */
input[type="submit"] {
    background-color: #6AC4CC;
    color: white;
    border: none;
    padding: 12px 25px;
    font-size: 15px;
    border-radius: 4px;
    cursor: pointer;
    transition: all 0.3s ease;
    margin: 20px auto 0;
    display: block;
    min-width: 200px;
    text-transform: uppercase;
    font-weight: 600;
    letter-spacing: 0.5px;
}

input[type="submit"]:hover {
    background-color: #59B3BB;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
    transform: translateY(-2px);
}

/* Animation subtile lors du chargement des formulaires */
@keyframes fadeIn {
    from { opacity: 0; transform: translateY(10px); }
    to { opacity: 1; transform: translateY(0); }
}

.child_form {
    animation: fadeIn 0.4s ease-out;
}

/* Responsive design plus précis */
@media (max-width: 576px) {
    .child_registration_container {
        padding: 15px 10px;
    }

    .child_form {
        padding: 15px;
    }

    input[type="submit"] {
        width: 100%;
    }
}

/* Styles pour la page récapitulative */
.summary-wrapper {
    max-width: 1200px;
    margin: 0 auto;
    padding: 30px 20px;
    background: white;
}

.summary-header {
    text-align: center;
    margin-bottom: 30px;
}

.summary-header h1 {
    font-size: 24px;
    color: #333;
    margin-bottom: 8px;
}

.subtitle {
    color: #666;
    font-size: 16px;
}

.children-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 20px;
    margin-bottom: 30px;
}

@media (min-width: 768px) {
    .children-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (min-width: 992px) {
    .children-grid {
        grid-template-columns: repeat(3, 1fr);
    }
}

.child-card {
    background: white;
    border-radius: 4px;
    box-shadow: 0 1px 5px rgba(0, 0, 0, 0.1);
    overflow: hidden;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.child-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 6px 12px rgba(0, 0, 0, 0.15);
}

.child-card-header {
    background: #6AC4CC;
    color: white;
    padding: 15px;
}

.child-card-header h3 {
    margin: 0;
    font-size: 18px;
}

.child-card-body {
    padding: 20px;
}

.info-section {
    margin-bottom: 20px;
}

.info-group {
    margin-bottom: 12px;
}

.info-group label {
    display: block;
    color: #666;
    font-size: 12px;
    margin-bottom: 4px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    font-weight: 600;
}

.info-group span {
    color: #333;
    font-size: 15px;
    font-weight: 500;
    display: block;
    padding-bottom: 4px;
    border-bottom: 1px solid #eee;
}

.school-info-section {
    background: #f8f9fa;
    border-radius: 4px;
    padding: 15px;
}

.school-info-section h4 {
    color: #333;
    margin: 0 0 15px 0;
    font-size: 16px;
    border-left: 3px solid #F2532F;
    padding-left: 10px;
}

.fees .fee-amount {
    color: #F2532F;
    font-weight: 600;
}

.fees .fee-applied {
    color: #6AC4CC;
    display: flex;
    align-items: center;
    gap: 5px;
}

.description p {
    margin: 8px 0 0 0;
    color: #444;
    line-height: 1.5;
}

.alert-message {
    display: flex;
    align-items: center;
    gap: 10px;
    background: #fff3cd;
    color: #856404;
    padding: 12px;
    border-radius: 4px;
}

.child-card-footer {
    padding: 15px;
    background: #f9f9f9;
    border-top: 1px solid #eee;
}

.btn-edit {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    color: #6AC4CC;
    text-decoration: none;
    font-weight: 500;
}

.btn-edit:hover {
    color: #59B3BB;
}

.empty-state {
    text-align: center;
    padding: 30px;
    background: #f9f9f9;
    border-radius: 4px;
    color: #666;
}

.empty-state i {
    font-size: 2em;
    margin-bottom: 15px;
}

.action-buttons {
    display: flex;
    justify-content: center;
    gap: 15px;
    margin-top: 30px;
}

.btn-primary,
.btn-secondary {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 12px 20px;
    border-radius: 4px;
    font-size: 15px;
    font-weight: 500;
    text-decoration: none;
    transition: all 0.2s ease;
}

.btn-primary {
    background: #6AC4CC;
    color: white;
}

.btn-primary:hover {
    background: #59B3BB;
    transform: translateY(-2px);
}

.btn-secondary {
    background: #f1f1f1;
    border: 1px solid #ddd;
    color: #333;
}

.btn-secondary:hover {
    background: #e9e9e9;
    transform: translateY(-2px);
}

@media (max-width: 768px) {
    .summary-wrapper {
        padding: 15px 10px;
    }

    .action-buttons {
        flex-direction: column;
    }

    .btn-primary,
    .btn-secondary {
        width: 100%;
        justify-content: center;
    }
}