/* OncoLab Dz — espace connecté. Mêmes couleurs et typographie que le site public (site.css). */
:root {
  --navy: #0E1F4D;
  --navy-2: #1B3270;
  --navy-soft: #EBF0F9;
  --green: #37852A; /* vert du logo foncé : texte blanc 4,6:1 */
  --green-soft: #e9f6e5;
  --blue: #176B96; /* bleu du logo foncé : liens ≥ 5:1 */
  --blue-soft: #e4f2fa;
  --amber: #b7791f;
  --amber-soft: #fdf3e1;
  --purple: #6b4fbb;
  --purple-soft: #efeafb;
  --red: #c53b3b;
  --red-soft: #fbe9e9;
  --teal: #13857a;
  --teal-soft: #e1f4f2;
  --gray: #6b7790;
  --gray-soft: #eef0f4;
  --bg: #F5F8FC;
  --surface: #ffffff;
  --text: #14213D;
  --muted: #55627D;
  --border: #DCE3EE;
  --radius: 10px;
  --shadow: none;
  --font: 'IBM Plex Sans', 'IBM Plex Sans Arabic', system-ui, -apple-system, 'Segoe UI', Roboto, Arial, sans-serif;
  --sidebar: 248px;
}
[dir="rtl"] { --font: 'IBM Plex Sans Arabic', 'IBM Plex Sans', system-ui, 'Segoe UI', Tahoma, Arial, sans-serif; }

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body { margin: 0; font-family: var(--font); font-size: 15px; line-height: 1.55; color: var(--text); background: var(--bg); }
[dir="rtl"] body { font-size: 16px; }
a { color: var(--blue); text-decoration: none; }
:focus-visible { outline: 3px solid #7DD35F; outline-offset: 2px; }
a:hover { text-decoration: underline; }
h1, h2, h3 { line-height: 1.25; margin: 0 0 .5em; color: var(--navy); font-weight: 600; }
h1 { font-size: 1.6rem; }
h2 { font-size: 1.2rem; }
h3 { font-size: 1.02rem; }
p { margin: 0 0 1em; }
.muted { color: var(--muted); }
.small { font-size: .87em; }
.ico { width: 20px; height: 20px; flex: none; }
.nowrap { white-space: nowrap; }
.mono { font-variant-numeric: tabular-nums; letter-spacing: .01em; }
[dir="rtl"] .ico-flip { transform: scaleX(-1); }
.ico-back { transform: scaleX(-1); }
[dir="rtl"] .ico-back { transform: none; }

/* ---------- Mise en page de l'application ---------- */
.app { display: grid; grid-template-columns: var(--sidebar) 1fr; min-height: 100vh; }
.sidebar { background: var(--navy); color: #cfd9f2; display: flex; flex-direction: column; position: sticky; top: 0; height: 100vh; }
.sidebar .brand { display: flex; align-items: center; gap: 10px; padding: 18px 18px 16px; color: #fff; font-weight: 600; font-size: 1.15rem; border-bottom: 1px solid rgba(255,255,255,.08); }
.sidebar .brand img { width: 40px; height: 40px; border-radius: 8px; background: #fff; padding: 3px; object-fit: contain; }
.sidebar .brand span span { color: #7bd062; }
.sidebar .brand small { display: block; font-weight: 400; font-size: .76rem; color: #9fb0d8; }
.sidebar nav { padding: 12px 10px; display: flex; flex-direction: column; gap: 2px; flex: 1; overflow-y: auto; }
.sidebar nav a { display: flex; align-items: center; gap: 12px; padding: 10px 12px; border-radius: 6px; color: #cfd9f2; font-weight: 500; }
.sidebar nav a:hover { background: rgba(255,255,255,.07); color: #fff; text-decoration: none; }
.sidebar nav a.active { background: rgba(255,255,255,.10); color: #fff; box-shadow: inset 3px 0 0 #7bd062; }
[dir="rtl"] .sidebar nav a.active { box-shadow: inset -3px 0 0 #7bd062; }
.sidebar nav .sep { height: 1px; background: rgba(255,255,255,.08); margin: 10px 6px; }
.sidebar .count { margin-inline-start: auto; background: var(--green); color: #fff; border-radius: 999px; font-size: .75rem; padding: 1px 8px; font-weight: 700; }
.sidebar .side-foot { padding: 14px 18px; font-size: .78rem; color: #8ea0cb; border-top: 1px solid rgba(255,255,255,.08); }

.main { min-width: 0; display: flex; flex-direction: column; }
.topbar { height: 64px; background: var(--surface); border-bottom: 1px solid var(--border); display: flex; align-items: center; gap: 12px; padding: 0 28px; position: sticky; top: 0; z-index: 20; }
.topbar .spacer { flex: 1; }
.topbar .hello { color: var(--muted); font-size: .92rem; }
.topbar .hello strong { color: var(--text); }
.icon-btn { position: relative; display: inline-flex; align-items: center; justify-content: center; gap: 6px; height: 40px; min-width: 40px; padding: 0 10px; border-radius: 6px; border: 1px solid var(--border); background: var(--surface); color: var(--navy); cursor: pointer; font: inherit; font-size: .9rem; font-weight: 600; }
.icon-btn:hover { background: var(--navy-soft); text-decoration: none; }
.icon-btn .dot { position: absolute; top: -5px; inset-inline-end: -5px; background: var(--red); color: #fff; border-radius: 999px; font-size: .7rem; min-width: 19px; height: 19px; display: grid; place-items: center; padding: 0 5px; font-weight: 700; }
.menu-toggle { display: none; }
.content { padding: 28px; max-width: 1240px; width: 100%; }
.page-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 16px; flex-wrap: wrap; margin-bottom: 22px; }
.page-head h1 { margin: 0; }
.page-head p { margin: 4px 0 0; color: var(--muted); }
.page-head .actions { display: flex; gap: 8px; flex-wrap: wrap; }

/* ---------- Composants ---------- */
.card { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); box-shadow: var(--shadow); padding: 22px; margin-bottom: 20px; }
.card > h2:first-child, .card > h3:first-child { margin-top: 0; }
.card-head { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin-bottom: 14px; flex-wrap: wrap; }
.card-head h2 { margin: 0; }
.grid { display: grid; gap: 20px; }
.grid-2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.grid-3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.layout-side { display: grid; grid-template-columns: minmax(0, 1fr) 360px; gap: 20px; align-items: start; }
.layout-side > *, .grid > * { min-width: 0; }

.stats { display: grid; grid-template-columns: repeat(auto-fit, minmax(170px, 1fr)); margin-bottom: 22px; background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); overflow: hidden; }
.stat { padding: 18px 20px; display: flex; flex-direction: column; gap: 6px; color: inherit; border-inline-start: 1px solid var(--border); margin-inline-start: -1px; border-top: 3px solid transparent; }
a.stat:hover { text-decoration: none; background: #F8FAFE; border-top-color: var(--navy); }
.stat .stat-ico { display: inline-flex; align-items: center; gap: 6px; background: none !important; font-size: .86rem; }
.stat .stat-ico .ico { width: 18px; height: 18px; }
.stat .num { font-size: 1.9rem; font-weight: 600; color: var(--navy); line-height: 1.1; font-variant-numeric: tabular-nums; }
.stat .lbl { color: var(--muted); font-size: .88rem; }

.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; padding: 10px 18px; border-radius: 6px; border: 1px solid transparent; font: inherit; font-weight: 600; font-size: .93rem; cursor: pointer; background: var(--navy); color: #fff; line-height: 1.2; text-decoration: none; white-space: nowrap; }
.btn:hover { background: var(--navy-2); text-decoration: none; }
.btn .ico { width: 18px; height: 18px; }
.btn-green { background: var(--green); }
.btn-green:hover { background: #2F7323; }
.btn-light { background: var(--surface); color: var(--navy); border-color: var(--border); }
.btn-light:hover { background: var(--navy-soft); }
.btn-danger { background: var(--surface); color: var(--red); border-color: #efc4c4; }
.btn-danger:hover { background: var(--red-soft); }
.btn-sm { padding: 6px 12px; font-size: .84rem; border-radius: 6px; }
.btn-block { width: 100%; }
.btn-row { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; }
form.inline { display: inline; }

.badge { display: inline-flex; align-items: center; gap: 6px; padding: 3px 10px; border-radius: 999px; font-size: .8rem; font-weight: 600; white-space: nowrap; }
.badge::before { content: ''; width: 7px; height: 7px; border-radius: 50%; background: currentColor; }
.b-blue { background: var(--blue-soft); color: var(--blue); }
.b-teal { background: var(--teal-soft); color: var(--teal); }
.b-amber { background: var(--amber-soft); color: var(--amber); }
.b-purple { background: var(--purple-soft); color: var(--purple); }
.b-green { background: var(--green-soft); color: #2f7d20; }
.b-red { background: var(--red-soft); color: var(--red); }
.b-gray { background: var(--gray-soft); color: var(--gray); }
.tag-urgent { display: inline-block; background: var(--red); color: #fff; font-size: .74rem; font-weight: 600; padding: 2px 8px; border-radius: 4px; }

.table-wrap { overflow-x: auto; margin: 0 -22px; padding: 0 22px; }
table.table { width: 100%; border-collapse: collapse; font-size: .92rem; }
.table th { text-align: start; font-weight: 600; color: var(--muted); font-size: .86rem; padding: 10px 12px; border-bottom: 2px solid var(--border); white-space: nowrap; }
.table td { padding: 12px; border-bottom: 1px solid var(--border); vertical-align: middle; }
.table tr:last-child td { border-bottom: 0; }
.table tbody tr:hover { background: #f8faff; }
.table .row-link { font-weight: 600; }
.empty { text-align: center; padding: 40px 10px; color: var(--muted); }
.empty .ico { width: 40px; height: 40px; color: #b8c3da; margin-bottom: 8px; }

/* Formulaires */
.form-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px 18px; }
.form-grid .full { grid-column: 1 / -1; }
.form-grid.cols-3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.field label, .label { display: block; font-weight: 600; font-size: .88rem; margin-bottom: 6px; color: var(--text); }
.field .req { color: var(--red); }
.field .hint { font-size: .8rem; color: var(--muted); margin-top: 4px; }
input[type=text], input[type=email], input[type=password], input[type=tel], input[type=date], input[type=number], input[type=search], select, textarea {
  width: 100%; padding: 10px 12px; border: 1px solid var(--border); border-radius: 6px; background: #fff; font: inherit; color: var(--text); font-size: .95rem;
}
textarea { min-height: 90px; resize: vertical; }
input:focus, select:focus, textarea:focus { outline: none; border-color: var(--blue); box-shadow: 0 0 0 3px rgba(31,138,192,.15); }
input[type=file] { font: inherit; font-size: .9rem; max-width: 100%; }
.check { display: flex; gap: 10px; align-items: flex-start; font-size: .92rem; }
.check input { margin-top: 4px; width: 17px; height: 17px; flex: none; accent-color: var(--navy); }
fieldset { border: 0; padding: 0; margin: 0; }
.section-title { display: flex; align-items: center; gap: 10px; margin: 0 0 16px; font-size: 1.05rem; color: var(--navy); }
.section-title .num { width: 28px; height: 28px; border-radius: 50%; background: var(--navy); color: #fff; display: grid; place-items: center; font-size: .85rem; font-weight: 700; }
.radio-cards { display: flex; gap: 10px; flex-wrap: wrap; }
.radio-cards label { display: flex; align-items: center; gap: 8px; border: 1px solid var(--border); border-radius: 6px; padding: 9px 14px; cursor: pointer; font-weight: 500; margin: 0; }
.radio-cards input { accent-color: var(--navy); }

.filters { display: flex; gap: 10px; flex-wrap: wrap; align-items: flex-end; margin-bottom: 16px; }
.filters .field { min-width: 150px; flex: 1; }
.filters .field.grow { flex: 2.5; min-width: 220px; }
.filters label { font-size: .78rem; color: var(--muted); }

.flash { display: flex; gap: 10px; align-items: flex-start; padding: 12px 16px; border-radius: 10px; margin-bottom: 18px; font-weight: 500; border: 1px solid; }
.flash-success { background: var(--green-soft); color: #2f6d22; border-color: #c7e6bd; }
.flash-error { background: var(--red-soft); color: #9b2c2c; border-color: #f1c9c9; }
.flash-info { background: var(--blue-soft); color: #1a6690; border-color: #c4e2f2; }

dl.kv { display: grid; grid-template-columns: minmax(140px, 38%) 1fr; gap: 8px 14px; margin: 0; }
dl.kv dt { color: var(--muted); font-size: .88rem; }
dl.kv dd { margin: 0; font-weight: 500; overflow-wrap: anywhere; }

/* Frise de progression */
.progress { display: flex; gap: 0; margin: 4px 0 6px; }
.progress .step { flex: 1; text-align: center; position: relative; font-size: .78rem; color: var(--muted); padding: 0 4px; }
.progress .step .dot { width: 30px; height: 30px; border-radius: 50%; margin: 0 auto 8px; display: grid; place-items: center; background: var(--gray-soft); color: var(--gray); border: 2px solid var(--surface); position: relative; z-index: 1; font-weight: 700; font-size: .8rem; }
.progress .step::before { content: ''; position: absolute; top: 15px; inset-inline-start: -50%; width: 100%; height: 3px; background: var(--gray-soft); }
.progress .step:first-child::before { display: none; }
.progress .step.done .dot { background: var(--green); color: #fff; }
.progress .step.done::before, .progress .step.current::before { background: var(--green); }
.progress .step.current .dot { background: var(--navy); color: #fff; box-shadow: 0 0 0 4px var(--navy-soft); }
.progress .step.current { color: var(--navy); font-weight: 700; }
.progress .step .dot .ico { width: 16px; height: 16px; }

.timeline { list-style: none; margin: 0; padding: 0; }
.timeline li { position: relative; padding-inline-start: 26px; padding-bottom: 18px; }
.timeline li::before { content: ''; position: absolute; inset-inline-start: 6px; top: 6px; width: 10px; height: 10px; border-radius: 50%; background: var(--navy); }
.timeline li::after { content: ''; position: absolute; inset-inline-start: 10px; top: 20px; bottom: 0; width: 2px; background: var(--border); }
.timeline li:last-child::after { display: none; }
.timeline li:last-child { padding-bottom: 0; }
.timeline .when { font-size: .8rem; color: var(--muted); }
.timeline .comment { background: var(--bg); border-radius: 8px; padding: 8px 10px; margin-top: 6px; font-size: .9rem; white-space: pre-wrap; }

.result-box { border: 1px solid #cfe7c7; background: linear-gradient(180deg, #f6fbf4, #fff); border-radius: var(--radius); padding: 20px; }
.result-box .conclusion { font-size: 1.05rem; font-weight: 700; color: var(--navy); white-space: pre-wrap; }
.pre { white-space: pre-wrap; }
.notice { display: flex; gap: 12px; align-items: flex-start; background: var(--bg); border-radius: 10px; padding: 14px 16px; color: var(--muted); }
.notice .ico { color: var(--navy); margin-top: 2px; }
.notice.warn { background: var(--amber-soft); color: #7a5414; }
.notice.warn .ico { color: var(--amber); }
.notice.danger { background: var(--red-soft); color: #8b2a2a; }
.notice.danger .ico { color: var(--red); }
.files { list-style: none; margin: 0; padding: 0; display: grid; gap: 8px; }
.files a { display: flex; align-items: center; gap: 10px; padding: 10px 12px; border: 1px solid var(--border); border-radius: 6px; color: var(--text); }
.files a:hover { background: var(--navy-soft); text-decoration: none; }

.pagination { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin-top: 16px; font-size: .88rem; color: var(--muted); flex-wrap: wrap; }

.notif-list { list-style: none; padding: 0; margin: 0; }
.notif-list li a { display: flex; gap: 12px; align-items: flex-start; padding: 14px 6px; border-bottom: 1px solid var(--border); color: var(--text); }
.notif-list li:last-child a { border-bottom: 0; }
.notif-list li a:hover { background: #f8faff; text-decoration: none; }
.notif-list .ndot { width: 9px; height: 9px; border-radius: 50%; margin-top: 7px; flex: none; background: transparent; }
.notif-list .unread .ndot { background: var(--blue); }
.notif-list .unread .ntext { font-weight: 600; }

.user-cell strong { display: block; }
.user-cell span { font-size: .84rem; color: var(--muted); }

details.admin-box { border: 1px solid var(--border); border-radius: 10px; padding: 0 14px; margin-top: 10px; }
details.admin-box summary { cursor: pointer; padding: 12px 0; font-weight: 600; color: var(--navy); }
details.admin-box[open] { padding-bottom: 14px; }

/* ---------- Pages publiques ---------- */
.auth-wrap { flex: 1; display: grid; place-items: center; padding: 24px 16px 48px; }
.auth-card { width: 100%; max-width: 440px; background: var(--surface); border: 1px solid var(--border); border-radius: 10px; padding: 30px; }
.auth-card.wide { max-width: 760px; }
.auth-card h1 { font-size: 1.45rem; margin-bottom: 4px; }
.auth-card .sub { color: var(--muted); margin-bottom: 22px; }
.auth-card .stack { display: grid; gap: 16px; }
.auth-card .alt { text-align: center; margin-top: 18px; color: var(--muted); font-size: .92rem; }

/* ---------- Documents imprimables ---------- */
.doc-page { background: #e9edf4; min-height: 100vh; padding: 24px 12px; }
.doc-toolbar { max-width: 820px; margin: 0 auto 14px; display: flex; gap: 8px; justify-content: space-between; flex-wrap: wrap; }
.doc { max-width: 820px; margin: 0 auto; background: #fff; padding: 40px 46px; box-shadow: 0 8px 30px rgba(0,0,0,.1); color: #111; font-size: 14px; }
.doc-head { display: flex; justify-content: space-between; align-items: center; gap: 20px; border-bottom: 3px solid var(--navy); padding-bottom: 14px; margin-bottom: 20px; }
.doc-head img { height: 64px; }
.doc-head .meta { text-align: end; font-size: 12.5px; color: #333; }
.doc h1 { font-size: 19px; text-align: center; margin: 10px 0 20px; color: var(--navy); text-transform: uppercase; letter-spacing: .03em; }
[dir="rtl"] .doc h1 { text-transform: none; letter-spacing: 0; }
.doc h2 { font-size: 13.5px; background: var(--navy-soft); color: var(--navy); padding: 6px 10px; margin: 20px 0 10px; border-radius: 4px; text-transform: uppercase; letter-spacing: .03em; }
[dir="rtl"] .doc h2 { text-transform: none; letter-spacing: 0; }
.doc table.info { width: 100%; border-collapse: collapse; }
.doc table.info td { padding: 4px 6px; vertical-align: top; width: 25%; }
.doc table.info td.k { color: #555; }
.doc .conclusion { border: 2px solid var(--navy); padding: 12px 14px; font-weight: 700; white-space: pre-wrap; border-radius: 4px; }
.doc .sign { display: flex; justify-content: flex-end; margin-top: 30px; }
.doc .sign div { text-align: center; min-width: 220px; border-top: 1px solid #999; padding-top: 6px; font-size: 12.5px; }
.doc .doc-foot { margin-top: 30px; border-top: 1px solid #ccc; padding-top: 8px; font-size: 11px; color: #666; text-align: center; }
.doc .box { border: 1px dashed #999; padding: 10px; min-height: 60px; }

@media print {
  @page { size: A4; margin: 12mm; }
  .doc-page { background: #fff; padding: 0; }
  .doc-toolbar { display: none; }
  .doc { box-shadow: none; padding: 0; max-width: none; }
  .doc h2 { -webkit-print-color-adjust: exact; print-color-adjust: exact; }
}

/* ---------- Responsive ---------- */
@media (max-width: 1080px) {
  .layout-side { grid-template-columns: minmax(0, 1fr); }
}
@media (max-width: 860px) {
  .app { grid-template-columns: 1fr; }
  .sidebar { position: fixed; inset-inline-start: 0; top: 0; bottom: 0; width: 270px; z-index: 50; transform: translateX(-100%); transition: transform .2s; }
  [dir="rtl"] .sidebar { transform: translateX(100%); }
  body.nav-open .sidebar { transform: none; }
  body.nav-open::after { content: ''; position: fixed; inset: 0; background: rgba(10,20,45,.4); z-index: 40; }
  .menu-toggle { display: inline-flex; }
  .topbar { padding: 0 16px; }
  .topbar .hello { display: none; }
  .content { padding: 18px 16px; }
  .grid-2, .grid-3, .form-grid, .form-grid.cols-3 { grid-template-columns: 1fr; }
  .card { padding: 18px; }
  .table-wrap { margin: 0 -18px; padding: 0 18px; }
  dl.kv { grid-template-columns: 1fr; gap: 2px; }
  dl.kv dd { margin-bottom: 8px; }
  .progress .step { font-size: 0; }
  .progress .step.current { font-size: .75rem; }
  .doc { padding: 22px 18px; }
}
@media (max-width: 520px) {
  .auth-card { padding: 22px 18px; }
}

.form-section { font-size: 1rem; margin: 26px 0 14px; padding-bottom: 8px; border-bottom: 1px solid var(--border); }
.form-section:first-of-type { margin-top: 6px; }

/* Comptes en attente (tableau de bord administrateur) */
.pending-accounts { border-inline-start: 4px solid var(--amber); }
.pending-list { list-style: none; margin: 0; padding: 0; }
.pending-list li { display: flex; justify-content: space-between; align-items: center; gap: 16px; flex-wrap: wrap; padding: 12px 0; border-top: 1px solid var(--border); }
.user-cell span { display: block; }
.stat { border-bottom: 1px solid var(--border); margin-bottom: -1px; }

/* Éléments masqués par le script (l'attribut hidden doit toujours l'emporter) */
[hidden] { display: none !important; }

/* Mode de prélèvement */
.mode-cards { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px; }
.mode-card { position: relative; display: block; cursor: pointer; }
.mode-card input { position: absolute; opacity: 0; inset-inline-start: 14px; top: 14px; }
.mode-card-body { display: flex; flex-direction: column; gap: 4px; height: 100%; padding: 16px; border: 1px solid var(--border); border-radius: var(--radius); background: var(--surface); }
.mode-card-body .ico { color: var(--navy); margin-bottom: 4px; }
.mode-card-body strong { color: var(--navy); }
.mode-card-body span { color: var(--muted); font-size: .9rem; }
.mode-card:hover .mode-card-body { border-color: var(--navy-2); }
.mode-card.is-checked .mode-card-body { border: 2px solid var(--green); padding: 15px; background: var(--green-soft); }
.mode-card input:focus-visible + .mode-card-body { outline: 3px solid #7DD35F; outline-offset: 2px; }
.mode-card.is-disabled { cursor: not-allowed; opacity: .5; }
.mode-not-allowed { margin: 14px 0 0; }
.price-summary { margin: 20px 0 0; padding: 14px 16px; background: var(--bg); border-radius: var(--radius); display: grid; gap: 6px; max-width: 420px; }
.price-summary > div { display: flex; justify-content: space-between; gap: 16px; }
.price-summary dt { color: var(--muted); }
.price-summary dd { margin: 0; font-variant-numeric: tabular-nums; }
.price-summary .price-total { border-top: 1px solid var(--border); padding-top: 6px; font-weight: 600; }
.price-summary .price-total dt { color: var(--text); }
@media (max-width: 860px) { .mode-cards { grid-template-columns: minmax(0, 1fr); } }

/* Bloc « mode de prélèvement » dans le détail d'une demande */
.collect-card { border-inline-start: 4px solid var(--blue); }
.appointment-pending { color: var(--amber); font-weight: 600; }
.appointment-confirmed { color: #2f7d20; font-weight: 600; }

/* Partage du compte rendu */
.share-grid { display: grid; grid-template-columns: minmax(0, 2fr) minmax(0, 1fr); gap: 16px; }
.copy-row { display: flex; gap: 8px; }
.copy-row input { flex: 1; min-width: 0; }
.code-input { font-size: 1.4rem !important; letter-spacing: .2em; text-align: center; font-variant-numeric: tabular-nums; font-weight: 600; }
.share-list { list-style: none; margin: 16px 0 0; padding: 0; }
.share-list li { display: flex; justify-content: space-between; align-items: center; gap: 12px; flex-wrap: wrap; padding: 10px 0; border-top: 1px solid var(--border); }
.share-list li .badge { margin-inline-end: 8px; }
.doc-shared-note { display: inline-flex; align-items: center; gap: 8px; color: var(--muted); font-size: .9rem; }
.state-ico { width: 44px !important; height: 44px !important; color: var(--muted); margin-bottom: 8px; }
@media (max-width: 860px) { .share-grid { grid-template-columns: minmax(0, 1fr); } }

/* Graphique d'évolution (une seule série : bleu du logo ; seuils discrets) */
.evo-wrap { overflow-x: auto; }
.evo-chart { width: 100%; min-width: 480px; height: auto; display: block; font-family: var(--font); }
.evo-grid { stroke: #EDF1F7; stroke-width: 1; }
.evo-baseline { stroke: #C9D2E1; stroke-width: 1; }
.evo-axis { fill: var(--muted); font-size: 13.5px; font-variant-numeric: tabular-nums; }
.evo-threshold { stroke: #9AA6BD; stroke-width: 1; stroke-dasharray: 4 4; }
.evo-threshold-label { fill: var(--muted); font-size: 13.5px; }
.evo-line { fill: none; stroke: #1F8AC0; stroke-width: 2; stroke-linejoin: round; stroke-linecap: round; }
.evo-dot { fill: #1F8AC0; stroke: #fff; stroke-width: 2; }
.evo-point.is-current .evo-dot { fill: #fff; stroke: #1F8AC0; stroke-width: 3; }
.evo-hit { fill: transparent; cursor: help; }
.evo-point:hover .evo-dot { stroke: var(--navy); }
.evo-table { margin-top: 10px; }
.evo-table summary { cursor: pointer; color: var(--blue); font-weight: 500; padding: 6px 0; }
.evo-table tr.is-current td { background: #F2F8FC; }
@media print { .evo-table { display: none; } }

/* Seuils de réponse atteints par le dernier résultat */
.evo-threshold.is-reached { stroke: #37852A; stroke-dasharray: 4 3; }
.evo-threshold-label.is-reached { fill: #2F7323; font-weight: 600; }

/* Moment « résultat disponible » : apparition du résultat, tracé de la courbe, points dans l'ordre chronologique */
@media (prefers-reduced-motion: no-preference) {
  .result-box { animation: resultIn .6s ease-out both; }
  .evo-line { stroke-dasharray: 1; stroke-dashoffset: 1; animation: evoDraw 1.4s .25s ease-in-out forwards; }
  .evo-dot { transform-box: fill-box; transform-origin: center; transform: scale(0); animation: evoPop .35s cubic-bezier(.3, 1.6, .5, 1) forwards; animation-delay: calc(.25s + var(--i) * .35s); }
  .evo-threshold-label.is-reached { opacity: 0; animation: evoShow .5s 1.6s ease-out forwards; }
}
@keyframes resultIn { from { opacity: 0; transform: translateY(8px); } }
@keyframes evoDraw { to { stroke-dashoffset: 0; } }
@keyframes evoPop { to { transform: scale(1); } }
@keyframes evoShow { to { opacity: 1; } }
@media print { .result-box, .evo-line, .evo-dot, .evo-threshold-label { animation: none !important; opacity: 1 !important; transform: none !important; stroke-dashoffset: 0 !important; } }

/* Sélecteur de langue FR · عربي · EN */
.lang-switch { display: inline-flex; align-items: center; height: 40px; padding: 3px; gap: 2px; border: 1px solid var(--border); border-radius: 8px; background: var(--surface); }
.lang-opt { display: inline-grid; place-items: center; min-width: 38px; height: 100%; padding: 0 8px; border-radius: 5px; font-size: .84rem; font-weight: 600; color: var(--navy); text-decoration: none; letter-spacing: .02em; }
.lang-opt[lang="ar"] { font-family: 'IBM Plex Sans Arabic', 'IBM Plex Sans', sans-serif; letter-spacing: 0; }
a.lang-opt:hover { background: var(--navy-soft); text-decoration: none; }
.lang-opt.is-current { background: var(--navy); color: #fff; }
.site-lang.lang-switch { height: 38px; border-color: rgba(14, 31, 77, .18); background: transparent; }
.site-lang .lang-opt { color: #0E1F4D; }
.site-lang .lang-opt.is-current { background: #0E1F4D; color: #fff; }
@media (max-width: 560px) { .lang-opt { min-width: 32px; padding: 0 6px; } }
