/* ============================================
   CHAMPS CONDITIONNELS - CF2ROUES
   Masquer/Afficher les champs du représentant légal
   selon si l'élève est mineur
   ============================================ */

/* MASQUER les champs du représentant légal PAR DÉFAUT */
/* (ils s'afficheront seulement si la checkbox est cochée) */

[data-field="fbb1dca292148e4c6841ccc5a8d475fd"],  /* E-mail de l'élève */
[data-field="561c83d6e141457629d079a49e628c66"],  /* Prénom du représentant légal */
[data-field="975aa9eb4d2067488212ff3e44e70d35"],  /* Nom du représentant légal */
[data-field="7f9cc8e65d50ff711bb711fcb0fdb04a"]   /* Téléphone du représentant légal */
{
    max-height: 0;
    opacity: 0;
    overflow: hidden;
    margin: 0 !important;
    padding: 0 !important;
    transform: translateY(-15px);
    transition: max-height 0.4s cubic-bezier(0.4, 0, 0.2, 1), 
                opacity 0.4s cubic-bezier(0.4, 0, 0.2, 1),
                transform 0.4s cubic-bezier(0.4, 0, 0.2, 1),
                margin 0.4s cubic-bezier(0.4, 0, 0.2, 1),
                padding 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

/* AFFICHER les champs quand la checkbox "élève mineur" est COCHÉE */
#\32 c26c86e300b5c8501bc3c351a9eb847:checked ~ [data-field="fbb1dca292148e4c6841ccc5a8d475fd"],
#\32 c26c86e300b5c8501bc3c351a9eb847:checked ~ [data-field="561c83d6e141457629d079a49e628c66"],
#\32 c26c86e300b5c8501bc3c351a9eb847:checked ~ [data-field="975aa9eb4d2067488212ff3e44e70d35"],
#\32 c26c86e300b5c8501bc3c351a9eb847:checked ~ [data-field="7f9cc8e65d50ff711bb711fcb0fdb04a"] {
    max-height: 500px;
    opacity: 1;
    overflow: hidden;
    margin: 0 0 18px 0 !important;
    padding: 5px 0 !important;
    transform: translateY(0);
    transition: max-height 0.4s cubic-bezier(0.4, 0, 0.2, 1), 
                opacity 0.4s cubic-bezier(0.4, 0, 0.2, 1),
                transform 0.4s cubic-bezier(0.4, 0, 0.2, 1),
                margin 0.4s cubic-bezier(0.4, 0, 0.2, 1),
                padding 0.4s cubic-bezier(0.4, 0, 0.2, 1),
                overflow 0s 0.4s;
}

/* ============================================
   SOLUTION ALTERNATIVE avec :has() 
   (Plus robuste, fonctionne même si structure change)
   ============================================ */

/* Si le navigateur supporte :has() */
@supports selector(:has(*)) {
    
    /* Réinitialiser les règles précédentes */
    [data-field="fbb1dca292148e4c6841ccc5a8d475fd"],
    [data-field="561c83d6e141457629d079a49e628c66"],
    [data-field="975aa9eb4d2067488212ff3e44e70d35"],
    [data-field="7f9cc8e65d50ff711bb711fcb0fdb04a"] {
        display: block !important;
        opacity: 1;
        max-height: none;
        overflow: visible;
    }
    
    /* Masquer par défaut */
    #sb_additional_fields:not(:has(#\32 c26c86e300b5c8501bc3c351a9eb847:checked)) [data-field="fbb1dca292148e4c6841ccc5a8d475fd"],
    #sb_additional_fields:not(:has(#\32 c26c86e300b5c8501bc3c351a9eb847:checked)) [data-field="561c83d6e141457629d079a49e628c66"],
    #sb_additional_fields:not(:has(#\32 c26c86e300b5c8501bc3c351a9eb847:checked)) [data-field="975aa9eb4d2067488212ff3e44e70d35"],
    #sb_additional_fields:not(:has(#\32 c26c86e300b5c8501bc3c351a9eb847:checked)) [data-field="7f9cc8e65d50ff711bb711fcb0fdb04a"] {
        max-height: 0;
        opacity: 0;
        overflow: hidden;
        margin: 0 !important;
        padding: 0 !important;
        transform: translateY(-15px);
        transition: max-height 0.4s cubic-bezier(0.4, 0, 0.2, 1), 
                    opacity 0.4s cubic-bezier(0.4, 0, 0.2, 1),
                    transform 0.4s cubic-bezier(0.4, 0, 0.2, 1),
                    margin 0.4s cubic-bezier(0.4, 0, 0.2, 1),
                    padding 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    }
    
    /* Afficher avec animation quand checkbox cochée */
    #sb_additional_fields:has(#\32 c26c86e300b5c8501bc3c351a9eb847:checked) [data-field="fbb1dca292148e4c6841ccc5a8d475fd"],
    #sb_additional_fields:has(#\32 c26c86e300b5c8501bc3c351a9eb847:checked) [data-field="561c83d6e141457629d079a49e628c66"],
    #sb_additional_fields:has(#\32 c26c86e300b5c8501bc3c351a9eb847:checked) [data-field="975aa9eb4d2067488212ff3e44e70d35"],
    #sb_additional_fields:has(#\32 c26c86e300b5c8501bc3c351a9eb847:checked) [data-field="7f9cc8e65d50ff711bb711fcb0fdb04a"] {
        max-height: 500px;
        opacity: 1;
        overflow: hidden;
        margin: 0 0 18px 0 !important;
        padding: 5px 0 !important;
        transform: translateY(0);
        transition: max-height 0.4s cubic-bezier(0.4, 0, 0.2, 1), 
                    opacity 0.4s cubic-bezier(0.4, 0, 0.2, 1),
                    transform 0.4s cubic-bezier(0.4, 0, 0.2, 1),
                    margin 0.4s cubic-bezier(0.4, 0, 0.2, 1),
                    padding 0.4s cubic-bezier(0.4, 0, 0.2, 1),
                    overflow 0s 0.4s;
    }
}

