/* Approfondissement sectoriel (ms-*) — /duer-medico-social */

.ms-updated { font-size: 13px; color: var(--text-light); margin: 0 0 1rem; }

.ms-h3 { font-size: 1.25rem; color: var(--dark); margin: 2.5rem 0 .75rem; }

.ms-note {
    font-size: 14px; color: var(--text-light); line-height: 1.65;
    border-left: 3px solid var(--border); padding-left: 14px; margin-top: 1.25rem;
}
.ms-note a { color: var(--primary-light); }

/* Sous-secteurs */
.ms-subs { display: grid; gap: 1.25rem; margin-top: 2rem; }
.ms-sub {
    background: var(--bg-white); border: 1px solid var(--border);
    border-left: 4px solid var(--primary); border-radius: var(--radius); padding: 1.5rem;
}
.ms-sub h3 { margin: 0 0 6px; color: var(--dark); font-size: 1.25rem; }
.ms-sub-base { margin: 0 0 1rem; color: var(--text); line-height: 1.6; font-size: 15px; }
.ms-sub-dl { margin: 0; display: grid; gap: 12px; }
.ms-sub-dl > div { display: flex; flex-direction: column; gap: 3px; }
.ms-sub-dl dt {
    font-size: 11.5px; text-transform: uppercase; letter-spacing: .03em;
    color: var(--text-light); font-weight: 700;
}
.ms-sub-dl dd { margin: 0; color: var(--dark); font-size: 14.5px; line-height: 1.55; }

/* Démarche en 7 étapes */
.ms-steps { margin: 2rem 0 0; padding-left: 1.25rem; }
.ms-steps li { margin-bottom: 10px; line-height: 1.65; color: var(--text); }
.ms-steps strong { color: var(--dark); }

/* Encadré */
.ms-callout {
    background: var(--primary-50); border: 1px solid var(--primary-100);
    border-radius: var(--radius); padding: 1.5rem; margin: 2rem 0;
}
.ms-callout h3 { margin: 0 0 .75rem; color: var(--primary); font-size: 1.125rem; }
.ms-callout p { margin: 0 0 .75rem; line-height: 1.7; color: var(--text); }
.ms-callout p:last-child { margin-bottom: 0; }

/* Grilles G / F */
.ms-grids { display: grid; grid-template-columns: repeat(2, 1fr); gap: 1.5rem; margin: 1.5rem 0 2rem; }
.ms-grids h4 { font-size: 1rem; color: var(--dark); margin: 0 0 10px; }

/* Tableaux */
.ms-table-wrap {
    overflow-x: auto; -webkit-overflow-scrolling: touch;
    border: 1px solid var(--border); border-radius: var(--radius); background: var(--bg-white);
}
.ms-table { width: 100%; border-collapse: collapse; font-size: 13.5px; min-width: 640px; }
.ms-table caption {
    caption-side: top; text-align: left; padding: 12px 14px; font-size: 13px;
    color: var(--text-light); border-bottom: 1px solid var(--border);
}
.ms-table th, .ms-table td {
    padding: 10px 12px; border-bottom: 1px solid var(--border-light);
    vertical-align: top; text-align: left; line-height: 1.5;
}
.ms-table thead th {
    background: var(--bg-alt); font-size: 12px; text-transform: uppercase;
    letter-spacing: .03em; color: var(--text-light); font-weight: 700; white-space: nowrap;
}
.ms-table tbody tr:last-child td { border-bottom: none; }
.ms-table .ms-num { text-align: center; white-space: nowrap; font-variant-numeric: tabular-nums; }
.ms-table .ms-delai, .ms-table .ms-resp { font-size: 12.5px; color: var(--text-light); min-width: 110px; }
.ms-family { font-size: 11.5px; color: var(--text-light); }
.ms-table--small { min-width: 0; }
.ms-table--small th[scope="row"] { width: 40px; font-weight: 700; color: var(--dark); background: var(--bg-alt); }

