/*
 * Kœurflor — Charte : fenêtres, tiroirs, menus, notifications, états vides et chargement
 * Auteur : Jacks Ngalangala
 */
/* --- Fenêtres, tiroirs, confirmations, notifications --- */
.fond-fenetre {
  position: fixed;
  inset: 0;
  background: rgba(11, 59, 48, 0.38);
  z-index: 40;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 16px;
}
.fenetre {
  background: var(--surface);
  border-radius: var(--r-lg);
  width: min(560px, 100%);
  max-height: calc(100vh - 32px);
  display: flex;
  flex-direction: column;
  box-shadow: 0 20px 60px rgba(11, 59, 48, 0.2);
}
.fenetre-large {
  width: min(860px, 100%);
}
.fenetre-tete {
  padding: 20px 24px 12px;
  display: flex;
  align-items: flex-start;
  gap: 12px;
}
.fenetre-tete h2 {
  flex: 1;
  font-size: 20px;
  line-height: 26px;
}
.fenetre-corps {
  padding: 4px 24px 16px;
  overflow-y: auto;
  display: flex;
  flex-direction: column;
  gap: 16px;
}
.fenetre-pied {
  padding: 14px 24px 20px;
  border-top: 1px solid var(--sable);
  display: flex;
  gap: 12px;
  justify-content: flex-end;
  flex-wrap: wrap;
}
.fond-tiroir {
  position: fixed;
  inset: 0;
  background: rgba(11, 59, 48, 0.3);
  z-index: 35;
  display: flex;
  justify-content: flex-end;
}
.tiroir {
  background: var(--creme);
  width: min(620px, 100%);
  height: 100%;
  display: flex;
  flex-direction: column;
  box-shadow: -10px 0 40px rgba(11, 59, 48, 0.15);
}
.tiroir-tete {
  background: var(--surface);
  padding: 16px 20px;
  border-bottom: 1px solid var(--sable);
  display: flex;
  align-items: center;
  gap: 10px;
}
.tiroir-tete h2 {
  flex: 1;
  font-size: 20px;
  line-height: 26px;
  min-width: 0;
  overflow-wrap: anywhere;
}
.tiroir-corps {
  padding: 20px;
  overflow-y: auto;
  display: flex;
  flex-direction: column;
  gap: 16px;
  flex: 1;
}
.tiroir-pied {
  background: var(--surface);
  padding: 14px 20px;
  border-top: 1px solid var(--sable);
  display: flex;
  gap: 12px;
  justify-content: flex-end;
  flex-wrap: wrap;
}
.zone-danger {
  border: 1px solid var(--danger-soft);
  background: var(--surface);
  border-radius: 16px;
  padding: 14px 16px;
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.zone-danger h3 {
  color: var(--danger);
  font-size: 15px;
}
.menu-flottant {
  position: relative;
}
.menu-liste {
  position: absolute;
  right: 0;
  top: calc(100% + 6px);
  background: var(--surface);
  border: 1px solid var(--sable);
  border-radius: 14px;
  box-shadow: 0 10px 30px rgba(11, 59, 48, 0.15);
  padding: 6px;
  min-width: 240px;
  z-index: 50;
  display: flex;
  flex-direction: column;
}
.menu-liste .btn {
  justify-content: flex-start;
  width: 100%;
  border-radius: 10px;
}
.toasts {
  position: fixed;
  bottom: 20px;
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  flex-direction: column;
  gap: 8px;
  z-index: 60;
  width: min(520px, calc(100% - 32px));
}
.toast {
  background: var(--brand-strong);
  color: var(--on-brand);
  padding: 12px 16px;
  border-radius: 14px;
  box-shadow: var(--ombre);
  font-size: 14px;
  display: flex;
  gap: 10px;
  align-items: center;
}
.toast-erreur {
  background: var(--danger);
}
.bandeau-reseau {
  background: var(--warning-soft);
  color: var(--warning);
  border-bottom: 1px solid var(--warning-trait);
  padding: 10px 16px;
  font-size: 14px;
  font-weight: 600;
  display: flex;
  gap: 10px;
  align-items: center;
  justify-content: center;
  text-align: center;
}
.dl {
  display: grid;
  grid-template-columns: minmax(140px, 38%) 1fr;
  gap: 8px 16px;
  font-size: 14px;
}
.dl dt {
  color: var(--ink-muted);
}
.dl dd {
  margin: 0;
  font-weight: 500;
  overflow-wrap: anywhere;
}
.historique {
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.historique li {
  list-style: none;
  border-left: 3px solid var(--brand-pale);
  padding: 2px 0 2px 12px;
  font-size: 14px;
}
.historique ul {
  padding: 0;
  margin: 0;
}
.vide {
  text-align: center;
  padding: 40px 20px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 12px;
  color: var(--ink-muted);
}
.vide-illustration {
  width: 72px;
  height: 72px;
  border-radius: 50%;
  background: var(--brand-soft);
  color: var(--brand);
  display: inline-flex;
  align-items: center;
  justify-content: center;
}
.vide h3 {
  color: var(--ink);
}
.chargement {
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 40px;
  color: var(--ink-muted);
  gap: 10px;
}
.roue {
  width: 22px;
  height: 22px;
  border: 3px solid var(--brand-pale);
  border-top-color: var(--brand);
  border-radius: 50%;
  animation: tourne 0.8s linear infinite;
}
@keyframes tourne {
  to {
    transform: rotate(360deg);
  }
}
