/* Gardeo — feuille de style de la refonte (remplace progressivement styles.css).
 * Chargée APRÈS styles.css. Sections : base · coque · navigation · en-tête · accueil (hero, filtres)
 * · cartes de garde · états (vide / chargement / erreur) · mouvement réduit.
 * Phase 1 : côté professionnel, accueil. Phase 2 : feuilles (fiche, publication, notifications). Les autres écrans sont encore pilotés par styles.css. */

/* ============ Base ============ */
*,
*::before,
*::after {
  box-sizing: border-box;
}

[hidden] {
  display: none !important;
}

html {
  -webkit-text-size-adjust: 100%;
  background: var(--bg);
}

html,
body {
  touch-action: manipulation; /* pas de zoom au double tap : l'app se comporte comme une app native */
  width: 100%;
  min-height: 100%;
  overflow-x: clip;
  overscroll-behavior-x: none;
}

body {
  margin: 0;
  color: var(--tx);
  background: var(--bg);
  font-family: var(--font-body);
  font-variant-numeric: tabular-nums;
  font-synthesis: none;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

h1,
h2,
h3,
h4,
p {
  margin-block-start: 0;
}

h1,
h2,
h3,
h4 {
  margin-block-end: 0;
  font-weight: 560;
  line-height: 1.2;
}

label span {
  font-size: 12px;
  font-weight: 600;
}

button,
input,
select,
textarea {
  font: inherit;
}

button {
  border: 0;
  cursor: pointer;
}

button:disabled {
  cursor: not-allowed;
  opacity: 0.58;
}

svg {
  display: block;
}

label {
  display: grid;
  gap: 6px;
}

input,
select,
textarea {
  width: 100%;
  min-height: 48px;
  font-size: 16px; /* < 16px = zoom automatique d'iOS au focus */
  padding: 0 16px;
  color: var(--tx);
  background: var(--s1);
  border: 1px solid var(--line2);
  border-radius: 18px;
  outline: 0;
}

* {
  -webkit-tap-highlight-color: transparent;
}

:focus-visible {
  outline: 2px solid var(--acc);
  outline-offset: 2px;
}

:focus:not(:focus-visible) {
  outline: none;
}

.f-opt {
  font-weight: 600;
  letter-spacing: 0;
  text-transform: none;
}

.is-hidden {
  display: none !important;
}

/* ============ Coque : scène, téléphone, écrans, vues ============ */
.stage {
  position: relative;
  min-height: 100dvh;
  display: grid;
  place-items: center;
  padding: 24px;
}

.phone {
  position: relative;
  width: min(430px, 100%);
  height: min(880px, calc(100dvh - 48px));
  min-height: 640px;
  overflow: hidden;
  background: var(--bg);
  border: 1px solid var(--line2);
  border-radius: 40px;
  box-shadow: 0 28px 80px rgba(0, 0, 0, 0.28);
  overscroll-behavior-y: contain;
}

.screen {
  display: none;
  height: 100%;
  overflow-y: auto;
  scrollbar-width: none;
  -webkit-overflow-scrolling: touch;
  overscroll-behavior-y: contain;
}

.screen::-webkit-scrollbar {
  display: none;
}

.screen.is-active {
  display: block;
}

#screen-app:not(.is-active) {
  display: none;
}

.view {
  display: none;
  padding-top: 20px;
}

.view.is-active {
  display: block;
}

#view-history,
#view-profile {
  padding-bottom: 20px;
}

.list {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 10px;
  padding-bottom: 12px;
}

#view-feed {
  padding-top: 0;
}

@media (max-width: 860px) {
  .stage {
    display: block;
    min-height: 100dvh;
    padding: 0;
  }

  .phone {
    width: 100%;
    height: 100dvh;
    min-height: 100dvh;
    border: 0;
    border-radius: 0;
    box-shadow: none;
  }
}

.toast {
  position: fixed;
  left: 50%;
  top: calc(env(safe-area-inset-top, 0px) + 12px);
  z-index: 300;
  min-height: 46px;
  max-width: min(360px, calc(100vw - 32px));
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 0 18px;
  color: var(--on-acc);
  font-size: 14px;
  font-weight: 700;
  background: var(--acc);
  border-radius: 23px;
  box-shadow: 0 12px 30px rgba(0, 0, 0, 0.25);
  opacity: 0;
  pointer-events: none;
  transform: translateX(-50%) translateY(-28px);
  transition: opacity 200ms var(--ease-in-out), transform 220ms var(--ease-in-out);
}

.toast.is-visible {
  opacity: 1;
  transform: translateX(-50%) translateY(0);
  transition: opacity 160ms var(--ease-out), transform var(--d-slow) var(--ease-spring);
}

.toast-check {
  flex: none;
  width: 24px;
  height: 24px;
}

.toast-check circle {
  fill: var(--on-acc);
  transform-origin: center;
  animation: ck-pop 420ms var(--ease-spring) both;
}

.toast-check path {
  fill: none;
  stroke: var(--acc);
  stroke-width: 2.4;
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-dasharray: 1;
  stroke-dashoffset: 1;
  animation: ck-draw 360ms var(--ease-out) 200ms forwards;
}

@keyframes ck-pop {
  from { transform: scale(.3); opacity: 0; }
  to { transform: scale(1); opacity: 1; }
}

@keyframes ck-draw {
  to { stroke-dashoffset: 0; }
}

.empty {
  min-height: 150px;
  display: grid;
  place-items: center;
  padding: 24px;
  color: var(--mut);
  text-align: center;
  background: var(--s1);
  border: 1px solid var(--line);
  border-radius: var(--r-card);
}

.empty strong {
  display: block;
  color: var(--tx);
  font-size: 18px;
  line-height: 24px;
  font-weight: 800;
}

.empty p {
  margin: 8px 0 0;
  font-size: 15px;
  line-height: 22px;
}

.text-button {
  min-height: 44px;
  padding: 0 12px;
  color: var(--tx2);
  font-size: 14px;
  font-weight: 700;
  white-space: nowrap;
  background: transparent;
}

/* Sélecteur de villes : structure commune (couleurs : voir .pf-group et .au-card) */
.city-picker {
  display: grid;
  gap: 8px;
}

.city-selected {
  min-height: 34px;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 6px;
}

.city-chip {
  min-width: 0;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-weight: 700;
}

.city-chip button {
  display: grid;
  place-items: center;
  padding: 0;
  color: inherit;
  background: transparent;
}

.city-search {
  width: 100%;
  min-height: 44px;
}

.city-results {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 6px;
}

.city-result {
  min-width: 0;
  min-height: 36px;
  overflow: hidden;
  padding: 0 11px;
  color: inherit;
  text-align: left;
  text-overflow: ellipsis;
  white-space: nowrap;
  background: transparent;
}

.city-empty {
  grid-column: 1 / -1;
  padding: 8px 4px 2px;
}

.i {
  width: 20px;
  height: 20px;
  flex: none;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.75;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.i.sm {
  width: 16px;
  height: 16px;
}

/* ============ Coque ============ */
#screen-app.is-active {
  /* Logo et cloche juste sous la barre d'état : encoche/Dynamic Island (zone sûre ~47-59 px),
     iPhone à bouton (20 px), Android/navigateur (0) — jamais sous la barre d'état. */
  padding: max(8px, calc(env(safe-area-inset-top, 0px) + 2px)) 20px var(--nav-clear);
  color: var(--tx);
}

#screen-app.is-active {
  background:
    /* Halo discret sous l'en-tête seulement : rien derrière le logo ni la cloche. */
    radial-gradient(70% 60% at 0% 55%, var(--glow-b), transparent 70%) top / 100% 430px no-repeat local,
    var(--bg);
}

/* ============ Navigation du bas (pilule flottante) ============ */
.bottom-nav {
  position: absolute;
  left: 20px;
  right: 20px;
  /* Collée au bas : sur iPhone à barre d'accueil on empiète un peu sur la zone sûre (34 px),
     sans toucher l'indicateur ; ailleurs 12 px. */
  bottom: max(12px, calc(var(--safe-bottom) - 12px));
  z-index: 8;
  display: flex;
  height: 64px;
  padding: 6px;
  border: 1px solid var(--line2);
  border-radius: 34px;
  background: var(--nav-bg);
  box-shadow: var(--nav-shadow);
  -webkit-backdrop-filter: blur(12px);
  backdrop-filter: blur(12px);
}

.nav-fade {
  display: block;
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 7;
  height: calc(96px + var(--safe-bottom));
  background: linear-gradient(to top, var(--bg) 45%, rgba(var(--bg-rgb), 0));
  pointer-events: none;
}

.nav-item {
  flex: 1;
  min-width: 0;
  min-height: 44px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 2px;
  padding: 0;
  border: 0;
  border-radius: 28px;
  background: transparent;
  color: var(--mut);
  font-size: 11px;
  font-weight: 700;
  line-height: 14px;
  cursor: pointer;
  -webkit-tap-highlight-color: transparent;
  transition: background var(--dur-fast) var(--ease-out), color var(--dur-fast) var(--ease-out);
}

.nav-item .nav-label {
  display: block;
  max-width: 100%;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.nav-item.is-active {
  background: var(--acc);
  color: var(--on-acc);
}

.bottom-nav .nav-item.is-hidden {
  display: none;
}

.nav-item:focus-visible {
  outline-offset: -2px;
}

/* ============ En-tête ============ */
.app-head {
  display: block;
  margin: 0;
  padding: 0;
}

.topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 44px;
}

.logo {
  display: flex;
  align-items: center;
  gap: 8px;
  color: var(--tx);
  font-size: 22px;
  font-weight: 800;
  letter-spacing: -0.03em;
}

.logo svg {
  width: 28px;
  height: 28px;
  color: var(--acc);
}

.ibtn {
  position: relative;
  width: 44px;
  height: 44px;
  display: grid;
  place-items: center;
  padding: 0;
  border: 1px solid var(--line);
  border-radius: 50%;
  background: var(--s1);
  color: var(--tx);
  cursor: pointer;
}

.badge {
  position: absolute;
  top: -2px;
  right: -2px;
  min-width: 20px;
  height: 20px;
  display: grid;
  place-items: center;
  padding: 0 4px;
  border: 2px solid var(--bg);
  border-radius: 10px;
  background: var(--acc);
  color: var(--on-acc);
  font-size: 12px;
  font-weight: 800;
  line-height: 1;
}

.badge.is-hidden {
  display: none;
}

.page-head {
  margin: 16px 0 12px;
}

.page-head h2 {
  margin: 0;
  color: var(--tx);
  font-size: 28px;
  line-height: 36px;
  font-weight: 800;
  letter-spacing: -0.02em;
}

.page-date {
  display: block;
  color: var(--mut);
  font-size: 14px;
  line-height: 20px;
  font-weight: 600;
}

.page-date:empty {
  display: none;
}

/* ============ Accueil : hero ============ */
.hero {
  position: relative;
  isolation: isolate;
  margin: 4px 0 8px;
}

.hero p {
  margin: 0;
}

.hero .ecg {
  display: none;
  position: absolute;
  left: -20px;
  bottom: 6px;
  width: calc(100% + 40px);
  height: 60px;
  z-index: 0;
  color: var(--acc);
  opacity: 0.22;
  pointer-events: none;
}

.hero.has-amount .ecg {
  display: block;
}

.hero-l {
  position: relative;
  display: flex;
  align-items: center;
  gap: 8px;
  color: var(--tx2);
  font-size: 14px;
  line-height: 20px;
  font-weight: 600;
}

.chk {
  width: 20px;
  height: 20px;
  flex: none;
  display: grid;
  place-items: center;
  border: 1px solid var(--acc-line);
  border-radius: 50%;
  background: var(--acc-soft);
  color: var(--acc);
}

.chk svg {
  width: 12px;
  height: 12px;
}

.hero .hero-k {
  position: relative;
  margin-top: 12px;
  color: var(--mut);
  font-size: 13px;
  line-height: 16px;
  font-weight: 600;
}

