/* CSFM Inscription ACM — Frontend Form Styles */

.csfm-form-wrapper {
    max-width: 780px;
    margin: 0 auto;
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    color: #333;
}

/* Progress bar */
.csfm-progress-bar { margin-bottom: 32px; }

.csfm-progress-steps {
    display: flex;
    justify-content: space-between;
    position: relative;
    margin-bottom: 12px;
}

.csfm-step {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 4px;
    flex: 1;
}

.csfm-step-num {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    background: #e0e0e0;
    color: #888;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    font-size: 14px;
    transition: background .3s, color .3s;
    position: relative;
    z-index: 2;
}

.csfm-step.active .csfm-step-num,
.csfm-step.done .csfm-step-num {
    background: #0F3D3E;
    color: #fff;
}

.csfm-step-label {
    font-size: 12px;
    color: #888;
    font-weight: 500;
}

.csfm-step.active .csfm-step-label { color: #0F3D3E; font-weight: 700; }

.csfm-progress-track {
    height: 4px;
    background: #e0e0e0;
    border-radius: 2px;
    overflow: hidden;
}

.csfm-progress-fill {
    height: 100%;
    background: #1F6F5B;
    border-radius: 2px;
    transition: width .4s ease;
}

/* Step content */
.csfm-step-title {
    font-size: 20px;
    color: #0F3D3E;
    margin: 0 0 24px;
    padding-bottom: 10px;
    border-bottom: 2px solid #0F3D3E;
}

.csfm-step-title ~ h3, h3.csfm-section-title {
    font-size: 15px;
    color: #1F6F5B;
    margin: 20px 0 10px;
}

h3 { font-size: 15px; color: #1F6F5B; margin: 20px 0 10px; }

/* Form grid */
.csfm-row {
    display: flex;
    gap: 16px;
    margin-bottom: 16px;
    flex-wrap: wrap;
}

.csfm-col { flex: 1; min-width: 200px; }
.csfm-col-full { flex: 1 1 100%; }

label {
    display: block;
    font-size: 13px;
    font-weight: 600;
    color: #444;
    margin-bottom: 5px;
}

label small {
    font-weight: 400;
    color: #888;
    font-size: 11px;
}

.req { color: #dc3545; }

input[type="text"],
input[type="email"],
input[type="tel"],
input[type="date"],
input[type="number"],
textarea,
select {
    width: 100%;
    padding: 9px 12px;
    border: 1.5px solid #ddd;
    border-radius: 6px;
    font-size: 14px;
    color: #333;
    background: #fff;
    transition: border-color .2s, box-shadow .2s;
    box-sizing: border-box;
    font-family: inherit;
}

input:focus, textarea:focus, select:focus {
    outline: none;
    border-color: #1F6F5B;
    box-shadow: 0 0 0 3px rgba(31,111,91,.12);
}

textarea { resize: vertical; min-height: 70px; }

.csfm-input-sm { max-width: 120px; }

.csfm-readonly-field {
    padding: 9px 12px;
    background: #f6fdf1;
    border: 1.5px solid #ddeee8;
    border-radius: 6px;
    font-size: 14px;
    color: #0F3D3E;
    font-weight: 600;
}

/* Radio / checkbox */
.csfm-radio-group {
    display: flex;
    gap: 16px;
    flex-wrap: wrap;
    padding: 4px 0;
}

.csfm-radio-group label {
    font-weight: 400;
    display: flex;
    align-items: center;
    gap: 6px;
    cursor: pointer;
}

.csfm-radio-vertical { flex-direction: column; gap: 8px; }

.csfm-radio-card {
    display: block;
    padding: 12px 16px;
    border: 2px solid #e0e0e0;
    border-radius: 8px;
    cursor: pointer;
    transition: border-color .2s, background .2s;
    font-weight: 400 !important;
    line-height: 1.5;
}

.csfm-radio-card input { margin-right: 8px; }
.csfm-radio-card:has(input:checked),
.csfm-radio-card.checked {
    border-color: #1F6F5B;
    background: #f6fdf1;
}

.csfm-checkbox-label {
    display: flex;
    align-items: flex-start;
    gap: 8px;
    cursor: pointer;
    font-weight: 400;
}

.csfm-checkbox-label input { margin-top: 2px; flex-shrink: 0; }

/* Checkbox grid (maladies) */
.csfm-checkbox-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    gap: 8px;
    margin-bottom: 16px;
}

.csfm-checkbox-item {
    display: flex;
    align-items: center;
    gap: 6px;
    font-weight: 400;
    font-size: 14px;
    cursor: pointer;
    padding: 5px 8px;
    border-radius: 4px;
    transition: background .15s;
}

.csfm-checkbox-item:hover { background: #f6fdf1; }

/* Tables */
.csfm-table-wrapper { overflow-x: auto; margin-bottom: 16px; }

.csfm-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 13.5px;
}

.csfm-table th {
    background: #0F3D3E;
    color: white;
    padding: 8px 12px;
    text-align: left;
    font-weight: 600;
}

.csfm-table td {
    border: 1px solid #ddeee8;
    padding: 7px 12px;
}

.csfm-center { text-align: center; }

/* Autorisations */
.csfm-authorizations { margin-bottom: 16px; }

.csfm-auth-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 10px 0;
    border-bottom: 1px solid #f0f0f0;
    flex-wrap: wrap;
    gap: 8px;
}

.csfm-auth-label { font-size: 13.5px; flex: 1; min-width: 200px; }
.csfm-auth-label em { color: #0F3D3E; }

/* Separator */
.csfm-separator { border: none; border-top: 1px solid #e0e0e0; margin: 20px 0; }

/* Tarif display */
.csfm-tarif-display {
    margin: 20px 0;
    padding: 20px;
    background: #0F3D3E;
    border-radius: 10px;
    text-align: center;
    color: white;
}

.csfm-tarif-label { font-size: 12px; color: #a8d5c5; display: block; margin-bottom: 4px; }
.csfm-tarif-amount { font-size: 32px; font-weight: 700; color: #fff; display: block; }
.csfm-tarif-detail { font-size: 11px; color: #a8d5c5; display: block; margin-top: 4px; }

/* Recap */
.csfm-recap {
    background: #f6fdf1;
    border: 1px solid #ddeee8;
    border-radius: 8px;
    padding: 16px 20px;
    margin: 16px 0;
    font-size: 13.5px;
}

.csfm-recap h3 { margin: 0 0 12px; color: #0F3D3E; font-size: 15px; }

.csfm-recap-row {
    display: flex;
    justify-content: space-between;
    padding: 5px 0;
    border-bottom: 1px solid #ddeee8;
}

.csfm-recap-row:last-child { border-bottom: none; }

.csfm-recap-label { color: #666; }
.csfm-recap-value { font-weight: 600; color: #0F3D3E; }

/* Règlement */
.csfm-reglement {
    background: #fff9e6;
    border: 1px solid #f59e0b;
    border-radius: 6px;
    padding: 12px 16px;
    font-size: 13px;
    line-height: 1.5;
}

/* Navigation buttons */
.csfm-form-nav {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-top: 28px;
    padding-top: 20px;
    border-top: 1px solid #e0e0e0;
}

.csfm-btn {
    padding: 11px 28px;
    border: none;
    border-radius: 7px;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: transform .15s, box-shadow .15s;
}

.csfm-btn:hover { transform: translateY(-1px); box-shadow: 0 4px 12px rgba(0,0,0,.15); }

.csfm-btn-primary { background: #1F6F5B; color: white; }
.csfm-btn-secondary { background: #f0f0f0; color: #444; }
.csfm-btn-success { background: #0F3D3E; color: white; font-size: 15px; padding: 14px 32px; }

/* Feedback boxes */
.csfm-success-box {
    text-align: center;
    padding: 40px 20px;
    background: #f6fdf1;
    border: 2px solid #1F6F5B;
    border-radius: 12px;
}

.csfm-success-icon {
    width: 56px;
    height: 56px;
    background: #1F6F5B;
    color: white;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 24px;
    margin: 0 auto 16px;
}

.csfm-success-box h2 { color: #0F3D3E; margin: 0 0 12px; }

.csfm-error-box {
    padding: 16px 20px;
    background: #fff5f5;
    border: 1px solid #dc3545;
    border-radius: 8px;
    color: #dc3545;
}

/* Mobile */
@media (max-width: 600px) {
    .csfm-row { flex-direction: column; gap: 10px; }
    .csfm-col { min-width: unset; }
    .csfm-step-label { font-size: 10px; }
    .csfm-tarif-amount { font-size: 24px; }
    .csfm-btn-success { font-size: 13px; padding: 12px 20px; }
    .csfm-auth-row { flex-direction: column; }
}
