/* Formulaires du site public et de l'espace adhérent. */
.cerm-card { background: #fff; border: 1px solid #e3e7ee; border-radius: 4px; box-shadow: var(--cerm-shadow); padding: 26px 28px; }
.cerm-narrow { max-width: 520px; margin: 0 auto; }
.cerm-medium { max-width: 860px; margin: 0 auto; }
.cerm-card h1 { font-size: 24px; margin-bottom: 18px; text-transform: uppercase; }
.cerm-card .cerm-lead { margin: 0 0 18px; }

.cerm-form { display: grid; gap: 16px; }
.cerm-form--inline { grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); align-items: end; }
.cerm-field { display: flex; flex-direction: column; gap: 5px; min-width: 0; }
.cerm-field label, .cerm-field .cerm-label { font-weight: 600; color: var(--cerm-dark); font-size: 13px; }
.cerm-field label .req { color: var(--cerm-danger); }
.cerm-field input[type=text], .cerm-field input[type=email], .cerm-field input[type=password], .cerm-field input[type=tel], .cerm-field input[type=search],
.cerm-field input[type=number], .cerm-field input[type=date], .cerm-field input[type=file], .cerm-field select, .cerm-field textarea, .cerm-field input:not([type]) {
  width: 100%; padding: 10px 12px; border: 1px solid #c6cfdc; border-radius: 3px; background: #fff; color: #333; font: inherit; line-height: 1.4;
}
.cerm-field textarea { min-height: 140px; resize: vertical; }
.cerm-field input:focus, .cerm-field select:focus, .cerm-field textarea:focus { border-color: var(--cerm-secondary); box-shadow: 0 0 0 3px rgba(0, 175, 239, .2); outline: 0; }
.cerm-field.has-error input, .cerm-field.has-error select, .cerm-field.has-error textarea { border-color: var(--cerm-danger); }
.cerm-field__error { color: var(--cerm-danger); font-size: 12.5px; }
.cerm-field__hint { color: #7b8190; font-size: 12.5px; }
.cerm-check { display: flex; gap: 10px; align-items: flex-start; }
.cerm-check input { margin-top: 4px; flex: none; width: 18px; height: 18px; }
.cerm-actions { display: flex; flex-wrap: wrap; gap: 12px 18px; align-items: center; margin-top: 4px; }
.cerm-links { display: flex; flex-wrap: wrap; gap: 6px 18px; margin: 16px 0 0; font-size: 13px; }
.cerm-form .cerm-btn { min-height: 44px; }
.cerm-hp { position: absolute !important; left: -9999px; width: 1px; height: 1px; overflow: hidden; }
.cerm-strength { height: 6px; background: #e8ebf2; border-radius: 3px; overflow: hidden; }
.cerm-strength > span { display: block; height: 100%; width: 0; background: var(--cerm-danger); transition: width .2s, background .2s; }

/* Signature manuscrite (formulaire de contact) */
.cerm-sign { border: 1px dashed #9aa8bd; border-radius: 4px; background: #fbfcfe; touch-action: none; }
.cerm-sign canvas { display: block; width: 100%; height: 150px; touch-action: none; cursor: crosshair; }
.cerm-sign__bar { display: flex; justify-content: space-between; align-items: center; padding: 4px 10px; font-size: 12px; color: #7b8190; border-top: 1px solid #e8ebf2; }
.cerm-sign__bar button { background: none; border: 0; color: var(--cerm-link); cursor: pointer; font: inherit; min-height: 40px; padding: 0 8px; }

/* Espace adhérent */
.cerm-dash { display: grid; grid-template-columns: repeat(auto-fit, minmax(210px, 1fr)); gap: 16px; margin: 20px 0; }
.cerm-dash a { display: flex; flex-direction: column; gap: 6px; align-items: flex-start; padding: 18px; background: #fff; border: 1px solid #dfe5ee; border-left: 4px solid var(--cerm-secondary); color: var(--cerm-primary); text-decoration: none; box-shadow: var(--cerm-shadow); }
.cerm-dash a:hover { border-left-color: var(--cerm-primary); text-decoration: none; background: #f7f9fd; }
.cerm-dash i { font-size: 26px; color: var(--cerm-secondary); }
.cerm-dash small { color: #7b8190; font-weight: 400; }
.cerm-table { width: 100%; border-collapse: collapse; font-size: 14px; }
.cerm-table th, .cerm-table td { padding: 9px 10px; border-bottom: 1px solid #e6eaf1; text-align: left; vertical-align: top; }
.cerm-table th { color: var(--cerm-primary); font-weight: 600; background: #f5f7fc; }
@media (max-width: 767.98px) {
  .cerm-table--stack thead { display: none; }
  .cerm-table--stack, .cerm-table--stack tbody, .cerm-table--stack tr, .cerm-table--stack td { display: block; width: 100%; }
  .cerm-table--stack tr { margin: 0 0 14px; border: 1px solid #dfe5ee; border-radius: 4px; padding: 6px 0; }
  .cerm-table--stack td { border: 0; display: flex; justify-content: space-between; gap: 14px; padding: 6px 12px; text-align: right; }
  .cerm-table--stack td::before { content: attr(data-label); font-weight: 600; color: var(--cerm-primary); text-align: left; }
}
.cerm-badge { display: inline-block; padding: 2px 9px; border-radius: 10px; font-size: 12px; font-weight: 600; background: #e8e9fa; color: var(--cerm-primary); }
.cerm-badge--ok { background: #d9f2df; color: #0b6b25; }
.cerm-badge--warn { background: #fff0cc; color: #8a5a00; }
.cerm-badge--ko { background: #fde0e4; color: #a10020; }
@media (max-width: 575.98px) { .cerm-card { padding: 20px 16px; } }
