/**
 * Styles pour les champs d'apprenants au checkout - VERSION GÉNÉRIQUE PROPRE
 * Inclut le support des custom attributes Dokeos
 * 
 * @package DokeosPremiun
 * @since 2.1.0
 */

/* =============================================
   SECTION PRINCIPALE
   ============================================= */

/* Améliorer l'apparence de la section */
.wc-block-checkout__order-fields {
    background: #ffffff;
    border: 1px solid #e1e8ed;
    border-radius: 8px;
    padding: 24px;
    margin: 20px 0;
    box-shadow: 0 1px 4px rgba(0, 0, 0, 0.05);
}

/* Espacement interne */
.wc-block-checkout__order-fields .wc-block-components-checkout-step__container {
    padding-top: 8px;
}

/* =============================================
   TITRES ET DESCRIPTIONS
   ============================================= */

/* Titre selon singulier/pluriel */
.wc-block-checkout__order-fields .wc-block-components-checkout-step__title[data-dokeos-plural="true"]::before {
    content: "Informations des apprenants";
    color: #234d70;
    font-size: 18px;
    font-weight: 600;
}

.wc-block-checkout__order-fields .wc-block-components-checkout-step__title[data-dokeos-plural="false"]::before {
    content: "Informations de l'apprenant";
    color: #234d70;
    font-size: 18px;
    font-weight: 600;
}

.wc-block-checkout__order-fields .wc-block-components-checkout-step__title {
    font-size: 0;
    color: transparent;
    margin-bottom: 8px;
}

/* Description selon singulier/pluriel */
.wc-block-checkout__order-fields .wc-block-components-checkout-step__container[data-dokeos-plural="true"]::before {
    content: "Veuillez renseigner les informations des personnes qui suivront les formations.";
    display: block;
    color: #666;
    font-size: 13px;
    margin: 0 0 16px 0;
    line-height: 1.4;
}

.wc-block-checkout__order-fields .wc-block-components-checkout-step__container[data-dokeos-plural="false"]::before {
    content: "Veuillez renseigner les informations de la personne qui suivra la formation.";
    display: block;
    color: #666;
    font-size: 13px;
    margin: 0 0 16px 0;
    line-height: 1.4;
}

/* =============================================
   CHAMPS GÉNÉRIQUES
   ============================================= */

/* Tous les champs Dokeos - Design épuré et compact (standards + custom attributes) */
.wc-block-components-text-input[class*="dokeos-premium"],
.wc-block-components-text-input[class*="dokeos-attr"] {
    display: block !important;
    width: 100% !important;
    margin-bottom: 4px !important;
    background: transparent;
    border: none !important;
    padding: 2px 0;
    box-sizing: border-box;
}

/* Titres de groupes créés en JavaScript - plus besoin de pseudo-éléments */

/* Style pour les titres de groupes créés dynamiquement */
.dokeos-group-title {
    color: #234d70 !important;
    font-size: 13px !important;
    font-weight: 600 !important;
    margin: 0 0 8px 0 !important;
    padding: 6px 10px !important;
    background: #f8fafc !important;
    border-left: 2px solid #f28067 !important;
    border-radius: 3px !important;
    display: block !important;
}

.dokeos-group-title:not(:first-child) {
    margin-top: 16px !important;
}

/* Champs input - Design compact (standards + custom attributes) */
.wc-block-components-text-input[class*="dokeos-premium"] input,
.wc-block-components-text-input[class*="dokeos-attr"] input {
    width: 100%;
    padding: 8px 10px;
    border: 1px solid #d1d5db;
    border-radius: 4px;
    font-size: 13px;
    background: white;
    transition: border-color 0.2s ease;
    box-sizing: border-box;
}

.wc-block-components-text-input[class*="dokeos-premium"] input:focus,
.wc-block-components-text-input[class*="dokeos-attr"] input:focus {
    border-color: #234d70;
    box-shadow: 0 0 0 1px rgba(35, 77, 112, 0.2);
    outline: none;
}

/* Labels compacts (standards + custom attributes) */
.wc-block-components-text-input[class*="dokeos-premium"] label,
.wc-block-components-text-input[class*="dokeos-attr"] label {
    display: block;
    margin-bottom: 3px;
    font-weight: 500;
    color: #374151;
    font-size: 12px;
}

/* Espacement pour les champs email (fin de groupe) */
.wc-block-components-text-input[class*="beneficiary_email"] {
    margin-bottom: 10px !important;
}

/* =============================================
   RESPONSIVE
   ============================================= */

@media (max-width: 768px) {
    .wc-block-checkout__order-fields {
        padding: 16px;
        margin: 16px 0;
    }
    
    .wc-block-components-text-input[class*="dokeos-premium"] input,
    .wc-block-components-text-input[class*="dokeos-attr"] input {
        font-size: 14px; /* Plus grand sur mobile */
        padding: 10px 12px;
    }
    
    .wc-block-components-text-input[class*="beneficiary_first_name"]::before {
        font-size: 12px;
        padding: 4px 8px;
    }
}