/* Modules cliniques repris de Carelia (styles en ligne dans les composants) : cadre et notifications. */
.espace-clinique { margin-top: 8px; }
.espace-clinique svg { max-width: 100%; }
.toasts { position: fixed; right: 16px; bottom: 16px; display: flex; flex-direction: column; gap: 8px; z-index: 1000; max-width: min(420px, calc(100vw - 32px)); }
.toast { padding: 10px 14px; border-radius: 8px; color: #fff; box-shadow: 0 4px 14px rgba(0,0,0,.15); font-size: 14px; }
.toast--ok { background: #1f6e49; } .toast--erreur { background: #b3261e; }

/* Synthèse patient */
.synth-editeur .carte { margin-bottom: 12px; }
.synth-editeur h3 { margin: 0 0 8px; color: var(--bleu, #1e3a6b); }
.synth-ligne { display: grid; grid-template-columns: 220px 1fr auto; gap: 8px; align-items: start; margin-bottom: 8px; }
.synth-titre { font-weight: 600; }
.synth-etape { border-left: 3px solid #00a8d6; padding: 6px 0 6px 10px; margin-bottom: 12px; display: grid; gap: 6px; }
.synth-etape__tete { display: flex; gap: 6px; align-items: center; }
.synth-etape__tete .champ { flex: 1; font-weight: 600; }
.synth-num { background: #1e3a6b; color: #fff; border-radius: 50%; width: 24px; height: 24px; display: inline-flex; align-items: center; justify-content: center; font-size: 12px; flex: none; }
.synth-options { display: grid; gap: 8px; }
.synth-option { border: 1px solid #d5dee8; border-radius: 8px; padding: 8px; }
.synth-option--deconseille { background: #fdf3f2; border-color: #f1c9c5; }
.synth-option__tete { display: flex; gap: 8px; align-items: center; margin-bottom: 6px; flex-wrap: wrap; }
.synth-option__tete .champ { flex: 1; min-width: 140px; }
.synth-versions { display: inline-flex; gap: 8px; align-items: center; margin: 6px 0 10px; }
.btn--petit { padding: 4px 10px; font-size: 13px; }
@media (max-width: 700px) { .synth-ligne { grid-template-columns: 1fr; } }
.logo-cabinet { display: flex; gap: 12px; align-items: center; margin: 10px 0; flex-wrap: wrap; } .logo-cabinet img { max-height: 60px; max-width: 120px; border: 1px solid #d5dee8; border-radius: 6px; padding: 4px; background: #fff; }

/* Imagerie */
.vignettes { display: flex; gap: 10px; overflow-x: auto; padding-bottom: 6px; margin-bottom: 12px; }
.vignette { display: flex; flex-direction: column; gap: 2px; border: 2px solid #d5dee8; border-radius: 8px; padding: 6px; background: #fff; cursor: pointer; min-width: 150px; text-align: left; font: inherit; font-size: 12px; }
.vignette img { width: 140px; height: 80px; object-fit: cover; border-radius: 4px; background: #000; }
.vignette--active { border-color: #00a8d6; }
.lecture-radio { margin-bottom: 16px; }
.lecture-radio__corps { display: grid; grid-template-columns: minmax(0, 1.2fr) minmax(0, 1fr); gap: 16px; align-items: start; }
.releves-radio { margin-bottom: 14px; }
.releves-radio .page__entete { margin-bottom: 6px; }
.grille-dents-radio { display: grid; grid-template-columns: repeat(auto-fill, minmax(290px, 1fr)); gap: 0 16px; }
.lecture-radio__image { }
.lecture-radio__image img { width: 100%; border-radius: 8px; background: #000; cursor: zoom-in; display: block; }
.lecture-radio__image img.zoom { width: 200%; max-width: none; cursor: zoom-out; }
.lecture-radio__image { overflow-x: auto; }   /* défile avec la page (pas de position fixe) */
.lecture-radio__resultats .carte { margin-bottom: 10px; }
.lecture-radio__resultats h3 { margin: 0 0 6px; }
.avertissement-ia { color: #8a939e; font-size: 11.5px; font-style: italic; margin: 8px 0 0; text-align: center; }
.dent-radio { display: grid; grid-template-columns: 42px 1fr; gap: 8px; border-top: 1px solid #e6ebf1; padding: 8px 0; }
.dent-radio__num { font-weight: 800; color: #1e3a6b; font-size: 18px; }
.dent-radio ul { list-style: none; margin: 0; padding: 0; display: grid; gap: 6px; }
.constat-radio { display: flex; justify-content: space-between; gap: 8px; align-items: flex-start; padding: 6px 8px; border-radius: 6px; }
.constat-radio--retenu { background: #e3f3ea; } .constat-radio--ecarte { background: #f3f4f6; opacity: .65; } .constat-radio--ecarte b { text-decoration: line-through; }
.constat-radio__choix { display: flex; gap: 4px; flex: none; }
@media (max-width: 900px) { .lecture-radio__corps { grid-template-columns: 1fr; } .lecture-radio__image { position: static; } }
.pastille--faible { background: #fff1e0; color: #a85b00; }
/* Fiche patient : 9 onglets — une seule ligne, défilement horizontal si l'écran est étroit */
.onglets { overflow-x: auto; flex-wrap: nowrap; scrollbar-width: thin; }
.onglets .onglet { white-space: nowrap; padding: 8px 11px; font-size: 15px; }

/* Photos cliniques */
.grille-photos { display: grid; grid-template-columns: repeat(auto-fill, minmax(230px, 1fr)); gap: 12px; }
.carte-photo { border: 1px solid #d5dee8; border-radius: 10px; padding: 10px; background: #fff; display: flex; flex-direction: column; gap: 6px; }
.carte-photo__titre { font-weight: 700; color: #1e3a6b; }
.carte-photo img { width: 100%; aspect-ratio: 4 / 3; object-fit: cover; border-radius: 6px; display: block; background: #eef2f6; }
.carte-photo__cadre { width: 100%; aspect-ratio: 4 / 3; border: 2px dashed #9fb3c6; border-radius: 6px; background: #f5f8fb; color: #1e3a6b; font: inherit; font-weight: 600; cursor: pointer; }
.carte-photo p { margin: 0; font-size: 12px; }
.carte-photo .actions { margin: 0; justify-content: flex-start; }
.analyse-esthetique .carte { margin-bottom: 12px; }
.analyse-esthetique h3 { margin: 0 0 8px; color: #1e3a6b; }
.grille-esthetique { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 10px 14px; align-items: start; }
.grille-esthetique .champ-multi, .grille-esthetique .champ-large { grid-column: 1 / -1; }
.champ-multi > span { font-weight: 600; font-size: 14px; display: block; margin-bottom: 4px; }
.puces { display: flex; flex-wrap: wrap; gap: 6px; }
.puce { border: 1px solid #c9d3de; background: #fff; border-radius: 999px; padding: 4px 12px; font: inherit; font-size: 13px; cursor: pointer; color: #1d2733; }
.puce--active { background: #1e3a6b; border-color: #1e3a6b; color: #fff; }
.grille-dents-radio .constat-radio { flex-direction: column; gap: 4px; }
.grille-dents-radio .dent-radio ul { align-content: start; }

/* Cabinet de groupe : répartition des séances entre praticiens */
.repartition { margin-bottom: 16px; }
.repartition .tableau select.champ { min-width: 180px; padding: 4px 8px; }
.repartition__totaux { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 10px; }
.carte__entete-actions { display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap; }
.carte__entete-actions h2 { margin: 0; }

/* Onglet Photos : QR code d'envoi depuis le téléphone */
.qr-telephone { margin: 12px 0; }
.qr-telephone h3 { margin: 0; }
.qr-telephone__corps { display: flex; gap: 20px; align-items: center; flex-wrap: wrap; margin-top: 10px; }
.qr-telephone__code { width: 168px; height: 168px; background: #fff; padding: 4px; border-radius: 8px; border: 1px solid #dde4ec; }
.qr-telephone__code svg { width: 100%; height: 100%; display: block; }
.qr-telephone__etapes { margin: 0; padding-left: 20px; flex: 1; min-width: 240px; line-height: 1.6; }
.qr-telephone__validite { width: 100%; margin: 0; }

/* Onglet Orthodontie : bilan + IOTN */
.ortho__grille { display: grid; grid-template-columns: minmax(0, 1fr) 300px; gap: 16px; align-items: start; }
.ortho__resultat { position: sticky; top: 72px; display: flex; flex-direction: column; gap: 10px; }
@media (max-width: 900px) { .ortho__grille { grid-template-columns: 1fr; } .ortho__resultat { position: static; order: -1; } }
.iotn { border-left: 5px solid #2e9e6b; }
.iotn__tete { display: flex; gap: 18px; align-items: flex-end; flex-wrap: wrap; margin-bottom: 8px; }
.iotn__libelle { display: block; font-size: 11.5px; text-transform: uppercase; letter-spacing: .04em; color: #5f6b7a; }
.iotn__grade { font-size: 34px; font-weight: 800; color: #1e3a6b; line-height: 1; }
.iotn__grade small { font-size: 16px; margin-left: 2px; }
.iotn__besoin { font-weight: 700; flex-basis: 100%; }
.champ-oui { display: flex; gap: 8px; align-items: flex-start; font-weight: normal; }

/* Orthodontie : sous-onglets, plan par phases, suivi */
.onglets--secondaires { margin: 4px 0 14px; }
.phase-ortho { border: 1px solid #dde4ec; border-radius: 10px; padding: 10px 12px; margin-bottom: 10px; }
.phase-ortho__tete { display: flex; align-items: center; gap: 10px; margin-bottom: 8px; flex-wrap: wrap; }
.phase-ortho__actions { margin-left: auto; display: flex; gap: 4px; }
.suivi-ortho__alertes p { margin: 4px 0; }
.suivi-ortho__attention { color: #8a6100; }

/* Photos : comparaison avant / après */
.comparaison__choix { display: flex; gap: 16px; flex-wrap: wrap; margin: 8px 0 12px; }
.comparaison__ligne { margin-bottom: 14px; }
.comparaison__titre { font-weight: 600; margin-bottom: 6px; }
.comparaison__paire { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.comparaison__paire img { width: 100%; border-radius: 8px; display: block; }
.comparaison__vide { aspect-ratio: 4/3; border: 1px dashed #c9d3de; border-radius: 8px; display: flex; align-items: center; justify-content: center; color: #8a939e; }

/* Céphalométrie : placement des points et mesures */
.cephalo { display: grid; grid-template-columns: minmax(0, 1fr) 340px; gap: 14px; align-items: start; }
@media (max-width: 1000px) { .cephalo { grid-template-columns: 1fr; } }
.cephalo__barre { display: flex; justify-content: space-between; gap: 12px; align-items: center; flex-wrap: wrap; margin-bottom: 6px; font-size: 13.5px; min-height: 48px; }
.cephalo__panneau .pastille { white-space: nowrap; }
.cephalo__zoom { display: flex; gap: 6px; align-items: center; font-weight: normal; }
.cephalo__cadre { overflow: auto; max-height: 78vh; border-radius: 10px; background: #111; }
.cephalo__zone { position: relative; user-select: none; }
.cephalo__zone img { width: 100%; display: block; }
.cephalo__trace { position: absolute; inset: 0; width: 100%; height: 100%; pointer-events: none; }
.cephalo__groupe { margin: 8px 0 4px; font-size: 12px; text-transform: uppercase; letter-spacing: .03em; }
.cephalo__points { display: flex; flex-wrap: wrap; gap: 4px; }
.cephalo__place { border-color: #2e9e6b; }

/* Aligneurs : suivi à distance */
.suivi-distance__url { display: flex; gap: 6px; }
.declaration { border-top: 1px solid #e3e9f0; padding: 10px 0; display: flex; gap: 14px; justify-content: space-between; flex-wrap: wrap; }
.declaration--nouvelle { background: #f6fbff; }
.declaration__photos { display: flex; gap: 6px; }
.declaration__photos img { width: 96px; height: 72px; object-fit: cover; border-radius: 6px; }

/* Occlusodontie (module Carelia) : sections plus compactes */
.espace-clinique .cp-section-grille { display: grid; grid-template-columns: repeat(auto-fill, minmax(340px, 1fr)); gap: 14px 24px; align-items: start; }
.espace-clinique .cp-section-grille > * { margin: 0 !important; min-width: 0; }
.espace-clinique details.cp-note { margin: -4px 0 10px; font-size: 12px; color: #8a939e; }
.espace-clinique details.cp-note summary { cursor: pointer; }

/* Grilles compactes (analyse esthétique des photos) : sections sur deux colonnes, champs resserrés */
.grille-compacte { column-count: 2; column-gap: 14px; }
@media (max-width: 900px) { .grille-compacte { column-count: 1; } }
.grille-compacte > .carte { break-inside: avoid; padding: 12px 14px; margin: 0 0 12px; display: inline-block; width: 100%; box-sizing: border-box; }
.grille-compacte h3 { margin: 0 0 6px; font-size: 13px; }
.grille-compacte .grille-esthetique { grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 6px 10px; }
.grille-compacte label, .grille-compacte .champ-multi > span { font-size: 12px; }
.grille-compacte .champ { padding: 5px 8px; font-size: 13px; }
.grille-compacte .puce { padding: 3px 8px; font-size: 12px; }
.grille-compacte textarea.champ { min-height: 0; }

/* Sommeil : liens vers les tests d'Epworth et de Berlin */
.liens-tests { display: flex; flex-wrap: wrap; gap: 6px 14px; align-items: baseline; margin: 10px 0 0; font-size: 14px; }
.liens-tests a { font-weight: 600; }

/* Placement de points sur une photo (commun/TraceurPoints.js) et analyse du sourire DSD (modules/dsd) */
.traceur__barre { display: flex; justify-content: space-between; gap: 12px; align-items: center; flex-wrap: wrap; margin-bottom: 6px; font-size: 13.5px; min-height: 44px; }
.traceur__zoom { display: flex; gap: 6px; align-items: center; font-weight: normal; }
.traceur__cadre { overflow: auto; max-height: 75vh; border-radius: 10px; background: #111; }
.traceur__zone { position: relative; user-select: none; }
.traceur__zone img { width: 100%; display: block; }
.traceur__trace { position: absolute; inset: 0; width: 100%; height: 100%; pointer-events: none; }
.traceur__groupe { margin: 8px 0 4px; font-size: 12px; text-transform: uppercase; letter-spacing: .03em; }
.traceur__points { display: flex; flex-wrap: wrap; gap: 4px; }
.traceur__place { border-color: #2e9e6b; }
.dsd { margin-top: 16px; }
.dsd__grille { display: grid; grid-template-columns: minmax(0, 1fr) 360px; gap: 16px; align-items: start; }
@media (max-width: 1000px) { .dsd__grille { grid-template-columns: 1fr; } }
.dsd__photo { display: flex; gap: 8px; align-items: center; margin-bottom: 8px; font-size: 14px; }
.dsd__photo .champ { max-width: 260px; }
.dsd__panneau { position: sticky; top: 72px; }
.dsd__panneau label { display: grid; gap: 4px; font-size: 14px; }
.dsd__mesures .pastille { white-space: nowrap; }
.dsd__resume { background: #fffbea; border-left: 4px solid #f0b429; padding: 8px 10px; border-radius: 6px; margin: 10px 0; font-size: 14px; }
.dsd__ia { border-top: 1px solid #e3e8ef; margin-top: 10px; padding-top: 6px; }
.dsd__ia h4 { margin: 8px 0 4px; }
.dsd__manque { padding: 30px 16px; text-align: center; border: 2px dashed #c9d3de; border-radius: 10px; }
.dsd-entree { margin-top: 16px; }
/* Projet de sourire (modules/dsd/ProjetSourire.js) */
.projet { display: grid; grid-template-columns: minmax(0, 1fr) 360px; gap: 16px; align-items: start; }
@media (max-width: 1000px) { .projet { grid-template-columns: 1fr; } }
.projet__barre { display: flex; justify-content: space-between; align-items: center; gap: 12px; flex-wrap: wrap; margin-bottom: 6px; }
.projet__opacite { display: flex; gap: 6px; align-items: center; font-size: 14px; }
.projet__image { width: 100%; height: auto; max-height: 70vh; background: #111; border-radius: 10px; display: block; }
.projet__reglages { position: sticky; top: 72px; }
.projet__reglages h3 { margin: 12px 0 6px; }
.projet__choix { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.projet__choix label, .projet__curseur { display: grid; gap: 2px; font-size: 14px; margin: 6px 0; }
.projet__curseur input { width: 100%; }
.projet__ecarts { margin: 0; padding-left: 18px; font-size: 14px; }