/* ============================================
   INDICATEUR VISUEL "OBLIGATOIRE" (*)
   Uniquement pour Prénom et Téléphone du représentant légal
   ============================================ */

/* Ajouter un astérisque rouge aux labels quand les champs sont visibles */
#\32 c26c86e300b5c8501bc3c351a9eb847:checked ~ [data-field="561c83d6e141457629d079a49e628c66"] label::after,
#\32 c26c86e300b5c8501bc3c351a9eb847:checked ~ [data-field="7f9cc8e65d50ff711bb711fcb0fdb04a"] label::after {
    content: " *";
    color: #dc3545;
    font-weight: bold;
    margin-left: 2px;
}

/* Version avec :has() pour plus de robustesse */
@supports selector(:has(*)) {
    #sb_additional_fields:has(#\32 c26c86e300b5c8501bc3c351a9eb847:checked) [data-field="561c83d6e141457629d079a49e628c66"] label::after,
    #sb_additional_fields:has(#\32 c26c86e300b5c8501bc3c351a9eb847:checked) [data-field="7f9cc8e65d50ff711bb711fcb0fdb04a"] label::after {
        content: " *";
        color: #dc3545;
        font-weight: bold;
        margin-left: 2px;
    }
}

/* ============================================
   AMÉLIORATION VISUELLE
   ============================================ */

/* L'animation fonctionne maintenant dans les deux sens grâce aux transitions */
/* Les champs glissent vers le bas quand ils apparaissent */
/* Et glissent vers le haut quand ils disparaissent */

/* Highlight de la checkbox quand cochée */
#\32 c26c86e300b5c8501bc3c351a9eb847:checked + .custom-label {
    background-color: #007bff;
    border-color: #007bff;
    transition: all 0.3s ease;
}

/* ============================================
   RÉSUMÉ DU FONCTIONNEMENT:
   
   ✅ Checkbox NON cochée (élève majeur):
      - Tous les champs du représentant légal sont MASQUÉS
   
   ✅ Checkbox COCHÉE (élève mineur):
      - E-mail de l'élève : VISIBLE
      - Prénom du représentant légal : VISIBLE + *
      - Nom du représentant légal : VISIBLE
      - Téléphone du représentant légal : VISIBLE + *
      
   * = Indicateur visuel d'obligation (rouge)
   ============================================ */

div#sb_invoice_payment_data_container {
 display : none ;
}
div#sb_booking_company_time {
 display : none ;
}
.form-group.form-group--terms.form-group--promotion-letter{
 display : none ;
}

.form-group.form-client-phone{
 display : none ;
}
/*
	Custom CSS
	Please make sure your CSS rules are 
	more particular / have higher priority
	then other page styles
*/
 #events h3   {
	/* add your css rule here */
}


 #events p.duration, #events div.duration   {
	/* add your css rule here */
}


 #events p.description, #events div.description   {
	/* add your css rule here */
}


 #events .selectedEvent   {
	/* add your css rule here */
}


 #events input.reserve_time_btn   {
	/* add your css rule here */
}


 #events input.select_another_btn   {
	/* add your css rule here */
}


 #eventForm #start_date-block-container h3, #eventForm #timeline-container h3   {
	/* add your css rule here */
}


 #eventForm #save_button   {
	/* add your css rule here */
}


 div.ui-widget-content   {
	/* add your css rule here */
}


 div.ui-widget-header   {
	/* add your css rule here */
}


 #timeline-container table.timeline   {
	/* add your css rule here */
}


 .timeline td.not_worked_time   {
	/* add your css rule here */
}


 .timeline td.free_time   {
	/* add your css rule here */
}


 .timeline td.selected_time   {
	/* add your css rule here */
}


 .timeline td.reserved_time   {
	/* add your css rule here */
}


 div#loading   {
	/* add your css rule here */
}


 #start_date-block-container .zend_form dt, start_date-block-container .zend_form dt b, start_date-block-container .zend_form dd label   {
	/* add your css rule here */
}

