/* =========================================================
   Espace DICOM — page « Mes examens » et visionneuse.
   Composants du site (fcard, btn, callout, ftable) ; ajouts seulement.
   ========================================================= */
.dc-section { padding-top: 56px; }
.dc-section [hidden], .dv-page [hidden] { display: none !important; }
.dc-demo { margin-bottom: 34px; }
.dc-grille { display: grid; grid-template-columns: minmax(0, 1.7fr) minmax(0, 1fr); gap: 0 30px; align-items: start; }
.dc-grille .fcard h2, .dc-mes-examens h2 { font-size: 1.3rem; margin: 0 0 16px; }
.dc-cache { position: absolute; width: 1px; height: 1px; opacity: 0; pointer-events: none; }
.dc-petit { font-size: .82rem; color: var(--muted); margin: 10px 0 0; }
.dc-boutons { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 12px; }
.dc-boutons .btn { cursor: pointer; }
.btn:disabled { opacity: .45; cursor: not-allowed; transform: none; box-shadow: none; }

/* Dépôt de fichiers */
.dc-depot { border: 3px dashed var(--navy); border-radius: 18px; background: #fff; padding: 22px 20px; text-align: center; transition: background .15s, border-color .15s; }
.dc-depot p { margin: 6px 0 0; }
.dc-depot .dc-boutons { justify-content: center; }
.dc-depot.is-survol { background: #eef0fb; border-color: var(--royal); }
.dc-depot-icone { width: 42px; height: 42px; color: var(--navy); }
.dc-test { margin-top: 20px; padding-top: 18px; border-top: 2px solid rgba(0, 0, 0, .08); }
.dc-test p { margin: 0; }

/* Progression, erreurs, annonces */
.dc-progression { margin-top: 20px; }
.dc-barre { height: 16px; border: 3px solid var(--ink); border-radius: 999px; background: #fff; overflow: hidden; }
.dc-barre-remplie { height: 100%; width: 0; background: var(--navy); transition: width .2s; }
.dc-progression-texte { margin: 8px 0 0; font-weight: 700; font-size: .9rem; }
.dc-erreur { margin: 18px 0 0; padding: 12px 16px; border-radius: 14px; background: #fbeff0; color: var(--red); font-weight: 700; }
.dc-annonce { margin: 0 0 20px; padding: 12px 18px; border-radius: 14px; background: #edf6f0; border: 3px solid var(--green); font-weight: 700; }

/* Résumé avant import */
.dc-resume { margin-top: 22px; }
.dc-resume h3 { margin: 0 0 12px; font-size: 1.05rem; }
.dc-resume .ftable-wrap { margin-bottom: 14px; box-shadow: 6px 6px 0 rgba(17, 17, 20, .85); border-width: 3px; }
.dc-table small { color: var(--muted); }
.dc-note { margin: 6px 0; font-size: .86rem; color: var(--muted); }
.dc-avertissement { margin: 14px 0 0; }
.dc-case { display: flex; gap: 10px; align-items: center; margin-top: 8px; font-weight: 700; cursor: pointer; }
.dc-case input { width: 20px; height: 20px; accent-color: var(--ink); }
.dc-actions { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 16px; }
.dc-badge { display: inline-block; padding: 2px 9px; border-radius: 999px; font-size: .72rem; font-weight: 800; white-space: nowrap; }
.dc-ok { color: #1f6b45; background: rgba(31, 138, 91, .14); }
.dc-alerte { color: var(--red); background: rgba(168, 23, 45, .13); }

/* Mes examens */
.dc-mes-examens { margin-top: 18px; }
.dc-titre-liste { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 18px; }
.dc-titre-liste h2 { margin: 0; }
.dc-titre-liste small { color: var(--muted); font-weight: 600; }
#dc-recherche { flex: 0 1 340px; min-width: 0; padding: 11px 16px; border: 3px solid var(--ink); border-radius: 999px; font: 600 .9rem var(--font); background: #fff; }
.dc-examens { display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 22px; }
.dc-examen { position: relative; padding: 20px 22px; border-radius: var(--radius); background: var(--card); border: 4px solid var(--ink); box-shadow: 8px 8px 0 rgba(17, 17, 20, .8); min-width: 0; }
.dc-examen-tete { display: flex; justify-content: space-between; align-items: center; gap: 8px; }
.dc-modalites { font: 800 .78rem var(--font); letter-spacing: .08em; color: var(--navy); }
.dc-examen h3 { margin: 10px 0 2px; font-size: 1.12rem; overflow-wrap: anywhere; }
.dc-examen-desc { margin: 0; font-weight: 600; overflow-wrap: anywhere; }
.dc-examen-infos { margin: 6px 0 14px; font-size: .84rem; color: var(--muted); overflow-wrap: anywhere; }
.dc-examen-actions { display: flex; flex-wrap: wrap; gap: 8px; }
.dc-vide { grid-column: 1 / -1; margin: 0; padding: 22px; border-radius: 18px; background: #fff; border: 3px dashed rgba(17, 17, 20, .25); color: var(--muted); font-weight: 600; text-align: center; }
#dc-tout-supprimer { margin-top: 14px; }

@media (max-width: 900px) {
  .dc-grille { grid-template-columns: 1fr; }
}
@media (max-width: 560px) {
  .dc-section { padding-top: 34px; }
  .dc-grille .fcard { padding: 20px 18px; }
  .dc-depot { padding: 18px 12px; }
  .dc-boutons .btn { flex: 1 1 auto; }
  .dc-table th:nth-child(2), .dc-table td:nth-child(2) { display: none; }
  #dc-recherche { flex-basis: 100%; }
}

/* ---------- Visionneuse ---------- */
.dv-page { margin: 0; height: 100vh; height: 100dvh; display: flex; flex-direction: column; background: #111127; color: #fff; font-family: var(--font); overflow: hidden; }
.dv-barre { flex: 0 0 auto; display: flex; align-items: center; gap: 14px; padding: 8px 14px; background: #f6f4ef; color: var(--ink); border-bottom: 3px solid var(--ink); min-width: 0; }
.dv-barre .brand-mark { width: 34px; height: auto; flex: 0 0 auto; }
.dv-retour { flex: 0 0 auto; }
.dv-titre { min-width: 0; flex: 1 1 auto; line-height: 1.2; }
.dv-titre b { display: block; font-size: .95rem; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.dv-titre small { display: block; font-size: .78rem; color: var(--muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.dv-demo { flex: 0 0 auto; font: 800 .7rem var(--font); letter-spacing: .06em; text-transform: uppercase; color: var(--red); background: rgba(168, 23, 45, .12); padding: 4px 10px; border-radius: 999px; }
.dv-onglets { display: none; }
.dv-corps { flex: 1 1 auto; display: flex; min-height: 0; }
.dv-images { flex: 1 1 auto; position: relative; min-width: 0; }
.dv-images iframe { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; background: #000; }
.dv-message { position: absolute; inset: 0; display: grid; place-items: center; padding: 24px; text-align: center; color: #fff; font-weight: 600; }
.dv-cr, .dv-courbe { flex: 0 0 360px; display: flex; flex-direction: column; background: #f6f4ef; color: var(--ink); border-left: 3px solid var(--ink); min-height: 0; }
.dv-cr-tete { padding: 14px 16px 6px; }
.dv-cr-tete h2 { margin: 0; font-size: 1.05rem; }
.dv-cr-tete p { margin: 6px 0 0; font-size: .8rem; color: var(--muted); }
.dv-cr textarea { flex: 1 1 auto; margin: 10px 16px 0; min-height: 160px; padding: 12px; border: 3px solid var(--ink); border-radius: 14px; font: 500 .9rem/1.5 var(--font); resize: none; background: #fff; }
.dv-cr-pied { display: flex; align-items: center; gap: 10px; padding: 12px 16px 16px; }
.dv-cr-etat { font-size: .8rem; color: var(--muted); }

/* Panneau « Courbe » (courbe de perfusion) */
.dv-courbe { flex-basis: 380px; overflow-y: auto; }
.dv-courbe .dv-cr-tete p { font-size: .76rem; line-height: 1.45; }
.dv-courbe-corps { padding: 8px 16px 18px; }
.dv-courbe-vide { margin: 4px 0; padding: 16px; border-radius: 14px; border: 3px dashed rgba(17, 17, 20, .25); background: #fff; color: var(--muted); font-weight: 600; font-size: .86rem; text-align: center; }
.dv-courbe-options { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 8px; margin: 2px 0 10px; }
.dv-segment { display: inline-flex; border: 3px solid var(--ink); border-radius: 999px; overflow: hidden; background: #fff; }
.dv-segment button { border: 0; background: none; padding: 6px 11px; font: 800 .7rem var(--font); letter-spacing: .04em; text-transform: uppercase; color: var(--muted); cursor: pointer; }
.dv-segment button[aria-pressed="true"] { background: var(--ink); color: #fff; }
.dv-courbe-graphe svg { display: block; width: 100%; height: auto; background: #fff; border: 3px solid var(--ink); border-radius: 14px; }
.dv-graphe text { font: 600 10px var(--font); fill: var(--muted); }
.dv-graphe .dv-legende-axe { font-weight: 800; fill: var(--ink); }
.dv-grille { stroke: rgba(17, 17, 20, .08); }
.dv-trait { stroke: var(--ink); stroke-width: 1.5; }
.dv-base { stroke: var(--ink); stroke-width: 1; stroke-dasharray: 4 3; opacity: .45; }
.dv-phase { stroke: var(--navy); stroke-width: 1.5; stroke-dasharray: 2 2; }
.dv-ligne { fill: none; stroke: var(--c); stroke-width: 2.4; stroke-linejoin: round; }
.dv-point { fill: var(--c); cursor: pointer; }
.dv-point:hover { stroke: var(--ink); stroke-width: 2; }
.dv-extreme { stroke: var(--ink); stroke-width: 1.5; }
.dv-region { margin-top: 12px; padding: 10px 12px; background: #fff; border: 3px solid var(--ink); border-left: 8px solid var(--c); border-radius: 12px; }
.dv-region h3 { display: flex; align-items: center; gap: 8px; margin: 0 0 6px; font-size: .9rem; overflow-wrap: anywhere; }
.dv-region-couleur { flex: 0 0 auto; width: 12px; height: 12px; border-radius: 50%; background: var(--c); border: 2px solid var(--ink); }
.dv-region dl { display: grid; gap: 3px; margin: 0; }
.dv-region dl div { display: flex; justify-content: space-between; gap: 10px; font-size: .8rem; }
.dv-region dt { color: var(--muted); font-weight: 600; }
.dv-region dd { margin: 0; font-weight: 800; text-align: right; }
.dv-region-note { margin: 6px 0 0; font-size: .76rem; color: var(--muted); }
.dv-courbe-avis { margin: 14px 0 0; font-size: .74rem; line-height: 1.45; color: var(--muted); }
.dv-pastille { display: inline-grid; place-items: center; min-width: 18px; height: 18px; margin-left: 4px; padding: 0 5px; border-radius: 999px; background: var(--amber); color: var(--ink); font-size: .7rem; letter-spacing: 0; }

@media (max-width: 760px) {
  .dv-barre { gap: 10px; padding: 6px 10px; }
  .dv-barre .brand-mark, .dv-demo, .dv-basculer { display: none; }
  .dv-onglets { display: flex; flex: 0 0 auto; background: #f6f4ef; border-bottom: 3px solid var(--ink); }
  .dv-onglets button { flex: 1; padding: 10px 4px; border: 0; background: none; font: 800 .76rem var(--font); letter-spacing: .04em; text-transform: uppercase; color: var(--muted); border-bottom: 4px solid transparent; }
  .dv-onglets button.is-actif { color: var(--ink); border-bottom-color: var(--navy); }
  .dv-corps { position: relative; }
  .dv-cr, .dv-courbe { position: absolute; inset: 0; flex: none; border-left: 0; }
  .dv-page:not(.voir-cr) .dv-cr, .dv-page:not(.voir-courbe) .dv-courbe { display: none; }
  .dv-page.voir-cr .dv-cr, .dv-page.voir-courbe .dv-courbe { display: flex !important; }
}
