/* Modal d'inscription V2 */
.cdfef-modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.8);
    z-index: 99999;
    overflow-y: auto;
    animation: fadeIn 0.3s;
}

@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

.cdfef-modal-content {
    background-color: #ffffff;
    margin: 40px auto;
    padding: 0;
    border-radius: 8px;
    max-width: 800px;
    width: 90%;
    max-height: 90vh;
    overflow: hidden;
    position: relative;
    box-shadow: 0 5px 30px rgba(0, 0, 0, 0.3);
}

.cdfef-modal-close {
    position: absolute;
    top: 20px;
    right: 20px;
    font-size: 28px;
    font-weight: bold;
    color: #aaa;
    cursor: pointer;
    z-index: 1;
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    transition: all 0.3s;
}

.cdfef-modal-close:hover {
    color: #000;
    background-color: rgba(0, 0, 0, 0.05);
}

.cdfef-modal-title {
    background: linear-gradient(135deg, #0073aa 0%, #005177 100%);
    color: white;
    margin: 0;
    padding: 30px;
    font-size: 24px;
    font-weight: 500;
}

.cdfef-modal-event-info {
    background-color: #f0f4f8;
    padding: 20px 30px;
    margin: 0;
    border-bottom: 1px solid #e0e0e0;
    color: #333;
    font-size: 16px;
}

/* Sélecteur de modèle */
.cdfef-template-selector {
    padding: 30px;
}

.cdfef-template-selector h3 {
    margin-top: 0;
    margin-bottom: 20px;
    color: #333;
    font-size: 20px;
}

.cdfef-template-buttons {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
    gap: 15px;
}

.cdfef-template-button {
    background: #fff;
    border: 2px solid #e0e0e0;
    border-radius: 6px;
    padding: 20px;
    cursor: pointer;
    transition: all 0.3s;
    text-align: left;
    position: relative;
}

.cdfef-template-button:hover {
    border-color: #0073aa;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 115, 170, 0.15);
}

.cdfef-template-button.is-default {
    border-color: #0073aa;
    background-color: #f0f8ff;
}

.template-name {
    font-size: 16px;
    font-weight: 500;
    color: #333;
    display: block;
    margin-bottom: 5px;
}

.default-badge {
    position: absolute;
    top: 10px;
    right: 10px;
    background-color: #0073aa;
    color: white;
    font-size: 11px;
    padding: 4px 8px;
    border-radius: 4px;
    text-transform: uppercase;
}

/* Formulaire d'inscription */
.cdfef-registration-form {
    padding: 30px;
    max-height: calc(90vh - 200px);
    overflow-y: auto;
}

.cdfef-form-section {
}

.cdfef-form-section:last-child {
}

.cdfef-form-heading {
    color: #0073aa;
    margin: 0 0 20px 0;
    padding-bottom: 10px;
    border-bottom: 2px solid #e0e0e0;
    font-size: 18px;
}

.cdfef-form-paragraph {
    background-color: #f9f9f9;
    padding: 15px;
    border-left: 4px solid #0073aa;
    margin: 0 0 20px 0;
    color: #666;
}

.cdfef-form-group {
    margin-bottom: 20px;
}

.cdfef-form-group label {
    display: block;
    margin-bottom: 8px;
    font-weight: 500;
    color: #333;
    font-size: 14px;
}

.cdfef-form-group label .required {
    color: #d63638;
}

.cdfef-form-group input[type="text"],
.cdfef-form-group input[type="email"],
.cdfef-form-group input[type="tel"],
.cdfef-form-group input[type="number"],
.cdfef-form-group input[type="date"],
.cdfef-form-group select,
.cdfef-form-group textarea {
    width: 100%;
    padding: 12px 16px;
    border: 1px solid #ddd;
    border-radius: 4px;
    font-size: 16px;
    transition: all 0.3s;
    background-color: #fff;
    box-sizing: border-box;
}

.cdfef-form-group input:focus,
.cdfef-form-group select:focus,
.cdfef-form-group textarea:focus {
    outline: none;
    border-color: #0073aa;
    box-shadow: 0 0 0 3px rgba(0, 115, 170, 0.1);
}

.cdfef-form-group textarea {
    resize: vertical;
    min-height: 100px;
}

/* Layout des champs */
.cdfef-form-row {
    display: flex;
    gap: 20px;
    flex-wrap: wrap;
}

.cdfef-form-group-half {
    flex: 0 0 calc(50% - 10px);
}

.cdfef-form-group-third {
    flex: 0 0 calc(33.333% - 14px);
}

/* Nouvelles classes de largeur pour les champs dynamiques */
.cdfef-field-full {
    flex: 0 0 100%;
}

.cdfef-field-half {
    flex: 0 0 calc(50% - 10px);
}

.cdfef-field-third {
    flex: 0 0 calc(33.333% - 14px);
}

/* Titres de section */
.cdfef-section-title {
    margin: 25px 0 15px;
    font-size: 18px;
    font-weight: 600;
    color: #333;
    border-bottom: 1px solid #e0e0e0;
    padding-bottom: 10px;
}

/* Heading de formulaire */
.cdfef-form-heading {
    width: 100%;
    margin: 20px 0 10px;
}

.cdfef-form-heading h4 {
    margin: 0;
    font-size: 16px;
    font-weight: 600;
    color: #444;
}

/* Radio et checkbox */
.cdfef-radio-group {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.cdfef-radio-label,
.cdfef-checkbox-label {
    display: flex;
    align-items: center;
    cursor: pointer;
    font-weight: normal;
}

.cdfef-radio-label input[type="radio"],
.cdfef-checkbox-label input[type="checkbox"] {
    margin-right: 8px;
    width: auto;
}

/* Boutons d'action */
.cdfef-form-actions {
    display: flex;
    gap: 15px;
    justify-content: flex-end;
    margin-top: 30px;
    padding-top: 30px;
    border-top: 1px solid #e0e0e0;
}

.cdfef-btn {
    padding: 12px 24px;
    border: none;
    border-radius: 4px;
    font-size: 16px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.3s;
    text-decoration: none;
    display: inline-block;
}

.cdfef-btn-primary {
    background-color: #0073aa;
    color: white;
}

.cdfef-btn-primary:hover {
    background-color: #005177;
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(0, 115, 170, 0.25);
}

.cdfef-btn-secondary {
    background-color: #f0f0f0;
    color: #333;
}

.cdfef-btn-secondary:hover {
    background-color: #e0e0e0;
}

/* Vérification SMS */
.cdfef-sms-verification {
    padding: 30px;
    text-align: center;
}

.cdfef-sms-verification h3 {
    color: #333;
    margin-bottom: 20px;
}

.cdfef-sms-verification .cdfef-form-group {
    max-width: 300px;
    margin: 30px auto;
}

#cdfef-sms-code {
    text-align: center;
    font-size: 24px;
    letter-spacing: 5px;
}

/* Aperçu du contrat */
.cdfef-contract-preview {
    padding: 30px;
}

.cdfef-contract-preview h3 {
    margin-bottom: 20px;
    color: #333;
}

.cdfef-contract-content {
    background-color: #fff;
    border: 1px solid #ddd;
    border-radius: 4px;
    padding: 30px;
    max-height: 500px;
    overflow-y: auto;
    margin-bottom: 20px;
}

/* Message de succès */
.cdfef-success-message {
    padding: 60px 30px;
    text-align: center;
}

.cdfef-success-icon {
    width: 80px;
    height: 80px;
    background-color: #46b450;
    color: white;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 48px;
    margin: 0 auto 20px;
}

.cdfef-success-message h3 {
    color: #333;
    margin-bottom: 15px;
    font-size: 24px;
}

.cdfef-success-message p {
    color: #666;
    font-size: 16px;
    margin-bottom: 30px;
}

/* Notifications */
.cdfef-notification {
    position: fixed;
    bottom: 20px;
    right: 20px;
    padding: 16px 24px;
    border-radius: 4px;
    color: white;
    font-weight: 500;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
    z-index: 100000;
    animation: slideIn 0.3s;
}

@keyframes slideIn {
    from {
        transform: translateX(100%);
        opacity: 0;
    }
    to {
        transform: translateX(0);
        opacity: 1;
    }
}

.cdfef-notification-info {
    background-color: #0073aa;
}

.cdfef-notification-error {
    background-color: #d63638;
}

/* Loading */
.cdfef-loading {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: rgba(255, 255, 255, 0.9);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 1000;
    font-size: 18px;
    color: #666;
}

/* Responsive */
@media (max-width: 768px) {
    .cdfef-modal-content {
        margin: 20px auto;
        width: 95%;
        max-height: 95vh;
    }
    
    .cdfef-form-group-half,
    .cdfef-form-group-third {
        flex: 0 0 100%;
    }
    
    .cdfef-form-row {
        flex-direction: column;
        gap: 0;
    }
    
    .cdfef-template-buttons {
        grid-template-columns: 1fr;
    }
    
    .cdfef-form-actions {
        flex-direction: column;
    }
    
    .cdfef-btn {
        width: 100%;
        text-align: center;
    }
}