.hero-n {
  position: relative;
  z-index: 1;
  color: var(--money);
  font-size: 64px;
  line-height: 68px;
  font-weight: 800;
  letter-spacing: -0.045em;
  text-shadow: var(--num-shadow);
}

.hero-n .dg {
  position: relative;
  z-index: 0;
  display: inline-block;
  padding: 0 0.045em 0 0;
  font-style: normal;
}

/* Bande citron : derrière les chiffres uniquement, sur toute leur largeur, hauteur constante. */
.hero-n .dg::before {
  content: "";
  position: absolute;
  z-index: -1;
  left: -0.12em;
  right: -0.08em;
  bottom: 0.17em;
  height: 0.44em;
  border-radius: 8px;
  background: var(--hl-bg);
  pointer-events: none;
}

.hero-n span {
  margin-left: 8px;
  color: var(--mut);
  font-size: 20px;
  font-weight: 700;
  letter-spacing: 0;
  text-shadow: none;
}

@media (max-width: 359px) {
  .hero-n {
    font-size: 52px;
    line-height: 56px;
  }
}

/* ============ Accueil : filtres et recherche ============ */
.search-wrap {
  margin: 0;
}

.chips {
  display: flex;
  gap: 8px;
  margin: 16px -20px 12px;
  padding: 0 20px;
  overflow-x: auto;
  scrollbar-width: none;
}

.chips::-webkit-scrollbar {
  display: none;
}

.chip {
  flex: none;
  height: 44px;
  padding: 0 16px;
  display: flex;
  align-items: center;
  border: 1px solid var(--line);
  border-radius: 22px;
  background: var(--s1);
  color: var(--mut);
  font-size: 15px;
  font-weight: 700;
  cursor: pointer;
  transition: background var(--dur-fast) var(--ease-out), color var(--dur-fast) var(--ease-out);
}

.chip.is-active {
  border-color: var(--acc);
  background: var(--acc);
  color: var(--on-acc);
}

.search {
  height: 44px;
  display: flex;
  align-items: center;
  gap: 8px;
  margin: 0 0 16px;
  padding: 0 16px;
  border: 1px solid var(--line);
  border-radius: 22px;
  background: var(--s1);
  color: var(--mut);
}

.search svg {
  width: 18px;
  height: 18px;
  flex: none;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.75;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.search input {
  flex: 1;
  width: auto;
  min-width: 0;
  min-height: 0;
  height: 100%;
  padding: 0;
  border: 0;
  border-radius: 0;
  outline: 0;
  box-shadow: none;
  background: transparent;
  color: var(--tx);
  font-size: 16px;
  font-weight: 600;
}

.search input::placeholder {
  color: var(--mut);
  opacity: 1;
}

.search:focus-within {
  border-color: var(--acc-ring);
}

[data-role="professional"] .feed-line {
  display: none;
}

#shift-list {
  display: grid;
  gap: 10px;
  width: 100%;
  min-width: 0;
  overflow: visible;
}

.end-toggle {
  width: 100%;
  min-height: 44px;
  margin-top: 4px;
  padding: 0 16px;
  border: 0;
  background: none;
  color: var(--mut);
  font-size: 15px;
  font-weight: 700;
  cursor: pointer;
}

/* ============ Cartes de garde ============ */
.shift-card {
  display: block;
  width: 100%;
  max-width: 100%;
  min-width: 0;
  box-sizing: border-box;
  margin: 0;
  padding: 16px 20px;
  border: 1px solid var(--line);
  border-radius: var(--r-card);
  background: var(--s1);
  color: var(--tx);
  font: inherit;
  text-align: left;
  cursor: pointer;
  -webkit-tap-highlight-color: transparent;
  transition: transform var(--dur-fast) var(--ease-out), border-color var(--dur-fast) var(--ease-out);
}

.shift-card:active {
  transform: scale(0.985);
}

.shift-card > span {
  display: block;
}

.shift-card > .shift-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}

.shift-card > .shift-row-main {
  align-items: flex-end;
  margin-top: 12px;
}

.shift-type {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  height: 28px;
  padding: 0 12px 0 10px;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: var(--s2);
  font-size: 13px;
  font-weight: 700;
}

.shift-type .i {
  width: 14px;
  height: 14px;
}

.shift-soon {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  color: var(--acc);
  font-size: 13px;
  font-weight: 700;
}

.shift-soon::before {
  content: "";
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--acc);
  box-shadow: 0 0 0 3px var(--acc-soft);
}

.shift-new {
  display: inline-flex;
  align-items: center;
  height: 24px;
  padding: 0 10px;
  border-radius: 12px;
  background: var(--new-bg);
  color: var(--new-tx);
  font-size: 12px;
  font-weight: 800;
}

.shift-amount {
  display: flex;
  align-items: baseline;
  gap: 6px;
  min-width: 0;
}

.shift-amount b {
  font-size: 40px;
  line-height: 44px;
  font-weight: 800;
  letter-spacing: -0.03em;
  white-space: nowrap;
}

.shift-amount span {
  color: var(--mut);
  font-size: 14px;
  font-weight: 600;
  white-space: nowrap;
}

.shift-hours {
  flex: none;
  text-align: right;
}

.shift-hours b {
  display: block;
  font-size: 17px;
  line-height: 22px;
  font-weight: 800;
  letter-spacing: -0.01em;
  white-space: nowrap;
}

.shift-hours span {
  color: var(--mut);
  font-size: 13px;
  font-weight: 600;
}

.shift-place {
  margin-top: 8px;
}

.shift-place b {
  display: block;
  font-size: 16px;
  line-height: 22px;
  font-weight: 700;
  letter-spacing: -0.01em;
  overflow-wrap: anywhere;
}

.shift-place span {
  display: flex;
  align-items: center;
  gap: 4px;
  color: var(--mut);
  font-size: 14px;
  line-height: 20px;
}

.shift-note {
  margin-top: 8px;
  color: var(--warn);
  font-size: 13px;
  line-height: 18px;
  font-weight: 700;
}

.shift-card > .shift-foot {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-top: 12px;
  padding-top: 12px;
  border-top: 1px solid var(--line);
}

.shift-perks {
  display: flex;
  flex-wrap: wrap;
  gap: 4px 16px;
  min-width: 0;
  color: var(--tx2);
  font-size: 13px;
  font-weight: 600;
}

.shift-perks > span {
  display: flex;
  align-items: center;
  gap: 6px;
}

.shift-perks .i {
  width: 16px;
  height: 16px;
  color: var(--acc);
}

.shift-aff {
  display: flex;
  flex: none;
  align-items: center;
  gap: 8px;
  margin-left: auto;
  color: var(--mut);
  font-size: 13px;
  font-weight: 600;
}

.bars {
  display: flex;
  align-items: flex-end;
  gap: 3px;
  height: 14px;
}

.bars i {
  display: block;
  width: 4px;
  border-radius: 2px;
  background: var(--line2);
}

.bars i:nth-child(1) { height: 6px; }
.bars i:nth-child(2) { height: 10px; }
.bars i:nth-child(3) { height: 14px; }
.bars i.f { background: var(--tx); }

.shift-card.is-incompatible,
.shift-card.is-soft-incompatible {
  border-style: dashed;
  border-color: var(--line2);
}

/* ============ États : chargement, vide, erreur ============ */
.shift-card.is-skeleton {
  cursor: default;
  pointer-events: none;
}

.sk {
  display: block;
  border-radius: 8px;
  position: relative;
  overflow: hidden;
  background: var(--skeleton);
}

.sk::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(90deg, transparent, color-mix(in srgb, var(--tx) 12%, transparent), transparent);
  transform: translateX(-100%);
  animation: sk-shimmer 1.3s var(--ease-in-out) infinite;
}

.sk-pill { width: 72px; height: 28px; border-radius: 14px; }
.sk-amount { width: 60%; height: 44px; margin-top: 12px; }
.sk-line { width: 80%; height: 16px; margin-top: 12px; }
.sk-line.short { width: 50%; margin-top: 8px; }

@keyframes sk-shimmer {
  to { transform: translateX(100%); }
}

#shift-list .empty {
  min-height: 0;
  padding: 24px 20px;
  border: 1px solid var(--line);
  border-radius: var(--r-card);
  background: var(--s1);
  color: var(--mut);
}

#shift-list .empty strong {
  margin-bottom: 8px;
  color: var(--tx);
  font-size: 18px;
  line-height: 24px;
  font-weight: 800;
  letter-spacing: -0.01em;
}

#shift-list .empty p {
  max-width: 28ch;
  margin: 0 auto;
  font-size: 15px;
  line-height: 22px;
  font-weight: 500;
}

.feed-actions {
  display: grid;
  gap: 8px;
  margin-top: 16px;
}

.feed-empty > div > .feed-action {
  margin-top: 16px;
}

.feed-action {
  width: 100%;
  min-height: 48px;
  padding: 0 20px;
  border: 1px solid var(--acc);
  border-radius: 24px;
  background: var(--acc);
  color: var(--on-acc);
  font-size: 16px;
  font-weight: 800;
  cursor: pointer;
}

.feed-action.ghost {
  border-color: var(--line2);
  background: transparent;
  color: var(--tx2);
}

/* ============ Feuilles et panneaux ============
 * Fiche de garde (#detail-sheet), publication (#publish-sheet), notifications (#notification-panel).
 */
.visually-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  margin: -1px;
  padding: 0;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
  border: 0;
}

.backdrop {
  position: fixed;
  inset: 0;
  z-index: 20;
  background: rgba(10, 3, 8, .6);
  -webkit-backdrop-filter: blur(4px);
  backdrop-filter: blur(4px);
  animation: backdrop-in var(--d-base) var(--ease-out) both;
}

.backdrop[hidden],
.sheet[hidden],
.notification-panel[hidden] {
  display: none;
}

.sheet,
.notification-panel {
  position: fixed;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 21;
  display: flex;
  flex-direction: column;
  width: min(100%, 520px);
  max-height: 92vh;
  max-height: 92dvh;
  margin-inline: auto;
  overflow: hidden;
  color: var(--tx);
  background:
    radial-gradient(90% 220px at 90% 0, var(--glow-a), transparent 70%),
    var(--bg);
  border: 1px solid var(--line2);
  border-bottom: 0;
  border-radius: 28px 28px 0 0;
  box-shadow: 0 -24px 60px -24px rgba(0, 0, 0, .55);
  outline: none;
  animation: sheet-rise var(--d-sheet) var(--ease-sheet) backwards;
  font-family: var(--font-body);
}

.handle {
  flex: none;
  display: grid;
  place-items: center;
  height: 28px;
  cursor: grab;
  touch-action: none;
}

.handle::before {
  content: "";
  width: 40px;
  height: 5px;
  border-radius: 3px;
  background: color-mix(in srgb, var(--mut) 60%, transparent);
}

.sheet :is(button, a, input, select),
.notification-panel :is(button, a) {
  -webkit-tap-highlight-color: transparent;
}

/* --- éléments communs --- */
.sh-icon {
  position: relative;
  flex: none;
  display: grid;
  place-items: center;
  width: 44px;
  height: 44px;
  padding: 0;
  color: var(--tx);
  text-decoration: none;
  background: var(--s1);
  border: 1px solid var(--line);
  border-radius: 50%;
  cursor: pointer;
}

.sh-icon-ghost {
  visibility: hidden;
}

.sh-bar {
  flex: none;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 0 20px 12px;
}

.sh-bar-text {
  display: flex;
  flex-direction: column;
  min-width: 0;
}

.sh-title {
  font-size: 24px;
  line-height: 30px;
  font-weight: 800;
  letter-spacing: -.02em;
}

.sh-sub {
  font-size: 13px;
  line-height: 18px;
  font-weight: 600;
  color: var(--mut);
}