/* Chips (unités par métier) */
.ms-chips { list-style: none; margin: 1rem 0 0; padding: 0; display: flex; flex-wrap: wrap; gap: 8px; }
.ms-chips li {
    background: var(--bg-white); border: 1px solid var(--border); border-radius: 999px;
    padding: 6px 14px; font-size: 13.5px; color: var(--dark);
}

/* Fiche établissement */
.ms-card {
    background: var(--bg-white); border: 1px solid var(--border);
    border-radius: var(--radius); padding: 1.5rem; margin-bottom: 1.5rem;
}
.ms-card h3 { margin: 0 0 1rem; color: var(--dark); font-size: 1.125rem; }
.ms-card--identity { border-left: 4px solid var(--primary); }
.ms-dl { margin: 0; display: grid; grid-template-columns: repeat(2, 1fr); gap: 10px 2rem; }
.ms-dl > div { display: flex; flex-direction: column; gap: 2px; }
.ms-dl dt {
    font-size: 12px; text-transform: uppercase; letter-spacing: .03em;
    color: var(--text-light); font-weight: 600;
}
.ms-dl dd { margin: 0; color: var(--dark); font-size: 14.5px; line-height: 1.5; }

/* Lignes en double cotation */
.ms-line {
    background: var(--bg-white); border: 1px solid var(--border);
    border-radius: var(--radius); padding: 1.5rem; margin-bottom: 1.25rem;
}
.ms-line-head h3 { margin: 0 0 4px; color: var(--dark); font-size: 1.125rem; }
.ms-line-meta { margin: 0; font-size: 13px; color: var(--text-light); line-height: 1.6; }
.ms-line-danger { margin: 1rem 0; color: var(--text); line-height: 1.65; font-size: 14.5px; }

.ms-cot {
    display: grid; grid-template-columns: 1fr auto 1.4fr auto 1fr;
    gap: 12px; align-items: start;
    background: var(--bg); border-radius: var(--radius-sm); padding: 1rem; margin-bottom: 1rem;
}
.ms-cot-col { display: flex; flex-direction: column; gap: 8px; align-items: flex-start; }
.ms-cot-tag {
    font-size: 11px; text-transform: uppercase; letter-spacing: .03em;
    color: var(--text-light); font-weight: 700;
}
.ms-cot-calc { margin: 0; font-size: 15px; color: var(--dark); font-variant-numeric: tabular-nums; }
.ms-cot-calc strong { font-size: 18px; }
.ms-cot-arrow { color: var(--text-muted); font-size: 20px; align-self: center; }

.ms-list { margin: 0; padding-left: 16px; }
.ms-list li { margin: 0 0 5px; line-height: 1.5; font-size: 13.5px; color: var(--text); }

.ms-line-actions {
    border-top: 1px solid var(--border-light); padding-top: 1rem;
    display: flex; flex-direction: column; gap: 8px;
}
.ms-line-note {
    margin: 1rem 0 0; font-size: 13.5px; color: var(--text-light); line-height: 1.6;
    border-left: 3px solid var(--accent); padding-left: 12px;
}

/* Réglementaire */
.ms-reg { display: grid; gap: 1rem; margin-top: 2rem; }
.ms-reg-item {
    background: var(--bg-white); border: 1px solid var(--border);
    border-radius: var(--radius); padding: 1.25rem 1.5rem;
}
.ms-reg-item h3 { margin: 0 0 .5rem; color: var(--dark); font-size: 1.0625rem; }
.ms-reg-item p { margin: 0; line-height: 1.7; color: var(--text); font-size: 14.5px; }
.ms-reg-ref { margin-top: .75rem !important; font-size: 13px !important; }
.ms-reg-ref a { color: var(--primary-light); }

@media (max-width: 768px) {
    .ms-grids { grid-template-columns: 1fr; }
    .ms-dl { grid-template-columns: 1fr; }
    .ms-cot { grid-template-columns: 1fr; }
    .ms-cot-arrow { display: none; }
    .ms-table { font-size: 13px; }
}
