/**
 * Styles du Widget Elementor Multi-Enrollment
 * 
 * @package WPTotem_LD_Multi_Enrollment
 */

/* Placeholder dans l'éditeur Elementor */
.wptldme-elementor-placeholder,
.wptldme-elementor-preview {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: #fff;
    padding: 40px 30px;
    text-align: center;
    border-radius: 8px;
    min-height: 150px;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
}

.wptldme-elementor-placeholder p,
.wptldme-elementor-preview p {
    margin: 0;
    font-size: 16px;
    line-height: 1.5;
}

.wptldme-elementor-placeholder p small,
.wptldme-elementor-preview p small {
    opacity: 0.8;
    font-size: 13px;
}

/* Formulaire de checkout */
.wptldme-checkout-form {
    background: #fff;
    padding: 30px;
    border-radius: 8px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.08);
}

/* Info cours */
.wptldme-course-info {
    margin-bottom: 25px;
    padding-bottom: 20px;
    border-bottom: 1px solid #eee;
}

.wptldme-course-info h3 {
    margin: 0 0 10px;
    font-size: 1.4em;
    color: #333;
}

.wptldme-course-price {
    font-size: 1.2em;
    font-weight: 600;
    color: #667eea;
}

/* Champs */
.wptldme-form-group {
    margin-bottom: 20px;
}

.wptldme-checkout-form label {
    display: block;
    margin-bottom: 8px;
    font-weight: 500;
    color: #333;
}

.wptldme-checkout-form input[type="text"],
.wptldme-checkout-form input[type="email"] {
    width: 100%;
    padding: 12px 15px;
    border: 1px solid #ddd;
    border-radius: 6px;
    font-size: 15px;
    transition: border-color 0.2s, box-shadow 0.2s;
    box-sizing: border-box;
}

.wptldme-checkout-form input[type="text"]:focus,
.wptldme-checkout-form input[type="email"]:focus {
    border-color: #667eea;
    box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.15);
    outline: none;
}

.wptldme-checkout-form input.error {
    border-color: #e74c3c;
}

/* Participant row */
.wptldme-participant-row {
    background: #f9f9f9;
    padding: 20px;
    border-radius: 8px;
    margin-bottom: 15px;
    position: relative;
}

.wptldme-participant-row:last-child {
    margin-bottom: 0;
}

.wptldme-participant-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 15px;
}

.wptldme-participant-title {
    font-weight: 600;
    color: #333;
}

.wptldme-participant-fields {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 15px;
}

/* Boutons */
.wptldme-checkout-form button,
.wptldme-checkout-form .button {
    cursor: pointer;
    transition: all 0.2s ease;
}

.wptldme-submit-btn {
    display: block;
    width: 100%;
    padding: 15px 30px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: #fff;
    border: none;
    border-radius: 8px;
    font-size: 16px;
    font-weight: 600;
    text-transform: none;
    margin-top: 25px;
}

.wptldme-submit-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 5px 20px rgba(102, 126, 234, 0.4);
}

.wptldme-submit-btn:disabled {
    opacity: 0.6;
    cursor: not-allowed;
    transform: none;
    box-shadow: none;
}

.wptldme-add-participant {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 10px 20px;
    background: #27ae60;
    color: #fff;
    border: none;
    border-radius: 6px;
    font-size: 14px;
    margin-top: 15px;
}

.wptldme-add-participant:hover {
    background: #219a52;
}

.wptldme-remove-participant {
    padding: 6px 12px;
    background: #e74c3c;
    color: #fff;
    border: none;
    border-radius: 4px;
    font-size: 13px;
}

.wptldme-remove-participant:hover {
    background: #c0392b;
}

/* Checkbox "M'inclure" */
.wptldme-include-purchaser {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 15px;
    background: #f0f4ff;
    border-radius: 8px;
    margin-bottom: 20px;
}

.wptldme-include-purchaser input[type="checkbox"] {
    width: 18px;
    height: 18px;
    cursor: pointer;
}

.wptldme-include-purchaser label {
    margin: 0;
    cursor: pointer;
}

/* Messages */
.wptldme-error {
    background: #fdf0f0;
    color: #e74c3c;
    padding: 15px 20px;
    border-radius: 6px;
    margin-bottom: 20px;
    border-left: 4px solid #e74c3c;
}

.wptldme-success {
    background: #f0fdf4;
    color: #27ae60;
    padding: 15px 20px;
    border-radius: 6px;
    margin-bottom: 20px;
    border-left: 4px solid #27ae60;
}

.field-error {
    color: #e74c3c;
    font-size: 13px;
    margin-top: 5px;
}

/* Résumé prix */
.wptldme-price-summary {
    background: #f9f9f9;
    padding: 20px;
    border-radius: 8px;
    margin-top: 20px;
}

.wptldme-price-summary .price-row {
    display: flex;
    justify-content: space-between;
    padding: 8px 0;
}

.wptldme-price-summary .price-total {
    font-weight: 700;
    font-size: 1.2em;
    border-top: 2px solid #ddd;
    padding-top: 15px;
    margin-top: 10px;
}

/* Loading state */
.wptldme-loading {
    position: relative;
    pointer-events: none;
}

.wptldme-loading::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(255, 255, 255, 0.8);
    display: flex;
    justify-content: center;
    align-items: center;
}

/* Responsive */
@media (max-width: 768px) {
    .wptldme-checkout-form {
        padding: 20px;
    }
    
    .wptldme-participant-fields {
        grid-template-columns: 1fr;
    }
    
    .wptldme-participant-header {
        flex-direction: column;
        gap: 10px;
        align-items: flex-start;
    }
}