.sh-scroll {
  flex: 1 1 auto;
  min-height: 0;
  overflow-y: auto;
  overscroll-behavior: contain;
  padding: 0 20px 24px;
}

.sh-cta {
  flex: none;
  display: grid;
  gap: 4px;
  padding: 28px 20px calc(16px + var(--safe-bottom));
  background: linear-gradient(to top, var(--bg) 62%, rgba(var(--bg-rgb), 0));
}

.sheet .sh-cta,
.notification-panel .sh-cta {
  margin-top: -12px;
  position: relative;
}

.sh-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  width: 100%;
  height: 56px;
  padding: 0 20px;
  color: var(--on-acc);
  font: 800 17px/1 var(--font-body);
  letter-spacing: -.01em;
  text-decoration: none;
  background: var(--acc);
  border: 0;
  border-radius: 28px;
  cursor: pointer;
}

.sh-btn:disabled {
  color: var(--mut);
  background: var(--s2);
  cursor: not-allowed;
}

.sh-btn2 {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  min-height: 44px;
  color: var(--mut);
  font: 700 15px/1 var(--font-body);
  background: none;
  border: 0;
  cursor: pointer;
}

.sh-btn2.is-danger {
  color: var(--danger);
}

.sh-cta-note {
  margin: 8px 0 0;
  text-align: center;
  font-size: 13px;
  line-height: 18px;
  font-weight: 600;
  color: var(--danger);
}

/* --- fiche de garde --- */
.sheet #detail-content {
  flex: 1 1 auto;
  min-height: 0;
  display: flex;
  flex-direction: column;
  overflow-y: auto;
}

.sh-top {
  position: sticky;
  top: 0;
  z-index: 2;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  height: 52px;
  background: transparent;
  border-bottom: 1px solid transparent;
  transition: background-color var(--d-base) var(--ease-out), border-color var(--d-base) var(--ease-out);
}

.sh-scroll > .sh-top {
  margin: 0 -20px;
  padding: 0 20px;
}

.sh-top.is-scrolled {
  background: rgba(var(--bg-rgb), .94);
  border-bottom-color: var(--line);
  -webkit-backdrop-filter: blur(10px);
  backdrop-filter: blur(10px);
}

.sh-top-title {
  flex: 1;
  min-width: 0;
  overflow: hidden;
  font-size: 16px;
  font-weight: 700;
  text-align: center;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.sh-top-title.is-fade {
  opacity: 0;
  transform: translateY(4px);
  transition: opacity var(--d-base) var(--ease-out), transform var(--d-base) var(--ease-out);
}

.sh-top.is-titled .sh-top-title.is-fade {
  opacity: 1;
  transform: none;
}

.sh-hero {
  margin-top: 8px;
}

.sh-badge {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  min-height: 32px;
  padding: 4px 12px 4px 8px;
  color: var(--acc);
  font-size: 13px;
  line-height: 18px;
  font-weight: 700;
  background: var(--acc-soft);
  border: 1px solid var(--acc-line);
  border-radius: 16px;
}

.sh-badge .i {
  width: 16px;
  height: 16px;
}

.sh-badge.is-neutral {
  color: var(--tx2);
  background: var(--s2);
  border-color: var(--line2);
}

.sh-badge.is-ok {
  color: var(--ok);
  background: color-mix(in srgb, var(--ok) 14%, transparent);
  border-color: transparent;
}

.sh-badge.is-soon {
  color: var(--acc);
  background: var(--acc-soft);
  border-color: var(--acc-line);
}

.sh-badge.is-new {
  padding: 4px 14px;
  font-weight: 800;
  color: var(--on-acc);
  background: var(--acc);
  border-color: transparent;
}

.sh-badge.is-warn {
  color: var(--warn);
  background: color-mix(in srgb, var(--warn) 14%, transparent);
  border-color: color-mix(in srgb, var(--warn) 35%, transparent);
}

.sh-badge.is-bad {
  color: var(--danger);
  background: color-mix(in srgb, var(--danger) 14%, transparent);
  border-color: color-mix(in srgb, var(--danger) 35%, transparent);
}

.sh-reason {
  margin: 8px 0 0;
  font-size: 14px;
  line-height: 20px;
  font-weight: 600;
  color: var(--warn);
}

.sh-reason.is-bad {
  color: var(--danger);
}

.sh-name {
  margin: 16px 0 0;
  font-size: 15px;
  line-height: 22px;
  font-weight: 600;
  color: var(--mut);
}

.sh-name b {
  color: var(--tx);
  font-weight: 700;
}

.sh-note {
  margin-top: 12px;
  padding: 12px 16px;
  font-size: 13px;
  line-height: 18px;
  font-weight: 600;
  color: var(--warn);
  background: color-mix(in srgb, var(--warn) 12%, transparent);
  border: 1px solid color-mix(in srgb, var(--warn) 30%, transparent);
  border-radius: 16px;
}

/* --- fiche d'une garde v2 (design/DETAIL.md) --- */
.dt-hero {
  position: relative;
  margin-top: 4px;
}

.dt-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.dt-name {
  display: -webkit-box;
  margin: 20px 0 0;
  overflow: hidden;
  font-size: 24px;
  line-height: 28px;
  font-weight: 800;
  letter-spacing: -.02em;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
}

.dt-sub {
  margin: 4px 0 0;
  font-size: 15px;
  line-height: 20px;
  font-weight: 600;
  color: var(--mut);
}

.dt-money {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: 0 8px;
  margin-top: 16px;
  color: var(--money);
}

.dt-money b {
  font-size: 56px;
  line-height: 60px;
  font-weight: 800;
  letter-spacing: -.045em;
  font-variant-numeric: tabular-nums;
  text-shadow: var(--num-shadow);
}

.dt-money span {
  font-size: 17px;
  font-weight: 700;
  color: var(--mut);
}

.dt-fine {
  margin: 6px 0 0;
  font-size: 13px;
  line-height: 18px;
  font-weight: 600;
  color: var(--mut);
}

.dt-sec {
  margin-top: 24px;
}

.dt-sec > h2 {
  margin: 0 4px 10px;
  font-size: 12px;
  line-height: 16px;
  font-weight: 700;
  letter-spacing: .12em;
  text-transform: uppercase;
  color: var(--mut);
}

.dt-card {
  padding: 16px;
  background: var(--s1);
  border: 1px solid var(--line);
  border-radius: var(--r-card);
}

.dt-card.dt-rows {
  padding: 0 16px;
}

.dt-frise {
  display: grid;
  grid-template-columns: auto 1fr auto;
  align-items: center;
  gap: 12px;
}

.dt-t b {
  display: block;
  font-size: 26px;
  line-height: 30px;
  font-weight: 800;
  letter-spacing: -.03em;
}

.dt-t span {
  font-size: 13px;
  font-weight: 600;
  color: var(--mut);
}

.dt-t-end {
  text-align: right;
}

.dt-track {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  height: 28px;
}

.dt-track::before {
  content: "";
  position: absolute;
  left: 6px;
  right: 6px;
  top: 50%;
  height: 2px;
  margin-top: -1px;
  background: repeating-linear-gradient(90deg, var(--acc-line) 0 4px, transparent 4px 9px);
}

.dt-track::after {
  content: "";
  position: absolute;
  left: 0;
  top: 50%;
  width: 12px;
  height: 12px;
  margin-top: -6px;
  border-radius: 50%;
  background: var(--acc);
  box-shadow: 0 0 0 4px var(--acc-soft);
}

.dt-end {
  position: absolute;
  right: 0;
  top: 50%;
  width: 12px;
  height: 12px;
  margin-top: -6px;
  border: 2px solid var(--mut);
  border-radius: 50%;
  background: var(--s1);
}

.dt-dur {
  position: relative;
  z-index: 1;
  display: flex;
  align-items: center;
  height: 28px;
  padding: 0 12px;
  font-size: 13px;
  font-weight: 800;
  background: var(--s2);
  border: 1px solid var(--line2);
  border-radius: 14px;
}

/* lignes de liste */
.dt-row {
  display: flex;
  align-items: center;
  gap: 12px;
  min-height: 56px;
  padding: 10px 0;
}

.dt-row + .dt-row,
.dt-pchips + .dt-row {
  border-top: 1px solid var(--line);
}

.dt-plain {
  padding: 0 4px;
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
}

.dt-pas {
  flex: none;
  display: grid;
  place-items: center;
  width: 36px;
  height: 36px;
  color: var(--acc);
  background: var(--s2);
  border-radius: 50%;
}

.dt-pas .i {
  width: 20px;
  height: 20px;
}

.dt-tx {
  flex: 1;
  min-width: 0;
}

.dt-tx small {
  display: block;
  font-size: 12px;
  line-height: 16px;
  font-weight: 600;
  color: var(--mut);
}

.dt-tx b {
  display: block;
  font-size: 15px;
  line-height: 20px;
  font-weight: 700;
  color: var(--tx);
  overflow-wrap: anywhere;
}

.dt-tx .dt-help,
.dt-help {
  font-size: 13px;
  line-height: 18px;
  font-weight: 500;
  color: var(--mut);
}

.dt-lnk {
  flex: none;
  display: inline-flex;
  align-items: center;
  gap: 4px;
  min-height: 44px;
  font-size: 13px;
  font-weight: 700;
  color: var(--acc);
  text-decoration: none;
  white-space: nowrap;
}

.dt-lnk .i {
  width: 14px;
  height: 14px;
}

.dt-val {
  flex: none;
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 14px;
  font-weight: 700;
  white-space: nowrap;
}

.dt-pchips {
  padding: 14px 0;
}

.dt-chip {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  height: 32px;
  padding: 0 14px 0 10px;
  font-size: 13px;
  font-weight: 700;
  color: var(--tx);
  white-space: nowrap;
  background: var(--s2);
  border: 1px solid var(--line);
  border-radius: 16px;
}

.dt-chip .i {
  width: 16px;
  height: 16px;
  color: var(--acc);
}

.dt-pstat {
  flex: none;
  display: inline-flex;
  align-items: center;
  height: 26px;
  padding: 0 10px;
  font-size: 12px;
  font-weight: 800;
  border-radius: 13px;
}

.dt-pstat.is-warn {
  color: var(--warn);
  background: color-mix(in srgb, var(--warn) 14%, transparent);
}

.dt-pstat.is-ok {
  color: var(--ok);
  background: color-mix(in srgb, var(--ok) 14%, transparent);
}

.dt-av {
  flex: none;
  display: grid;
  place-items: center;
  width: 44px;
  height: 44px;
  font-size: 15px;
  font-weight: 800;
  color: var(--on-acc);
  background: var(--acc);
  border-radius: 50%;
}

.dt-call {
  flex: none;
  display: grid;
  place-items: center;
  width: 44px;
  height: 44px;
  color: var(--acc);
  text-decoration: none;
  background: var(--acc-soft);
  border: 1px solid var(--acc-line);
  border-radius: 50%;
}

.dt-danger {
  display: flex;
  justify-content: center;
  margin-top: 16px;
}

.dt-danger button {
  min-height: 44px;
  padding: 0 12px;
  font: 700 14px/1 var(--font-body);
  color: var(--danger);
  background: none;
  border: 0;
  text-decoration: underline;
  text-decoration-thickness: 1px;
  text-underline-offset: 3px;
  cursor: pointer;
}

/* liste des gardes prises (agenda) dans la fiche */
#detail-sheet .occupied-sheet-list {
  display: grid;
  gap: 8px;
}

#detail-sheet .occupied-shift-row {
  display: flex;
  align-items: center;
  gap: 12px;
  width: 100%;
  min-height: 60px;
  padding: 8px 16px 8px 8px;
  color: var(--tx);
  text-align: left;
  background: var(--s1);
  border: 1px solid var(--line);
  border-radius: 18px;
}

#detail-sheet .occupied-shift-row .shift-date {
  display: grid;
  place-items: center;
  flex: none;
  width: 52px;
  min-height: 44px;
  padding: 4px;
  font-size: 12px;
  color: var(--mut);
  background: var(--s2);
  border-radius: 14px;
}

