/* Conteneur principal - Design senior-friendly */
.msf-form-container {
    max-width: var(--msf-width, 800px);
    margin: 40px auto;
    padding: 0;
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
}

.msf-form-inner {
    background: #ffffff;
    border-radius: 16px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.08);
    overflow: hidden;
    border: 2px solid #e8e8e8;
}

/* Barre de progression - Plus visible */
.msf-progress-bar {
    height: 8px;
    background: #f5f5f5;
    position: relative;
    overflow: hidden;
    border-bottom: 1px solid #e0e0e0;
}

.msf-progress-fill {
    height: 100%;
    background: linear-gradient(90deg, var(--msf-primary, #4a90e2) 0%, var(--msf-secondary, #357abd) 100%);
    transition: width 0.5s ease;
    position: relative;
}

.msf-progress-fill::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.4), transparent);
    animation: shimmer 2s infinite;
}

@keyframes shimmer {
    0% { transform: translateX(-100%); }
    100% { transform: translateX(100%); }
}

.msf-progress-text {
    text-align: center;
    padding: 20px;
    font-size: 18px;
    color: #333;
    font-weight: 600;
    background: #fafafa;
}

/* Conteneur des étapes */
.msf-steps-wrapper {
    padding: 40px;
    min-height: 400px;
    position: relative;
}

@media (max-width: 768px) {
    .msf-steps-wrapper {
        padding: 30px 20px;
    }
}

/* Étapes */
.msf-step {
    display: none;
}

.msf-step-active {
    display: block;
    animation: fadeInUp 0.5s ease-out;
}

/* Animations */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Slide animation */
.msf-step-prev {
    display: none;
}

.msf-step-next {
    display: none;
}

/* En-tête de l'étape - Textes plus gros et lisibles */
.msf-step-header {
    margin-bottom: 40px;
}

.msf-step-title {
    font-size: 34px;
    font-weight: 700;
    color: #2c3e50;
    margin: 0 0 15px 0;
    line-height: 1.3;
}

.msf-step-subtitle {
    font-size: 20px;
    color: #555;
    margin: 0;
    line-height: 1.6;
    font-weight: 400;
}

/* Champs - Textes plus gros et spacing généreux */
.msf-field-group {
    margin-bottom: 35px;
}

.msf-field-label {
    display: block;
    font-size: 19px;
    font-weight: 600;
    color: #2c3e50;
    margin-bottom: 12px;
    line-height: 1.4;
}

.msf-field-required::after {
    content: '*';
    color: #e74c3c;
    margin-left: 5px;
    font-size: 20px;
}

/* Inputs - Plus gros et plus espacés */
.msf-field-input,
.msf-field-textarea,
.msf-field-select {
    width: 100%;
    padding: 18px 22px;
    font-size: 18px;
    border: 2px solid #d0d0d0;
    border-radius: 8px;
    transition: all 0.3s ease;
    font-family: inherit;
    background: #fafafa;
    color: #2c3e50;
    line-height: 1.5;
}

