/* Section « Outils médicaux » d'ordonnance.net — mêmes couleurs que les guidelines. */
:root {
  --bg: #f4f6f8; --surface: #ffffff; --surface-2: #f0f3f6; --text: #15202b; --muted: #5b6b7b;
  --border: #dfe5eb; --primary: #0f766e; --primary-strong: #115e59; --primary-weak: #ccfbf1;
  --danger: #b42318; --danger-bg: #fdecea; --warn: #a15c07; --warn-bg: #fef4e2;
  --ok: #18794e; --ok-bg: #e7f6ee; --info: #1d5fbf; --info-bg: #e8f0fc;
  --radius: 14px; --shadow: 0 1px 2px rgba(16,32,48,.06), 0 4px 16px rgba(16,32,48,.06);
  --font: "Inter", system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
}
* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body { margin: 0; background: var(--bg); color: var(--text); font: 16px/1.6 var(--font); }
a { color: var(--primary); }
a:hover { color: var(--primary-strong); }

header.site { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: .5rem 1rem;
  padding: .75rem 16px; background: var(--surface); border-bottom: 1px solid var(--border); }
header.site .logo { font-weight: 700; font-size: 1.15rem; color: var(--text); text-decoration: none; }
header.site .logo span { color: var(--primary); }
header.site nav { display: flex; flex-wrap: wrap; gap: .25rem .9rem; font-size: .95rem; }
header.site nav a { color: var(--muted); text-decoration: none; padding: .2rem 0; }
header.site nav a[aria-current="page"] { color: var(--primary); font-weight: 600; border-bottom: 2px solid var(--primary); }

main { max-width: 860px; margin: 0 auto; padding: 1rem 16px 2.5rem; }
.crumbs { font-size: .85rem; color: var(--muted); margin: .25rem 0 1rem; }
.crumbs a { color: var(--muted); }
h1 { font-size: clamp(1.5rem, 4vw, 2rem); line-height: 1.25; margin: .25rem 0 .75rem; }
h2 { font-size: 1.3rem; line-height: 1.3; margin: 0 0 .75rem; }
.chapo { font-size: 1.08rem; color: var(--text); margin: 0 0 .5rem; }
.meta { font-size: .85rem; color: var(--muted); margin: 0 0 1.25rem; }

main > section, .sommaire { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius);
  box-shadow: var(--shadow); padding: 1.1rem 1.25rem; margin: 0 0 1rem; }
main > section > p:last-child, main > section > ul:last-child { margin-bottom: 0; }
.sommaire ul { display: flex; flex-wrap: wrap; gap: .4rem .6rem; list-style: none; margin: 0; padding: 0; }
.sommaire a { display: inline-block; padding: .25rem .65rem; border-radius: 999px; background: var(--surface-2);
  text-decoration: none; font-size: .9rem; color: var(--text); }
.sommaire a:hover { background: var(--primary-weak); }
section.outil { border: 2px solid var(--primary); }
section[id] { scroll-margin-top: 1rem; }

ul { padding-left: 1.2rem; }
li { margin: .25rem 0; }
.table-wrap { overflow-x: auto; }
table { width: 100%; border-collapse: collapse; font-size: .95rem; }
th, td { text-align: left; vertical-align: top; padding: .55rem .6rem; border-bottom: 1px solid var(--border); }
th { background: var(--surface-2); font-weight: 600; }
td:first-child { white-space: nowrap; font-weight: 600; }
.tone { display: inline-block; padding: .1rem .5rem; border-radius: 999px; font-size: .85rem; font-weight: 600; }
.tone-success { background: var(--ok-bg); color: var(--ok); }
.tone-warning { background: var(--warn-bg); color: var(--warn); }
.tone-danger { background: var(--danger-bg); color: var(--danger); }
.tone-info { background: var(--info-bg); color: var(--info); }

details { border-top: 1px solid var(--border); padding: .6rem 0; }
details:first-of-type { border-top: 0; }
summary { cursor: pointer; font-weight: 600; }
details p { margin: .5rem 0 0; }
.refs { font-size: .9rem; color: var(--muted); padding-left: 1.4rem; }

ul.cartes { list-style: none; padding: 0; margin: 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(230px, 1fr)); gap: .6rem; }
ul.cartes li { margin: 0; }
ul.cartes a { display: block; height: 100%; padding: .75rem .85rem; border: 1px solid var(--border); border-radius: 10px;
  background: var(--surface); text-decoration: none; color: var(--text); }
ul.cartes a:hover { border-color: var(--primary); }
ul.cartes strong { display: block; color: var(--primary); margin-bottom: .2rem; }
ul.cartes span { display: block; font-size: .88rem; color: var(--muted); line-height: 1.45; }

.recherche { margin: 0 0 1rem; }
.recherche label { display: block; font-weight: 600; margin-bottom: .35rem; }
.recherche input { width: 100%; padding: .7rem .85rem; font: inherit; border: 1px solid var(--border); border-radius: 10px; background: var(--surface); }
.recherche input:focus { outline: 2px solid var(--primary); outline-offset: 1px; }

footer.site { border-top: 1px solid var(--border); background: var(--surface); padding: 1.25rem 16px; font-size: .85rem; color: var(--muted); text-align: center; }
footer.site p { max-width: 760px; margin: .3rem auto; }

/* Moteur de calcul : seul le calculateur et le résultat sont affichés, les textes sont ceux de la page. */
[data-clinioutils-tool] .cot-sections, [data-clinioutils-tool] .cot-description, [data-clinioutils-tool] .cot-title { display: none; }
[data-clinioutils-tool] .cot-header { margin-bottom: 0; }

@media (max-width: 520px) {
  main > section, .sommaire { padding: .9rem 1rem; }
  td:first-child { white-space: normal; }
}