#detail-sheet .occupied-shift-row .shift-date strong {
  color: var(--tx);
}

#detail-sheet .occupied-shift-main {
  flex: 1;
  min-width: 0;
}

#detail-sheet .occupied-shift-main strong {
  display: block;
  color: var(--tx);
}

#detail-sheet .occupied-shift-main span,
#detail-sheet .occupied-shift-main small {
  display: block;
  color: var(--mut);
}

#detail-sheet .occupied-shift-row em {
  font-style: normal;
  font-weight: 800;
  color: var(--money);
}

/* --- publication --- */
#publish-form {
  flex: 1 1 auto;
  min-height: 0;
  display: flex;
  flex-direction: column;
  margin: 0;
}

#publish-form .sh-scroll {
  display: grid;
  align-content: start;
  gap: 16px;
}

.f-field {
  display: grid;
  gap: 6px;
  min-width: 0;
}

.f-label,
.f-legend {
  padding: 0;
  font-size: 13px;
  line-height: 18px;
  font-weight: 700;
  color: var(--tx2);
}

.f-legend {
  margin-bottom: 8px;
}

.f-group {
  min-width: 0;
  margin: 0;
  padding: 0;
  border: 0;
}

.f-help {
  display: block;
  margin-top: 0;
  font-size: 12px;
  line-height: 16px;
  font-weight: 500;
  color: var(--mut);
}

.f-group .f-help {
  margin-top: 6px;
}

.f-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
}

.f-section {
  margin-top: 8px;
  font-size: 13px;
  line-height: 18px;
  font-weight: 800;
  letter-spacing: .08em;
  text-transform: uppercase;
  color: var(--mut);
}

#publish-form .f-input {
  width: 100%;
  min-width: 0;
  height: 52px;
  min-height: 52px;
  padding: 0 16px;
  color: var(--tx);
  font: 600 16px/1 var(--font-body);
  background: var(--s1);
  border: 1px solid var(--line2);
  border-radius: 16px;
  box-shadow: none;
  outline: none;
  appearance: none;
  -webkit-appearance: none;
}

#publish-form .f-input:focus-visible {
  border-color: var(--acc);
  box-shadow: 0 0 0 3px var(--acc-soft);
}

#publish-form .f-input::placeholder {
  color: var(--dim);
}

.f-money {
  position: relative;
  display: block;
}

#publish-form .f-money .f-input {
  padding-right: 72px;
  font-size: 22px;
  font-weight: 800;
  letter-spacing: -.01em;
}

.f-money em {
  position: absolute;
  right: 16px;
  top: 50%;
  transform: translateY(-50%);
  font-style: normal;
  font-size: 14px;
  font-weight: 700;
  color: var(--mut);
  pointer-events: none;
}

.seg {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 4px;
  padding: 4px;
  background: var(--s1);
  border: 1px solid var(--line);
  border-radius: 22px;
}

.seg-opt {
  position: relative;
  display: block;
  min-width: 0;
}

.seg-opt input {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  min-height: 0;
  margin: 0;
  opacity: 0;
  cursor: pointer;
}

.seg-opt > span {
  display: grid;
  place-items: center;
  align-content: center;
  gap: 2px;
  min-height: 56px;
  padding: 6px 4px;
  color: var(--mut);
  text-align: center;
  border-radius: 18px;
}

.seg-opt b {
  font-size: 15px;
  line-height: 18px;
  font-weight: 800;
  color: var(--tx);
}

.seg-opt small {
  font-size: 12px;
  line-height: 14px;
  font-weight: 600;
  color: inherit;
}

.seg-opt input:checked + span {
  color: var(--on-acc);
  background: var(--acc);
}

.seg-opt input:checked + span b {
  color: inherit;
}

.seg-opt input:focus-visible + span {
  outline: 2px solid var(--acc);
  outline-offset: 2px;
}

/* --- notifications --- */
.notification-panel {
  max-height: 84vh;
  max-height: 84dvh;
}

.notification-list {
  flex: 1 1 auto;
  min-height: 0;
  display: grid;
  align-content: start;
  gap: 8px;
  overflow-y: auto;
  overscroll-behavior: contain;
  padding: 4px 20px calc(24px + var(--safe-bottom));
}

.notification-row {
  display: grid;
  grid-template-columns: 40px minmax(0, 1fr);
  gap: 4px 12px;
  align-items: start;
  padding: 12px 14px;
  background: var(--s1);
  border: 1px solid var(--line);
  border-radius: 18px;
}

.notification-row.is-unread {
  background: var(--acc-soft);
  border-color: var(--acc-line);
}

.notification-ico {
  display: grid;
  place-items: center;
  width: 40px;
  height: 40px;
  color: var(--acc);
  background: var(--s2);
  border: 1px solid var(--line);
  border-radius: 14px;
}

.notification-row.is-unread .notification-ico {
  color: var(--on-acc);
  background: var(--acc);
  border-color: var(--acc);
}

.notification-text {
  min-width: 0;
}

.notification-text strong {
  display: block;
  font-size: 15px;
  line-height: 20px;
  font-weight: 700;
  overflow-wrap: anywhere;
}

.notification-text p {
  margin: 2px 0 0;
  font-size: 14px;
  line-height: 20px;
  color: var(--tx2);
  overflow-wrap: anywhere;
}

.notification-text small {
  display: block;
  margin-top: 4px;
  font-size: 12px;
  line-height: 16px;
  font-weight: 600;
  color: var(--mut);
}

.notification-read {
  grid-column: 2;
  justify-self: start;
  min-height: 44px;
  padding: 0 16px;
  color: var(--acc);
  font: 700 13px/1 var(--font-body);
  background: transparent;
  border: 1px solid var(--acc-line);
  border-radius: 22px;
  cursor: pointer;
}

.notification-empty {
  display: grid;
  justify-items: center;
  gap: 8px;
  padding: 40px 20px;
  text-align: center;
}

.notification-empty .i {
  box-sizing: content-box;
  width: 24px;
  height: 24px;
  padding: 16px;
  color: var(--acc);
  background: var(--s2);
  border-radius: 50%;
}

.notification-empty strong {
  font-size: 17px;
  font-weight: 800;
}

.notification-empty p {
  max-width: 28ch;
  margin: 0;
  font-size: 14px;
  line-height: 20px;
  color: var(--mut);
}

@media (min-width: 768px) {
  .sheet {
    bottom: 24px;
    max-height: min(820px, calc(100dvh - 48px));
    border-bottom: 1px solid var(--line2);
    border-radius: 28px;
  }

  .notification-panel {
    top: 72px;
    right: 24px;
    bottom: auto;
    left: auto;
    width: 400px;
    max-height: min(620px, calc(100dvh - 96px));
    margin: 0;
    border-bottom: 1px solid var(--line2);
    border-radius: 24px;
  }

  .notification-panel .handle {
    display: none;
  }

  .notification-panel .sh-bar {
    padding-top: 16px;
  }
}

@keyframes sheet-rise {
  from { transform: translateY(100%); }
  to { transform: none; }
}

@keyframes backdrop-in {
  from { opacity: 0; -webkit-backdrop-filter: blur(0); backdrop-filter: blur(0); }
  to { opacity: 1; -webkit-backdrop-filter: blur(4px); backdrop-filter: blur(4px); }
}

/* Feuille « gardes déjà prises » (agenda) : en-tête hors zone défilante */
#detail-content > .sh-top {
  padding: 0 20px 12px;
  height: auto;
  min-height: 52px;
}

/* ============ Agenda (professionnel) ============ */
#screen-app[data-view="agenda"] .page-head {
  display: none;
}

.agenda-view.is-editing {
  padding-bottom: min(62dvh, 440px); /* réserve : le jour choisi peut remonter au-dessus de la feuille */
}

.mth {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin: 8px 0 12px;
}

.mth h2 {
  margin: 0;
  color: var(--tx);
  font-size: 28px;
  line-height: 34px;
  font-weight: 800;
  letter-spacing: -.02em;
}

.mth h2 small {
  display: block;
  color: var(--mut);
  font-size: 14px;
  line-height: 18px;
  font-weight: 600;
  letter-spacing: 0;
}

.arrows {
  display: flex;
  flex: none;
  gap: 8px;
}

.ag-next {
  transform: scaleX(-1);
}

/* semaine en cours */
.week {
  display: grid;
  grid-template-columns: repeat(7, minmax(0, 1fr));
  gap: 4px;
  padding: 8px;
  background: var(--s1);
  border: 1px solid var(--line);
  border-radius: var(--r-card);
}

.wd {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 2px;
  height: 64px;
  color: var(--mut);
  font-size: 11px;
  font-weight: 700;
  letter-spacing: .04em;
  text-transform: uppercase;
  border-radius: var(--r-tile);
}

.wd b {
  color: var(--tx);
  font-size: 17px;
  font-weight: 800;
  letter-spacing: -.01em;
  text-transform: none;
}

.wd.today {
  color: var(--bg);
  background: var(--tx);
}

.wd.today b {
  color: var(--bg);
}

.wd.conf {
  color: var(--on-acc);
  background: var(--acc);
}

.wd.conf b {
  color: var(--on-acc);
}

.wd.off:not(.today):not(.conf) b {
  color: var(--dim);
}

.wd .d {
  position: absolute;
  bottom: 6px;
  width: 4px;
  height: 4px;
  border-radius: 50%;
  background: var(--acc);
}

.wd.today .d {
  background: var(--bg);
}

/* calendrier du mois */
.cal {
  margin-top: 12px;
  padding: 12px;
  background: var(--s1);
  border: 1px solid var(--line);
  border-radius: var(--r-card);
}

.calendar-grid {
  display: grid;
  grid-template-columns: repeat(7, minmax(0, 1fr));
  text-align: center;
}

.calendar-weekday {
  display: grid;
  place-items: center;
  height: 24px;
  color: var(--mut);
  font-size: 11px;
  font-weight: 700;
  letter-spacing: .04em;
  text-transform: uppercase;
}

.calendar-day {
  position: relative;
  z-index: 0;
  display: grid;
  place-items: center;
  height: 44px;
  padding: 0;
  color: var(--tx2);
  font: 700 14px/1 var(--font-body);
  background: none;
  border: 0;
  cursor: pointer;
  -webkit-tap-highlight-color: transparent;
}

.calendar-day.is-blank {
  pointer-events: none;
}

.calendar-day::after {
  content: "";
  position: absolute;
  inset: 4px 3px;
  z-index: -1;
  border: 1.5px solid transparent;
  border-radius: 12px;
}

.calendar-day.is-past {
  color: var(--dim);
}

.calendar-day.is-active {
  color: var(--acc);
}

.calendar-day.is-active::after {
  border-color: var(--acc-ring);
}

.calendar-day.is-booked {
  color: var(--on-acc);
}

.calendar-day.is-booked::after {
  background: var(--acc);
  border-color: var(--acc);
}

.calendar-day.is-today {
  color: var(--tx);
  text-decoration: underline;
  text-decoration-thickness: 2px;
  text-underline-offset: 5px;
}

.calendar-day.is-booked.is-today {
  color: var(--on-acc);
}

.calendar-day.is-selected:not(.is-booked) {
  color: var(--tx);
}

.calendar-day.is-selected:not(.is-booked)::after {
  background: var(--acc-soft);
  border: 2px solid var(--tx);
}

.calendar-day.is-booked.is-selected::after {
  box-shadow: 0 0 0 2px var(--s1), 0 0 0 4px var(--tx);
}

.calendar-day.is-range-middle:not(.is-booked)::after {
  border-color: transparent;
  background: var(--acc-soft);
}

.calendar-day.is-inspected:not(.is-selected)::after {
  border-color: var(--line2);
}

.calendar-day:focus-visible {
  outline-offset: -2px;
  border-radius: 12px;
}

