/* Exolia — mêmes gestes, mêmes couleurs, mêmes états dans chaque espace. */
:root {
  --exolia-ink: #10372e;
  --exolia-hover: #1c5142;
  --exolia-soft: #edf3ee;
  --exolia-line: #d7e1da;
  --exolia-danger: #983b32;
  --exolia-focus: #ba7047;
  --exolia-button-radius: 12px;
}

button { font-family: inherit; font-weight: 650; border-radius: var(--exolia-button-radius); min-height: 40px; cursor: pointer; }

/* L'état HTML hidden prime toujours sur les mises en page grid/flex. */
[hidden], .hidden { display: none !important; }

:is(.button, button.primary, a.primary, .secondary, .ghost, .new-plan,
    .profile-chip, .refresh, .logout-button, .danger-button, .primary-cta,
    .patient-actions .main, .patient-shortcut, .tool-menu-button) {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 44px;
  padding: 11px 16px;
  border: 1px solid var(--exolia-line);
  border-radius: var(--exolia-button-radius);
  font-family: inherit;
  font-size: 13px;
  font-weight: 650;
  line-height: 1.35;
  letter-spacing: 0;
  text-align: center;
  text-decoration: none;
  cursor: pointer;
  box-shadow: none;
  transition: background-color .16s ease, border-color .16s ease, color .16s ease;
}

:is(.button.primary, button.primary, a.primary, .new-plan, .primary-cta,
    .patient-actions .main) {
  color: #fff;
  background: var(--exolia-ink);
  border-color: var(--exolia-ink);
}
:is(.button.primary, button.primary, a.primary, .new-plan, .primary-cta,
    .patient-actions .main):hover:not(:disabled) {
  color: #fff;
  background: var(--exolia-hover);
  border-color: var(--exolia-hover);
}

:is(.button.soft, .button.quiet, .secondary, .ghost, .profile-chip,
    .refresh, .logout-button, .patient-shortcut, .tool-menu-button) {
  color: var(--exolia-ink);
  background: #fff;
  border-color: var(--exolia-line);
}
:is(.button.soft, .button.quiet, .secondary, .ghost, .profile-chip,
    .refresh, .logout-button, .patient-shortcut, .tool-menu-button):hover:not(:disabled) {
  background: var(--exolia-soft);
  border-color: #a9c2b3;
}

:is(.danger-button, .button.danger-outline) {
  color: var(--exolia-danger);
  background: #fff8f6;
  border-color: #d6aaa2;
}
:is(.danger-button, .button.danger-outline):hover:not(:disabled) {
  color: #fff;
  background: var(--exolia-danger);
  border-color: var(--exolia-danger);
}

:is(.text-button, .back-button) {
  min-height: 44px;
  padding: 10px 6px;
  color: var(--exolia-ink);
  font-family: inherit;
  font-size: 13px;
  font-weight: 650;
  line-height: 1.35;
  border-radius: var(--exolia-button-radius);
  cursor: pointer;
}
:is(.text-button, .back-button):hover:not(:disabled) {
  text-decoration: underline;
  text-underline-offset: 4px;
}
.text-button.danger-text { color: var(--exolia-danger); }

:is(.filters button, .auth-tabs button, .tabs button, .kind-option,
    .protocol-tab, .chip) {
  min-height: 40px;
  border-radius: 10px;
  font-family: inherit;
  font-size: 12px;
  font-weight: 650;
  line-height: 1.35;
  cursor: pointer;
}
:is(.filters button.active, .tabs button.active, .kind-option.is-on,
    .protocol-tab.is-on) { background: var(--exolia-soft); color: var(--exolia-ink); }
.filters button.active { background: var(--exolia-ink); color: #fff; }
.auth-tabs button.active { color: var(--exolia-ink); border-color: var(--exolia-ink); }
.audience-option, .quick-primary, .signal {
  border-radius: 16px;
  font-family: inherit;
  cursor: pointer;
}
.quick-primary { background: var(--exolia-ink); box-shadow: none; }
.quick-primary:hover { background: var(--exolia-hover); transform: none; }

:is(.dialog-close, .close-button, .icon-button) {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 44px;
  min-height: 44px;
  border-radius: var(--exolia-button-radius);
  cursor: pointer;
}
button:disabled, [aria-disabled="true"] {
  opacity: .5;
  cursor: not-allowed;
  box-shadow: none;
}
:is(button, a, summary):focus-visible {
  outline: 3px solid var(--exolia-focus);
  outline-offset: 3px;
}
.exolia-logo { display: block; object-fit: contain; flex-shrink: 0; }
.brand > .exolia-logo { width: 40px; height: 40px; }
.phone-brand > .exolia-logo { width: 32px; height: 32px; }
.topbar .profile-chip { white-space: nowrap; }
.topbar .logout-button { font-size: 12px; }
.topbar .profile-chip::after, .topbar .logout-button::after { content: none; }

@media (max-width: 820px) {
  .topbar { gap: 10px; }
  .topbar :is(.new-plan, .profile-chip, .logout-button) {
    min-height: 40px;
    padding: 9px 12px;
    font-size: 12px;
  }
}
@media (max-width: 600px) {
  .topbar { height: auto; min-height: 68px; flex-wrap: wrap; padding-block: 12px; }
  .topbar .profile-chip { width: auto; font-size: 12px; }
  .topbar .logout-button { width: auto; font-size: 12px; }
  .topbar .new-plan { width: auto; height: auto; font-size: 12px; }
  .topbar .new-plan::after { content: none; }
  .primary-cta { width: 100%; }
  .patient-actions .main { width: 100%; }
}
@media (prefers-reduced-motion: reduce) {
  button, a { transition: none; }
}
