

@import url('https://fonts.googleapis.com/css2?family=DM+Sans:wght@300;400;500;600&family=DM+Mono:wght@400;500&display=swap');

:root {
  
  --brand-cyan:  #22C1ED;
  --brand:       #1893CF;
  --brand-deep:  #0E6C9E;
  --brand-navy:  #0A3F5C;
  --grad:        linear-gradient(135deg, #1FC2EE 0%, #1E8FCC 55%, #0E6C9E 100%);
  --grad-cyan:   linear-gradient(135deg, #34CDF2 0%, #1893CF 100%);

  --bg:        #EFF4F8;   
  --bg-white:  #FFFFFF;
  --bg-head:   #0E6C9E;   
  --fg-dark:   #0E2A3B;   
  --fg-mid:    #48626F;
  --fg-light:  #59717F;
  --border:    #DCE8EF;
  --ok:        #1F9D6B;   
  --ok-bg:     #E2F4EC;
  --warn:      #D98410;
  --warn-bg:   #FBEFD9;
  --bad:       #E0524B;
  --bad-bg:    #FCEAE9;
  --acc:       #3D5663;
  --acc-bg:    #EAF1F5;
  --blue:      #1893CF;   
  --blue-bg:   #E3F3FB;
  --green:     #1AA67A;   
  --green-bg:  #E1F4EC;
  --brown:     #0E7C8E;   
  --radius:    12px;
  --radius-lg: 16px;
  --shadow:    0 2px 8px rgba(14,60,90,.08);
  --shadow-md: 0 8px 24px rgba(14,60,90,.12);
  --shadow-lg: 0 18px 44px rgba(14,60,90,.16);
}

:root {
  --theme:        var(--blue);
  --theme-grad:   var(--grad);
  --theme-shadow: rgba(24,147,207,.40);
  --theme-bg:     var(--blue-bg);
  --theme-deep:   var(--brand-deep);
  
  --theme-header:        var(--grad);
  --theme-header-shadow: rgba(14,108,158,.28);
}

[data-theme="patient"] {            
  --theme:        #6D5BA6;
  --theme-grad:   linear-gradient(135deg, #8A78C2 0%, #6D5BA6 55%, #4E3F7A 100%);
  --theme-shadow: rgba(109,91,166,.34);
  --theme-bg:     #EFECF7;
  --theme-deep:   #4E3F7A;
  --theme-header:        linear-gradient(135deg, #6D5BA6 0%, #574689 55%, #41336B 100%);
  --theme-header-shadow: rgba(65,51,107,.30);
}
[data-theme="terrain"] {            
  --theme:        #8A6D3B;
  --theme-grad:   linear-gradient(135deg, #A98A54 0%, #8A6D3B 55%, #6B5327 100%);
  --theme-shadow: rgba(138,109,59,.34);
  --theme-bg:     #F5EFE2;
  --theme-deep:   #6B5327;
  --theme-header:        linear-gradient(135deg, #8A6D3B 0%, #6B5327 55%, #52401E 100%);
  --theme-header-shadow: rgba(82,64,30,.30);
}
[data-theme="mineral"] {            
  --theme:        #CB6259;
  --theme-grad:   linear-gradient(135deg, #E0908A 0%, #CB6259 55%, #AC4942 100%);
  --theme-shadow: rgba(203,98,89,.34);
  --theme-bg:     #FBEEEC;
  --theme-deep:   #AC4942;
  --theme-header:        linear-gradient(135deg, #C8635A 0%, #B14E47 55%, #8E3C37 100%);
  --theme-header-shadow: rgba(142,60,55,.30);
}
[data-theme="irido"] {              
  --theme:        var(--blue);
  --theme-grad:   var(--grad);
  --theme-shadow: rgba(24,147,207,.40);
  --theme-bg:     var(--blue-bg);
  --theme-deep:   var(--brand-deep);
  --theme-header:        var(--grad);
  --theme-header-shadow: rgba(14,108,158,.28);
}
[data-theme="homeo"] {              
  --theme:        #0097AF;
  --theme-grad:   linear-gradient(135deg, #22B3C9 0%, #0097AF 55%, #007E93 100%);
  --theme-shadow: rgba(0,151,175,.34);
  --theme-bg:     #E7F4F6;
  --theme-deep:   #00697E;
  --theme-header:        linear-gradient(135deg, #0097AF 0%, #007E93 55%, #00637A 100%);
  --theme-header-shadow: rgba(0,99,122,.30);
}
[data-theme="naturo"] {             
  --theme:        var(--green);
  --theme-grad:   linear-gradient(135deg, #34CFA3 0%, #1AA67A 55%, #0E7A58 100%);
  --theme-shadow: rgba(26,166,122,.40);
  --theme-bg:     var(--green-bg);
  --theme-deep:   #0E7A58;
  --theme-header:        linear-gradient(135deg, #2BB98C 0%, #169A71 55%, #0C6E50 100%);
  --theme-header-shadow: rgba(12,110,80,.30);
}
[data-theme="physioscan"],
[data-theme="energie"] {            
  --theme:        #574FD6;
  --theme-grad:   linear-gradient(135deg, #7B74E8 0%, #574FD6 55%, #3F37AB 100%);
  --theme-shadow: rgba(87,79,214,.38);
  --theme-bg:     #ECEBFB;
  --theme-deep:   #3F37AB;
  --theme-header:        linear-gradient(135deg, #6A62DE 0%, #514AC4 55%, #3A329E 100%);
  --theme-header-shadow: rgba(58,50,158,.30);
}

* { box-sizing: border-box; margin: 0; padding: 0; }

.nas-alert {
  display: none; position: fixed; top: 0; left: 0; right: 0; z-index: 9999;
  background: #C0392B; color: #fff; text-align: center;
  padding: 11px 18px; font-size: 14px; font-weight: 600; line-height: 1.35;
  box-shadow: 0 3px 14px rgba(0,0,0,.35);
  animation: nasPulse 1.6s ease-in-out infinite;
}
.nas-alert.show { display: block; }
.nas-alert strong { font-weight: 800; }
@keyframes nasPulse { 0%,100% { background: #B03326; } 50% { background: #E0524B; } }

.backup-alert {
  display: none; position: fixed; top: 0; left: 0; right: 0; z-index: 9998;
  background: #B4690E; color: #fff; text-align: center;
  padding: 9px 18px; font-size: 13px; font-weight: 600; line-height: 1.35;
  box-shadow: 0 2px 10px rgba(0,0,0,.22);
}
.backup-alert.show { display: block; }
.backup-alert strong { font-weight: 800; }

body.nas-down { padding-top: 44px; }
body.backup-warn { padding-top: 38px; }
body.nas-down.backup-warn { padding-top: 82px; }
body.nas-down .backup-alert { top: 44px; }

html, body { height: 100%; }
body {
  font-family: 'DM Sans', sans-serif;
  font-size: 14px;
  background: var(--bg);
  color: var(--fg-dark);
  margin: 0;
  display: flex;
  flex-direction: column;   
}

.app-header {
  background: var(--theme-header);
  padding: 16px 26px 14px;
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
}
.app-logo { position: absolute; left: 26px; top: 50%; transform: translateY(-50%); display: block; line-height: 0; }
.app-logo img { height: 72px; width: auto; display: block; transition: opacity .15s; }
.app-logo:hover img { opacity: .8; }
.app-logo-right { position: absolute; right: 26px; top: 50%; transform: translateY(-50%); height: 52px; width: auto; }
.app-header-text { min-width: 0; text-align: center; }
.app-header-text .app-subtitle {
  font-size: 14px; font-weight: 500; letter-spacing: .02em;
  color: rgba(255,255,255,.82); margin-top: 4px;
}
.app-header-text .app-version {
  display: inline-block; margin-left: 8px; font-size: 11px; font-weight: 600;
  color: rgba(255,255,255,.92); background: rgba(255,255,255,.16);
  border-radius: 999px; padding: 1px 8px; vertical-align: middle; letter-spacing: 0;
}
.app-header-text .app-lang {
  margin-left: 8px; font-size: 11px; font-weight: 600; vertical-align: middle;
  color: rgba(255,255,255,.92); background: rgba(255,255,255,.16);
  border: 1px solid rgba(255,255,255,.28); border-radius: 999px;
  padding: 1px 6px; cursor: pointer; letter-spacing: 0;
}
.app-header-text .app-lang option { color: #222; }
.app-header h1 {
  font-size: 30px;
  font-weight: 700;
  color: #fff;
  letter-spacing: -.5px;
}
.app-header p {
  font-size: 12px;
  color: #AAAAAA;
  margin-top: 2px;
}

.page-body {

  padding: 16px 24px;
  flex: 1;
  min-height: 0;
  overflow-y: auto;
  display: flex;
  flex-direction: column;
}

.toolbar {
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin-bottom: 12px;
}
.toolbar-row {
  display: flex;
  align-items: center;
  gap: 10px;
}
.toolbar-row label {
  font-size: 12px;
  color: var(--fg-mid);
  white-space: nowrap;
  min-width: 130px;
}

input[type="text"], input[type="password"], textarea {
  font-family: 'DM Sans', sans-serif;
  font-size: 13px;
  background: var(--bg-white);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 7px 10px;
  color: var(--fg-dark);
  outline: none;
  width: 100%;
  transition: border-color .15s;
}
input:focus, textarea:focus { border-color: #999; }
input[type="file"] { display: none; }

.btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 7px 16px;
  border-radius: var(--radius);
  border: none;
  font-family: 'DM Sans', sans-serif;
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  white-space: nowrap;
  transition: opacity .15s, transform .1s;
}
.btn:active { transform: scale(.98); }
.btn:disabled { opacity: .45; cursor: not-allowed; }
.btn-dark  { background: var(--bg-head); color: #fff; }
.btn-dark:hover:not(:disabled) { opacity: .85; }
.btn-sec   { background: #ECECEA; color: var(--fg-dark); }
.btn-sec:hover:not(:disabled) { background: #E0E0DE; }
.btn-green { background: var(--green); color: #fff; }
.btn-green:hover:not(:disabled) { opacity: .85; }
.btn-blue  { background: var(--blue); color: #fff; }
.btn-blue:hover:not(:disabled) { opacity: .85; }
.btn-brown { background: var(--brown); color: #fff; }
.btn-brown:hover:not(:disabled) { opacity: .85; }
.btn-grey  { background: #CCCCCC; color: #888; cursor: not-allowed; }
.btn-sm    { padding: 5px 12px; font-size: 12px; }

.patient-card {
  background: #F0F8F0;
  border: 1px solid #C3E6CB;
  border-radius: var(--radius);
  padding: 8px 14px;
  margin-bottom: 8px;
  display: flex;
  align-items: center;
  gap: 16px;
}
.patient-card .name {
  font-size: 14px;
  font-weight: 600;
  color: #1A5C2A;
}
.patient-card .meta {
  font-size: 12px;
  color: var(--fg-mid);
}
.patient-card.hidden { display: none; }

.table-wrap {
  background: var(--bg-white);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
  flex: 1;
}
table {
  width: 100%;
  border-collapse: collapse;
  font-size: 13px;
}
thead th {
  background: #F0F0ED;
  color: var(--fg-mid);
  font-size: 11px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: .04em;
  padding: 8px 12px;
  text-align: left;
  position: sticky;
  top: 0;
  z-index: 1;
}
tbody tr:hover td { background: #FAFAF8; }
tr.ind-row { cursor: pointer; }
tr.section-header { cursor: pointer; }

@keyframes navflash {
  0%   { box-shadow: 0 0 0 3px var(--theme); background: var(--theme-bg); }
  100% { box-shadow: 0 0 0 0 transparent; background: transparent; }
}
.nav-flash { animation: navflash 1.4s ease-out; border-radius: var(--radius); }
tbody td {
  padding: 7px 12px;
  border-bottom: 1px solid #F0EFE8;
  vertical-align: middle;
}
tbody tr:last-child td { border-bottom: none; }
tr.section-header td {
  background: #ECECEC;
  color: var(--fg-mid);
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .06em;
  padding: 6px 12px;
  cursor: pointer;
  user-select: none;
}
tr.section-header:hover td { background: #E4E4E1; }

.toggle-all {
  margin-left: 8px; border: none; background: var(--theme);
  color: #fff; font-size: 14px; font-weight: 700; line-height: 20px;
  width: 22px; height: 22px; border-radius: 50%; cursor: pointer;
  padding: 0; vertical-align: middle; text-align: center;
  box-shadow: 0 1px 3px rgba(0,0,0,.18);
  transition: background .15s, transform .1s, box-shadow .15s;
}
.toggle-all:hover { filter: brightness(1.08); transform: scale(1.08); box-shadow: 0 2px 5px rgba(0,0,0,.25); }
.toggle-all:active { transform: scale(.96); }

.sec-hdr { display: flex; align-items: center; gap: 8px; }
.sec-caret { font-size: 10px; color: var(--fg-light); transition: transform .15s; display: inline-block; }
tr.section-header.open .sec-caret { transform: rotate(90deg); }
.sec-label { font-weight: 700; }
.sec-count {
  font-weight: 600; color: var(--fg-light); font-size: 10px;
  background: rgba(0,0,0,.06); border-radius: 10px; padding: 1px 7px; letter-spacing: 0;
}
.sec-spacer { flex: 1; }
.sev-bar {
  display: inline-flex; width: 120px; height: 8px;
  border-radius: 4px; overflow: hidden; background: #F0EFE8;
}
.sev-bar .seg { display: block; height: 100%; }

.seg-bad     { background: #E59189; }
.seg-watch   { background: #E6B575; }
.seg-ok      { background: #74C2A0; }
.seg-neutral { background: var(--border); }
.sec-tally {
  font-size: 11px; font-weight: 600; letter-spacing: 0;
  text-transform: none; color: var(--fg-mid);
  min-width: 96px; text-align: right;
}
.sec-tally .tally { display: inline-flex; align-items: center; gap: 3px; margin-left: 8px; }
.sec-tally .tally .dot { width: 8px; height: 8px; border-radius: 50%; display: inline-block; }
.tally-bad   .dot { background: #E59189; }
.tally-watch .dot { background: #E6B575; }
.tally-ok   .chk { color: #5FB18C; font-style: normal; font-weight: 700; }
.sec-tally .tally-bad   { color: #B66760; }
.sec-tally .tally-watch { color: #B5853B; }
.sec-tally .tally-ok    { color: #4E9E7C; }
.tally-empty { color: var(--fg-light); }
.val { text-align: center; font-family: 'DM Mono', monospace; font-size: 12px; }
.sym { text-align: center; color: var(--fg-light); font-size: 12px; }

.badge {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  font-size: 11px;
  font-weight: 500;
  padding: 2px 8px;
  border-radius: 20px;
  white-space: nowrap;
}
.badge-ok      { color: var(--ok);   background: var(--ok-bg); }
.badge-watch   { color: var(--warn); background: var(--warn-bg); }
.badge-bad     { color: var(--bad);  background: var(--bad-bg); }
.badge-acc     { color: var(--acc);  background: var(--acc-bg); }
.badge-good    { color: var(--ok);   background: var(--ok-bg); }
.badge-neutral { color: var(--fg-light); background: transparent; }

tr.row-bad td { color: var(--bad); font-weight: 600; }
tr.row-watch td { color: var(--warn); }
tr.row-good td { color: var(--ok); }

.statusbar {
  background: var(--bg-white);
  border-top: 1px solid var(--border);
  padding: 8px 24px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  position: sticky;
  bottom: 0;
  z-index: 10;
}
.statusbar .status-text {
  font-size: 12px;
  color: var(--fg-light);
  flex: 1;
}
.statusbar .btn-group {
  display: flex;
  gap: 8px;
  align-items: center;
}

.progress-bar {
  display: none;
  align-items: center;
  gap: 10px;
  padding: 6px 0;
}
.progress-bar.visible { display: flex; }
.spinner {
  width: 16px; height: 16px;
  border: 2px solid var(--border);
  border-top-color: var(--fg-mid);
  border-radius: 50%;
  animation: spin .7s linear infinite;
  flex-shrink: 0;
}
@keyframes spin { to { transform: rotate(360deg); } }

.ai-overlay {
  position: fixed; inset: 0; z-index: 9999;
  display: none; align-items: center; justify-content: center;
  background: rgba(255,255,255,.72);
  -webkit-backdrop-filter: blur(3px); backdrop-filter: blur(3px);
}
.ai-overlay.show { display: flex; }
.ai-card {
  background: var(--bg-white); border: 1px solid var(--border);
  border-radius: 16px; box-shadow: 0 14px 44px rgba(0,0,0,.14);
  padding: 28px 40px; text-align: center; min-width: 260px;
}
.ai-dots { display: inline-flex; gap: 11px; margin-bottom: 16px; }
.ai-dots i {
  width: 15px; height: 15px; border-radius: 50%; display: block;
  animation: ai-bounce 1.1s infinite ease-in-out both;
}

.ai-dots i:nth-child(1) { background: color-mix(in srgb, var(--theme) 55%, #fff); animation-delay: -.32s; }
.ai-dots i:nth-child(2) { background: var(--theme); animation-delay: -.16s; }
.ai-dots i:nth-child(3) { background: var(--theme-deep); }
@keyframes ai-bounce {
  0%, 80%, 100% { transform: scale(.4); opacity: .5; }
  40%           { transform: scale(1);  opacity: 1; }
}
.ai-title { font-size: 15px; font-weight: 700; color: var(--fg-dark); }
.ai-sub { font-size: 12.5px; color: var(--fg-light); font-style: italic; margin-top: 6px; min-height: 16px; }

.ai-actions { display: flex; gap: 10px; justify-content: center; align-items: center; margin-top: 16px; flex-wrap: wrap; }
.ai-bg {
  border: 1px solid var(--theme); background: var(--theme-bg, #eef); color: var(--theme-deep);
  font-size: 12px; font-weight: 600; padding: 6px 18px; border-radius: 8px; cursor: pointer;
}
.ai-bg:hover { background: var(--theme); color: #fff; }
.progress-bar span { font-size: 12px; color: var(--fg-light); font-style: italic; }

.job-toasts { position: fixed; right: 18px; top: 76px; z-index: 9999; display: flex; flex-direction: column; gap: 10px; max-width: 360px; }
body.nas-down .job-toasts { top: 120px; }
.job-toast {
  background: #fff; border: 1px solid var(--border); border-left: 4px solid var(--theme);
  box-shadow: 0 8px 28px rgba(0,0,0,.16); border-radius: 10px; padding: 12px 14px;
  font-size: 13px; color: var(--fg-dark); display: flex; align-items: center; gap: 8px;
  opacity: 0; transform: translateY(-12px); transition: opacity .25s, transform .25s;
}
.job-toast.show { opacity: 1; transform: translateY(0); }
.job-toast.err { background: #FDECEA; color: #7A241C; }   
.job-toast.err .jt-close { color: #B23A2E; }
.job-toast a { color: var(--theme-deep); font-weight: 700; text-decoration: none; white-space: nowrap; }
.job-toast a:hover { text-decoration: underline; }
.job-toast .jt-close { margin-left: auto; border: none; background: none; cursor: pointer; color: var(--fg-light); font-size: 16px; line-height: 1; padding: 0 2px; }

.job-indicator {
  position: fixed; left: 16px; bottom: 16px; z-index: 9998; display: none;
  align-items: center; gap: 8px; max-width: 60vw; flex-wrap: wrap;
  background: #fff; border: 1px solid var(--border); border-radius: 22px;
  padding: 6px 12px 6px 10px; box-shadow: 0 6px 20px rgba(14,60,90,.16);
  font-size: 12px; color: var(--fg-mid);
}
.job-indicator.show { display: flex; }

.job-indicator { --c-roue: var(--fg-mid, #567); }
.job-indicator .gear { display: block; color: var(--c-roue); transform-origin: 50% 50%; animation: jobspin 2.6s linear infinite; }
@keyframes jobspin { to { transform: rotate(360deg); } }
.job-indicator .ji-count {
  background: var(--fg-dark); color: #fff; font-weight: 700; font-size: 11px;
  min-width: 18px; height: 18px; border-radius: 9px; display: inline-flex;
  align-items: center; justify-content: center; padding: 0 5px;
}
.job-indicator .ji-chips { display: inline-flex; gap: 6px; flex-wrap: wrap; }
.job-indicator .ji-chip {
  display: inline-flex; align-items: center; gap: 2px;
  background: color-mix(in srgb, var(--c) 14%, #fff);
  border: 1px solid color-mix(in srgb, var(--c) 35%, #fff);
  border-radius: 12px; padding: 2px 4px 2px 9px; font-weight: 600;
}
.job-indicator .ji-go {
  color: var(--c); text-decoration: none; max-width: 200px;
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}
.job-indicator .ji-go:hover { text-decoration: underline; }
.job-indicator .ji-x {
  border: none; background: none; cursor: pointer; color: var(--c); opacity: .65;
  font-size: 15px; line-height: 1; padding: 0 3px; border-radius: 8px;
}
.job-indicator .ji-x:hover { opacity: 1; background: color-mix(in srgb, var(--c) 22%, #fff); }

.report-wrap {
  display: flex;
  flex-direction: column;
  flex: 1;
  min-height: 0;
  overflow: hidden;
}
.motif-row {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 10px;
  flex-shrink: 0;

  flex-wrap: wrap;
}

.motif-row .cout-analyse { flex: 0 0 auto; white-space: nowrap; }

.motif-row label { font-size: 12px; color: var(--fg-mid); white-space: nowrap; min-width: 140px;
                   margin-right: 6px; }

.motif-row .btn-theme { margin-left: auto; }
.report-text {
  flex: 1;
  min-height: 0;
  background: var(--bg-white);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 14px;
  font-size: 13px;
  line-height: 1.7;
  overflow-y: auto;
  color: var(--fg-dark);
  font-family: 'DM Sans', sans-serif;
}

.report-text h1, .report-text h2, .report-text h3, .report-text h4 {
  font-weight: 700;
  line-height: 1.3;
  color: var(--fg-dark);
  margin: 18px 0 6px;
}
.report-text > :first-child { margin-top: 0; }
.report-text h1 { font-size: 19px; }
.report-text h2 {
  font-size: 16px;
  border-bottom: 1px solid var(--border);
  padding-bottom: 4px;
}
.report-text h3 { font-size: 14px; color: var(--fg-mid); }
.report-text h4 { font-size: 13px; color: var(--fg-mid); text-transform: uppercase; letter-spacing: .03em; }
.report-text p { margin: 6px 0; }
.report-text strong { font-weight: 700; color: var(--fg-dark); }
.report-text em { font-style: italic; }
.report-text ul, .report-text ol { margin: 6px 0 10px; padding-left: 24px; }
.report-text li { margin: 3px 0; }
.report-text code {
  font-family: 'DM Mono', monospace; font-size: 12px;
  background: rgba(0,0,0,.05); padding: 1px 5px; border-radius: 4px;
}
.report-text hr { border: none; border-top: 1px solid var(--border); margin: 14px 0; }

.sections-form {
  flex: 1;
  min-height: 0;
  overflow-y: auto;
  padding: 4px 4px 4px 0;
  display: flex;
  flex-direction: column;
  gap: 14px;
}
.boutique-toggle {
  display: flex; align-items: center; gap: 8px;
  font-size: 13px; font-weight: 600; color: var(--brown);
  background: #E4F4F2; border: 1px solid #B6E0DB; border-radius: var(--radius);
  padding: 8px 14px; margin-bottom: 14px; cursor: pointer;
}
.boutique-toggle input { accent-color: var(--brown); cursor: pointer; margin: 0; }

.rubrique-picker {
  background: var(--bg-white);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 10px 14px;
  margin-bottom: 14px;
}
.picker-title { font-size: 12px; font-weight: 700; color: var(--fg-mid); text-transform: uppercase; letter-spacing: .03em; margin-bottom: 8px; }
.picker-items { display: grid; grid-template-columns: repeat(auto-fill, minmax(190px, 1fr)); gap: 8px 18px; }
.picker-item { display: flex; align-items: center; gap: 7px; font-size: 13px; color: var(--fg-dark); cursor: pointer; }
.picker-item input { margin: 0; flex-shrink: 0; }
.picker-item input { accent-color: var(--theme); cursor: pointer; }

.phase-nav { display: flex; gap: 6px; flex-wrap: wrap; margin-bottom: 10px; flex-shrink: 0; }
.phase-nav-btn {
  font-size: 12px; font-weight: 600; padding: 5px 11px; border-radius: 14px;
  border: 1px solid var(--border); background: var(--bg-white); color: var(--fg-mid);
  cursor: pointer; white-space: nowrap; transition: background .15s, color .15s, border-color .15s;
}
.phase-nav-btn:hover { border-color: var(--theme); color: var(--theme); }
.phase-nav-btn.active { background: var(--theme); color: #fff; border-color: var(--theme); }

.phase-block {
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 12px 14px;
  margin-bottom: 16px;
  background: var(--bg-white);
  display: flex;
  flex-direction: column;
  gap: 12px;
}
.phase-head {
  display: flex; align-items: center; justify-content: space-between;
  gap: 10px;
  border-bottom: 1px solid var(--border);
  padding-bottom: 8px;
}

.cov-bar { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; margin: 10px 0 4px; padding: 8px 10px; background: var(--theme-bg); border-radius: 8px; }
.cov-count { font-size: 12px; font-weight: 600; color: var(--theme-deep); background: #fff; border: 1px solid var(--border); border-radius: 20px; padding: 2px 9px; flex-shrink: 0; }
.cov-chips { display: flex; flex-wrap: wrap; gap: 5px; }
.cov-chip { font-size: 11px; color: var(--fg-light); background: #fff; border: 1px solid var(--border); border-radius: 14px; padding: 2px 8px; opacity: .5; transition: all .12s; }
.cov-chip.on { opacity: 1; color: var(--theme-deep); border-color: var(--theme); background: color-mix(in srgb, var(--theme) 8%, #fff); font-weight: 500; }
.rub-tech { font-size: 12px; cursor: help; opacity: .85; }
.phase-title {
  font-size: 14px; font-weight: 700; color: var(--fg-dark);
}
.phase-actions { display: flex; gap: 6px; flex-shrink: 0; }

.prod-links { display: flex; flex-wrap: wrap; align-items: center; gap: 5px; margin-top: 5px; }
.prod-lbl { font-size: 11px; color: var(--fg-light); margin-right: 2px; }
.prod-chip {
  display: inline-flex; align-items: center; gap: 4px; font-size: 12px;
  background: var(--blue-bg); border: 1px solid #C9CBF5; border-radius: 12px; padding: 2px 4px 2px 10px;
}
.prod-chip-link { color: var(--theme); text-decoration: none; }
.prod-chip-link:hover { text-decoration: underline; }
.prod-x {
  border: none; background: transparent; color: var(--fg-light);
  font-size: 14px; line-height: 1; cursor: pointer; padding: 0 3px; border-radius: 50%;
}
.prod-x:hover { background: var(--bad); color: #fff; }

.sys-col { min-width: 160px; }
.sys-tag {
  display: inline-block; font-size: 10.5px; line-height: 1.5; font-weight: 500;
  border-radius: 9px; padding: 1px 8px; margin: 1px 3px 1px 0; white-space: nowrap;
}
.sys-empty { color: var(--fg-light); }

.sys-tag.emonc { font-weight: 600; }
.emonc-ic { vertical-align: -1px; margin-right: 3px; opacity: .9; }
.emonc-legend {
  display: inline-flex; align-items: center; gap: 2px;
  margin-left: 8px; font-size: 10.5px; color: var(--fg-light);
}
.emonc-legend .emonc-ic { opacity: .7; }
.filter-hint { font-size: 10.5px; color: var(--fg-light); display: inline-flex; align-items: center; gap: 4px; }
.filter-hint kbd {
  font-family: inherit; font-size: 10px; line-height: 1; color: var(--fg-mid);
  background: #F1F4F8; border: 1px solid #D7DEEA; border-bottom-width: 2px;
  border-radius: 4px; padding: 2px 5px;
}

.sys-filter-bar {
  position: sticky; top: 0; z-index: 5;
  display: flex; flex-wrap: wrap; align-items: center; gap: 6px;
  background: #fff; padding: 8px 10px; border-bottom: 1px solid var(--border);
}
.sys-filter-lbl { font-size: 11px; color: var(--fg-light); margin-right: 2px; }
.sys-pill { cursor: pointer; user-select: none; transition: opacity .15s, transform .1s; }
.sys-pill:hover { filter: brightness(1.08); }
.sys-pill.active { outline: 2px solid currentColor; outline-offset: 1px; font-weight: 600; }
.sys-filter-bar.filtering .sys-pill:not(.active) { opacity: .45; }
.sys-filter-all {
  font-size: 11px; font-weight: 600; cursor: pointer;
  background: #EEF1F6; color: #3A4A63; border: 1px solid #D7DEEA;
  border-radius: 9px; padding: 2px 10px;
}
.sys-filter-all.active { background: #3A4A63; color: #fff; border-color: #3A4A63; }

.filter-sep { width: 1px; height: 18px; background: var(--border); margin: 0 4px; }
.sev-pill {
  cursor: pointer; user-select: none; font-size: 11px; font-weight: 600;
  border-radius: 9px; padding: 2px 10px; border: 1px solid; transition: opacity .15s, filter .15s;
}
.sev-pill:hover { filter: brightness(1.05); }
.sev-pill.sev-bad   { color: #A32D2D; border-color: #E3B7B7; background: #FCEAE9; }
.sev-pill.sev-watch { color: #9A6A12; border-color: #EAD2A0; background: #FBF0DA; }
.sev-pill.sev-ok    { color: #1F7A55; border-color: #BBE3CF; background: #E6F5EC; }
.sev-pill.active { outline: 2px solid currentColor; outline-offset: 1px; }
.sys-filter-bar.sevfiltering .sev-pill:not(.active) { opacity: .45; }

.ico-word { vertical-align: -3px; margin-right: 5px; }

.nas-banner {
  background: #FDECEA; color: #8A1C12; border-bottom: 1px solid #F1B0A8;
  padding: 9px 24px; font-size: 13px; font-weight: 600;
}
.nas-banner.hidden { display: none; }

.config-panel { border: 1px solid var(--border); border-radius: 8px; margin-bottom: 12px; background: var(--card-bg, #fff); }
.config-toggle {
  width: 100%; display: flex; align-items: center; gap: 8px; cursor: pointer;
  background: transparent; border: none; padding: 8px 12px; font-size: 13px; font-weight: 600;
  color: var(--fg); text-align: left;
}
.config-chevron { display: inline-block; transition: transform .2s ease; font-size: 11px; color: var(--fg-light); }
.config-body { padding: 0 12px 12px; max-height: 1200px; overflow: hidden; transition: max-height .25s ease, opacity .2s ease; }
.config-panel.collapsed .config-body { max-height: 0 !important; padding-top: 0; padding-bottom: 0; opacity: 0; }
.config-panel.collapsed .config-chevron { transform: rotate(180deg); }

.physioscan-field { margin-top: 4px; }
.planche-chips { display: flex; flex-wrap: wrap; gap: 5px; margin-top: 4px; }
.planche-chip {
  display: inline-flex; align-items: center; gap: 4px; font-size: 12px;
  background: #E8F5E9; border: 1px solid #A5D6A7; border-radius: 12px; padding: 2px 4px 2px 10px;
}
.planche-name { color: #2D6A2D; }

.section-field { display: flex; flex-direction: column; gap: 4px; }
.section-field label {
  font-size: 12px; font-weight: 700; color: var(--fg-mid);
  text-transform: uppercase; letter-spacing: .03em;
}
.section-field textarea {
  width: 100%;
  box-sizing: border-box;
  resize: none;
  overflow: hidden;
  min-height: 44px;
  background: var(--bg-white);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 10px 12px;
  font-family: 'DM Sans', sans-serif;
  font-size: 13px;
  line-height: 1.6;
  color: var(--fg-dark);
}
.section-field textarea:focus {
  outline: none;
  border-color: var(--theme);
  box-shadow: 0 0 0 3px var(--theme-bg);
}
.report-actions {
  display: flex;
  gap: 8px;
  justify-content: flex-end;
  padding-top: 8px;
  padding-bottom: 4px;
  align-items: center;
  flex-shrink: 0;
}
.report-status {
  font-size: 12px;
  color: var(--fg-light);
  flex: 1;
}

.patient-list {
  list-style: none;
  margin-top: 8px;
}
.patient-list li {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 8px 12px;
  border-bottom: 1px solid var(--border);
  cursor: pointer;
  transition: background .12s;
}
.patient-list li:hover { background: #F8F8F6; }
.patient-list li .pname { font-weight: 500; }
.patient-list li .pdate { font-size: 12px; color: var(--fg-light); }

.table-container {
  flex: 1;
  overflow-y: auto;
  border: 1px solid var(--border);
  border-radius: var(--radius);
}
.main-layout {
  display: flex;
  flex-direction: column;
  flex: 1;
  min-height: 0;
  gap: 8px;
}

.split-layout {
  display: flex;
  gap: 16px;
  flex: 1;
  min-height: 0;
}
.report-col, .bilan-col {
  display: flex;
  flex-direction: column;
  min-width: 0;
  min-height: 0;
}
.report-col { flex: 1 1 54%; }
.bilan-col  { flex: 1 1 46%; }
.report-col .report-wrap { height: auto; flex: 1; }
.bilan-col .table-container { flex: 1; min-height: 0; }
.bilan-col-head {
  font-size: 12px; font-weight: 700; text-transform: uppercase;
  letter-spacing: .04em; color: var(--fg-mid); margin: 0 0 6px 2px;
}
.bilan-empty { text-align: center; color: var(--fg-light); padding: 40px; }

@media (max-width: 900px) {
  .split-layout { flex-direction: column; height: auto; }
  .bilan-col .table-container { max-height: 50vh; }
  
  .split-layout .report-col, .split-layout .bilan-col { flex: 1 1 auto !important; }
  .split-gutter { display: none; }
}

.split-gutter {
  flex: 0 0 8px; align-self: stretch; cursor: col-resize; position: relative;
  margin: 0 -4px;
}
.split-gutter::before {
  content: ''; position: absolute; top: 0; bottom: 0; left: 50%; transform: translateX(-50%);
  width: 2px; border-radius: 2px; background: var(--border); transition: background .15s, width .15s;
}
.split-gutter:hover::before, .split-gutter.dragging::before { background: var(--theme); width: 4px; }

.nav-tabs {
  display: flex;
  align-items: center;          
  gap: 2px;
  background: #ECECEA;
  padding: 4px;
  border-radius: var(--radius);
  margin-bottom: 12px;
  min-height: 52px;             
}

.service-embarque { width: 100%; height: calc(100vh - 150px); min-height: 420px;
                    border: 0; display: block; }
.service-indisponible { margin: 24px; color: #b54a4a; }

.nav-tab.travaille { position: relative; }

.nav-tab.travaille::after {
  content: ''; position: absolute; top: 4px; right: 4px;
  width: 8px; height: 8px; border-radius: 50%;
  background: var(--c-travail, var(--theme, #3b82f6));
  box-shadow: 0 0 0 2px var(--bg, #fff);
  animation: nav-travaille 1.8s ease-in-out infinite;
}
@keyframes nav-travaille { 0%, 100% { opacity: 1; } 50% { opacity: .35; } }
@media (prefers-reduced-motion: reduce) { .nav-tab.travaille::after { animation: none; } }

.nav-tab {
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 7px 12px;
  font-size: 13px;
  font-weight: 500;
  color: var(--fg-mid);
  border-radius: 6px;
  cursor: pointer;
  text-decoration: none;
  transition: background .12s;
}
.nav-tab:hover { background: rgba(0,0,0,.05); color: var(--fg-dark); }
.nav-tab.active { background: var(--bg-white); color: var(--blue); font-weight: 600; box-shadow: var(--shadow); }

.subnav-row {
  background: #fff;
  border-bottom: 1px solid var(--border);
  padding: 6px 24px;
}
.subnav-inner { display: flex; gap: 6px; flex-wrap: wrap; }

.subnav-ic { display: inline-flex; align-items: center; }
.subnav-ic svg { width: 15px; height: 15px; display: block; }
.subnav-tab {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 5px 13px;
  font-size: 13px;
  font-weight: 500;
  color: var(--fg-mid);
  border-radius: 7px;
  text-decoration: none;
  transition: background .12s, color .12s;
}
.subnav-ic { font-size: 14px; line-height: 1; }

.sans-compte { display: flex; align-items: center; gap: 12px; flex-wrap: wrap;
  padding: 10px 24px; background: var(--theme-bg); border-bottom: 1px solid var(--border); }
.sans-compte-dit { margin: 0; flex: 1 1 320px; font-size: 13px; color: var(--fg-dark); line-height: 1.45; }
.sans-compte-dit b { font-weight: 700; }
.sans-compte-entrer { flex: 0 0 auto; color: #fff; text-decoration: none; }
.sans-compte-croix { flex: 0 0 auto; border: 0; background: none; cursor: pointer;
  font-size: 14px; line-height: 1; padding: 6px; color: var(--fg-light); border-radius: 8px; }
.sans-compte-croix:hover { background: var(--bg-white); color: var(--fg-dark); }
@media (max-width: 720px) { .sans-compte { padding: 10px 16px; } }

.bascule-figee { opacity: .55; }
.bascule-figee .interrupteur { cursor: not-allowed; }
.bascule-figee .bascule-nom { cursor: help; }

.ecran-incomplet { display: flex; align-items: center; gap: 14px; flex-wrap: wrap;
  padding: 12px 24px; background: #FDECEA; border-bottom: 1px solid #F3B4AC; }
.ecran-incomplet-dit { margin: 0; flex: 1 1 320px; font-size: 13.5px; color: #7A2017; line-height: 1.45; }
.ecran-incomplet-recharger { flex: 0 0 auto; color: #fff; text-decoration: none; }
@media (max-width: 720px) { .ecran-incomplet { padding: 10px 16px; } }

.exige-compte { opacity: .5; filter: grayscale(1); cursor: help; }
.exige-compte:hover { opacity: .62; }

.icone-svg { display: inline-flex; align-items: center; vertical-align: -3px; margin-right: 7px; }
.icone-svg svg { width: 18px; height: 18px; display: block; }
h2 > .icone-svg svg, h3 > .icone-svg svg { width: 20px; height: 20px; }

.ecran-medaillon { position: absolute; top: 10px; right: 16px;
  width: 64px; height: 64px; border-radius: 50%; pointer-events: none; z-index: 1; }
@media (max-width: 720px) { .ecran-medaillon { width: 48px; height: 48px; top: 8px; right: 10px; } }
.ecran-medaillon-titre { position: static; width: 48px; height: 48px; flex: 0 0 auto;
  margin-right: 12px; vertical-align: -16px;
  box-shadow: 0 1px 3px rgba(14, 42, 59, .18); }
@media (max-width: 720px) { .ecran-medaillon-titre { width: 36px; height: 36px;
  margin-right: 8px; vertical-align: -11px; } }

.nav-ai {
  display: inline-flex;
  align-items: center;
  gap: 2px;
  font-size: .62em;
  font-weight: 700;
  letter-spacing: .3px;
  line-height: 1;
  padding: 2px 5px;
  margin-left: 4px;
  border-radius: 999px;
  vertical-align: middle;
  color: #5a5a5a;
  background: #fff;
  border: 1px solid rgba(0,0,0,.12);
  box-shadow: 0 1px 2px rgba(0,0,0,.12);
}

.nav-ai-star { filter: grayscale(1) brightness(0); }

.gem { display: block; width: 100%; height: 100%; overflow: visible; }
.cell-gem { display: flex; align-items: center; justify-content: center; width: 32px; height: 32px; margin: 0 auto; }
.cell-gem .gem { width: 32px; height: 32px; filter: drop-shadow(0 1px 1.5px rgba(0,0,0,.20)); }

.ed-badge.gem-badge, .sd-badge.gem-badge {
  background: transparent !important; box-shadow: none !important; border: 0 !important;
  padding: 0; width: 46px; height: 46px; display: inline-flex; align-items: center; justify-content: center;
}
.gem-badge .gem { width: 44px; height: 44px; filter: drop-shadow(0 1.5px 2.5px rgba(0,0,0,.24)); }

.tile-badge.has-gem { background: transparent !important; box-shadow: none !important; display: flex; align-items: center; justify-content: center; }
.tile-badge.has-gem .gem { width: 36px; height: 36px; filter: drop-shadow(0 1px 1.5px rgba(0,0,0,.20)); }
.subnav-tab:hover { background: rgba(0,0,0,.05); color: var(--fg-dark); }
.subnav-tab.active { background: var(--theme); color: #fff; font-weight: 600; }

.seance-strip {
  background: #eef6fc; border-bottom: 1px solid var(--border);
  color: var(--fg-mid); font-size: 13px; padding: 6px 24px;
  display: flex; align-items: center; gap: 8px; flex-wrap: wrap;
}
.seance-strip .seance-select {
  padding: 3px 8px; border: 1px solid var(--border); border-radius: 6px;
  font: inherit; background: #fff; max-width: 420px;
}
.seance-strip .ss-cta { color: var(--theme); font-weight: 600; text-decoration: none; margin-left: 4px; }

.seance-strip .ss-combo { position: relative; display: inline-flex; align-items: center; gap: 4px; }
.seance-strip .ss-plainte { min-width: 300px; max-width: 46vw; padding: 3px 9px; border: 1px solid var(--border);
  border-radius: 6px; font: inherit; font-size: 13px; background: #fff; }
.seance-strip .ss-plainte:focus { outline: none; border-color: var(--theme); box-shadow: 0 0 0 2px var(--theme-bg); }
.seance-strip .ss-pick { border: 1px solid var(--border); background: #fff; border-radius: 6px; cursor: pointer;
  padding: 3px 7px; font-size: 12px; color: var(--fg-mid); line-height: 1; }
.seance-strip .ss-pick:hover { border-color: var(--theme); color: var(--theme-deep); }
.seance-strip .ss-menu { position: absolute; top: 100%; left: 0; margin-top: 5px; background: #fff;
  border: 1px solid var(--border); border-radius: 9px; box-shadow: 0 10px 28px rgba(0,0,0,.16); z-index: 60;
  min-width: 340px; max-width: 70vw; max-height: 320px; overflow-y: auto; padding: 5px; }
.seance-strip .ss-item { display: block; width: 100%; text-align: left; background: none; border: none;
  border-radius: 6px; padding: 7px 10px; cursor: pointer; font: inherit; font-size: 13px; white-space: normal; line-height: 1.4; color: var(--fg-mid); }
.seance-strip .ss-item:hover { background: var(--theme-bg); }
.seance-strip .ss-item.on { font-weight: 700; color: var(--theme-deep); }

.busy-overlay { position: fixed; inset: 0; z-index: 3000; background: rgba(255,255,255,.6);
  -webkit-backdrop-filter: blur(1.5px); backdrop-filter: blur(1.5px);
  display: flex; align-items: center; justify-content: center; }
.busy-card { display: flex; align-items: center; gap: 13px; background: #fff; border: 1px solid var(--border);
  border-radius: 14px; box-shadow: 0 14px 40px rgba(0,0,0,.2); padding: 16px 22px;
  font-size: 14px; font-weight: 600; color: var(--fg-dark); max-width: 80vw; }
.busy-card .busy-msg { white-space: pre-line; line-height: 1.4; }
.busy-spin { width: 22px; height: 22px; flex-shrink: 0; border: 3px solid var(--theme-bg, #e6f2ec);
  border-top-color: var(--theme, #2f8f6b); border-radius: 50%; animation: busySpin .8s linear infinite; }
@keyframes busySpin { to { transform: rotate(360deg); } }

.seance-strip .ss-client { margin-left: auto; color: var(--theme-deep); white-space: nowrap; }
.seance-strip .ss-client strong { font-weight: 700; }
.seance-strip .ss-client .ss-client-meta { color: var(--fg-light); font-weight: 400; }

.seance-strip .ss-client { position: relative; }
.ss-client-btn { background: none; border: 1px solid transparent; border-radius: 7px; cursor: pointer;
  font: inherit; color: var(--theme-deep); display: inline-flex; align-items: center; gap: 5px; padding: 2px 8px; }
.ss-client-btn:hover { background: #fff; border-color: var(--border); }
.ss-client-chev { color: var(--fg-light); font-size: 11px; }
.ss-client-menu { position: absolute; top: 100%; right: 0; margin-top: 5px; background: #fff;
  border: 1px solid var(--border); border-radius: 10px; box-shadow: 0 12px 30px rgba(0,0,0,.18); z-index: 60;
  width: 300px; max-width: 80vw; padding: 8px; }
.ss-client-menu .scm-search { width: 100%; padding: 7px 10px; border: 1px solid var(--border); border-radius: 8px;
  font: inherit; font-size: 13px; margin-bottom: 6px; box-sizing: border-box; }
.ss-client-menu .scm-search:focus { outline: none; border-color: var(--theme); box-shadow: 0 0 0 2px var(--theme-bg); }
.ss-client-menu .scm-list { max-height: 340px; overflow-y: auto; display: flex; flex-direction: column; gap: 2px; }
.ss-client-menu .scm-item { flex: 0 0 auto; display: block; width: 100%; text-align: left; background: none; border: none;
  border-radius: 6px; padding: 7px 10px; cursor: pointer; font: inherit; font-size: 13px; line-height: 1.5; color: var(--fg-dark);
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.ss-client-menu .scm-item:hover { background: var(--theme-bg); }
.ss-client-menu .scm-item.on { font-weight: 700; color: var(--theme-deep); }
.ss-client-menu .scm-empty { color: var(--fg-light); font-size: 13px; padding: 8px 4px; }

.patient-card { display: none !important; }

@media (max-width: 700px) {
  .toolbar-row { flex-wrap: wrap; }
  .statusbar .btn-group { flex-wrap: wrap; }
}

.nav-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 26px;
  height: 26px;
  border-radius: 50%;
  background: #EAF1F5;
  color: var(--fg-dark);
  font-size: 15px;
  line-height: 1;
  font-weight: 700;
  margin-right: 8px;
  flex-shrink: 0;
  box-shadow: inset 0 0 0 1.6px rgba(14,60,90,.18);
}

.nav-tab[data-key="patient"]    .nav-badge { background: #EFECF7;         box-shadow: inset 0 0 0 1.6px rgba(109,91,166,.45); }
.nav-tab[data-key="mineral"]    .nav-badge { background: #FBEEEC;         box-shadow: inset 0 0 0 1.6px rgba(203,98,89,.5); }
.nav-tab[data-key="irido"]      .nav-badge { background: var(--blue-bg);  box-shadow: inset 0 0 0 1.6px rgba(24,147,207,.5); }
.nav-tab[data-key="physioscan"] .nav-badge { background: var(--green-bg); box-shadow: inset 0 0 0 1.6px rgba(26,166,122,.5); }
.nav-tab[data-key="homeo"]      .nav-badge { background: #E7F4F6;         box-shadow: inset 0 0 0 1.6px rgba(0,151,175,.5); }

.nav-tab.active .nav-badge {
  background: #fff;
  color: var(--fg-dark);
  box-shadow: 0 1px 3px rgba(0,0,0,.18);
}

html { scroll-behavior: smooth; }
body { -webkit-font-smoothing: antialiased; text-rendering: optimizeLegibility; }

*:focus-visible {
  outline: none;
  box-shadow: 0 0 0 3px rgba(34,193,237,.35);
  border-radius: 6px;
}

.app-header {
  position: relative;
  box-shadow: 0 6px 22px var(--theme-header-shadow);
  text-align: center;
  transition: background .25s ease;
}
.app-header h1 { font-size: 30px; font-weight: 700; letter-spacing: -.5px; }
.app-header p { color: rgba(255,255,255,.82); }

nav { backdrop-filter: saturate(1.2); }
.nav-tabs {
  background: #E4EEF4;
  padding: 5px;
  border-radius: 14px;
}
.nav-tab {
  border-radius: 10px;
  font-weight: 500;
  color: var(--fg-mid);
  transition: all .18s ease;
}
.nav-tab:hover { background: rgba(24,147,207,.10); color: var(--brand-deep); }
.nav-tab.active {
  background: var(--theme-grad);
  color: #fff;
  font-weight: 600;
  box-shadow: 0 4px 14px var(--theme-shadow);
}

.btn {
  border-radius: 10px;
  font-weight: 600;
  letter-spacing: .1px;
  transition: transform .12s ease, box-shadow .18s ease, background .18s ease, opacity .18s ease;
}
.btn:hover:not(:disabled) { transform: translateY(-1px); }
.btn:active:not(:disabled) { transform: translateY(0); }

.btn-dark, .btn-blue, .btn-green, .btn-brown {
  background: var(--theme-grad); color: #fff;
  box-shadow: 0 4px 14px var(--theme-shadow);
}
.btn-dark:hover:not(:disabled), .btn-blue:hover:not(:disabled),
.btn-green:hover:not(:disabled), .btn-brown:hover:not(:disabled) {
  box-shadow: 0 8px 22px var(--theme-shadow); opacity: 1;
}
.btn-sec {
  background: var(--bg-white); color: var(--theme-deep);
  border: 1px solid var(--border); box-shadow: var(--shadow);
}
.btn-sec:hover:not(:disabled) { background: var(--theme-bg); border-color: var(--theme); }

.patient-card, .phase-block, .ai-card {
  border-radius: var(--radius-lg);
  border: 1px solid var(--border);
  box-shadow: var(--shadow-md);
}
.patient-card {
  background: linear-gradient(to right, var(--theme-deep) 0%, var(--theme) 45%, transparent 100%);
  border: none;
  color: #fff;
  justify-content: flex-start;
  text-align: left;
}
.patient-card .name { color: #fff; }
.patient-card .meta { color: rgba(255,255,255,.85); }
.table-container, .report-text {
  border-radius: var(--radius-lg);
  border: 1px solid var(--border);
  box-shadow: var(--shadow);
}
.toolbar { gap: 10px; }

input[type="text"], textarea, .report-text {
  border-radius: 10px;
}
input[type="text"]:focus, .motif-row input:focus {
  outline: none; border-color: var(--theme);
  box-shadow: 0 0 0 3px var(--theme-bg);
}

tr.section-header td {
  background: linear-gradient(90deg, var(--theme-bg) 0%, var(--bg-white) 100%);
  color: var(--theme-deep);
}
tr.section-header:hover td { background: var(--theme-bg); }
thead th { background: var(--theme-bg); color: var(--theme-deep); }

.badge { border-radius: 20px; font-weight: 600; box-shadow: inset 0 0 0 1px rgba(0,0,0,.04); }

.statusbar { border-top: 1px solid var(--border); box-shadow: 0 -2px 10px rgba(14,60,90,.05); }

* { scrollbar-width: thin; scrollbar-color: #B9D2E0 transparent; }
*::-webkit-scrollbar { width: 10px; height: 10px; }
*::-webkit-scrollbar-thumb { background: #C2D8E4; border-radius: 8px; border: 2px solid transparent; background-clip: content-box; }
*::-webkit-scrollbar-thumb:hover { background: #9FBED0; background-clip: content-box; }

.ai-overlay { background: rgba(239,244,248,.78); }
.ai-card { box-shadow: var(--shadow-lg); border-radius: 20px; }

.no-client-gate { position: fixed; left: 0; right: 0; bottom: 0; z-index: 500;
  background: var(--bg, #EFF4F8); display: flex; align-items: center; justify-content: center; padding: 24px; }
.no-client-gate .ncg-card { text-align: center; max-width: 560px; }
.no-client-gate .ncg-icon { font-size: 64px; line-height: 1; margin-bottom: 6px; }
.no-client-gate .ncg-title { font-size: 26px; margin: 8px 0 10px; color: var(--fg-dark); font-weight: 700; }
.no-client-gate .ncg-msg { color: var(--fg-mid); font-size: 15px; line-height: 1.6; margin: 0 0 22px; }
.no-client-gate .ncg-btn { display: inline-block; background: var(--theme-grad); color: #fff; font-weight: 600;
  padding: 12px 24px; border-radius: 10px; text-decoration: none; box-shadow: 0 4px 14px var(--theme-shadow); }
.no-client-gate .ncg-btn:hover { filter: brightness(1.05); }

.cout-analyse { font-size: 13px; color: var(--fg-light); margin: 0; }
.cout-analyse:empty { display: none; }   
.cout-analyse.cout-vide { color: var(--red, #B4453C); font-weight: 600; }

.recharge-dialogue {
  position: fixed; inset: 0; z-index: 4000; display: flex;
  align-items: safe center; justify-content: safe center; padding: 24px;
  background: rgba(0, 0, 0, .45); overflow-y: auto;
}
.recharge-carte {
  background: var(--bg-card, #fff); color: var(--fg-dark, #1A1A1A);
  border-radius: 14px; padding: 24px; max-width: 420px; width: 100%;
  box-shadow: 0 18px 48px rgba(0, 0, 0, .28);
}
.recharge-carte h2 { margin: 0 0 8px; font-size: 18px; }
.recharge-carte p { margin: 0 0 18px; font-size: 14px; line-height: 1.5; color: var(--fg-light); }
.recharge-actions { display: flex; gap: 10px; justify-content: flex-end; flex-wrap: wrap; }
.recharge-actions .btn { text-decoration: none; }

.zoomable { cursor: zoom-in; }
.zoom-voile {
  position: fixed; inset: 0; z-index: 4500; display: none;
  align-items: safe center; justify-content: safe center;
  flex-direction: column; gap: 12px; padding: 24px;
  background: rgba(0, 0, 0, .92); cursor: zoom-out; overflow: auto;
}
.zoom-voile.ouvert { display: flex; }
.zoom-voile img { max-width: 100%; max-height: 88vh; border-radius: 8px; }
.zoom-legende { color: #E8E8E8; font-size: 13px; text-align: center; }

tr.row-unmeasured td { color: var(--fg-light, #777); font-style: italic; opacity: .75; }

.hidden { display: none !important; }

.services-nav { display: flex; align-items: center; gap: 8px; flex-wrap: wrap;
                font-size: 13px; }

.entete .services-nav { position: absolute; left: 24px; top: 50%; transform: translateY(-50%); }
.services-nav:empty { display: none; }
.service-lien { text-decoration: none; color: var(--fg-light, #777); }
.service-lien:hover { text-decoration: underline; }
.service-lien.actif { color: var(--fg, #333); font-weight: 600; }
.service-sep { color: var(--border, #ddd); }

.bandeau-version { position: fixed; left: 50%; bottom: 18px; transform: translateX(-50%);
  z-index: 200; display: flex; align-items: center; gap: 12px;
  background: var(--bg-white, #fff); border: 1px solid var(--border, #ddd);
  border-radius: 999px; padding: 8px 10px 8px 18px; font-size: 13.5px;
  box-shadow: 0 6px 20px rgba(0,0,0,.10); }
.bandeau-version button { font: inherit; font-size: 13px; cursor: pointer;
  border: none; border-radius: 999px; padding: 6px 14px;
  background: var(--theme, #CB6259); color: #fff; }
.bandeau-version button:hover { filter: brightness(1.08); }

.bilan-col-aide { margin: 2px 0 8px; font-size: 12px; color: var(--fg-light, #777); line-height: 1.35; }

details.quoi-contient { margin: 0 0 10px; border: 1px solid var(--border);
                 border-radius: 8px; background: #fff; }
details.quoi-contient > summary { padding: 8px 10px; cursor: pointer; list-style: none; font-size: 12.5px;
  color: var(--fg-light, #777); user-select: none; }
details.quoi-contient > summary::-webkit-details-marker { display: none; }
details.quoi-contient > summary::before { content: '▸ 💡 '; }
details.quoi-contient[open] > summary::before { content: '▾ 💡 '; }
details.quoi-contient p { margin: 0 12px 10px; font-size: 12.5px; color: var(--fg-mid, #666); line-height: 1.45; }

.demarche-col { margin-top: 18px; }
.demarche-avis {
  margin: 6px 0 10px; font-size: 12px; font-style: italic;
  color: var(--fg-light); padding-left: 2px;
}
.demarche { border: 1px solid var(--border); border-radius: 8px; margin-bottom: 8px; background: #fff; }
.demarche > summary {
  padding: 8px 10px; cursor: pointer; font-size: 13px; font-weight: 600;
  color: var(--fg-dark); list-style: none;
}
.demarche > summary::-webkit-details-marker { display: none; }
.demarche > summary::before { content: '▸ '; display: inline-block; transition: transform .15s ease; }
.demarche[open] > summary::before { transform: rotate(90deg); }
.demarche-corps { padding: 0 12px 10px; font-size: 12.5px; line-height: 1.55; }
.demarche-corps h4 { margin: 8px 0 6px; font-size: 13px; }
.demarche-corps ul { margin: 6px 0; padding-left: 18px; }
.demarche-corps li { margin: 6px 0; }
.demarche-corps p { margin: 6px 0; }

.legende-echelles strong { color: var(--fg-dark); }

details.legende-echelles { margin-top: 12px; }

.alertes {
  margin: 0 0 16px;
  padding: 12px 14px;
  border: 1px solid #e6d3a3;
  border-left: 3px solid #d9a441;
  border-radius: 8px;
  background: #fdf8ec;
  font-size: 13.5px;
  line-height: 1.5;
}
.alertes.hidden { display: none; }

.alertes-tete {
  display: flex;
  align-items: center;
  gap: 8px;
  font-weight: 600;
  margin-bottom: 8px;
}
.alertes-fermer {
  margin-left: auto;
  border: 0;
  background: none;
  font: inherit;
  font-size: 15px;
  line-height: 1;
  color: var(--fg-doux, #667);
  cursor: pointer;
  padding: 2px 4px;
}
.alertes-fermer:hover { color: var(--fg, #223); }

.alerte { margin: 6px 0 0; }
.alerte:first-of-type { margin-top: 0; }

.alertes-lien {
  margin-left: 10px;
  border: 1px solid #e6d3a3;
  border-radius: 999px;
  background: #fdf8ec;
  font: inherit;
  font-size: 12.5px;
  padding: 3px 10px;
  cursor: pointer;
}
.alertes-lien:hover { background: #faf0da; }

.btn-theme { background: var(--theme-grad, var(--theme, #CB6259)); border-color: var(--theme-deep, #AC4942);
             color: #fff; }
.btn-theme:hover:not(:disabled) { filter: brightness(1.06); }
.btn-theme:disabled { opacity: .45; cursor: default; }

.btn-ia { font-size: 10px; font-weight: 600; padding: 1px 6px; border-radius: 999px;
          background: rgba(255,255,255,.22); margin-right: 2px; white-space: nowrap; }
.btn-sec .btn-ia, .btn-nouveau .btn-ia { background: rgba(0,0,0,.08); }

.btn .ico { vertical-align: -2px; margin-right: 2px; flex-shrink: 0; }

details.avertissements > summary { cursor: pointer; list-style: none; font-size: 13px;
  color: var(--fg-soft, #666); padding: 6px 0; user-select: none; }
details.avertissements > summary::-webkit-details-marker { display: none; }
details.avertissements > summary::before { content: '▸ '; }
details.avertissements[open] > summary::before { content: '▾ '; }

.mentions { display: flex; flex-wrap: wrap; align-items: flex-start; gap: 8px; margin-bottom: 10px; }
details.mention, details.mention-fixe { position: relative; display: inline-block; vertical-align: top; margin: 0 8px 12px 0; }
.mentions details.mention, .mentions details.mention-fixe { margin: 0; }
:is(details.mention, details.mention-fixe) > summary { display: inline-flex; align-items: center; gap: 6px; padding: 4px 12px;
  border: 1px solid var(--border); border-radius: 999px; background: var(--bg-white, #fff);
  color: var(--fg-mid); font-size: 12.5px; font-weight: 500; line-height: 1.4;
  cursor: pointer; list-style: none; user-select: none; transition: border-color .12s, background .12s; }
:is(details.mention, details.mention-fixe) > summary::-webkit-details-marker { display: none; }
:is(details.mention, details.mention-fixe) > summary::before,
:is(details.mention, details.mention-fixe)[open] > summary::before { content: none; }
:is(details.mention, details.mention-fixe) > summary::after { content: '▾'; font-size: 10px; opacity: .6; transition: transform .15s; }
:is(details.mention, details.mention-fixe)[open] > summary::after { transform: rotate(180deg); }
:is(details.mention, details.mention-fixe) > summary:hover { border-color: var(--theme); color: var(--theme-deep); }
:is(details.mention, details.mention-fixe)[open] > summary { border-color: var(--theme); color: var(--theme-deep); background: var(--theme-bg); }
.mention-panneau { position: absolute; top: calc(100% + 6px); left: 0; z-index: 60;
  width: min(460px, calc(100vw - 32px)); background: var(--bg-white, #fff);
  border: 1px solid var(--border); border-top: 3px solid var(--theme); border-radius: 4px 4px 12px 12px;
  box-shadow: 0 12px 32px rgba(20, 35, 50, .18); text-align: left;
  animation: mention-ouvre .14s ease-out; }

details.mention-fixe > .mention-panneau { position: static; margin-top: 6px; }
@keyframes mention-ouvre { from { opacity: 0; transform: translateY(-4px); } }
@media (prefers-reduced-motion: reduce) { .mention-panneau { animation: none; } }
.mention-tete { display: flex; align-items: center; gap: 8px; padding: 8px 8px 8px 14px;
  border-bottom: 1px solid var(--border); font-size: 13.5px; font-weight: 600; color: var(--theme-deep); }
.mention-titre { display: inline-flex; align-items: center; gap: 7px; }
.mention-fermer { margin-left: auto; width: 28px; height: 28px; flex-shrink: 0; border: 0; border-radius: 6px;
  background: none; color: var(--fg-light); font-size: 13px; line-height: 1; cursor: pointer; }
.mention-fermer:hover { background: rgba(0,0,0,.06); color: var(--fg-dark); }
.mention-corps { display: flex; flex-direction: column; gap: 8px; padding: 10px 14px 14px;
  max-height: 60vh; overflow: auto; font-size: 13px; line-height: 1.55; color: var(--fg); }
.mention-corps p, .mention-corps .aide-anonymat { max-width: none; margin: 0; }
.mention-corps #avertissements:empty { display: none; }

.mentions > details.mention.dossier-courant { margin-left: auto; }
details.dossier-courant > summary { border-color: var(--theme); color: var(--theme-deep); font-size: 13px; max-width: 360px; }
details.dossier-courant > summary b { font-weight: 600; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.dossier-age { color: var(--fg-light); white-space: nowrap; }
details.dossier-courant.dossier-vide > summary { border-style: dashed; border-color: var(--border); color: var(--fg-mid); }
details.dossier-courant > .mention-panneau { left: auto; right: 0; width: min(340px, calc(100vw - 32px)); }
.dossier-cherche { width: 100%; box-sizing: border-box; padding: 6px 10px; border: 1px solid var(--border); border-radius: 8px; font: inherit; }
.dossier-liste { display: flex; flex-direction: column; max-height: 260px; overflow: auto; margin: 0 -14px; }
.dossier-ligne { display: flex; justify-content: space-between; gap: 12px; padding: 7px 14px; border: 0;
  background: none; text-align: left; font: inherit; color: var(--fg); cursor: pointer; }
.dossier-ligne:hover { background: var(--theme-bg); }
.dossier-ligne.courant { color: var(--theme-deep); font-weight: 600; }
.dossier-date { color: var(--fg-light); font-size: 12px; white-space: nowrap; }
.dossier-rien { color: var(--fg-light); }
.dossier-pied { display: flex; justify-content: space-between; gap: 12px; border-top: 1px solid var(--border); padding-top: 8px; }
.dossier-pied button, .dossier-pied a { border: 0; background: none; padding: 0; font: inherit; font-weight: 600;
  color: var(--theme-deep); cursor: pointer; text-decoration: none; }
.dossier-pied button:hover, .dossier-pied a:hover { text-decoration: underline; }
.mention-liens { display: flex; flex-wrap: wrap; gap: 6px 16px; }
.mention-liens a { font-weight: 600; color: var(--theme-deep); text-decoration: none; }
.mention-liens a:hover { text-decoration: underline; }

.vignette-cote {
  position: absolute; left: 0; right: 0; bottom: 0; text-align: center;
  font-size: 10px; font-weight: 600; line-height: 14px; color: #fff;
  background: rgba(0, 0, 0, .55); border-radius: 0 0 6px 6px;
  opacity: 0; transition: opacity .12s; pointer-events: none;
}
.vignette:hover .vignette-cote { opacity: 1; }
.vignette { position: relative; display: inline-flex; }
.vignette img { width: 34px; height: 34px; cursor: pointer; object-fit: cover; border-radius: 6px;
                border: 1px solid var(--border, #e4e4e4); display: block; background: var(--theme-bg, #f4f4f4); }
.vignette-croix {
  position: absolute; top: -5px; right: -5px; width: 17px; height: 17px; padding: 0;
  border-radius: 50%; border: 1px solid var(--border, #d8d8d8); background: #fff;
  color: var(--fg-mid, #666); font-size: 12px; line-height: 1; cursor: pointer;
  opacity: 0; transition: opacity .12s;
}
.vignette:hover .vignette-croix, .vignette-croix:focus { opacity: 1; }
.vignette-croix:hover { color: var(--red, #B4453C); border-color: var(--red, #B4453C); }

.aide-anonymat { margin: 10px 0 0; font-size: 12.5px; line-height: 1.5;
                 color: var(--fg-light); max-width: 760px; }

.section-bloc { margin-bottom: 16px; }
.section-titre { display: block; font-weight: 600; font-size: 13.5px; margin-bottom: 5px;
                 color: var(--theme-deep, var(--fg-dark)); }

.sections-form {

  --bande-chapeau: 30px;
}
.sections-form .section-titre {
  position: sticky; top: 0; z-index: 2;
  background: var(--bg, #EFF4F8);
  padding: 3px 0 4px;

  box-shadow: 0 -6px 0 var(--bg, #EFF4F8);
}

.sections-form .section-sous .section-titre { top: var(--bande-chapeau); z-index: 1; }

.sections-form .section-chapeau {
  position: sticky; top: 0; z-index: 3;
  background: var(--bg, #EFF4F8);
  box-sizing: border-box;
  min-height: var(--bande-chapeau);
  padding: 2px 0 4px;
  box-shadow: 0 -6px 0 var(--bg, #EFF4F8);
}

.sections-form .section-groupe { display: flex; flex-direction: column; gap: 14px; }
.section-texte { width: 100%; border: 1px solid var(--border); border-radius: 6px;
                 padding: 9px 11px; font: inherit; font-size: 13.5px; line-height: 1.55;
                 resize: vertical; background: #fff; color: var(--fg); }

.section-texte:focus { outline: 2px solid var(--theme, #CB6259); outline-offset: -1px; }
.section-texte::placeholder { color: var(--fg-light); font-style: italic; }

.section-bloc.section-sous { margin-left: 18px; padding-left: 14px;
                             border-left: 2px solid var(--border, #E4EAF0); }
.section-bloc.section-sous .section-titre { font-size: 12.5px; font-weight: 600;
                                            color: var(--fg-mid, #555); }

.section-chapeau { margin: 22px 0 10px; font-size: 15px; color: var(--theme-deep, #2b5c85); }
.section-chapeau:first-child { margin-top: 0; }
.section-chapeau + .section-bloc.section-sous { margin-left: 0; }

.memo-wrap {
  margin: 0 0 18px;
  padding: 12px 14px;
  background: var(--bg-soft, #F7FAFC);
  border: 1px solid var(--border, #E4EAF0);
  border-radius: 10px;
}

.memo-entete {
  display: flex;
  align-items: baseline;
  gap: 10px;
  flex-wrap: wrap;
  margin: 0 0 10px;
}

.memo-titre {
  margin: 0;
  font-size: 15px;
  color: var(--theme-deep, #2b5c85);
}

.memo-etat {
  font-size: 12px;
  color: var(--fg-light, #777);
}

.memo-relance {
  margin: 12px 0 0;
  padding-top: 10px;
  border-top: 1px solid var(--border, #E4EAF0);
  font-size: 12px;
  color: var(--fg-light, #777);
}

.memo-limite {
  margin: 12px 0 0;
  padding: 9px 11px;
  background: rgba(232, 179, 74, .10);
  border-left: 3px solid #E8B34A;
  border-radius: 0 6px 6px 0;
  font-size: 12.5px;
  line-height: 1.5;
  color: var(--fg-mid, #555);
}

.memo-encours {
  margin: 0 0 10px;
  padding: 9px 12px;
  background: rgba(232, 179, 74, .14);
  border: 1px solid rgba(232, 179, 74, .45);
  border-radius: 8px;
  font-size: 12.5px;
  font-weight: 600;
  color: #8A5E1E;
}

.memo-trame {
  margin: 0 0 10px;
  padding: 9px 12px;
  background: rgba(24, 147, 207, .10);
  border: 1px solid rgba(24, 147, 207, .35);
  border-radius: 8px;
  font-size: 12.5px;
  line-height: 1.5;
  color: #2b5c85;
}

.memo-guide {
  margin: 0 0 16px;
  padding: 12px 16px;
  background: var(--bg-soft, #F7FAFC);
  border-left: 3px solid var(--theme-deep, #2b5c85);
  border-radius: 0 8px 8px 0;
}
.memo-guide p { margin: 0 0 6px; font-size: 13px; line-height: 1.55; color: var(--fg-mid, #555); }
.memo-guide p:last-child { margin-bottom: 0; }
.memo-guide strong { color: var(--fg, #223); }

.memo-wrap > .report-wrap {
  flex: none;
  overflow: visible;
  min-height: 0;
  margin: 0 0 18px;
}

.report-entete {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 10px;
}
.report-titre {
  margin: 0;
  font-size: 15px;
  color: var(--theme-deep, #2b5c85);
}
.report-bascule {
  margin-left: auto;
  padding: 2px 10px;
  border: 1px solid var(--border, #E4EAF0);
  border-radius: 8px;
  background: var(--bg-card, #fff);
  color: var(--fg-mid, #555);
  font-size: 13px;
  line-height: 1.6;
  cursor: pointer;
}
.report-bascule:hover { background: var(--bg-soft, #F7FAFC); }
.report-indice { display: none; }

.motif-input, .motif-select {
  padding: 6px 8px;
  border: 1px solid var(--border, #E4EAF0);

  border-radius: 10px;

  background-color: var(--bg-card, #fff);
  color: var(--fg);
  font: inherit;
  font-size: 13px;
}

.motif-input:disabled, .motif-select:disabled {
  background-color: var(--bg, #EFF4F8);
  color: var(--fg-light, #59717F);
  border-color: var(--border, #DCE8EF);
  cursor: not-allowed;
}
.motif-input:disabled::placeholder { color: var(--fg-light, #59717F); opacity: .8; }

.motif-input:focus, .motif-select:focus {
  outline: none;
  border-color: var(--theme, #185FA5);
  box-shadow: 0 0 0 3px var(--theme-bg, #E6F1FB);
}

.motif-select {
  appearance: none;
  -webkit-appearance: none;
  
  padding-right: 28px;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='10' height='6' viewBox='0 0 10 6'%3E%3Cpath d='M1 1l4 4 4-4' fill='none' stroke='%236B7A8D' stroke-width='1.6' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 10px center;
  background-size: 10px 6px;

  line-height: 1.45;
  cursor: pointer;
}

.motif-court { max-width: 110px; }

.manquante {
  border-color: rgba(232, 179, 74, .55);
  background: rgba(232, 179, 74, .10);
}

.compte-pastille { border: 1px solid rgba(255,255,255,.45); background: rgba(255,255,255,.16);
                   color: #fff; border-radius: 999px; padding: 5px 14px; font-size: 12.5px;
                   cursor: pointer; white-space: nowrap;

                   position: absolute; right: 110px; top: 50%; transform: translateY(-50%);
                   max-width: 340px; overflow: hidden; text-overflow: ellipsis; }
.compte-pastille:hover { background: rgba(255,255,255,.28); }

.compte-sortie { position: absolute; right: 110px; top: 50%; transform: translateY(-50%);
                 width: 30px; height: 30px; border-radius: 999px; cursor: pointer;
                 border: 1px solid rgba(255,255,255,.45); background: rgba(255,255,255,.16);
                 color: #fff; font-size: 13px; line-height: 1; padding: 0; }
.compte-sortie:hover { background: rgba(255,255,255,.28); }
.compte-pastille:has(+ .compte-sortie:not([hidden])) { right: 150px; }

@media (max-width: 1180px) { .compte-pastille .compte-adresse { display: none; } }

.compte-dialogue { border: none; border-radius: 12px; padding: 0; box-shadow: 0 12px 40px rgba(0,0,0,.25);
                   margin: auto; }
.compte-dialogue::backdrop { background: rgba(20,20,30,.45); }
.compte-forme { padding: 22px 26px; min-width: 320px; display: flex; flex-direction: column; gap: 12px; }
.compte-forme h3 { margin: 0; }
.compte-note { margin: 0; font-size: 12.5px; color: var(--fg-light); max-width: 340px; }
.compte-forme label { display: flex; flex-direction: column; gap: 4px; font-size: 12.5px; color: var(--fg-mid); }
.compte-forme input { border: 1px solid var(--border); border-radius: 6px; padding: 8px 10px; font: inherit; }
.compte-erreur { margin: 0; color: #B3362D; font-size: 12.5px; }
.compte-actions { display: flex; justify-content: flex-end; gap: 8px; }

.bilan-poids { cursor: help; }

.champ-requis::after {
  content: ' *';
  color: var(--danger, #C0392B);
  font-weight: 600;
}

.bandeau-reseau {
  padding: 8px 16px; font-size: 13px; line-height: 1.45; text-align: center;
  background: #FFF4D6; color: #6B5327; border-bottom: 1px solid #E8D9AE;
}

.bandeau-reseau-alerte {
  background: #FCE8E6; color: #8C2F27; border-bottom-color: #F0C4BF; font-weight: 600;
}