.legend {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 16px;
  margin: 8px 4px 0;
  padding-top: 10px;
  color: var(--mut);
  font-size: 12px;
  line-height: 16px;
  font-weight: 600;
  border-top: 1px solid var(--line);
}

.legend span {
  display: flex;
  align-items: center;
  gap: 6px;
}

.legend i {
  display: block;
  width: 10px;
  height: 10px;
  border-radius: 4px;
}

.legend .lg-av {
  border: 1.5px solid var(--acc-ring);
}

.legend .lg-conf {
  background: var(--acc);
}

.legend .lg-past {
  background: var(--s2);
  box-shadow: inset 0 0 0 1px var(--line2);
}

/* titres de section et listes */
.sec {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin: 20px 0 8px;
}

.sec h3 {
  margin: 0;
  color: var(--tx);
  font-size: 18px;
  font-weight: 800;
  letter-spacing: -.01em;
}

.sec span {
  color: var(--mut);
  font-size: 13px;
  font-weight: 600;
}

.ag-list {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 8px;
}

.slot {
  display: flex;
  align-items: center;
  gap: 12px;
  width: 100%;
  min-height: 60px;
  padding: 8px 16px 8px 8px;
  color: var(--tx);
  text-align: left;
  background: var(--s1);
  border: 1px solid var(--line);
  border-radius: 18px;
}

.slot.conf {
  border-color: var(--acc-line);
  cursor: pointer;
}

.slot .dt {
  flex: none;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  width: 44px;
  height: 44px;
  color: var(--mut);
  font-size: 10px;
  line-height: 12px;
  font-weight: 700;
  text-transform: uppercase;
  background: var(--s2);
  border-radius: 14px;
}

.slot .dt b {
  color: var(--tx);
  font-size: 17px;
  line-height: 20px;
  font-weight: 800;
}

.slot .m {
  min-width: 0;
  overflow-wrap: anywhere;
}

.slot .m b {
  display: block;
  font-size: 15px;
  line-height: 20px;
  font-weight: 700;
}

.slot .m span {
  display: block;
  color: var(--mut);
  font-size: 13px;
  line-height: 18px;
}

.slot .st {
  display: flex;
  align-items: center;
  flex: none;
  height: 24px;
  margin-left: auto;
  padding: 0 10px;
  font-size: 12px;
  font-weight: 800;
  white-space: nowrap;
  border-radius: 12px;
}

.st.a {
  color: var(--acc);
  border: 1.5px solid var(--acc-ring);
}

.st.c {
  color: var(--on-acc);
  background: var(--acc);
}

.empty-inline {
  padding: 16px;
  color: var(--mut);
  font-size: 14px;
  line-height: 20px;
  font-weight: 600;
  text-align: center;
  background: var(--s1);
  border: 1px dashed var(--line2);
  border-radius: 18px;
}

.period-card {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  min-height: 60px;
  padding: 10px 8px 10px 16px;
  background: var(--s1);
  border: 1px solid var(--line);
  border-radius: 18px;
}

.period-main {
  min-width: 0;
}

.period-main strong {
  display: block;
  color: var(--tx);
  font-size: 15px;
  line-height: 20px;
  font-weight: 700;
}

.period-main > span {
  display: block;
  color: var(--mut);
  font-size: 13px;
  line-height: 18px;
}

.period-slots {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-top: 6px;
}

.period-slots em {
  display: inline-flex;
  align-items: center;
  height: 24px;
  padding: 0 10px;
  color: var(--acc);
  font-size: 12px;
  font-style: normal;
  font-weight: 800;
  border: 1.5px solid var(--acc-ring);
  border-radius: 12px;
}

.ag-del {
  flex: none;
  display: grid;
  place-items: center;
  width: 44px;
  height: 44px;
  padding: 0;
  color: var(--mut);
  background: none;
  border: 0;
  border-radius: 50%;
  cursor: pointer;
}

.ag-del:hover {
  color: var(--danger);
}

/* bouton principal : dans le flux, sous le calendrier */
.ag-cta {
  margin: 16px 0 8px;
}

.ag-cta .sh-btn {
  width: 100%;
}

.agenda-view.is-editing .ag-cta {
  visibility: hidden;
}

/* --- éditeur de disponibilités (feuille) --- */
.agenda-sheet {
  z-index: 19;
  max-height: min(60dvh, 420px);
}

.agenda-sheet .sh-title {
  font-size: 22px;
}

.agenda-sheet .sh-scroll {
  display: grid;
  align-content: start;
  gap: 12px;
}

.agenda-sheet .sh-cta {
  gap: 0;
  padding-top: 20px;
}

.agenda-sheet .sh-btn {
  height: 52px;
}

.ag-seg {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 4px;
  padding: 4px;
  background: var(--s1);
  border: 1px solid var(--line);
  border-radius: 22px;
}

.ag-seg button {
  min-height: 44px;
  color: var(--mut);
  font: 800 15px/1 var(--font-body);
  background: none;
  border: 0;
  border-radius: 18px;
  cursor: pointer;
}

.ag-seg button.is-active {
  color: var(--on-acc);
  background: var(--acc);
}

.bulk-slots {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 8px;
}

.bulk-slots > span {
  margin-right: 4px;
  color: var(--mut);
  font-size: 13px;
  font-weight: 700;
}

.slot-pill {
  min-height: 44px;
  padding: 0 16px;
  color: var(--tx);
  font: 700 14px/1 var(--font-body);
  background: var(--s1);
  border: 1px solid var(--line2);
  border-radius: 22px;
  cursor: pointer;
}

.slot-pill.is-active {
  color: var(--on-acc);
  background: var(--acc);
  border-color: var(--acc);
}

.slot-pill.is-blocked:not(.is-active) {
  color: var(--dim);
  text-decoration: line-through;
}

.slot-pill.is-blocked.is-active {
  background: var(--warn);
  border-color: var(--warn);
}

.slot-pill:disabled {
  opacity: .5;
  cursor: not-allowed;
}

.date-slot-list {
  display: grid;
  gap: 8px;
}

.date-slot-row {
  display: grid;
  gap: 8px;
  padding: 12px;
  background: var(--s1);
  border: 1px solid var(--line);
  border-radius: 18px;
}

.date-slot-label {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  color: var(--tx);
  font-size: 15px;
  font-weight: 800;
}

.date-slot-label em {
  padding: 2px 10px;
  color: var(--on-acc);
  font-size: 12px;
  font-style: normal;
  font-weight: 800;
  background: var(--acc);
  border-radius: 12px;
}

.date-slot-options {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.occupied-summary {
  display: grid;
  gap: 8px;
  padding: 12px;
  background: var(--s1);
  border: 1px solid var(--acc-line);
  border-radius: 18px;
}

.occupied-summary[hidden] {
  display: none;
}

.occupied-summary-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}

.occupied-summary-head strong {
  color: var(--tx);
  font-size: 15px;
  font-weight: 800;
}

.occupied-summary-head .text-button {
  min-height: 44px;
  padding: 0 8px;
  color: var(--acc);
  font: 800 14px/1 var(--font-body);
  background: none;
  border: 0;
  cursor: pointer;
}

.occupied-preview-list {
  display: grid;
  gap: 8px;
}

.day-shift-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  width: 100%;
  min-height: 52px;
  padding: 8px 12px;
  color: var(--tx);
  text-align: left;
  background: var(--s2);
  border: 0;
  border-radius: 14px;
  cursor: pointer;
}

.day-shift-row strong,
.day-shift-row span {
  display: block;
}

.day-shift-row strong {
  font-size: 14px;
  font-weight: 700;
}

.day-shift-row span {
  color: var(--mut);
  font-size: 12px;
}

.day-shift-row em {
  color: var(--money);
  font-style: normal;
  font-weight: 800;
}

.occupied-date-chips {
  display: flex;
  gap: 8px;
  overflow-x: auto;
}

.occupied-date-chips button {
  flex: none;
  min-height: 44px;
  padding: 0 14px;
  color: var(--tx);
  font: 700 13px/1 var(--font-body);
  background: var(--s2);
  border: 0;
  border-radius: 22px;
  cursor: pointer;
}

.occupied-date-chips button.is-active {
  color: var(--on-acc);
  background: var(--acc);
}

.calendar-day.is-past:not(.is-booked):not(.is-selected) {
  color: var(--dim);
}

.calendar-day.is-past.is-active:not(.is-booked)::after {
  border-color: var(--line2);
}

/* ============ Mes gardes (professionnel) ============ */
.hist-tabs {
  margin: 4px 0 16px;
}

.seg.seg-2 {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.seg-sm .seg-opt > span {
  min-height: 44px;
  padding: 4px;
}

.seg-sm .seg-opt b {
  font-size: 14px;
  color: inherit;
}

#history-list {
  display: grid;
  gap: 12px;
}

#history-list .empty {
  min-height: 0;
  padding: 24px 20px;
  border: 1px solid var(--line);
  border-radius: var(--r-card);
  background: var(--s1);
  color: var(--mut);
}

#history-list .empty strong {
  margin-bottom: 8px;
  color: var(--tx);
  font-size: 18px;
  line-height: 24px;
  font-weight: 800;
}

#history-list .empty p {
  max-width: 30ch;
  margin: 0 auto;
  font-size: 15px;
  line-height: 22px;
}

.hc {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 4px;
  width: 100%;
  max-width: 100%;
  min-width: 0;
  box-sizing: border-box;
  margin: 0;
  padding: 16px 20px;
  color: var(--tx);
  font: inherit;
  text-align: left;
  background: var(--s1);
  border: 1px solid var(--line);
  border-radius: var(--r-card);
  cursor: pointer;
  -webkit-tap-highlight-color: transparent;
}

.hc:active {
  transform: scale(0.99);
}

.hc.is-dim .hc-amount b {
  color: var(--mut);
  text-decoration: line-through;
}

.hc-top {
  display: flex;
  min-width: 0;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
}

.hc-top strong {
  min-width: 0;
  font-size: 17px;
  line-height: 22px;
  font-weight: 800;
  letter-spacing: -0.01em;
  flex: 1 1 0;
  overflow: hidden;
  display: -webkit-box;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
  line-clamp: 2;
  overflow-wrap: anywhere;
}

.hc-top .pf-pill {
  flex: none;
  margin-top: 1px;
}

.hc-when {
  color: var(--tx2);
  font-size: 14px;
  line-height: 20px;
  font-weight: 600;
}

.hc-amount {
  display: flex;
  align-items: baseline;
  gap: 6px;
  margin-top: 8px;
}

.hc-amount b {
  color: var(--money);
  font-size: 28px;
  line-height: 32px;
  font-weight: 800;
  letter-spacing: -0.02em;
  white-space: nowrap;
}

.hc-amount span {
  color: var(--mut);
  font-size: 13px;
  font-weight: 600;
}

/* pastille de statut (mes gardes, profil) */
.pf-pill {
  flex: none;
  display: inline-flex;
  align-items: center;
  height: 24px;
  padding: 0 10px;
  color: var(--tx2);
  font-size: 12px;
  font-weight: 800;
  white-space: nowrap;
  background: var(--s2);
  border-radius: 12px;
}

.pf-pill.is-ok { color: var(--ok); background: color-mix(in srgb, var(--ok) 14%, transparent); }
.pf-pill.is-warn { color: var(--warn); background: color-mix(in srgb, var(--warn) 14%, transparent); }
.pf-pill.is-bad { color: var(--danger); background: color-mix(in srgb, var(--danger) 14%, transparent); }

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
}

/* ============ Profil (professionnel) ============ */
.pf-head {
  display: flex;
  align-items: center;
  gap: 16px;
  margin: 4px 0 20px;
}

.pf-avatar {
  flex: none;
  display: grid;
  place-items: center;
  width: 64px;
  height: 64px;
  color: var(--on-acc);
  font-size: 22px;
  font-weight: 800;
  background: var(--acc);
  border-radius: 50%;
}

.pf-id {
  flex: 1;
  min-width: 0;
}