.msf-field-input:focus,
.msf-field-textarea:focus,
.msf-field-select:focus {
    outline: none;
    border-color: var(--msf-primary, #4a90e2);
    background: #fff;
    box-shadow: 0 0 0 3px rgba(74, 144, 226, 0.15);
}

.msf-field-textarea {
    min-height: 140px;
    resize: vertical;
}

/* Radio et Checkbox - Plus gros et plus lisibles */
.msf-radio-group,
.msf-checkbox-group {
    display: flex;
    flex-direction: column;
    gap: 15px;
}

.msf-radio-item,
.msf-checkbox-item {
    display: flex;
    align-items: center;
    padding: 18px 22px;
    background: #fafafa;
    border: 2px solid #d0d0d0;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.3s ease;
    position: relative;
}

.msf-radio-item:hover,
.msf-checkbox-item:hover {
    background: #fff;
    border-color: var(--msf-primary, #4a90e2);
    transform: translateX(5px);
}

.msf-radio-item input,
.msf-checkbox-item input {
    margin: 0 15px 0 0;
    width: 24px;
    height: 24px;
    cursor: pointer;
    accent-color: var(--msf-primary, #4a90e2);
}

.msf-radio-item input:checked,
.msf-checkbox-item input:checked {
    background: var(--msf-primary, #4a90e2);
}

.msf-radio-item label,
.msf-checkbox-item label {
    cursor: pointer;
    flex: 1;
    font-size: 18px;
    margin: 0;
    color: #2c3e50;
    line-height: 1.5;
}

/* Cartes visuelles - Plus grosses et lisibles */
.msf-cards-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(160px, 1fr));
    gap: 20px;
    margin-top: 15px;
}

@media (max-width: 768px) {
    .msf-cards-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

.msf-card {
    background: #fafafa;
    border: 3px solid #d0d0d0;
    border-radius: 12px;
    padding: 30px 20px;
    text-align: center;
    cursor: pointer;
    transition: all 0.3s ease;
    position: relative;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 15px;
    min-height: 140px;
}

.msf-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.12);
    border-color: var(--msf-primary, #4a90e2);
    background: #fff;
}

.msf-card-selected {
    background: var(--msf-primary, #4a90e2);
    border-color: var(--msf-primary, #4a90e2);
    color: white;
    transform: translateY(-4px);
    box-shadow: 0 8px 20px rgba(74, 144, 226, 0.35);
}

.msf-card-icon {
    font-size: 48px;
    margin-bottom: 5px;
    transition: transform 0.3s ease;
}

.msf-card:hover .msf-card-icon {
    transform: scale(1.15);
}

.msf-card-selected .msf-card-icon::before {
    filter: brightness(0) invert(1);
}

.msf-card-label {
    font-size: 17px;
    font-weight: 600;
    line-height: 1.4;
}

.msf-card input {
    position: absolute;
    opacity: 0;
    pointer-events: none;
}

/* Erreurs - Plus visibles */
.msf-error .msf-field-input,
.msf-error .msf-field-textarea,
.msf-error .msf-field-select {
    border-color: #e74c3c;
    background: #fff5f5;
    border-width: 3px;
}

.msf-error-message {
    color: #c0392b;
    font-size: 16px;
    margin-top: 8px;
    display: flex;
    align-items: center;
    gap: 8px;
    font-weight: 600;
}

.msf-error-message::before {
    content: '⚠';
    font-size: 18px;
}

/* Boutons de navigation - Plus gros et visibles */
.msf-form-actions {
    display: flex;
    gap: 20px;
    margin-top: 50px;
    padding-top: 35px;
    border-top: 2px solid #e8e8e8;
}

.msf-btn {
    flex: 1;
    padding: 20px 40px;
    font-size: 19px;
    font-weight: 600;
    border: none;
    border-radius: 10px;
    cursor: pointer;
    transition: all 0.3s ease;
    font-family: inherit;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    text-transform: none;
    letter-spacing: 0.3px;
}

.msf-btn-prev {
    background: #f5f5f5;
    color: #555;
    border: 2px solid #d0d0d0;
}

.msf-btn-prev:hover {
    background: #e8e8e8;
    transform: translateX(-4px);
    border-color: #b0b0b0;
}

.msf-btn-next,
.msf-btn-submit {
    background: var(--msf-primary, #4a90e2);
    color: white;
    box-shadow: 0 4px 12px rgba(74, 144, 226, 0.35);
    border: 2px solid var(--msf-primary, #4a90e2);
}

.msf-btn-next:hover,
.msf-btn-submit:hover {
    transform: translateY(-3px);
    box-shadow: 0 6px 18px rgba(74, 144, 226, 0.45);
}

.msf-btn-submit {
    background: #27ae60;
    border-color: #27ae60;
    box-shadow: 0 4px 12px rgba(39, 174, 96, 0.35);
}

.msf-btn-submit:hover {
    box-shadow: 0 6px 18px rgba(39, 174, 96, 0.45);
}

.msf-btn:disabled {
    opacity: 0.6;
    cursor: not-allowed;
    transform: none !important;
}

/* Spinner de chargement */
.msf-spinner {
    display: inline-block;
    width: 16px;
    height: 16px;
    border: 2px solid rgba(255, 255, 255, 0.3);
    border-top-color: white;
    border-radius: 50%;
    animation: spin 0.6s linear infinite;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

/* Message de succès - Plus gros et visible */
.msf-success-message {
    text-align: center;
    padding: 70px 40px;
    animation: fadeInUp 0.5s ease-out;
}

.msf-success-icon {
    width: 90px;
    height: 90px;
    background: #27ae60;
    color: white;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 54px;
    margin: 0 auto 30px;
    box-shadow: 0 8px 25px rgba(39, 174, 96, 0.3);
    animation: scaleIn 0.5s cubic-bezier(0.68, -0.55, 0.265, 1.55);
}

@keyframes scaleIn {
    from {
        transform: scale(0);
        opacity: 0;
    }
    to {
        transform: scale(1);
        opacity: 1;
    }
}

.msf-success-message h3 {
    font-size: 32px;
    color: #2c3e50;
    margin: 0 0 20px 0;
    font-weight: 700;
}

.msf-success-message p {
    font-size: 20px;
    color: #555;
    margin: 0;
    line-height: 1.7;
    font-weight: 400;
}

/* Responsive - Adapté pour mobile */
@media (max-width: 768px) {
    .msf-form-container {
        margin: 20px 15px;
    }
    
    .msf-steps-wrapper {
        padding: 30px 20px;
    }
    
    .msf-step-title {
        font-size: 28px;
    }
    
    .msf-step-subtitle {
        font-size: 18px;
    }
    
    .msf-field-label {
        font-size: 18px;
    }
    
    .msf-field-input,
    .msf-field-textarea,
    .msf-field-select {
        font-size: 17px;
        padding: 16px 20px;
    }
    
    .msf-radio-item label,
    .msf-checkbox-item label {
        font-size: 17px;
    }
    
    .msf-card {
        padding: 25px 15px;
        min-height: 120px;
    }
    
    .msf-card-icon {
        font-size: 42px;
    }
    
    .msf-card-label {
        font-size: 16px;
    }
    
    .msf-form-actions {
        flex-direction: column-reverse;
        gap: 15px;
    }
    
    .msf-btn {
        width: 100%;
        font-size: 18px;
        padding: 18px 30px;
    }
    
    .msf-success-message {
        padding: 50px 20px;
    }
    
    .msf-success-icon {
        width: 80px;
        height: 80px;
        font-size: 48px;
    }
    
    .msf-success-message h3 {
        font-size: 26px;
    }
    
    .msf-success-message p {
        font-size: 18px;
    }
}