.pf-id h3 {
  margin: 0;
  color: var(--tx);
  font-size: 20px;
  line-height: 26px;
  font-weight: 800;
  letter-spacing: -0.01em;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.pf-id p {
  margin: 0;
  color: var(--mut);
  font-size: 14px;
  line-height: 20px;
  font-weight: 600;
}

.pf-form {
  display: block;
}

.pf-sec {
  margin: 24px 4px 8px;
  color: var(--mut);
  font-size: 13px;
  line-height: 18px;
  font-weight: 800;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.pf-group {
  display: block;
  padding: 4px 16px;
  background: var(--s1);
  border: 1px solid var(--line);
  border-radius: var(--r-card);
}

.pf-group-flat {
  padding: 0;
  background: none;
  border: 0;
}

.pf-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  min-height: 52px;
  padding: 6px 0;
  color: var(--tx);
  border-bottom: 1px solid var(--line);
}

.pf-row:last-child,
.pf-block:last-child {
  border-bottom: 0;
}

.pf-row > span,
.pf-label {
  flex: none;
  color: var(--tx2);
  font-size: 15px;
  line-height: 20px;
  font-weight: 600;
}

.pf-row input,
.pf-row select,
.pf-row textarea {
  flex: 1;
  min-width: 0;
  width: auto;
  min-height: 44px;
  margin: 0;
  padding: 0;
  color: var(--tx);
  font: inherit;
  font-size: 16px;
  font-weight: 700;
  text-align: right;
  background: transparent;
  border: 0;
  border-radius: 0;
  box-shadow: none;
  appearance: none;
  -webkit-appearance: none;
}

.pf-row select {
  direction: rtl;
}

.pf-row select option {
  direction: ltr;
  color: #2A0D22;
}

.pf-row input[readonly] {
  color: var(--mut);
}

.pf-row input:focus,
.pf-row select:focus,
.pf-row textarea:focus {
  outline: none;
  box-shadow: none;
}

.pf-row:focus-within {
  border-bottom-color: var(--acc);
}

.pf-row-area {
  flex-direction: column;
  align-items: stretch;
  gap: 4px;
  padding: 12px 0;
}

.pf-row-area textarea {
  min-height: 56px;
  text-align: left;
  font-weight: 500;
  line-height: 22px;
  resize: vertical;
}

.pf-block {
  display: grid;
  gap: 12px;
  padding: 16px 0;
  border-bottom: 1px solid var(--line);
}

.pf-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.pf-chip {
  position: relative;
}

.pf-chip input {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  margin: 0;
  opacity: 0;
  cursor: pointer;
}

.pf-chip span {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  padding: 0 18px;
  color: var(--tx2);
  font-size: 15px;
  font-weight: 700;
  background: var(--s2);
  border: 1px solid var(--line);
  border-radius: 22px;
}

.pf-chip input:checked + span {
  color: var(--on-acc);
  background: var(--acc);
  border-color: var(--acc);
}

.pf-chip input:focus-visible + span {
  outline: 2px solid var(--acc);
  outline-offset: 2px;
}

.pf-group .switch-row {
  min-height: 52px;
  margin: 0;
  padding: 8px 0;
  color: var(--tx);
  font-size: 15px;
  font-weight: 600;
  background: none;
  border: 0;
  border-top: 1px solid var(--line);
  border-radius: 0;
}

.pf-group .city-picker {
  margin: 0;
}

.pf-line {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 14px 0 8px;
}

.pf-line b {
  display: block;
  color: var(--tx);
  font-size: 15px;
  font-weight: 700;
}

.pf-line p {
  margin: 2px 0 0;
  color: var(--mut);
  font-size: 13px;
  line-height: 18px;
}

.pf-actions {
  display: flex;
  gap: 8px;
  padding: 0 0 14px;
}

.pf-actions:not(:has(> :not([hidden]))) {
  display: none;
}

.pf-link {
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-height: 52px;
  color: var(--tx);
  font-size: 15px;
  font-weight: 600;
  text-decoration: none;
}

.pf-link .i {
  color: var(--mut);
  transform: rotate(180deg);
}

.pf-submit {
  display: grid;
  gap: 8px;
  margin-top: 24px;
}

.pf-btn {
  min-height: 48px;
  padding: 0 20px;
  color: var(--on-acc);
  font: inherit;
  font-size: 16px;
  font-weight: 800;
  background: var(--acc);
  border: 1px solid var(--acc);
  border-radius: 24px;
  cursor: pointer;
}

.pf-btn.ghost {
  color: var(--tx2);
  background: transparent;
  border-color: var(--line2);
}

.pf-btn[hidden] {
  display: none;
}

/* sélecteur de villes et interrupteur dans le profil */
.pf-switch {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  min-height: 56px;
  padding: 8px 0;
  color: var(--tx);
  font-size: 15px;
  line-height: 20px;
  font-weight: 600;
  cursor: pointer;
}

.pf-switch-input {
  position: absolute;
  opacity: 0;
  pointer-events: none;
}

.pf-switch-ui {
  position: relative;
  flex: none;
  width: 52px;
  height: 32px;
  background: var(--s2);
  border: 1px solid var(--line2);
  border-radius: 16px;
  transition: background var(--dur-fast) var(--ease-out);
}

.pf-switch-ui::after {
  content: "";
  position: absolute;
  top: 3px;
  left: 3px;
  width: 24px;
  height: 24px;
  background: var(--tx2);
  border-radius: 50%;
  transition: transform var(--dur-fast) var(--ease-out), background var(--dur-fast) var(--ease-out);
}

.pf-switch-input:checked + .pf-switch-ui {
  background: var(--acc);
  border-color: var(--acc);
}

.pf-switch-input:checked + .pf-switch-ui::after {
  background: var(--on-acc);
  transform: translateX(20px);
}

.pf-switch-input:focus-visible + .pf-switch-ui {
  outline: 2px solid var(--acc);
  outline-offset: 2px;
}

.pf-group .city-picker {
  display: grid;
  gap: 8px;
  padding: 0;
  background: none;
  border: 0;
}

.pf-group .city-selected {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.pf-group .city-chip {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  min-height: 36px;
  padding: 0 8px 0 14px;
  color: var(--tx);
  font-size: 14px;
  font-weight: 700;
  background: var(--s2);
  border: 1px solid var(--line);
  border-radius: 18px;
}

.pf-group .city-chip button {
  display: grid;
  place-items: center;
  width: 28px;
  height: 28px;
  padding: 0;
  color: var(--mut);
  background: transparent;
  border: 0;
  cursor: pointer;
}

.pf-group .city-placeholder,
.pf-group .city-empty {
  color: var(--mut);
  font-size: 14px;
}

.pf-group .city-search {
  min-height: 48px;
  padding: 0 16px;
  color: var(--tx);
  font: inherit;
  font-size: 16px;
  background: var(--s2);
  border: 1px solid var(--line);
  border-radius: 24px;
  box-shadow: none;
}

.pf-group .city-search:focus {
  border-color: var(--acc);
  box-shadow: none;
}

.pf-group .city-results {
  background: var(--s2);
  border: 1px solid var(--line2);
  border-radius: 18px;
  box-shadow: none;
}

.pf-group .city-result {
  color: var(--tx);
  background: transparent;
}

.pf-group .city-result:hover,
.pf-group .city-result:focus-visible {
  background: var(--acc-soft);
}

.pf-switch > span:first-child {
  color: var(--tx);
  font-size: 15px;
  line-height: 20px;
  font-weight: 600;
}

.pf-group .city-results:empty {
  display: none;
}

/* profil pas encore validé : on ne montre que la carte de statut */
#view-feed.is-onboarding :is(#feed-hero, .search-wrap, .feed-line, #show-all-shifts) {
  display: none;
}

.pf-group .city-empty,
.pf-group .city-result {
  display: block;
  width: 100%;
  min-height: 44px;
  padding: 12px 16px;
  font: inherit;
  font-size: 15px;
  text-align: left;
  border: 0;
}

.pf-group .city-results {
  display: grid;
  overflow: hidden;
}

.pf-group .city-results:empty {
  display: none;
}

/* ============ Splash et authentification ============ */
.splash {
  position: fixed;
  inset: 0;
  z-index: 200;
  display: grid;
  place-items: center;
  background: var(--bg);
  transition: opacity 360ms var(--ease-in-out);
}

.splash.is-done {
  opacity: 0;
  pointer-events: none;
}

.splash-in {
  display: grid;
  justify-items: center;
  gap: 22px;
}

.splash .au-logo {
  transition: transform 360ms var(--ease-in-out), opacity 360ms var(--ease-in-out);
}

.splash.is-done .au-logo,
.splash.is-done .sp-bar {
  opacity: 0;
  transform: scale(.88);
}

.splash .au-logo svg {
  overflow: visible;
  transform-origin: center;
  animation: sp-breathe 2.4s var(--ease-in-out) 800ms infinite;
}

.splash .au-logo svg path {
  stroke-dasharray: 1 2;
  stroke-dashoffset: 1.3;
  animation:
    sp-draw 400ms var(--ease-out) calc(var(--i) * 50ms + 60ms) forwards,
    sp-wave 1.6s var(--ease-in-out) calc(var(--i) * 110ms + 900ms) infinite;
}

.splash .au-logo svg path:nth-child(1) { --i: 0; }
.splash .au-logo svg path:nth-child(2) { --i: 1; }
.splash .au-logo svg path:nth-child(3) { --i: 2; }
.splash .au-logo svg path:nth-child(4) { --i: 3; }
.splash .au-logo svg path:nth-child(5) { --i: 4; }
.splash .au-logo svg path:nth-child(6) { --i: 5; }
.splash .au-logo svg path:nth-child(7) { --i: 6; }
.splash .au-logo svg path:nth-child(8) { --i: 7; }

.splash .au-logo span {
  animation: sp-word 520ms var(--ease-out) 380ms both;
}

.sp-bar {
  position: relative;
  width: 96px;
  height: 3px;
  overflow: hidden;
  border-radius: 2px;
  background: var(--line2);
  animation: sp-word 400ms var(--ease-out) 600ms both;
  transition: transform 360ms var(--ease-in-out), opacity 360ms var(--ease-in-out);
}

.sp-bar i {
  position: absolute;
  inset: 0;
  border-radius: 2px;
  background: var(--acc);
  transform: translateX(-100%) scaleX(.45);
  animation: sp-slide 1.3s var(--ease-in-out) infinite;
}

.sp-note {
  margin: 0;
  color: var(--mut);
  font-size: 13px;
  font-weight: 600;
  animation: sp-word 300ms var(--ease-out) both;
}

.sp-note[hidden] {
  display: none;
}

@keyframes sp-draw {
  from { stroke-dashoffset: 1.3; }
  to { stroke-dashoffset: 0; }
}

@keyframes sp-wave {
  0%, 100% { opacity: 1; }
  50% { opacity: .45; }
}

@keyframes sp-breathe {
  0%, 100% { transform: scale(1); }
  50% { transform: scale(1.04); }
}

@keyframes sp-word {
  from { opacity: 0; transform: translateY(6px); }
  to { opacity: 1; transform: none; }
}

@keyframes sp-slide {
  to { transform: translateX(260%) scaleX(.45); }
}

.au-logo {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  color: var(--tx);
  font-size: 34px;
  font-weight: 800;
  letter-spacing: -0.03em;
  line-height: 1;
}

.au-logo svg {
  width: 40px;
  height: 40px;
  color: var(--acc);
}

#screen-auth.is-active {
  padding: max(24px, env(safe-area-inset-top)) 20px calc(28px + var(--safe-bottom));
  color: var(--tx);
  background:
    radial-gradient(90% 60% at 85% 0%, var(--glow-a), transparent 62%) top / 100% 460px no-repeat local,
    radial-gradient(70% 55% at 0% 30%, var(--glow-b), transparent 70%) top / 100% 460px no-repeat local,
    linear-gradient(180deg, var(--glow-top) 0%, rgba(var(--bg-rgb), 0) 100%) top / 100% 460px no-repeat local,
    var(--bg);
}

.au-wrap {
  display: grid;
  gap: 24px;
  max-width: 440px;
  margin: 0 auto;
}

.au-brand {
  display: grid;
  justify-items: center;
  gap: 12px;
  padding: 28px 8px 4px;
  text-align: center;
}

.au-promise {
  max-width: 300px;
  margin: 0;
  color: var(--tx2);
  font-size: 16px;
  line-height: 24px;
  font-weight: 500;
}

.au-card {
  display: grid;
  gap: 16px;
  padding: 16px;
  background: var(--s1);
  border: 1px solid var(--line);
  border-radius: 24px;
}

.au-seg {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 4px;
  padding: 4px;
  background: var(--s2);
  border-radius: 24px;
}

.au-seg button {
  min-height: 44px;
  padding: 0 8px;
  color: var(--mut);
  font: 700 15px/1 var(--font-body);
  background: transparent;
  border: 0;
  border-radius: 20px;
  cursor: pointer;
}

.au-seg button.is-active {
  color: var(--on-acc);
  background: var(--acc);
}

.au-seg-role {
  background: transparent;
  border: 1px solid var(--line2);
}

.au-seg-role button.is-active {
  color: var(--tx);
  background: var(--s2);
  box-shadow: inset 0 0 0 1px var(--acc);
}

.au-form {
  display: grid;
  gap: 16px;
}

.au-step {
  display: grid;
  gap: 16px;
  min-width: 0;
}

.au-step.au-off {
  display: none;
}

.au-progress {
  display: grid;
  gap: 8px;
}

.au-bars {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 6px;
}

.au-bars i {
  height: 4px;
  background: var(--line2);
  border-radius: 2px;
}

.au-bars i.is-on {
  background: var(--acc);
}

.au-step-label {
  margin: 0;
  color: var(--mut);
  font-size: 13px;
  line-height: 18px;
  font-weight: 700;
}

.au-field {
  display: grid;
  gap: 6px;
  min-width: 0;
  margin: 0;
  padding: 0;
  border: 0;
}

.au-label {
  padding: 0;
  color: var(--tx2);
  font-size: 13px;
  line-height: 18px;
  font-weight: 700;
}

.au-input {
  width: 100%;
  min-width: 0;
  min-height: 52px;
  padding: 0 16px;
  color: var(--tx);
  font: 500 16px/1.2 var(--font-body);
  background: var(--bg);
  border: 1px solid var(--line2);
  border-radius: 16px;
  box-shadow: none;
}

select.au-input {
  appearance: none;
  padding-right: 40px;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23999' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M6 9l6 6 6-6'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 14px center;
  background-size: 18px;
}

.au-input::placeholder {
  color: var(--mut);
  opacity: .8;
}

.au-input:focus,
.au-card .city-search:focus {
  outline: none;
  border-color: var(--acc);
  box-shadow: 0 0 0 3px var(--acc-soft);
}

.au-help {
  color: var(--mut);
  font-size: 12px;
  line-height: 16px;
  font-weight: 500;
}

.au-err {
  color: var(--danger);
  font-size: 12px;
  line-height: 16px;
  font-weight: 600;
}

.has-error .au-input,
.has-error.au-upload {
  border-color: var(--danger);
}

.au-pw {
  position: relative;
  display: block;
}

.au-pw .au-input {
  padding-right: 52px;
}

.au-eye {
  position: absolute;
  top: 0;
  right: 0;
  display: grid;
  place-items: center;
  width: 52px;
  height: 52px;
  color: var(--mut);
  background: none;
  border: 0;
  cursor: pointer;
}

.au-alert {
  margin: 0;
  padding: 12px 14px;
  color: var(--danger);
  font-size: 14px;
  line-height: 20px;
  font-weight: 600;
  background: color-mix(in srgb, var(--danger) 12%, transparent);
  border-radius: 14px;
}

.au-alert.is-ok {
  color: var(--ok);
  background: color-mix(in srgb, var(--ok) 14%, transparent);
}

.au-alert[hidden] {
  display: none;
}

.au-note {
  margin: 0;
  color: var(--mut);
  font-size: 14px;
  line-height: 20px;
}

.au-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.au-chip {
  position: relative;
  display: block;
}

.au-chip input {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  margin: 0;
  opacity: 0;
  cursor: pointer;
}

.au-chip span {
  display: grid;
  place-items: center;
  min-height: 44px;
  padding: 0 18px;
  color: var(--tx2);
  font-size: 15px;
  font-weight: 700;
  background: var(--bg);
  border: 1px solid var(--line2);
  border-radius: 22px;
}

.au-chip input:checked + span {
  color: var(--on-acc);
  background: var(--acc);
  border-color: var(--acc);
}

.au-chip input:focus-visible + span {
  outline: 2px solid var(--acc);
  outline-offset: 2px;
}

.au-upload {
  position: relative;
  display: grid;
  gap: 10px;
  padding: 14px;
  background: var(--bg);
  border: 1px dashed var(--line2);
  border-radius: 16px;
  cursor: pointer;
}

.au-upload-title {
  color: var(--tx);
  font-size: 14px;
  line-height: 20px;
  font-weight: 700;
}

.au-upload-title em {
  color: var(--mut);
  font-size: 12px;
  font-style: normal;
  font-weight: 600;
}

.au-upload-control {
  display: flex;
  align-items: center;
  gap: 10px;
  min-width: 0;
}

.au-upload-btn {
  flex: none;
  display: grid;
  place-items: center;
  min-height: 36px;
  padding: 0 16px;
  color: var(--on-acc);
  font-size: 14px;
  font-weight: 800;
  background: var(--acc);
  border-radius: 18px;
}

.au-upload-name {
  min-width: 0;
  overflow: hidden;
  color: var(--mut);
  font-size: 13px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.au-upload-input {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  opacity: 0;
  cursor: pointer;
}

.au-upload:focus-within {
  outline: 2px solid var(--acc);
  outline-offset: 2px;
}

.au-cta {
  min-height: 56px;
  padding: 0 20px;
  color: var(--on-acc);
  font: 800 17px/1 var(--font-body);
  background: var(--acc);
  border: 0;
  border-radius: 28px;
  cursor: pointer;
}

.au-link {
  min-height: 44px;
  padding: 0 8px;
  color: var(--tx2);
  font: 700 14px/1.2 var(--font-body);
  background: none;
  border: 0;
  cursor: pointer;
}

.au-link[hidden] {
  display: none;
}

.au-links {
  display: grid;
  justify-items: center;
}

.au-legal {
  margin: 0;
  text-align: center;
  font-size: 12px;
}

.au-legal a {
  color: var(--mut);
}

.au-reset-copy h2 {
  margin: 0 0 4px;
  color: var(--tx);
  font-size: 22px;
  line-height: 28px;
  font-weight: 800;
}

.au-reset-copy p {
  margin: 0;
  color: var(--mut);
  font-size: 14px;
  line-height: 20px;
}

/* sélecteur de villes (inscription) */
.au-card .city-picker {
  display: grid;
  gap: 8px;
  padding: 0;
  background: none;
  border: 0;
}

.au-card .city-selected {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.au-card .city-chip {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  min-height: 36px;
  padding: 0 6px 0 14px;
  color: var(--tx);
  font-size: 14px;
  font-weight: 700;
  background: var(--s2);
  border: 1px solid var(--line);
  border-radius: 18px;
}

.au-card .city-chip button {
  display: grid;
  place-items: center;
  width: 28px;
  height: 28px;
  padding: 0;
  color: var(--mut);
  background: transparent;
  border: 0;
  cursor: pointer;
}

.au-card .city-placeholder,
.au-card .city-empty {
  color: var(--mut);
  font-size: 14px;
}

.au-card .city-search {
  width: 100%;
  min-height: 52px;
  padding: 0 16px;
  color: var(--tx);
  font: 500 16px/1.2 var(--font-body);
  background: var(--bg);
  border: 1px solid var(--line2);
  border-radius: 16px;
  box-shadow: none;
}

.au-card .city-results {
  display: grid;
  position: static;
  overflow: hidden;
  background: var(--s2);
  border: 1px solid var(--line2);
  border-radius: 16px;
  box-shadow: none;
}

.au-card .city-results:empty {
  display: none;
}

.au-card .city-empty,
.au-card .city-result {
  display: block;
  width: 100%;
  min-height: 44px;
  padding: 12px 16px;
  color: var(--tx);
  font: inherit;
  font-size: 15px;
  text-align: left;
  background: transparent;
  border: 0;
}

.au-card .city-result:hover,
.au-card .city-result:focus-visible {
  background: var(--acc-soft);
}

/* ============ Clinique : accueil ============ */
.cl-hero .hero-n {
  margin-top: 8px;
}

.cl-hero .hero-n .dg {
  min-width: 0;
}

.cl-hero .hero-k {
  margin-top: 4px;
  font-size: 14px;
  line-height: 20px;
  color: var(--tx2);
}

.cl-cta {
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  width: 100%;
  margin-top: 16px;
}

.clinic-dashboard {
  display: grid;
  gap: 16px;
  margin: 0 0 8px;
}

.cl-stats {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 8px;
}

.cl-stat {
  display: grid;
  gap: 2px;
  padding: 12px 8px;
  text-align: center;
  background: var(--s1);
  border: 1px solid var(--line);
  border-radius: 16px;
}

.cl-stat strong {
  color: var(--money);
  font-size: 24px;
  line-height: 28px;
  font-weight: 800;
  letter-spacing: -0.02em;
}

.cl-stat span {
  color: var(--mut);
  font-size: 12px;
  line-height: 16px;
  font-weight: 700;
}

.cl-stat.is-warn strong {
  color: var(--warn);
}

.cl-h {
  margin: 0;
  color: var(--tx);
  font-size: 17px;
  line-height: 24px;
  font-weight: 800;
  letter-spacing: -0.01em;
}

.cl-today {
  display: grid;
  gap: 8px;
}

.cl-none {
  margin: 0;
  padding: 12px 16px;
  color: var(--mut);
  font-size: 14px;
  line-height: 20px;
  font-weight: 600;
  background: var(--s2);
  border-radius: 16px;
}

.cl-today-row {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  align-items: center;
  gap: 12px;
  width: 100%;
  min-height: 52px;
  margin: 0 0 8px;
  padding: 10px 14px;
  color: var(--tx);
  font: inherit;
  text-align: left;
  background: var(--s1);
  border: 1px solid var(--line);
  border-radius: 16px;
  cursor: pointer;
}

.cl-today-row b {
  font-size: 15px;
  font-weight: 800;
  white-space: nowrap;
}

.cl-today-row > span:nth-child(2) {
  min-width: 0;
  color: var(--tx2);
  font-size: 14px;
  font-weight: 600;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.cl-today-row .pf-pill {
  max-width: 150px;
  overflow: hidden;
  text-overflow: ellipsis;
}

.cl-card.is-dim .shift-amount b {
  color: var(--mut);
  text-decoration: line-through;
}

.cl-card .shift-row > .pf-pill {
  max-width: 62%;
  overflow: hidden;
  text-overflow: ellipsis;
  display: inline-block;
  line-height: 24px;
}

.cl-pro {
  color: var(--mut);
}

.cl-pro.has-pro {
  color: var(--tx2);
  font-weight: 700;
}

.cl-ava {
  flex: none;
  width: 24px;
  height: 24px;
  display: inline-grid;
  place-items: center;
  color: var(--on-acc);
  font-size: 10px;
  font-style: normal;
  font-weight: 800;
  background: var(--acc);
  border-radius: 50%;
}

/* Section du fil clinique + suivi */
.section-line {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin: 8px 0 12px;
}

.section-line h3 {
  margin: 0;
  color: var(--tx);
  font-size: 17px;
  line-height: 24px;
  font-weight: 800;
  letter-spacing: -0.01em;
}

.section-line > span {
  min-width: 28px;
  padding: 2px 10px;
  color: var(--tx2);
  font-size: 13px;
  font-weight: 800;
  text-align: center;
  background: var(--s2);
  border-radius: 12px;
}

.cl-track {
  gap: 0;
  padding: 0;
  cursor: default;
}

.cl-track-main {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  min-width: 0;
  gap: 4px;
  width: 100%;
  padding: 16px 20px;
  color: inherit;
  font: inherit;
  text-align: left;
  background: none;
  border: 0;
  border-radius: var(--r-card);
  cursor: pointer;
}

.cl-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  padding: 0 20px 16px;
}

.cl-actions .pf-btn {
  flex: 1 1 140px;
  min-height: 44px;
  font-size: 15px;
}

/* ============ Admin : validations ============ */
.ad-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin: 8px 0 12px;
}

.ad-list {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 12px;
}

.ad-card {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  min-width: 0;
  gap: 12px;
  padding: 16px 20px;
  background: var(--s1);
  border: 1px solid var(--line);
  border-radius: var(--r-card);
}

.ad-top {
  display: flex;
  align-items: center;
  gap: 12px;
}

.ad-top .cl-ava {
  width: 40px;
  height: 40px;
  font-size: 14px;
}

.ad-id {
  min-width: 0;
  flex: 1;
  display: grid;
}

.ad-id strong {
  font-size: 17px;
  line-height: 22px;
  font-weight: 800;
  letter-spacing: -0.01em;
  overflow-wrap: anywhere;
}

.ad-id span {
  color: var(--mut);
  font-size: 13px;
  line-height: 18px;
  font-weight: 600;
}

.ad-contact {
  margin: 0;
  color: var(--tx2);
  font-size: 14px;
  line-height: 20px;
  overflow-wrap: anywhere;
}

.ad-docs {
  display: grid;
  gap: 8px;
}

.ad-doc {
  display: flex;
  align-items: center;
  gap: 10px;
  min-height: 44px;
  padding: 0 14px;
  color: var(--tx);
  font-size: 14px;
  font-weight: 700;
  text-decoration: none;
  background: var(--s2);
  border-radius: 14px;
}

.ad-doc span {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.ad-doc .i {
  color: var(--acc);
}

.ad-nodoc {
  color: var(--warn);
  font-size: 14px;
  font-weight: 700;
}

.ad-actions {
  display: flex;
  gap: 8px;
}

.ad-actions .pf-btn {
  flex: 1;
  min-height: 44px;
}

.ad-actions .pf-btn:disabled {
  opacity: 0.45;
  cursor: not-allowed;
}

.pf-pill.is-neutral {
  color: var(--tx2);
}

.is-hidden {
  display: none !important;
}

/* Nav clinique : « Publier » mis en avant */
.bottom-nav .nav-main .i {
  width: 24px;
  height: 24px;
}

.cl-hero .ecg {
  top: 52px;
  bottom: auto;
  opacity: 0.14;
}


/* ============ Mouvement v2 (design/MOTION.md) ============
 * Tout est animé en CSS / WAAPI (transform, opacity, clip-path, filter) : aucune dépendance à la View Transitions API.
 * Les déplacements calculés (onglets, indicateurs, fiches) vivent dans app.js, section « Mouvement ». */

/* Nav : pilule active qui glisse d'un onglet à l'autre */
.bottom-nav .nav-item {
  position: relative;
  z-index: 1;
}

.nav-pill {
  position: absolute;
  left: 0;
  top: 0;
  z-index: 0;
  width: 0;
  height: 0;
  border-radius: 28px;
  background: var(--acc);
  opacity: 0;
  pointer-events: none;
  will-change: transform;
}

.bottom-nav.has-pill .nav-pill {
  opacity: 1;
}

.bottom-nav.has-pill .nav-item.is-active {
  background: transparent;
}

/* Indicateurs glissants (segmented controls, chips) */
.seg,
.chips,
.au-seg,
.ag-seg {
  position: relative;
}

.slide-ind {
  position: absolute;
  left: 0;
  top: 0;
  z-index: 0;
  width: 0;
  height: 0;
  border-radius: 18px;
  background: var(--acc);
  opacity: 0;
  pointer-events: none;
  transform-origin: 0 0;
  will-change: transform;
}

.has-ind > .slide-ind {
  opacity: 1;
}

.seg-opt > span,
.chips .chip,
.au-seg button,
.ag-seg button {
  position: relative;
  z-index: 1;
}

.seg-opt input {
  z-index: 2;
}

.seg.has-ind .seg-opt input:checked + span,
.chips.has-ind .chip.is-active,
.au-seg.has-ind button.is-active,
.ag-seg.has-ind button.is-active {
  background: transparent;
}

.au-seg-role .slide-ind {
  background: var(--s2);
  box-shadow: inset 0 0 0 1px var(--acc);
}

.au-seg-role.has-ind button.is-active {
  box-shadow: none;
}

/* Couleurs : fondu (la position, elle, glisse) */
.nav-item,
.chip,
.pf-chip span,
.au-chip span,
.seg-opt > span,
.seg-opt b,
.au-seg button,
.ag-seg button,
.slot-pill {
  transition: background-color var(--d-base) var(--ease-in-out), color var(--d-base) var(--ease-in-out), border-color var(--d-base) var(--ease-in-out), box-shadow var(--d-base) var(--ease-in-out), transform var(--d-fast) var(--ease-out);
}

/* Interrupteur : pastille qui glisse avec un léger rebond */
.pf-switch-ui {
  transition: background var(--d-base) var(--ease-in-out), border-color var(--d-base) var(--ease-in-out);
}

.pf-switch-ui::after {
  transition: transform var(--d-base) var(--ease-spring), background var(--d-base) var(--ease-in-out);
}

/* Appuis : boutons .97, cartes .985 */
button:not(:disabled):active,
.pf-btn:active,
[role="button"]:active {
  transform: scale(.97);
}

:is(.shift-card, .cl-track-main, .cl-today-row, .hc, .pf-link, .notification-row):not(:disabled):active {
  transform: scale(.985);
}

button,
.pf-btn,
.hc,
.pf-link,
.notification-row,
.cl-today-row {
  transition-property: transform, background-color, color, border-color, box-shadow, opacity;
  transition-duration: var(--d-fast), var(--d-base), var(--d-base), var(--d-base), var(--d-base), var(--d-base);
  transition-timing-function: var(--ease-out);
}

/* Sortie des fiches (l'entrée est dans .sheet / .backdrop) */
.sheet.is-closing,
.notification-panel.is-closing {
  animation: sheet-sink var(--d-base) var(--ease-sheet) both;
  pointer-events: none;
}

.backdrop.is-closing {
  animation: backdrop-out var(--d-base) var(--ease-out) both;
  pointer-events: none;
}

@keyframes sheet-sink {
  to { transform: translateY(100%); }
}

@keyframes backdrop-out {
  from { opacity: 1; -webkit-backdrop-filter: blur(4px); backdrop-filter: blur(4px); }
  to { opacity: 0; -webkit-backdrop-filter: blur(0); backdrop-filter: blur(0); }
}

/* Authentification : barre de progression qui se remplit */
.au-bars i {
  position: relative;
  overflow: hidden;
}

.au-bars i.is-on {
  background: var(--line2);
}

.au-bars i::after {
  content: "";
  position: absolute;
  inset: 0;
  background: var(--acc);
  transform: scaleX(0);
  transform-origin: left center;
  transition: transform var(--d-slow) var(--ease-out);
}

.au-bars i.is-on::after {
  transform: scaleX(1);
}

/* Messages d'erreur : glissent en place */
.au-err,
.f-error {
  animation: err-in var(--d-base) var(--ease-out) both;
}

@keyframes err-in {
  from { opacity: 0; transform: translateY(-6px); }
  to { opacity: 1; transform: none; }
}

@keyframes fade-in {
  from { opacity: 0; }
  to { opacity: 1; }
}

@keyframes fade-out {
  to { opacity: 0; }
}

/* ============ Réduction des animations : on garde les fondus, plus de déplacements, rebonds, boucles ============ */
@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    scroll-behavior: auto !important;
  }

  button:not(:disabled):active,
  .pf-btn:active,
  [role="button"]:active,
  :is(.shift-card, .cl-track-main, .cl-today-row, .hc, .pf-link, .notification-row):not(:disabled):active {
    transform: none;
  }

  .sheet,
  .notification-panel {
    animation: fade-in 200ms ease-out backwards;
  }

  .sheet.is-closing,
  .notification-panel.is-closing {
    animation: fade-out 200ms ease-out both;
  }

  .backdrop {
    animation: fade-in 200ms ease-out both;
  }

  .backdrop.is-closing {
    animation: fade-out 200ms ease-out both;
  }

  .toast,
  .toast.is-visible {
    transform: translateX(-50%);
    transition: opacity 200ms linear;
  }

  .toast-check circle,
  .toast-check path {
    animation: none;
    stroke-dashoffset: 0;
  }

  .sk::after,
  .sp-bar {
    display: none;
  }

  .splash,
  .splash.is-done {
    transition: opacity 200ms linear;
  }

  .splash .au-logo,
  .splash.is-done .au-logo {
    transition: none;
    transform: none;
  }

  .splash .au-logo svg,
  .splash .au-logo svg path,
  .splash .au-logo span {
    animation: none;
    stroke-dashoffset: 0;
  }

  .splash .au-logo {
    animation: fade-in 200ms ease-out both;
  }

  .sp-note {
    animation: fade-in 200ms ease-out both;
  }

  .au-bars i::after {
    transition: none;
  }

  .au-err,
  .f-error {
    animation: fade-in 200ms ease-out both;
  }

  .pf-switch-ui::after {
    transition: background 200ms linear;
  }
}


/* --- erreurs de champ, attente d'une action --- */
.f-error {
  display: block;
  margin-top: 4px;
  font-size: 13px;
  line-height: 18px;
  font-weight: 600;
  color: var(--danger);
}

.f-input[aria-invalid="true"] {
  border-color: var(--danger);
}

.sh-cta-note.is-wait,
.cl-wait {
  color: var(--mut);
}

.cl-wait {
  display: block;
  flex-basis: 100%;
  font-size: 12px;
  line-height: 16px;
  font-weight: 600;
}

.sh-btn:disabled,
.pf-btn:disabled {
  opacity: .5;
  cursor: not-allowed;
}

.empty .pf-btn {
  margin-top: 12px;
}


/* ============ Corrections QA ============ */
.pf-reason {
  margin: -6px 0 14px;
  color: var(--mut);
  font-size: 13px;
  line-height: 18px;
  font-weight: 600;
}

.pf-reason[hidden] {
  display: none;
}

.pf-btn:disabled {
  opacity: 0.45;
  cursor: not-allowed;
}

.slot-warn {
  display: flex;
  align-items: flex-start;
  gap: 6px;
  margin: 6px 0 0;
  color: var(--warn);
  font-size: 13px;
  line-height: 18px;
  font-weight: 600;
}

.slot-warn .i {
  flex: none;
  margin-top: 1px;
}

.calendar-day:disabled {
  opacity: 0.35;
  cursor: not-allowed;
  pointer-events: none;
}

[data-calendar-prev]:disabled,
[data-calendar-next]:disabled {
  opacity: 0.35;
  pointer-events: none;
}

/* Squelettes : tuiles de suivi clinique, en-têtes de fiche (geste de fermeture) */
.sk-stat { width: 40%; height: 24px; margin-bottom: 6px; }

.sheet .handle,
.sheet .sh-bar,
.sheet .sh-top,
.notification-panel .handle,
.notification-panel .sh-bar {
  touch-action: none;
}

.dt-danger-note {
  margin: 8px 20px 0;
  font-size: 13px;
  line-height: 18px;
  color: var(--mut);
  text-align: center;
}
