/* Look local — Océan Moderne */
:root {
  --ocean: #0EA5E9;
  --cyan: #7DD3FC;
  --ice: #F0F9FF;
  --coral: #FB7185;
  --navy: #072033;
  --copper: #FB7185;
  --bg: #E8F4FC;
  --bg-elevated: #ffffff;
  --bg-card: #ffffff;
  --bg-card-hover: #e0f2fe;
  --bg-surface: #f7fbff;
  --bg-muted: #e8f4fc;
  --border: rgba(14, 165, 233, 0.22);
  --border-strong: rgba(2, 132, 199, 0.38);
  --text: #072033;
  --text-muted: #3d6a85;
  --primary: #0284C7;
  --primary-hover: #0369A1;
  --primary-light: rgba(14, 165, 233, 0.14);
  --primary-glow: rgba(14, 165, 233, 0.22);
  --accent: #FB7185;
  --gold: #67E8F9;
  --gold-light: rgba(103, 232, 249, 0.22);
  --success: #0d9488;
  --success-light: rgba(13, 148, 136, 0.16);
  --danger: #E11D48;
  --danger-light: rgba(225, 29, 72, 0.12);
  --warning: #d97706;
  --warning-light: rgba(217, 119, 6, 0.14);
  --radius: 18px;
  --radius-sm: 12px;
  --radius-btn: 999px;
  --shadow: 0 12px 32px rgba(14, 165, 233, 0.12);
  --shadow-soft: 0 2px 10px rgba(15, 23, 42, 0.05);
  --shadow-card: 0 10px 34px rgba(14, 165, 233, 0.1);
  --font-body: "Source Sans 3", system-ui, -apple-system, sans-serif;
  --font-display: "Outfit", system-ui, -apple-system, sans-serif;
  --font-brand: "Fraunces", "Georgia", serif;
  --ease: cubic-bezier(0.22, 1, 0.36, 1);
  --header-h: 4rem;
  --app-max: min(1120px, 100%);
  --page-pad: clamp(0.7rem, 2.8vw, 1.25rem);
}

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

[hidden] {
  display: none !important;
}

html {
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
  overflow-x: clip;
}

body {
  font-family: var(--font-body);
  background:
    radial-gradient(1200px 520px at 8% -10%, rgba(125, 211, 252, 0.45), transparent 55%),
    radial-gradient(900px 480px at 100% 8%, rgba(14, 165, 233, 0.18), transparent 50%),
    linear-gradient(180deg, #dbeafe 0%, #e8f4fc 42%, #f7fbff 100%);
  color: var(--text);
  line-height: 1.6;
  min-height: 100vh;
  min-height: 100dvh;
  font-size: 1rem;
  overflow-x: clip;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

body::before,
body::after {
  display: none;
}

::selection {
  background: rgba(14, 165, 233, 0.22);
  color: #ffffff;
}

.app {
  position: relative;
  z-index: 1;
  max-width: var(--app-max);
  width: 100%;
  margin: 0 auto;
  padding: 0 max(var(--page-pad), env(safe-area-inset-right)) max(2.5rem, env(safe-area-inset-bottom)) max(var(--page-pad), env(safe-area-inset-left));
}

.topbar {
  position: sticky;
  top: 0;
  z-index: 100;
  margin: 0 calc(-1 * max(var(--page-pad), env(safe-area-inset-left))) 1rem;
  background: #ffffff;
  backdrop-filter: none;
  -webkit-backdrop-filter: none;
  border-bottom: 1px solid var(--border);
}

.topbar-card {
  background: transparent;
  backdrop-filter: none;
  border: none;
  border-radius: 0;
  box-shadow: none;
  padding: 0.35rem 0 0;
}

.header {
  display: contents;
}

.header-brand-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  padding: 0.35rem max(var(--page-pad), env(safe-area-inset-right)) 0.15rem max(var(--page-pad), env(safe-area-inset-left));
}

.header-inner {
  position: relative;
  top: auto;
  z-index: 120;
  max-width: none;
  width: 100%;
  margin: 0;
  display: block;
  padding: 0 max(var(--page-pad), env(safe-area-inset-right)) 0 max(var(--page-pad), env(safe-area-inset-left));
  background: transparent;
  border-bottom: 0;
}

.brand {
  display: flex;
  align-items: center;
  justify-content: flex-start;
  gap: 0.8rem;
  text-decoration: none;
  flex-shrink: 1;
  min-width: 0;
  padding: 0.15rem 0;
  text-align: left;
}

.brand-orb,
.brand-orb-modal,
.brand-sprout,
.brand-sprout-modal,
.brand-wave,
.brand-wave-modal,
.brand-mark {
  display: none;
}

.brand-name {
  display: block;
  font-family: var(--font-brand);
  font-size: clamp(1.35rem, 3vw, 1.85rem);
  font-style: italic;
  font-weight: 500;
  color: var(--navy);
  letter-spacing: -0.02em;
  line-height: 1.1;
  text-transform: none;
  text-shadow: none;
  margin-right: 0;
}

.brand-name-modal {
  display: block;
  margin-bottom: 0.35rem;
  color: var(--navy);
  text-shadow: none;
  font-size: 1.7rem;
  letter-spacing: -0.02em;
  text-transform: none;
  font-style: italic;
  font-weight: 500;
}

.brand-tagline {
  display: none;
}

.site-hero {
  display: none;
}

.bbc-logo {
  display: none;
}

.modal-brand-mark {
  display: none;
}

.brand-text {
  min-width: 0;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
}

.brand h1 {
  font-family: var(--font-display);
  font-size: 1.15rem;
  font-weight: 800;
  line-height: 1.15;
  letter-spacing: -0.03em;
  color: var(--text);
}

.brand p {
  font-size: 0.8rem;
  color: var(--text-muted);
  margin-top: 0.1rem;
}

.header-actions {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  flex-wrap: wrap;
  justify-content: flex-end;
}

.admin-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  font-size: 0.82rem;
  font-weight: 500;
  padding: 0.35rem 0;
  background: transparent;
  border: 0;
  color: var(--text-muted);
  border-radius: 0;
  white-space: nowrap;
  letter-spacing: 0;
  text-transform: none;
}

.admin-badge.admin-active {
  color: var(--copper);
  background: transparent;
  border-color: transparent;
}

.admin-badge.admin-active .badge-crown {
  font-size: 0.92rem;
  line-height: 1;
}

.admin-badge.member-active {
  color: var(--primary);
  background: var(--primary-light);
  border-color: #c9ddff;
}

.app-blurred {
  filter: blur(6px);
  pointer-events: none;
  user-select: none;
}

.member-item.member-current {
  border-color: rgba(181, 106, 58, 0.4);
  background: var(--success-light);
}

.member-item.member-online {
  border-color: rgba(34, 197, 94, 0.35);
}

.member-avatar-online {
  position: relative;
}

.member-avatar-online::after {
  content: "";
  position: absolute;
  right: -2px;
  bottom: -2px;
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: #22c55e;
  border: 2px solid #fff;
}

.tag-you {
  display: inline-block;
  font-size: 0.6rem;
  font-weight: 600;
  padding: 0.1rem 0.35rem;
  background: rgba(181, 106, 58, 0.15);
  color: var(--success);
  border-radius: 100px;
  margin-left: 0.35rem;
  vertical-align: middle;
}

.btn-header {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  background: var(--primary);
  border: 0;
  color: #f4fbfe;
  padding: 0.45rem 0.95rem;
  border-radius: var(--radius-btn);
  font-family: var(--font-body);
  font-size: 0.86rem;
  font-weight: 600;
  letter-spacing: 0;
  text-transform: none;
  cursor: pointer;
  transition: color 0.15s, background 0.15s;
  box-shadow: none;
}

.btn-header:hover {
  border-color: transparent;
  color: #f4fbfe;
  background: var(--copper);
}

.btn-header-out {
  color: var(--primary);
  border-color: transparent;
  background: var(--primary-light);
  box-shadow: none;
}

.btn-header-out:hover {
  color: #f4fbfe;
  border-color: transparent;
  background: var(--copper);
}

.btn-header-icon {
  flex-shrink: 0;
}

.admin-lock-msg,
.info-msg {
  font-size: 0.9rem;
  color: var(--text-muted);
  padding: 0.85rem 1rem;
  background: var(--primary-light);
  border: 1px solid #b6c5f5;
  border-radius: var(--radius-sm);
  margin-bottom: 0.85rem;
}

.admin-section.locked {
  opacity: 0.55;
  pointer-events: none;
  user-select: none;
}

.save-msg {
  font-size: 0.78rem;
  font-weight: 600;
  padding: 0.45rem 0.7rem;
  border-radius: 8px;
  margin-bottom: 0.6rem;
}

.save-msg-success {
  color: var(--success);
  background: var(--success-light);
  border: 1px solid rgba(181, 106, 58, 0.2);
}

.save-msg-error {
  color: var(--danger);
  background: var(--danger-light);
  border: 1px solid rgba(217, 48, 37, 0.2);
}

.tournee-head-actions {
  display: flex;
  align-items: flex-end;
  gap: 0.65rem;
  flex-wrap: wrap;
}

.tournee-year-label {
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
  font-size: 0.72rem;
  color: var(--text-muted);
  font-weight: 600;
}

.tournee-year-select,
.tournee-month-select,
.tournee-partner-select {
  min-width: 10rem;
  padding: 0.35rem 0.5rem;
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: 6px;
  color: var(--text);
  font-family: inherit;
  font-size: 0.78rem;
}

.tournee-member-select-required,
.tournee-partner-select.tournee-member-select-required {
  border-color: rgba(255, 118, 117, 0.55);
}

.tournee-month-cell {
  font-weight: 600;
  white-space: nowrap;
}

.tournee-name-cell {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 0.35rem;
}

.tag-bouffe-ok {
  display: inline-block;
  margin-left: 0.35rem;
  padding: 0.12rem 0.45rem;
  border-radius: 999px;
  font-size: 0.65rem;
  font-weight: 800;
  letter-spacing: 0.04em;
  vertical-align: middle;
  color: #1e3a2f;
  background: var(--success-light);
  border: 1px solid #8fd4ad;
}

.btn-bouffe-ok {
  font-family: var(--font-display);
  font-size: 0.72rem;
  font-weight: 700;
  padding: 0.25rem 0.6rem;
  border-radius: 999px;
  border: 1px solid var(--border-strong);
  background: var(--bg-muted);
  color: var(--text-muted);
  cursor: pointer;
  transition: background 0.15s, color 0.15s, border-color 0.15s;
}

.btn-bouffe-ok:hover {
  border-color: var(--success);
  color: var(--success);
  background: var(--success-light);
}

.btn-bouffe-ok.is-done {
  border-color: #8fd4ad;
  color: #1e3a2f;
  background: var(--success-light);
}

.btn-bouffe-ok.is-done:hover {
  border-color: var(--danger);
  color: var(--danger);
  background: var(--danger-light);
}

.row-bouffe-ok td:first-child {
  font-weight: 600;
}

.tournee-hint {
  display: block;
  margin-top: 0.2rem;
  font-size: 0.65rem;
  color: var(--danger);
  font-weight: 600;
}

.tournee-hint-ok {
  color: var(--success);
}

.tournee-na {
  color: var(--text-muted);
  font-size: 0.78rem;
}

.tournee-member-months {
  font-weight: 500;
}

.tournee-ristourne-edit {
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
  min-width: 11rem;
}

.tournee-ristourne-hint {
  font-size: 0.62rem;
  color: var(--text-muted);
  font-weight: 500;
}

.tournee-reception-edit {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 0.25rem;
  min-width: 10.5rem;
}

.tournee-reception-date {
  width: 100%;
  min-width: 10.5rem;
  padding: 0.28rem 0.4rem;
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: 6px;
  color: var(--text);
  font-family: inherit;
  font-size: 0.78rem;
}

.tournee-reception-date:focus {
  outline: 2px solid var(--primary);
  outline-offset: 1px;
}

.tournee-reception-hint,
.tournee-member-reception {
  font-size: 0.68rem;
  font-weight: 600;
  color: var(--text-muted);
}

.tournee-member-reception {
  font-size: 0.82rem;
  color: var(--text);
}

.tournee-month-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 0.25rem;
  max-width: 15rem;
}

.tournee-month-chip {
  min-width: 2.1rem;
  padding: 0.18rem 0.35rem;
  font-size: 0.64rem;
  font-weight: 600;
  border-radius: 6px;
  border: 1px solid var(--border);
  background: var(--bg);
  color: var(--text-muted);
  cursor: pointer;
  touch-action: manipulation;
  user-select: none;
  transition: background 0.15s, color 0.15s, border-color 0.15s;
}

.tournee-month-chip:hover {
  border-color: var(--primary);
  color: var(--primary);
}

.tournee-month-chip.is-active {
  background: var(--primary);
  color: var(--bg-elevated);
  border-color: var(--primary);
}

.tournee-month-chip:focus-visible {
  outline: 2px solid var(--primary);
  outline-offset: 1px;
}

.tournee-partners-stack,
.tournee-partner-row {
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
}

.tournee-partner-row {
  flex-direction: row;
  align-items: center;
  gap: 0.4rem;
}

.tournee-partner-label {
  min-width: 2rem;
  font-size: 0.68rem;
  font-weight: 700;
  color: var(--text-muted);
}

.tournee-sort-btn {
  display: inline-flex;
  align-items: center;
  gap: 0.25rem;
  padding: 0;
  border: 0;
  background: none;
  color: inherit;
  font: inherit;
  font-weight: 700;
  cursor: pointer;
  text-align: left;
}

.tournee-sort-btn:hover,
.tournee-sort-btn.is-active {
  color: var(--primary);
}

.tournee-sort-indicator {
  display: inline-block;
  min-width: 0.75rem;
  font-size: 0.62rem;
  line-height: 1;
  color: var(--primary);
}

.tournee-unified-table {
  width: 100%;
  min-width: 100%;
}

.tournee-planning-table .tournee-num-cell {
  width: 2.5rem;
  text-align: center;
  font-weight: 800;
  color: var(--text-muted);
}

.tournee-order-readout,
.tournee-order-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 0.35rem;
  align-items: center;
}

.tournee-person,
.tournee-order-chip {
  display: inline-flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 0.3rem;
  padding: 0.18rem 0.5rem;
  border-radius: 999px;
  background: var(--bg-muted);
  border: 1px solid var(--border);
  font-size: 0.78rem;
  font-weight: 600;
}

.tournee-person.is-you,
.tournee-person.is-ok {
  border-color: #8fd4ad;
  background: var(--success-light);
}

.tournee-order-empty {
  color: var(--text-muted);
  font-weight: 500;
}

.tournee-order-edit {
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
  min-width: 12rem;
}

.tournee-order-add {
  min-width: 10rem;
  padding: 0.3rem 0.45rem;
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: 6px;
  color: var(--text);
  font-family: inherit;
  font-size: 0.75rem;
}

.tournee-order-remove {
  margin-left: 0.1rem;
  width: 1.15rem;
  height: 1.15rem;
  padding: 0;
  border: 0;
  border-radius: 999px;
  background: transparent;
  color: var(--text-muted);
  font-size: 0.95rem;
  line-height: 1;
  cursor: pointer;
}

.tournee-order-remove:hover {
  background: var(--danger-light);
  color: var(--danger);
}

.tournee-cotisations-block {
  margin-top: 1.25rem;
}

.tournee-cotisations-block h3 {
  margin: 0 0 0.25rem;
  font-size: 1rem;
}

.tournee-amounts-table {
  width: 100%;
  min-width: 100%;
}

.tournee-unified-table tfoot td:last-child {
  color: var(--primary);
  font-weight: 700;
}

.amount-readonly {
  font-weight: 600;
  color: var(--text);
}

.tabs {
  display: flex;
  flex-wrap: nowrap;
  align-items: center;
  justify-content: flex-start;
  gap: 0.05rem;
  margin: 0;
  padding: 0;
  background: transparent;
  border: none;
  border-radius: 0;
  box-shadow: none;
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: none;
  position: relative;
  top: auto;
  z-index: 1;
  min-width: 0;
}

.tabs::-webkit-scrollbar {
  display: none;
}

.tab {
  display: inline-flex;
  align-items: center;
  gap: 0.42rem;
  flex: 0 0 auto;
  min-width: 0;
  padding: 0.65rem 0.8rem 0.7rem;
  border: none;
  border-bottom: 2px solid transparent;
  margin-bottom: 0;
  background: transparent;
  color: var(--text-muted);
  font-family: var(--font-body);
  font-weight: 500;
  font-size: 0.92rem;
  letter-spacing: 0;
  text-transform: none;
  border-radius: 0;
  cursor: pointer;
  transition: color 0.15s, border-color 0.15s;
  position: relative;
  white-space: nowrap;
}

.tab-icon {
  width: 1.12rem;
  height: 1.12rem;
  flex-shrink: 0;
  display: block;
}

/* Badge notifications sur onglets — désactivé
.tab-badge { display: none !important; }
*/

.tab {
  color: var(--text-muted);
}

.tab:hover {
  color: var(--primary);
  background: transparent;
}

.tab.active {
  color: var(--primary);
  background: var(--primary-light);
  border-bottom-color: var(--primary);
  border-radius: 12px 12px 0 0;
  font-weight: 600;
  box-shadow: none;
}

.tab.active::after {
  display: none;
}

.tab-content {
  display: none;
  flex-direction: column;
  gap: 0.9rem;
}

.tab-content.active {
  display: flex;
  animation: tabEnter 0.28s var(--ease) both;
}

@keyframes tabEnter {
  from {
    opacity: 0;
    transform: translateY(6px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.main {
  display: flex;
  flex-direction: column;
}

.panel {
  position: relative;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1.25rem 1.35rem;
  box-shadow: var(--shadow-card);
  overflow: hidden;
  backdrop-filter: blur(18px) saturate(1.2);
  -webkit-backdrop-filter: blur(18px) saturate(1.2);
}

.panel::before {
  display: none;
}

.panel h2 {
  font-family: var(--font-display);
  font-size: 1.35rem;
  font-weight: 600;
  font-style: italic;
  letter-spacing: -0.02em;
  text-transform: none;
  color: var(--navy);
  text-shadow: none;
  margin-bottom: 0.15rem;
}

.panel-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 0.55rem;
  gap: 0.65rem;
}

.counter {
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--text-muted);
}

.add-form {
  display: flex;
  gap: 0.75rem;
}

.add-form input {
  flex: 1;
  padding: 0.85rem 1.05rem;
  background: var(--bg-muted);
  border: 1px solid transparent;
  border-radius: var(--radius-sm);
  color: var(--text);
  font-family: inherit;
  font-size: 1rem;
  outline: none;
  transition: border-color 0.2s, background 0.2s, box-shadow 0.2s;
}

.add-form input:focus {
  background: var(--bg-elevated);
  border-color: var(--primary);
  box-shadow: 0 0 0 4px var(--primary-light);
  outline: none;
}

.add-form input:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}

.btn-primary {
  background: var(--primary);
  color: #f4fbfe;
  border: none;
  padding: 0.72rem 1.25rem;
  border-radius: var(--radius-btn);
  font-family: var(--font-body);
  font-weight: 600;
  font-size: 0.92rem;
  cursor: pointer;
  transition: background 0.15s, transform 0.1s, box-shadow 0.15s;
  white-space: nowrap;
  box-shadow: none;
  letter-spacing: 0;
  text-transform: none;
}

.btn-primary:hover:not(:disabled) {
  background: var(--copper);
  box-shadow: none;
}

.btn-primary:active:not(:disabled) {
  transform: scale(0.98);
}

.btn-primary:disabled {
  opacity: 0.45;
  cursor: not-allowed;
  background: #9aa8ba;
  color: #ffffff;
  box-shadow: none;
}

.btn-primary:focus-visible,
.btn-secondary:focus-visible,
.btn-header:focus-visible,
.tab:focus-visible {
  outline: 2px solid var(--primary);
  outline-offset: 2px;
}

.limit-msg {
  margin-top: 0.75rem;
  font-size: 0.85rem;
  color: var(--danger);
}

.panel-desc {
  font-size: 0.95rem;
  color: var(--text-muted);
  margin-bottom: 0.85rem;
  line-height: 1.55;
}

.role-form {
  display: grid;
  grid-template-columns: 1fr 1fr auto;
  gap: 0.75rem;
  align-items: end;
}

.role-form label {
  display: flex;
  flex-direction: column;
  gap: 0.4rem;
  font-size: 0.85rem;
  font-weight: 500;
  color: var(--text-muted);
}

.role-form select {
  padding: 0.75rem 1rem;
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: 10px;
  color: var(--text);
  font-family: inherit;
  font-size: 0.95rem;
  outline: none;
}

.role-form select:focus {
  border-color: var(--primary);
}

.bureau-panel {
  width: 100%;
  padding: 0.85rem 1rem 0.9rem;
  margin-bottom: 0;
  background: var(--bg-card);
  box-shadow: var(--shadow-card);
  backdrop-filter: blur(18px) saturate(1.2);
  -webkit-backdrop-filter: blur(18px) saturate(1.2);
}

.bureau-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.5rem;
  margin-bottom: 0.4rem;
}

.bureau-panel h2 {
  margin: 0;
  font-family: var(--font-display);
  font-size: 1.05rem;
  font-weight: 500;
  font-style: italic;
  letter-spacing: -0.01em;
  text-transform: none;
  color: var(--text-muted);
}

.online-panel {
  width: 100%;
  padding: 0.85rem 1rem 0.95rem;
  background: var(--bg-card);
  box-shadow: var(--shadow-card);
  backdrop-filter: blur(18px) saturate(1.2);
  -webkit-backdrop-filter: blur(18px) saturate(1.2);
}

.online-panel h2 {
  margin: 0;
  font-family: var(--font-display);
  font-size: 1.05rem;
  font-weight: 500;
  font-style: italic;
  letter-spacing: -0.01em;
  color: var(--text-muted);
}

.online-count {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 1.5rem;
  height: 1.5rem;
  padding: 0 0.45rem;
  border-radius: 100px;
  background: var(--success-light);
  color: var(--success);
  font-size: 0.78rem;
  font-weight: 700;
  line-height: 1;
}

.online-list {
  list-style: none;
  display: flex;
  flex-wrap: wrap;
  gap: 0.45rem;
  margin: 0;
  padding: 0;
}

.online-empty {
  width: 100%;
  color: var(--text-muted);
  font-size: 0.85rem;
  padding: 0.35rem 0;
}

.online-item {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  padding: 0.35rem 0.65rem 0.35rem 0.45rem;
  background: rgba(13, 148, 136, 0.08);
  border: 1px solid rgba(13, 148, 136, 0.22);
  border-radius: 100px;
  min-width: 0;
}

.online-item-you {
  background: var(--success-light);
  border-color: rgba(13, 148, 136, 0.4);
}

.online-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: #22c55e;
  box-shadow: 0 0 0 0 rgba(34, 197, 94, 0.55);
  animation: onlinePulse 1.8s ease-out infinite;
  flex-shrink: 0;
}

@keyframes onlinePulse {
  0% {
    box-shadow: 0 0 0 0 rgba(34, 197, 94, 0.55);
  }
  70% {
    box-shadow: 0 0 0 7px rgba(34, 197, 94, 0);
  }
  100% {
    box-shadow: 0 0 0 0 rgba(34, 197, 94, 0);
  }
}

.online-avatar {
  width: 22px;
  height: 22px;
  border-radius: 50%;
  background: var(--success-light);
  color: var(--success);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 0.58rem;
  font-weight: 700;
  flex-shrink: 0;
}

.online-name {
  font-size: 0.82rem;
  font-weight: 600;
  color: var(--text);
  white-space: nowrap;
}

.online-item .tag-you {
  margin-left: 0;
}

.bureau-edit-toggle {
  padding: 0.2rem 0.5rem;
  border: 1px solid var(--border);
  border-radius: var(--radius-btn);
  background: transparent;
  font-family: inherit;
  font-size: 0.68rem;
  font-weight: 600;
  color: var(--text-muted);
  cursor: pointer;
  white-space: nowrap;
}

.bureau-edit-toggle:hover {
  background: var(--bg-elevated);
  border-color: var(--border-strong);
  color: var(--text);
}

.bureau-assign {
  margin-bottom: 0.45rem;
}

.bureau-assign-form {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.4rem;
  width: 100%;
}

.bureau-assign-form select {
  min-width: 0;
  flex: 1 1 8rem;
  padding: 0.35rem 0.5rem;
  background: var(--bg-elevated);
  border: 1px solid var(--border-strong);
  border-radius: 6px;
  color: var(--text);
  font-family: inherit;
  font-size: 0.78rem;
  outline: none;
}

.bureau-assign-form select:focus {
  border-color: var(--primary);
  box-shadow: 0 0 0 2px var(--primary-light);
}

.btn-compact {
  flex-shrink: 0;
  padding: 0.35rem 0.7rem;
  font-size: 0.74rem;
  font-weight: 700;
  border-radius: 6px;
  min-height: auto;
  white-space: nowrap;
}

/* Une seule ligne compacte pour toute l'équipe */
.bureau-grid {
  list-style: none;
  display: flex;
  flex-wrap: nowrap;
  align-items: center;
  gap: 0.3rem;
  width: 100%;
  margin: 0;
  padding: 0;
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
}

.bureau-card {
  position: relative;
  display: inline-flex;
  flex-direction: row;
  align-items: center;
  gap: 0.25rem;
  flex: 0 0 auto;
  min-width: 0;
  max-width: none;
  padding: 0.2rem 0.4rem 0.2rem 0.45rem;
  border: 1px solid var(--border);
  border-radius: 999px;
  background: var(--bg-elevated);
  transition: border-color 0.15s var(--ease), background 0.15s var(--ease);
  white-space: nowrap;
}

.bureau-card:hover {
  border-color: var(--border-strong);
  background: var(--bg);
}

.bureau-card.is-vacant {
  opacity: 0.55;
  background: var(--bg);
}

.bureau-card-body {
  flex: 0 1 auto;
  min-width: 0;
  display: inline-flex;
  flex-direction: row;
  align-items: center;
  gap: 0.3rem;
  line-height: 1.2;
}

.bureau-card-name {
  font-size: 0.68rem;
  font-weight: 600;
  color: var(--text);
  line-height: 1.2;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  max-width: 5.5rem;
}

.bureau-card.is-vacant .bureau-card-name {
  font-style: italic;
  color: var(--text-muted);
  font-weight: 500;
}

.bureau-card-role {
  font-size: 0.58rem;
  font-weight: 600;
  color: var(--text-muted);
  line-height: 1.2;
  display: inline;
  white-space: nowrap;
  text-transform: uppercase;
  letter-spacing: 0.02em;
  opacity: 0.9;
}

.bureau-card-role::after {
  content: "·";
  margin-left: 0.3rem;
  opacity: 0.5;
}

/* Role first then name: reverse visual order via flex */
.bureau-card-body {
  flex-direction: row;
}

.bureau-empty {
  font-size: 0.72rem;
  color: var(--text-muted);
  font-style: italic;
  padding: 0.25rem 0;
  text-align: left;
  white-space: nowrap;
}

.btn-bureau-clear {
  flex-shrink: 0;
  width: 1.1rem;
  height: 1.1rem;
  padding: 0;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 0.85rem;
  line-height: 1;
  border-radius: 50%;
  background: transparent;
  color: var(--text-muted);
  border: 1px solid transparent;
  cursor: pointer;
  transition: color 0.12s, background 0.12s, border-color 0.12s;
}

.btn-bureau-clear:hover {
  background: var(--danger-light);
  color: var(--danger);
  border-color: rgba(217, 48, 37, 0.2);
}

.btn-clear {
  background: var(--primary-light);
  color: var(--primary);
  border: 1px solid rgba(181, 106, 58, 0.2);
  padding: 0.35rem 0.75rem;
  border-radius: var(--radius-btn);
  font-family: inherit;
  font-size: 0.78rem;
  font-weight: 600;
  cursor: pointer;
  transition: background 0.15s;
  white-space: nowrap;
}

.btn-clear:hover {
  background: rgba(181, 106, 58, 0.15);
}

.role-badge {
  display: inline-block;
  font-size: 0.62rem;
  font-weight: 600;
  padding: 0.1rem 0.35rem;
  background: rgba(181, 106, 58, 0.15);
  color: var(--primary);
  border-radius: 100px;
  margin-right: 0.25rem;
}

.tag-admin {
  display: inline-block;
  font-size: 0.6rem;
  font-weight: 600;
  padding: 0.1rem 0.35rem;
  background: rgba(181, 106, 58, 0.15);
  color: var(--success);
  border-radius: 100px;
  margin-left: 0.35rem;
  vertical-align: middle;
}

.list-panel h2 {
  margin-bottom: 0.45rem;
  font-size: 0.95rem;
}

.member-list {
  list-style: none;
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 0.35rem;
}

.member-list > .empty {
  grid-column: 1 / -1;
}

.member-item {
  display: flex;
  flex-direction: column;
  align-items: stretch;
  gap: 0.35rem;
  padding: 0.65rem 0.7rem;
  background: #ffffff;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  transition: border-color 0.15s, box-shadow 0.15s, background 0.15s;
  min-width: 0;
}

.member-item:hover {
  background: var(--bg-card-hover);
  border-color: var(--border-strong);
}

.member-info {
  display: flex;
  align-items: center;
  gap: 0.4rem;
  min-width: 0;
}

.member-avatar {
  width: 30px;
  height: 30px;
  border-radius: 10px;
  background: var(--primary-light);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.65rem;
  font-weight: 700;
  flex-shrink: 0;
  color: var(--primary);
  box-shadow: none;
}

.member-text {
  min-width: 0;
  flex: 1;
}

.member-name {
  font-weight: 600;
  font-size: 0.72rem;
  line-height: 1.35;
  white-space: normal;
  overflow: visible;
}

.member-name .member-num {
  margin-right: 0.15rem;
  opacity: 0.75;
}

.member-cotisation {
  font-weight: 700;
  color: var(--primary);
}

.member-item .tag-admin,
.member-item .tag-you,
.member-item .tag-online,
.member-item .role-badge {
  font-size: 0.52rem;
  padding: 0.05rem 0.25rem;
  margin-left: 0.15rem;
}

.tag-online {
  display: inline-block;
  font-size: 0.6rem;
  font-weight: 600;
  padding: 0.1rem 0.35rem;
  background: rgba(34, 197, 94, 0.16);
  color: #15803d;
  border-radius: 100px;
  margin-left: 0.35rem;
  vertical-align: middle;
}

.member-date {
  font-size: 0.58rem;
  color: var(--text-muted);
  line-height: 1.2;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.member-right {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.25rem;
  flex-shrink: 0;
  flex-wrap: wrap;
}

.member-num {
  font-size: 0.62rem;
  color: var(--text-muted);
  font-weight: 600;
}

.member-actions {
  display: flex;
  align-items: center;
  gap: 0.2rem;
  margin-left: auto;
}

.member-item .btn-clear,
.member-item .btn-reset-pwd,
.member-item .btn-delete {
  padding: 0.15rem 0.35rem;
  font-size: 0.58rem;
  border-radius: 4px;
  line-height: 1.2;
}

.member-item .admin-only-note {
  font-size: 0.55rem;
}

.btn-delete {
  background: var(--danger-light);
  color: var(--danger);
  border: 1px solid rgba(217, 48, 37, 0.2);
  padding: 0.35rem 0.75rem;
  border-radius: var(--radius-btn);
  font-family: inherit;
  font-size: 0.78rem;
  font-weight: 600;
  cursor: pointer;
  transition: background 0.15s;
}

.btn-delete:hover {
  background: rgba(217, 48, 37, 0.12);
}

@media (max-width: 1100px) {
  .member-list {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
}

@media (max-width: 780px) {
  .member-list {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 420px) {
  .member-list {
    grid-template-columns: 1fr;
  }
}

.empty {
  text-align: center;
  color: var(--text-muted);
  padding: 1.5rem 1rem;
  font-size: 0.9rem;
  border: 1px dashed var(--border-strong);
  border-radius: var(--radius-sm);
  background: var(--bg-muted);
}

.table-wrap {
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  overscroll-behavior-x: contain;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  max-width: 100%;
  background: var(--bg-elevated);
}

.cotisation-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.8rem;
}

.cotisation-table th,
.cotisation-table td {
  padding: 0.45rem 0.6rem;
  text-align: left;
  border-bottom: 1px solid var(--border);
  vertical-align: middle;
}

.cotisation-table th {
  position: sticky;
  top: 0;
  z-index: 2;
  background: var(--bg-muted);
  font-family: var(--font-display);
  font-size: 0.72rem;
  font-weight: 700;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.04em;
  box-shadow: 0 1px 0 var(--border);
}

.cotisation-table tbody tr:nth-child(even) {
  background: var(--bg-muted);
}

.cotisation-table tbody tr:hover {
  background: var(--primary-light);
}

.cotisation-table tbody tr.row-current {
  background: var(--success-light);
}

.cotisation-table tbody tr.row-current:hover {
  background: var(--success-light);
}

.cotisation-table tfoot td {
  background: var(--bg-muted);
  font-weight: 700;
  border-bottom: none;
}

.cotisation-table tfoot td:last-child {
  color: var(--primary);
}

.table-num {
  display: inline-block;
  font-size: 0.65rem;
  color: var(--text-muted);
  margin-right: 0.3rem;
  font-weight: 600;
}

.amount-input-wrap {
  display: flex;
  align-items: center;
  gap: 0.25rem;
  max-width: 110px;
}

.amount-input {
  width: 100%;
  padding: 0.45rem 0.6rem;
  background: var(--bg-elevated);
  border: 1px solid var(--border-strong);
  border-radius: var(--radius-sm);
  color: var(--text);
  font-family: inherit;
  font-size: 0.85rem;
  font-weight: 600;
  outline: none;
}

.amount-input:focus {
  border-color: var(--primary);
  box-shadow: 0 0 0 3px var(--primary-light);
}

.amount-suffix {
  font-size: 0.85rem;
  color: var(--text-muted);
  font-weight: 600;
}

.empty-cell {
  text-align: center;
  color: var(--text-muted);
  padding: 0.75rem 0.5rem !important;
  font-size: 0.78rem;
}

.modal-overlay {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(240, 249, 255, 0.42);
  backdrop-filter: blur(10px) saturate(1.1);
  -webkit-backdrop-filter: blur(10px) saturate(1.1);
  z-index: 200;
  align-items: center;
  justify-content: center;
  padding: 1rem;
}

.modal-overlay.open {
  display: flex;
  animation: overlayIn 0.25s var(--ease);
}

#confirmModal {
  z-index: 240;
}

#confirmModalDesc {
  white-space: pre-line;
}

.confirm-modal-actions {
  padding: 0.35rem 1.5rem 1.6rem;
}

.confirm-modal-actions .modal-actions {
  justify-content: center;
}

@keyframes overlayIn {
  from { opacity: 0; }
  to { opacity: 1; }
}

.modal {
  background: rgba(255, 255, 255, 0.92);
  border: 1px solid rgba(255, 255, 255, 0.95);
  border-radius: var(--radius);
  width: 100%;
  max-width: 420px;
  box-shadow: 0 18px 50px rgba(11, 18, 32, 0.16), 0 0 0 1px rgba(3, 105, 161, 0.12);
  animation: modalIn 0.32s var(--ease);
  overflow: hidden;
  backdrop-filter: blur(24px) saturate(1.15);
  -webkit-backdrop-filter: blur(24px) saturate(1.15);
}

@keyframes modalIn {
  from {
    opacity: 0;
    transform: translateY(12px) scale(0.97);
  }
  to {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}

.modal-hero {
  text-align: center;
  padding: 2rem 1.5rem 0.75rem;
}

.modal-bbc-logo {
  display: block;
  margin: 0 auto 1rem;
}

.modal-hero h3 {
  font-family: var(--font-display);
  font-size: 1.35rem;
  font-weight: 600;
  font-style: italic;
  letter-spacing: -0.02em;
  text-transform: none;
  margin-bottom: 0.35rem;
  color: var(--navy);
}

.modal-hero .modal-desc {
  margin: 0;
}

.modal-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 1.25rem 1.5rem;
  border-bottom: 1px solid var(--border);
}

.modal-header h3 {
  font-family: var(--font-display);
  font-size: 1.1rem;
}

.modal-close {
  background: none;
  border: none;
  color: var(--text-muted);
  font-size: 1.5rem;
  cursor: pointer;
  line-height: 1;
}

.modal form {
  padding: 1rem 1.5rem 1.5rem;
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.modal-desc {
  font-size: 0.88rem;
  color: var(--text-muted);
  line-height: 1.45;
}

.modal form label {
  display: flex;
  flex-direction: column;
  gap: 0.4rem;
  font-size: 0.85rem;
  font-weight: 500;
  color: var(--text-muted);
}

.modal form input {
  padding: 0.75rem 0.95rem;
  background: var(--bg-muted);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  color: var(--text);
  font-family: inherit;
  font-size: 16px;
  transition: border-color 0.2s var(--ease), box-shadow 0.2s var(--ease);
}

.modal form input:focus {
  border-color: var(--primary);
  box-shadow: 0 0 0 3px var(--primary-light);
  outline: none;
}

.modal-error {
  font-size: 0.85rem;
  color: var(--danger);
}

.modal-actions {
  display: flex;
  justify-content: flex-end;
  gap: 0.75rem;
}

.btn-secondary {
  background: var(--bg-elevated);
  color: var(--primary);
  border: 1px solid var(--primary);
  padding: 0.6rem 1.2rem;
  border-radius: var(--radius-btn);
  font-family: var(--font-body);
  font-weight: 600;
  font-size: 0.9rem;
  letter-spacing: 0;
  text-transform: none;
  cursor: pointer;
  transition: background 0.15s, color 0.15s;
}

.btn-secondary:hover {
  background: var(--primary-light);
}

.btn-secondary:active {
  transform: scale(0.98);
}

.tour-panel .panel-head {
  margin-bottom: 0.5rem;
}

.tour-panel .panel-desc {
  margin-bottom: 0;
}

.permissions-table th,
.permissions-table td {
  text-align: center;
  vertical-align: middle;
  padding: 0.35rem 0.3rem;
  font-size: 0.72rem;
  white-space: nowrap;
  overflow-wrap: normal;
  word-break: normal;
}

.permissions-table .permissions-tab-col {
  text-align: left;
  font-weight: 600;
  white-space: normal;
  min-width: 8.5rem;
}

.permissions-table input[type="checkbox"] {
  width: 1rem;
  height: 1rem;
  cursor: pointer;
  accent-color: var(--primary);
}

.permissions-table input[type="checkbox"]:disabled {
  cursor: not-allowed;
  opacity: 0.5;
}

#tabPermissionsPanel .btn-primary {
  margin-top: 0.55rem;
}

.fond-caisse-form {
  max-width: 420px;
}

.fond-caisse-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  align-items: center;
}

.caisse-fonds-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 1rem;
  margin-bottom: 1rem;
}

.caisse-fonds-grid > .panel {
  margin-bottom: 0;
}

.fond-caisse-annuel-list {
  display: flex;
  flex-direction: column;
  gap: 0.45rem;
  margin-top: 0.75rem;
}

.fond-caisse-annuel-row {
  align-items: flex-start;
}

.fond-caisse-annuel-row.is-paid {
  opacity: 0.78;
}

.fond-caisse-annuel-main {
  min-width: 0;
  flex: 1 1 auto;
}

.fond-caisse-annuel-history {
  display: flex;
  flex-wrap: wrap;
  gap: 0.35rem;
  margin: 0.35rem 0 0;
}

.fond-caisse-annuel-chip {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  padding: 0.15rem 0.45rem 0.15rem 0.55rem;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.65);
  border: 1px solid var(--border);
  font-size: 0.72rem;
  color: var(--text-muted);
}

.fond-caisse-annuel-undo {
  border: 0;
  background: transparent;
  color: var(--danger);
  font: inherit;
  font-size: 0.7rem;
  font-weight: 700;
  cursor: pointer;
  padding: 0;
}

.fond-caisse-annuel-undo:hover {
  text-decoration: underline;
}

.fond-caisse-annuel-row .btn-secondary.fond-caisse-annuel-undo {
  padding: 0.28rem 0.55rem;
  font-size: 0.72rem;
  background: var(--bg-elevated);
  border: 1px solid var(--border);
  border-radius: 10px;
  color: var(--danger);
}

.fond-caisse-annuel-done {
  margin-left: auto;
  font-size: 0.75rem;
  font-weight: 700;
  color: var(--success);
  background: var(--success-light);
  border-radius: 999px;
  padding: 0.2rem 0.6rem;
}

@media (max-width: 900px) {
  .caisse-fonds-grid {
    grid-template-columns: 1fr;
  }
}

.pret-summary {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(120px, 1fr));
  gap: 0.45rem;
  margin-bottom: 0.35rem;
}

.pret-summary-card {
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 0.6rem 0.75rem;
  display: flex;
  flex-direction: column;
  gap: 0.15rem;
  transition: border-color 0.2s var(--ease), transform 0.15s var(--ease);
}

.pret-summary-card:hover {
  border-color: var(--border-strong);
}

.pret-summary-main {
  border-color: rgba(181, 106, 58, 0.35);
  background: rgba(181, 106, 58, 0.08);
}

.pret-summary-locked {
  border-color: rgba(253, 203, 110, 0.45);
  background: rgba(253, 203, 110, 0.08);
}

.pret-summary-total {
  border-color: rgba(47, 158, 107, 0.28);
  background: rgba(47, 158, 107, 0.08);
}

.pret-summary-label {
  font-size: 0.75rem;
  color: var(--text-muted);
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.03em;
}

.pret-summary-amount {
  font-size: 1rem;
  font-weight: 700;
  color: var(--primary);
}

.pret-summary-out {
  border-color: rgba(225, 29, 72, 0.35);
  background: var(--danger-light);
}

.pret-summary-out .pret-summary-amount,
.pret-summary-out strong,
.pret-summary-out .pret-active-detail-amount {
  color: var(--danger);
}

.pret-summary-card strong {
  font-size: 0.9rem;
}

.pret-summary-formula {
  font-size: 0.72rem;
  color: var(--text-muted);
}

.pret-active-details {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem 1rem;
  margin-top: 0.15rem;
}

.pret-active-detail-item {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  font-size: 0.72rem;
  color: var(--text-muted);
}

.pret-active-detail-name {
  font-weight: 600;
  color: var(--text);
}

.pret-active-detail-amount {
  font-weight: 600;
  color: var(--primary);
}

.pret-notif-list {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.pret-notif-item {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 0.75rem;
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 0.55rem 0.75rem;
  border-left: 3px solid transparent;
  transition: border-color 0.2s var(--ease), background 0.2s var(--ease);
}

.pret-notif-body {
  min-width: 0;
  flex: 1;
}

.pret-notif-delete {
  flex-shrink: 0;
  padding: 0.28rem 0.55rem;
  font-size: 0.72rem;
}

.pret-notif-unread {
  border-color: rgba(181, 106, 58, 0.35);
  border-left-color: var(--primary);
  background: rgba(181, 106, 58, 0.08);
}

.pret-notif-item p {
  margin: 0 0 0.25rem;
  font-size: 0.9rem;
}

.pret-notif-date {
  font-size: 0.75rem;
  color: var(--text-muted);
}

.pret-notif-empty,
.pret-empty {
  color: var(--text-muted);
  font-size: 0.75rem;
  padding: 0.25rem 0;
}

.pret-form {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.75rem;
}

.pret-form label {
  display: flex;
  flex-direction: column;
  gap: 0.4rem;
  font-size: 0.85rem;
  font-weight: 500;
  color: var(--text-muted);
}

.pret-form input {
  padding: 0.65rem 0.85rem;
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: 10px;
  color: var(--text);
  font-family: inherit;
  font-size: 0.95rem;
}

.pret-form button {
  grid-column: 1 / -1;
  justify-self: start;
}

.pret-loan-list {
  display: flex;
  flex-direction: column;
  gap: 0.45rem;
}

.pret-loan-card {
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 0.75rem 0.9rem;
  transition: border-color 0.2s var(--ease), box-shadow 0.2s var(--ease);
}

.pret-loan-card:hover {
  border-color: var(--border-strong);
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.15);
}

.pret-loan-head {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 0.75rem;
  margin-bottom: 0.35rem;
}

.pret-loan-head h3 {
  margin: 0;
  font-size: 0.85rem;
}

.pret-loan-status {
  font-size: 0.72rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.03em;
  color: var(--primary);
  white-space: nowrap;
}

.pret-loan-note,
.pret-loan-date,
.pret-deadline,
.pret-due-dates,
.pret-financier-msg,
.pret-my-vote,
.pret-balance {
  font-size: 0.72rem;
  color: var(--text-muted);
  margin: 0.15rem 0;
}

.pret-vote-stats {
  display: flex;
  flex-wrap: wrap;
  gap: 0.35rem;
  margin: 0.4rem 0;
}

.pret-stat {
  font-size: 0.78rem;
  font-weight: 600;
  padding: 0.25rem 0.55rem;
  border-radius: 999px;
  background: var(--bg-card);
  border: 1px solid var(--border);
}

.pret-stat-yes { color: var(--success); border-color: rgba(181, 106, 58, 0.3); }
.pret-stat-no { color: var(--danger); border-color: rgba(217, 48, 37, 0.3); }
.pret-stat-pending { color: #fdcb6e; border-color: rgba(253, 203, 110, 0.3); }

.pret-vote-actions,
.pret-financier-actions,
.pret-repay-form {
  display: flex;
  flex-wrap: wrap;
  gap: 0.35rem;
  margin-top: 0.4rem;
}

.btn-pret-yes,
.btn-pret-no {
  padding: 0.45rem 0.85rem;
  border-radius: 8px;
  font-family: inherit;
  font-size: 0.82rem;
  font-weight: 600;
  cursor: pointer;
  border: 1px solid transparent;
}

.btn-pret-yes {
  background: rgba(181, 106, 58, 0.12);
  color: var(--success);
  border-color: rgba(181, 106, 58, 0.25);
}

.btn-pret-no {
  background: rgba(217, 48, 37, 0.12);
  color: var(--danger);
  border-color: rgba(217, 48, 37, 0.25);
}

.btn-pret-delete {
  padding: 0.45rem 0.85rem;
  border-radius: 8px;
  font-family: inherit;
  font-size: 0.82rem;
  font-weight: 600;
  cursor: pointer;
  background: rgba(217, 48, 37, 0.12);
  color: var(--danger);
  border: 1px solid rgba(217, 48, 37, 0.25);
}

.btn-pret-delete:hover {
  background: rgba(217, 48, 37, 0.22);
}

.pret-financier-controls {
  margin-top: 0.75rem;
  padding-top: 0.75rem;
  border-top: 1px solid var(--border);
}

.pret-repay-input {
  padding: 0.55rem 0.75rem;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 8px;
  font-family: inherit;
  min-width: 140px;
}

.pret-repay-history {
  margin-top: 0.7rem;
  padding-top: 0.65rem;
  border-top: 1px solid var(--border);
}

.pret-repay-history-title {
  margin: 0 0 0.4rem;
  font-size: 0.82rem;
  font-weight: 600;
  color: var(--text-muted);
}

.pret-repay-list {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
  margin: 0;
  padding: 0;
}

.pret-repay-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.6rem;
  padding: 0.4rem 0.55rem;
  background: var(--bg-muted);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  font-size: 0.86rem;
}

.btn-pret-repay-undo {
  flex-shrink: 0;
  padding: 0.28rem 0.7rem;
  font-size: 0.78rem;
}

.pret-progress-wrap {
  margin: 0.65rem 0;
}

.pret-progress-bar {
  height: 10px;
  background: var(--bg-muted);
  border-radius: 999px;
  overflow: hidden;
  margin-bottom: 0.35rem;
  border: 1px solid var(--border);
}

.pret-progress-bar span {
  display: block;
  height: 100%;
  background: linear-gradient(90deg, var(--primary), var(--accent));
  border-radius: 999px;
  box-shadow: 0 0 12px var(--primary-glow);
  transition: width 0.4s var(--ease);
}

.evenement-form {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.75rem;
}

.evenement-form label {
  display: flex;
  flex-direction: column;
  gap: 0.4rem;
  font-size: 0.85rem;
  font-weight: 500;
  color: var(--text-muted);
}

.evenement-form-wide {
  grid-column: 1 / -1;
}

.evenement-form input,
.evenement-form select {
  padding: 0.65rem 0.85rem;
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: 10px;
  color: var(--text);
  font-family: inherit;
  font-size: 0.95rem;
}

.evenement-form button {
  grid-column: 1 / -1;
  justify-self: start;
}

.evenement-member-summary-wrap {
  margin-bottom: 0.55rem;
}

.evenement-member-summary {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.4rem;
}

.evenement-member-summary .financier-pay-inline {
  grid-column: 1 / -1;
}

.evenement-summary-stat {
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 0.55rem 0.7rem;
  display: flex;
  flex-direction: column;
  gap: 0.12rem;
  transition: border-color 0.2s var(--ease);
}

.evenement-summary-stat:hover {
  border-color: var(--border-strong);
}

.evenement-summary-stat span {
  font-size: 0.65rem;
  font-weight: 600;
  text-transform: uppercase;
  color: var(--text-muted);
  letter-spacing: 0.03em;
}

.evenement-summary-stat strong {
  font-size: 0.95rem;
}

.evenement-summary-paid strong {
  color: var(--success);
}

.evenement-summary-remaining strong {
  color: #d4a017;
}

.evenement-member-summary-exempt {
  grid-template-columns: 1fr 1fr;
}

.evenement-summary-note {
  grid-column: 1 / -1;
  margin: 0;
  font-size: 0.72rem;
  color: var(--primary);
  text-align: center;
}

.evenement-list-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 0.65rem;
  margin-bottom: 0.55rem;
}

.evenement-list-head h2 {
  margin-bottom: 0;
}

.evenement-list-head .panel-desc {
  margin-bottom: 0;
}

.evenement-reset-closed-btn {
  flex-shrink: 0;
  white-space: nowrap;
  font-size: 0.72rem;
  color: var(--danger);
  border-color: rgba(217, 48, 37, 0.35);
}

.evenement-reset-closed-btn:hover {
  border-color: var(--danger);
  background: rgba(217, 48, 37, 0.1);
}

.evenement-list {
  display: flex;
  flex-direction: column;
  gap: 0.45rem;
}

.evenement-card {
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 0.8rem 0.95rem;
  transition: border-color 0.2s var(--ease), box-shadow 0.2s var(--ease);
}

.evenement-card:hover {
  border-color: var(--border-strong);
  box-shadow: 0 4px 18px rgba(0, 0, 0, 0.18);
}

.evenement-head {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 0.65rem;
  margin-bottom: 0.45rem;
}

.evenement-head h3 {
  margin: 0.2rem 0 0;
  font-size: 0.88rem;
}

.evenement-type-badge {
  display: inline-block;
  font-size: 0.7rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  padding: 0.2rem 0.5rem;
  border-radius: 999px;
  background: rgba(181, 106, 58, 0.12);
  color: var(--primary);
}

.type-accouchement { background: rgba(255, 118, 117, 0.15); color: var(--danger); }
.type-visite_parent { background: rgba(116, 185, 255, 0.15); color: var(--primary); }
.type-autre { background: rgba(253, 203, 110, 0.15); color: #e1a000; }

.evenement-poto {
  font-size: 0.78rem;
  color: var(--text);
  margin: 0.2rem 0 0;
}

.evenement-poto strong {
  color: var(--primary);
}

.evenement-desc,
.evenement-meta {
  font-size: 0.72rem;
  color: var(--text-muted);
  margin: 0.15rem 0 0;
}

.evenement-totals {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(90px, 1fr));
  gap: 0.35rem;
  margin-bottom: 0.45rem;
}

.evenement-totals div {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 6px;
  padding: 0.35rem 0.5rem;
  display: flex;
  flex-direction: column;
  gap: 0.05rem;
}

.evenement-totals span {
  font-size: 0.72rem;
  color: var(--text-muted);
  font-weight: 600;
  text-transform: uppercase;
}

.evenement-totals strong {
  font-size: 0.82rem;
}

.evenement-totals-poto {
  grid-column: 1 / -1;
  border-color: rgba(116, 185, 255, 0.35) !important;
  background: rgba(116, 185, 255, 0.1) !important;
}

.evenement-totals-poto > strong {
  font-size: 1rem;
  color: var(--primary);
}

.evenement-poto-receivable-name {
  font-size: 0.68rem;
  color: var(--text-muted);
  font-weight: 600;
}

.evenement-poto-bonus {
  display: block;
  font-size: 0.62rem;
  font-weight: 600;
  color: var(--success);
  margin-top: 0.1rem;
}

.evenement-poto-receivable {
  margin: 0.35rem 0 0;
  padding: 0.4rem 0.55rem;
  background: rgba(116, 185, 255, 0.1);
  border: 1px solid rgba(116, 185, 255, 0.25);
  border-radius: 8px;
  font-size: 0.72rem;
  color: var(--text-muted);
}

.evenement-poto-receivable-done {
  background: rgba(181, 106, 58, 0.1);
  border-color: rgba(181, 106, 58, 0.25);
}

.evenement-poto-receivable-amount {
  color: var(--primary);
  font-weight: 700;
}

.evenement-poto-receivable-done .evenement-poto-receivable-amount {
  color: var(--success);
}

.evenement-card-member .evenement-head {
  margin-bottom: 0;
}

.evenement-my-contribution {
  margin-top: 0.45rem;
  padding: 0.45rem 0.6rem;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 6px;
}

.evenement-contribution-label {
  margin: 0 0 0.4rem;
  font-size: 0.72rem;
  font-weight: 600;
  text-transform: uppercase;
  color: var(--text-muted);
  letter-spacing: 0.04em;
}

.evenement-contribution-amount {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
}

.evenement-contribution-amount strong {
  font-size: 0.95rem;
}

.evenement-my-status {
  font-size: 0.9rem;
  margin: 0;
  padding: 0.65rem 0.85rem;
  border-radius: 10px;
}

.evenement-my-paid {
  background: rgba(181, 106, 58, 0.1);
  border: 1px solid rgba(181, 106, 58, 0.25);
  color: var(--success);
}

.evenement-my-unpaid {
  background: rgba(253, 203, 110, 0.1);
  border: 1px solid rgba(253, 203, 110, 0.3);
  color: #d4a017;
}

.evenement-status {
  font-size: 0.65rem;
  font-weight: 700;
  padding: 0.12rem 0.4rem;
  border-radius: 999px;
}

.evenement-paid {
  background: rgba(181, 106, 58, 0.12);
  color: var(--success);
}

.evenement-unpaid {
  background: rgba(253, 203, 110, 0.15);
  color: #d4a017;
}

.evenement-exempt {
  background: rgba(116, 185, 255, 0.15);
  color: #0984e3;
}

.evenement-debt {
  background: rgba(217, 48, 37, 0.15);
  color: var(--danger);
}

.evenement-debt-hint,
.evenement-debt-note {
  font-size: 0.68rem;
  color: var(--text-muted);
  margin: 0.25rem 0 0;
}

/* === Dettes & amendes — affichage light === */

.amende-panel {
  display: flex;
  flex-direction: column;
  gap: 1.1rem;
}

.amende-head h2 {
  margin-bottom: 0.2rem;
}

.amende-head .panel-desc {
  max-width: 34rem;
}

.dette-dashboard {
  margin: 0;
}

.dette-status {
  display: flex;
  align-items: center;
  gap: 1rem;
  flex-wrap: wrap;
  padding: 1.15rem 1.25rem;
  border-radius: 20px;
  background: linear-gradient(180deg, #ffffff 0%, #f0f9ff 100%);
  border: 1px solid var(--border);
  box-shadow: var(--shadow-soft);
  animation: detteRowIn 0.45s var(--ease) both;
}

.dette-status--clear {
  background: linear-gradient(180deg, #ecfdf5 0%, #ffffff 100%);
  border-color: rgba(13, 148, 136, 0.28);
}

.dette-status--due {
  background: linear-gradient(180deg, #fff7ed 0%, #ffffff 100%);
  border-color: rgba(234, 88, 12, 0.28);
}

.dette-status-mark {
  flex-shrink: 0;
  width: 2.4rem;
  height: 2.4rem;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  background: var(--success-light);
  color: var(--success);
  font-size: 1.05rem;
  font-weight: 800;
}

.dette-status-copy {
  min-width: 0;
  flex: 1 1 10rem;
}

.dette-status-kicker {
  margin: 0;
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--text-muted);
}

.dette-status-title,
.dette-status-amount {
  display: block;
  margin: 0.12rem 0 0.1rem;
  font-family: var(--font-display);
  font-size: clamp(1.45rem, 3.5vw, 1.9rem);
  font-weight: 700;
  letter-spacing: -0.03em;
  line-height: 1.1;
  color: var(--text);
}

.dette-status--due .dette-status-kicker {
  color: #c2410c;
}

.dette-status--due .dette-status-amount {
  color: #ea580c;
}

.dette-status-meta {
  margin: 0;
  font-size: 0.88rem;
  color: var(--text-muted);
}

.dette-pills {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
  margin-left: auto;
}

.dette-pill {
  display: inline-flex;
  align-items: center;
  padding: 0.32rem 0.7rem;
  border-radius: 999px;
  font-size: 0.75rem;
  font-weight: 600;
  background: rgba(255, 255, 255, 0.65);
  border: 1px solid rgba(184, 194, 208, 0.45);
  color: var(--text);
}

.dette-pill.type-dette,
.dette-pill.type-absence {
  color: var(--danger);
  background: var(--danger-light);
  border-color: rgba(225, 29, 72, 0.22);
}
.dette-pill.type-retard {
  color: #c2410c;
  background: var(--warning-light);
  border-color: rgba(217, 119, 6, 0.22);
}
.dette-pill.type-bavardage {
  color: #0369a1;
  background: var(--primary-light);
  border-color: rgba(2, 132, 199, 0.22);
}
.dette-pill.type-sanctions {
  color: #6d28d9;
  background: rgba(109, 40, 217, 0.12);
  border-color: rgba(109, 40, 217, 0.22);
}

.dette-feed {
  display: flex;
  flex-direction: column;
  gap: 1.25rem;
}

.dette-group-head {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 0.75rem;
  margin-bottom: 0.7rem;
}

.dette-group-head h3 {
  margin: 0;
  font-family: var(--font-display);
  font-size: 0.95rem;
  font-weight: 700;
  color: var(--text);
}

.dette-block-desc {
  margin: 0.15rem 0 0;
  font-size: 0.8rem;
  color: var(--text-muted);
  line-height: 1.4;
}

.dette-group-total {
  display: flex;
  align-items: baseline;
  gap: 0.45rem;
  color: var(--text);
  font-variant-numeric: tabular-nums;
}

.dette-group-total strong {
  font-size: 1rem;
  font-weight: 700;
  color: #ea580c;
}

.dette-group-total-count {
  min-width: 1.35rem;
  height: 1.35rem;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 999px;
  background: var(--bg-muted);
  color: var(--text-muted);
  font-size: 0.7rem;
  font-weight: 700;
}

.dette-card-list {
  display: flex;
  flex-direction: column;
  gap: 0.55rem;
}

.dette-card {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto auto;
  align-items: center;
  gap: 0.65rem 0.85rem;
  padding: 0.85rem 1rem;
  border-radius: 16px;
  background: rgba(255, 255, 255, 0.52);
  border: 1px solid rgba(184, 194, 208, 0.4);
  box-shadow: 0 1px 0 rgba(255, 255, 255, 0.5) inset;
  animation: detteRowIn 0.4s var(--ease) both;
  animation-delay: calc(var(--i, 0) * 50ms);
  transition: transform 0.18s var(--ease), border-color 0.18s var(--ease), background 0.18s var(--ease);
}

.dette-card:hover {
  transform: translateY(-1px);
  background: rgba(255, 255, 255, 0.72);
  border-color: var(--border-strong);
}

.dette-card-main {
  min-width: 0;
}

.dette-card-title {
  margin: 0;
  font-size: 0.95rem;
  font-weight: 600;
  color: var(--text);
  line-height: 1.3;
  overflow: hidden;
  text-overflow: ellipsis;
}

.dette-card-meta {
  margin: 0.15rem 0 0;
  font-size: 0.78rem;
  color: var(--text-muted);
}

.dette-card-amount {
  font-family: var(--font-display);
  font-size: 1.05rem;
  font-weight: 700;
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
  color: var(--text);
}

.dette-card.type-dette .dette-card-amount { color: #ea580c; }
.dette-card.type-absence .dette-card-amount { color: var(--danger); }
.dette-card.type-retard .dette-card-amount { color: #c2410c; }
.dette-card.type-bavardage .dette-card-amount { color: var(--primary); }
.dette-card.type-sanctions .dette-card-amount { color: #6d28d9; }

.dette-card-end {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 0.4rem;
  flex-shrink: 0;
  margin-left: auto;
}

.dette-card-end .btn-primary,
.dette-card-end .btn-amende-edit {
  min-height: 36px;
  padding: 0.35rem 0.85rem;
  font-size: 0.78rem;
  white-space: nowrap;
}

.dette-table-wrap {
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  overscroll-behavior-x: contain;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  background: var(--bg-elevated);
  box-shadow: var(--shadow-soft);
}

.dette-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.82rem;
}

.dette-table th,
.dette-table td {
  padding: 0.65rem 0.8rem;
  text-align: left;
  border-bottom: 1px solid var(--border);
  vertical-align: middle;
}

.dette-table th {
  position: sticky;
  top: 0;
  z-index: 2;
  background: var(--bg-muted);
  font-size: 0.68rem;
  font-weight: 700;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.05em;
  box-shadow: 0 1px 0 var(--border);
  white-space: nowrap;
}

.dette-table tbody tr {
  animation: detteRowIn 0.28s var(--ease) both;
  animation-delay: calc(var(--dette-row-i, 0) * 35ms);
}

@keyframes detteRowIn {
  from {
    opacity: 0;
    transform: translateY(8px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@media (max-width: 640px) {
  .dette-status {
    padding: 1rem;
  }

  .dette-pills {
    margin-left: 0;
    width: 100%;
  }

  .dette-card {
    grid-template-columns: auto minmax(0, 1fr) auto;
  }

  .dette-card-end {
    grid-column: 1 / -1;
    margin-left: auto;
  }
}

@media (prefers-reduced-motion: reduce) {
  .dette-status,
  .dette-card {
    animation: none;
  }
}

.dette-table tbody tr:nth-child(even) {
  background: rgba(255, 255, 255, 0.45);
}

.dette-table tbody tr:hover {
  background: var(--primary-light);
}

.dette-table tfoot td {
  background: var(--bg-muted);
  font-weight: 700;
  border-bottom: none;
}

.dette-col-text {
  max-width: 14rem;
}

.dette-col-date {
  white-space: nowrap;
  font-variant-numeric: tabular-nums;
}

.dette-col-detail {
  font-size: 0.78rem;
  color: var(--text-muted);
  line-height: 1.35;
}

.dette-member-name {
  font-weight: 700;
  color: var(--text);
  white-space: nowrap;
}

.dette-th-amount,
.dette-td-amount {
  text-align: right;
  white-space: nowrap;
  font-variant-numeric: tabular-nums;
}

.dette-td-amount {
  font-weight: 700;
}

.dette-th-actions,
.dette-td-actions {
  text-align: right;
  white-space: nowrap;
}

.dette-td-amount.type-dette,
.dette-td-amount.type-absence { color: var(--danger); }
.dette-td-amount.type-retard { color: #c98a00; }
.dette-td-amount.type-bavardage { color: var(--primary); }
.dette-td-amount.type-sanctions { color: #7c6fe0; }

.dette-type-badge {
  display: inline-flex;
  align-items: center;
  padding: 0.2rem 0.55rem;
  border-radius: 999px;
  font-size: 0.68rem;
  font-weight: 700;
  letter-spacing: 0.02em;
  white-space: nowrap;
  border: 1px solid transparent;
}

.dette-type-badge.type-dette,
.dette-type-badge.type-absence {
  background: var(--danger-light);
  color: var(--danger);
  border-color: rgba(217, 48, 37, 0.15);
}

.dette-type-badge.type-retard {
  background: var(--warning-light);
  color: #9a6700;
  border-color: rgba(245, 158, 11, 0.2);
}

.dette-type-badge.type-bavardage {
  background: var(--primary-light);
  color: var(--primary);
  border-color: rgba(181, 106, 58, 0.15);
}

.dette-type-badge.type-sanctions {
  background: #ede9fe;
  color: #6d5ce0;
  border-color: rgba(109, 92, 224, 0.18);
}

.dette-empty-cell {
  text-align: center;
  color: var(--text-muted);
  font-style: italic;
  padding: 1.25rem 0.8rem !important;
}

.dette-td-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.35rem;
  justify-content: flex-end;
}

.dette-table .btn-dette-pay,
.dette-table .btn-amende-pay {
  padding: 0.35rem 0.65rem;
  font-size: 0.72rem;
  white-space: nowrap;
}

.evenement-my-exempt {
  color: #0984e3;
}

.tag-beneficiary {
  display: inline-block;
  margin-left: 0.35rem;
  font-size: 0.68rem;
  font-weight: 700;
  padding: 0.15rem 0.45rem;
  border-radius: 999px;
  background: rgba(116, 185, 255, 0.15);
  color: #0984e3;
}

.evenement-table .btn-primary,
.evenement-table .btn-secondary {
  padding: 0.2rem 0.4rem;
  font-size: 0.65rem;
}

.evenement-pay-actions {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-end;
  gap: 0.3rem;
  min-width: 9rem;
}

.evenement-pay-label {
  display: flex;
  flex-direction: column;
  gap: 0.15rem;
  font-size: 0.58rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.03em;
  color: var(--text-muted);
}

.evenement-pay-input {
  width: 4.5rem;
  padding: 0.25rem 0.4rem;
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: 6px;
  color: var(--text);
  font-family: inherit;
  font-size: 0.72rem;
  font-weight: 600;
}

.evenement-pay-input:focus {
  border-color: var(--primary);
  outline: none;
}

.evenement-extra-tag {
  display: block;
  font-size: 0.58rem;
  font-weight: 600;
  color: var(--success);
  margin-top: 0.1rem;
}

.evenement-extra-note {
  margin: 0.3rem 0 0;
  font-size: 0.68rem;
  color: var(--success);
}

.evenement-reimburse-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.5rem;
  flex-wrap: wrap;
  margin-bottom: 0.45rem;
  padding: 0.45rem 0.6rem;
  background: rgba(181, 106, 58, 0.08);
  border: 1px solid rgba(181, 106, 58, 0.2);
  border-radius: 10px;
}

.evenement-reimburse-row p {
  margin: 0;
  font-size: 0.72rem;
  color: var(--text-muted);
}

.evenement-reimbursed-msg {
  font-size: 0.72rem;
  color: var(--success);
  margin: 0;
  padding: 0.4rem 0.55rem;
  background: rgba(181, 106, 58, 0.1);
  border: 1px solid rgba(181, 106, 58, 0.25);
  border-radius: 10px;
}

.evenement-close-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.5rem;
  flex-wrap: wrap;
  margin-bottom: 0.45rem;
}

.evenement-close-row .evenement-reimbursed-msg {
  flex: 1 1 auto;
  min-width: 0;
}

.btn-evenement-close {
  flex-shrink: 0;
  white-space: nowrap;
}

.evenement-layout {
  display: flex;
  align-items: flex-start;
  gap: 0.55rem;
}

.evenement-layout-has-closed .evenement-list-active {
  flex: 1 1 auto;
  min-width: 0;
}

.evenement-list-active {
  display: flex;
  flex-direction: column;
  gap: 0.45rem;
  width: 100%;
}

.evenement-empty-active {
  padding: 0.5rem 0;
}

.evenement-closed-aside {
  flex: 0 0 auto;
  width: 7.5rem;
  max-height: 70vh;
  overflow-y: auto;
  padding: 0.4rem 0.45rem;
  background: var(--bg-muted);
  border: 1px solid var(--border);
  border-radius: 8px;
  opacity: 0.85;
}

.evenement-closed-label {
  margin: 0 0 0.35rem;
  font-size: 0.58rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--text-muted);
  text-align: center;
}

.evenement-closed-list {
  display: flex;
  flex-direction: column;
  gap: 0.3rem;
}

.evenement-closed-chip {
  display: flex;
  flex-direction: column;
  gap: 0.12rem;
  padding: 0.35rem 0.4rem;
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: 6px;
  line-height: 1.25;
}

.evenement-closed-badge {
  align-self: flex-start;
  font-size: 0.52rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  padding: 0.08rem 0.3rem;
  border-radius: 999px;
  background: rgba(139, 147, 167, 0.15);
  color: var(--text-muted);
}

.evenement-closed-chip-title {
  font-size: 0.62rem;
  font-weight: 600;
  color: var(--text);
  overflow: hidden;
  text-overflow: ellipsis;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
}

.evenement-closed-chip-meta,
.evenement-closed-chip-date {
  font-size: 0.55rem;
  color: var(--text-muted);
}

/* Les règles responsive sont regroupées en fin de fichier */

.admin-list {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
  margin-bottom: 0.55rem;
}

.admin-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.65rem;
  padding: 0.5rem 0.7rem;
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: 8px;
}

.admin-item-name {
  font-weight: 600;
  font-size: 0.82rem;
  margin: 0;
}

.admin-item-meta {
  font-size: 0.78rem;
  color: var(--text-muted);
  margin: 0.15rem 0 0;
}

.admin-only-note {
  font-size: 0.75rem;
  font-weight: 600;
  color: var(--text-muted);
}

.autre-argent-form {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.75rem;
}

.autre-argent-form label {
  display: flex;
  flex-direction: column;
  gap: 0.4rem;
  font-size: 0.85rem;
  font-weight: 500;
  color: var(--text-muted);
}

.autre-argent-form-wide {
  grid-column: 1 / -1;
}

.autre-argent-form-actions {
  grid-column: 1 / -1;
  display: flex;
  flex-wrap: wrap;
  gap: 0.6rem;
  align-items: center;
}

.autre-argent-form input,
.autre-argent-form select {
  padding: 0.65rem 0.85rem;
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: 10px;
  color: var(--text);
  font-family: inherit;
  font-size: 0.95rem;
}

.autre-argent-form button {
  justify-self: start;
}

.autre-argent-retrait td {
  color: var(--danger);
}

.autre-argent-type {
  display: inline-block;
  padding: 0.12rem 0.45rem;
  border-radius: 999px;
  font-size: 0.68rem;
  font-weight: 700;
}

.autre-argent-type.is-in {
  color: var(--success);
  background: var(--success-light);
}

.autre-argent-type.is-out {
  color: var(--danger);
  background: var(--danger-light);
}

.autre-argent-table .btn-autre-argent-delete {
  padding: 0.25rem 0.55rem;
  font-size: 0.72rem;
}

.ancienne-tournee-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.35rem;
  align-items: center;
  width: 100%;
}

.ancienne-tournee-actions .btn-primary,
.ancienne-tournee-actions .btn-secondary {
  padding: 0.28rem 0.55rem;
  font-size: 0.72rem;
}

.ancienne-tournee-actions .btn-ancienne-tournee-repay {
  margin-left: auto;
}

.ancienne-tournee-list {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  width: 100%;
}

.ancienne-tournee-row {
  display: flex;
  align-items: center;
  gap: 0.65rem 1rem;
  width: 100%;
  padding: 0.75rem 0.9rem;
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.48);
  border: 1px solid var(--border);
}

.ancienne-tournee-row-date,
.ancienne-tournee-row-poto {
  white-space: nowrap;
  color: var(--text);
}

.ancienne-tournee-row-poto {
  font-weight: 600;
}

.ancienne-tournee-row-amount,
.ancienne-tournee-amount-cell {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 0.1rem;
  white-space: nowrap;
  font-variant-numeric: tabular-nums;
}

.ancienne-tournee-repaid-hint {
  font-size: 0.72rem;
  font-weight: 600;
  color: var(--success);
}

.ancienne-tournee-repay-controls {
  display: flex;
  align-items: center;
  gap: 0.4rem;
  margin-left: auto;
  flex-shrink: 0;
}

.ancienne-tournee-repay-field {
  display: inline-flex;
  align-items: center;
  gap: 0.2rem;
  padding: 0.2rem 0.5rem;
  border-radius: 10px;
  border: 1px solid var(--border);
  background: rgba(255, 255, 255, 0.72);
  color: var(--text-muted);
  font-size: 0.8rem;
}

.ancienne-tournee-repay-input {
  width: 4.5rem;
  border: 0;
  background: transparent;
  font: inherit;
  font-weight: 700;
  color: var(--text);
  text-align: right;
}

.ancienne-tournee-repay-input:focus {
  outline: none;
}

.ancienne-tournee-repay-field:focus-within {
  border-color: var(--primary);
  box-shadow: 0 0 0 3px var(--primary-light);
}

.ancienne-tournee-list .empty-cell {
  margin: 0;
  padding: 1rem 0.25rem;
  text-align: left;
  font-style: italic;
  color: var(--text-muted);
}

.amende-form {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.75rem;
}

.amende-form label {
  display: flex;
  flex-direction: column;
  gap: 0.4rem;
  font-size: 0.85rem;
  font-weight: 500;
  color: var(--text-muted);
}

.amende-form input,
.amende-form select {
  padding: 0.65rem 0.85rem;
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: 10px;
  color: var(--text);
  font-family: inherit;
  font-size: 0.95rem;
}

.amende-history-title {
  margin: 1rem 0 0.5rem;
  font-size: 0.92rem;
  font-weight: 700;
}

.amende-history-list {
  display: flex;
  flex-direction: column;
  gap: 0.45rem;
}

.amende-history-row {
  flex-wrap: wrap;
}

.amende-history-note {
  flex: 1 1 8rem;
  min-width: 0;
  color: var(--text-muted);
  font-size: 0.82rem;
}

.amende-history-actions,
.amende-action-controls {
  margin-left: auto;
}

.amende-action-controls {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: flex-end;
  gap: 0.35rem;
}

.dette-card .amende-action-controls {
  grid-column: 1 / -1;
  margin-left: 0;
}

.amende-repaid-hint {
  width: 100%;
  margin: 0;
  font-size: 0.78rem;
  font-weight: 700;
  color: var(--success);
}

.amende-repay-field {
  display: inline-flex;
  align-items: center;
  gap: 0.3rem;
  padding: 0.2rem 0.5rem;
  border-radius: 10px;
  border: 1px solid var(--border);
  background: rgba(255, 255, 255, 0.75);
  font-size: 0.75rem;
  color: var(--text-muted);
  font-weight: 600;
}

.amende-repay-field input {
  width: 4.8rem;
  border: 0;
  background: transparent;
  font: inherit;
  font-weight: 700;
  color: var(--text);
}

.amende-repay-field input:focus {
  outline: none;
}

.amende-repay-field:focus-within {
  border-color: var(--primary);
  box-shadow: 0 0 0 3px var(--primary-light);
}

.amende-form-actions {
  grid-column: 1 / -1;
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
}

.btn-amende-edit,
.btn-amende-delete,
.btn-amende-pay {
  padding: 0.35rem 0.55rem;
  border-radius: 6px;
  font-family: inherit;
  font-size: 0.72rem;
  font-weight: 600;
  cursor: pointer;
  transition: background 0.2s;
  white-space: nowrap;
}

.btn-amende-edit {
  background: rgba(116, 185, 255, 0.12);
  color: var(--primary);
  border: 1px solid rgba(116, 185, 255, 0.25);
}

.btn-amende-edit:hover {
  background: rgba(116, 185, 255, 0.22);
}

.btn-amende-delete {
  background: rgba(217, 48, 37, 0.12);
  color: var(--danger);
  border: 1px solid rgba(217, 48, 37, 0.25);
}

.btn-amende-delete:hover {
  background: rgba(217, 48, 37, 0.22);
}

/* === BlaBlaCar — surfaces & formulaires === */

.admin-item,
.pret-loan-card,
.pret-notif-item,
.pret-summary-card,
.evenement-card,
.evenement-summary-stat,
.dette-chip,
.dette-dashboard-hero {
  background: var(--bg-elevated);
}

.add-form input,
.role-form select,
.pret-form input,
.evenement-form input,
.evenement-form select,
.amende-form input,
.amende-form select,
.autre-argent-form input,
.autre-argent-form select,
.tournee-year-select,
.tournee-month-select,
.tournee-partner-select,
.pret-repay-input {
  background: var(--bg-elevated);
  border: 1px solid var(--border-strong);
  border-radius: var(--radius-sm);
}

.add-form input:focus,
.role-form select:focus,
.pret-form input:focus,
.evenement-form input:focus,
.evenement-form select:focus,
.amende-form input:focus,
.amende-form select:focus,
.autre-argent-form input:focus,
.autre-argent-form select:focus,
.tournee-year-select:focus,
.tournee-month-select:focus,
.tournee-partner-select:focus {
  border-color: var(--primary);
  box-shadow: 0 0 0 3px var(--primary-light);
  outline: none;
}

.panel-desc {
  color: var(--text-muted);
  font-size: 0.875rem;
}

.counter {
  color: var(--text-muted);
  font-size: 0.8rem;
}

.cotisation-table th {
  color: var(--text-muted);
  font-weight: 700;
}

.evenement-closed-aside {
  background: var(--bg-muted);
  opacity: 1;
}

.dette-block-events {
  background: linear-gradient(180deg, var(--danger-light) 0%, transparent 100%);
  border-color: rgba(217, 48, 37, 0.15);
}

.pret-progress-bar {
  background: var(--bg-muted);
  border-color: var(--border);
}

.pret-progress-bar span {
  background: var(--primary);
  box-shadow: none;
}

.btn-pret-yes {
  background: var(--success-light);
  color: var(--success);
  border-color: rgba(181, 106, 58, 0.3);
  border-radius: var(--radius-btn);
}

.btn-pret-no,
.btn-pret-delete {
  border-radius: var(--radius-btn);
}

.tag-admin,
.tag-you,
.role-badge {
  background: var(--primary-light);
  color: var(--primary);
}

.tag-you {
  background: var(--success-light);
  color: var(--success);
}

.tag-online {
  background: rgba(34, 197, 94, 0.16);
  color: #15803d;
}

/* === Finance — onglet archive Excel === */

.finance-panel {
  display: flex;
  flex-direction: column;
  gap: 0.85rem;
}

.finance-dashboard {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(8.5rem, 1fr));
  gap: 0.55rem;
}

.finance-stat {
  display: flex;
  flex-direction: column;
  gap: 0.12rem;
  padding: 0.7rem 0.85rem;
  border-radius: var(--radius-sm);
  border: 1px solid var(--border);
  background: var(--bg-elevated);
  box-shadow: var(--shadow-soft);
}

.finance-stat-label {
  font-size: 0.68rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--text-muted);
}

.finance-stat strong {
  font-size: 1.05rem;
  font-weight: 800;
  letter-spacing: -0.02em;
}

.finance-stat--in strong { color: var(--success); }
.finance-stat--out strong { color: var(--danger); }
.finance-stat--balance strong { color: var(--primary); }
.finance-stat--brute strong { color: var(--text); }

.finance-stat-note {
  display: block;
  margin-top: 0.35rem;
  font-size: 0.72rem;
  font-weight: 500;
  color: var(--text-muted);
  line-height: 1.35;
}

/* Bannière vue compte simple (admin qui teste) */
.simple-view-banner {
  margin: 0 0 1rem;
  padding: 0.8rem 1rem;
  border-radius: var(--radius-sm);
  border: 1px solid #b6c5f5;
  background: var(--primary-light);
  color: var(--text-muted);
  font-size: 0.88rem;
  line-height: 1.45;
}

.simple-view-banner strong {
  color: var(--primary);
}

.tab-admin-entry {
  margin-left: auto;
}

.tab-admin-entry.active {
  background: var(--primary-light) !important;
  color: var(--primary) !important;
  box-shadow: none !important;
}

.admin-workspace-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 1rem;
  flex-wrap: wrap;
}

.admin-workspace-badge {
  flex-shrink: 0;
  padding: 0.4rem 0.8rem;
  border-radius: 999px;
  background: var(--gold-light);
  color: #9c4221;
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.02em;
  text-transform: uppercase;
  border: 1px solid #f6d5a8;
}

/* === Gestion administrateur (sous-onglets comme Finance) === */
.gestion-panel {
  gap: 0.85rem;
}

.gestion-subtabs {
  position: sticky;
  top: 0;
  z-index: 2;
  background: var(--bg-elevated, var(--bg));
  padding: 0.35rem 0 0.55rem;
  margin: 0;
}

.gestion-subcontent {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
  min-height: 8rem;
}

.gestion-subpanel {
  display: none;
  flex-direction: column;
  gap: 1rem;
  animation: gestionFade 0.18s ease;
}

.gestion-subpanel.is-active,
.gestion-subpanel:not([hidden]) {
  display: flex;
}

.gestion-subpanel[hidden] {
  display: none !important;
}

@keyframes gestionFade {
  from { opacity: 0; transform: translateY(4px); }
  to { opacity: 1; transform: none; }
}

.finance-live-section {
  display: flex;
  flex-direction: column;
  gap: 1rem;
  margin-top: 0.25rem;
}

.finance-live-section[hidden] {
  display: none !important;
}

.finance-archives-stack {
  display: flex;
  flex-direction: column;
  gap: 1.75rem;
  margin-top: 1.15rem;
}

.finance-ledger-title {
  margin: 0;
  font-family: var(--font-display);
  font-size: 1.08rem;
  font-weight: 700;
}

.finance-archives-sep {
  border: none;
  border-top: 1px solid var(--border);
  margin: 0.25rem 0;
}

/* Nav principale : scroll horizontal sur mobile */
.tabs {
  flex-wrap: nowrap;
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: none;
}

.tabs::-webkit-scrollbar {
  display: none;
}

.tab {
  flex: 0 0 auto;
  white-space: nowrap;
}

.finance-subtabs {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
  padding: 0.25rem 0;
}

.finance-subtab {
  padding: 0.5rem 0.95rem;
  border: 1px solid var(--border);
  border-radius: 999px;
  background: var(--bg-muted);
  font-family: var(--font-display);
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--text-muted);
  cursor: pointer;
  transition: background 0.15s var(--ease), border-color 0.15s var(--ease), color 0.15s var(--ease);
}

.finance-subtab:hover {
  background: var(--bg-card-hover);
  color: var(--text);
}

.finance-subtab.active {
  background: var(--primary);
  border-color: transparent;
  color: #ffffff;
  box-shadow: 0 2px 8px rgba(2, 132, 199, 0.32);
}

.finance-subcontent {
  min-height: 4rem;
}

.finance-section-head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 0.75rem;
  flex-wrap: wrap;
  margin-bottom: 0.55rem;
}

.finance-section-head h3 {
  margin: 0;
  font-size: 0.92rem;
  font-weight: 700;
}

.finance-section-head--sub span {
  font-size: 0.78rem;
  color: var(--text-muted);
  font-weight: 600;
}

.finance-table-wrap {
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  background: var(--bg-elevated);
  box-shadow: var(--shadow-soft);
  margin-bottom: 0.75rem;
}

.finance-table-wrap--wide .finance-table {
  min-width: 100%;
  width: 100%;
}

.finance-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.8rem;
}

.finance-table th,
.finance-table td {
  padding: 0.55rem 0.7rem;
  border-bottom: 1px solid var(--border);
  text-align: left;
  vertical-align: middle;
}

.finance-table th {
  position: sticky;
  top: 0;
  z-index: 1;
  background: var(--bg-muted);
  font-size: 0.66rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: var(--text-muted);
  white-space: nowrap;
}

.finance-table tbody tr {
  animation: financeRowIn 0.25s var(--ease) both;
  animation-delay: calc(var(--finance-row-i, 0) * 30ms);
}

@keyframes financeRowIn {
  from { opacity: 0; transform: translateY(3px); }
  to { opacity: 1; transform: translateY(0); }
}

.finance-table tbody tr:nth-child(even) {
  background: rgba(255, 255, 255, 0.4);
}

.finance-table tbody tr:hover {
  background: var(--primary-light);
}

.finance-table tfoot td {
  background: var(--bg-muted);
  font-weight: 700;
}

.finance-th-amount,
.finance-td-amount {
  text-align: right;
  white-space: nowrap;
  font-variant-numeric: tabular-nums;
  font-weight: 700;
}

.finance-td-amount--in { color: var(--success); }
.finance-td-amount--out { color: var(--danger); }

.finance-td-person {
  font-weight: 700;
  white-space: nowrap;
}

.finance-td-note {
  font-size: 0.76rem;
  color: var(--text-muted);
  max-width: 16rem;
}

.finance-flow-badge {
  display: inline-flex;
  padding: 0.18rem 0.5rem;
  border-radius: 999px;
  font-size: 0.66rem;
  font-weight: 700;
}

.finance-flow-badge--in {
  background: var(--success-light);
  color: var(--success);
}

.finance-flow-badge--out {
  background: var(--danger-light);
  color: var(--danger);
}

.finance-empty,
.finance-empty-cell {
  color: var(--text-muted);
  font-style: italic;
}

.finance-empty-cell {
  text-align: center;
  padding: 1.1rem !important;
}

.finance-empty code {
  font-size: 0.78rem;
  background: var(--bg-muted);
  padding: 0.1rem 0.35rem;
  border-radius: 4px;
}

/* === Responsive — tablettes et smartphones === */

@media (max-width: 768px) {
  .panel {
    padding: 0.75rem 0.8rem;
  }

  .panel-head {
    flex-direction: column;
    align-items: flex-start;
  }

  .tabs {
    flex-wrap: nowrap;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    overscroll-behavior-x: contain;
    scrollbar-width: none;
    scroll-snap-type: x proximity;
    margin-left: 0;
    margin-right: 0;
    border-radius: 0;
    mask-image: linear-gradient(90deg, transparent, #000 0.8rem, #000 calc(100% - 0.8rem), transparent);
    -webkit-mask-image: linear-gradient(90deg, transparent, #000 0.8rem, #000 calc(100% - 0.8rem), transparent);
  }

  .topbar-card {
    border-radius: 0;
    padding: 0;
  }

  .header-inner {
    grid-template-columns: 1fr;
    gap: 0.2rem;
  }

  .header-actions {
    justify-content: flex-end;
  }

  .site-hero {
    display: none;
  }

  .header-brand-row {
    padding-top: 0.25rem;
  }

  .brand {
    padding: 0.1rem 0;
  }

  .brand-name {
    letter-spacing: -0.02em;
    margin-right: 0;
    font-size: 1.25rem;
  }

  .header {
    margin-left: 0;
    margin-right: 0;
  }

  .tabs::-webkit-scrollbar {
    display: none;
  }

  .tab {
    flex: 0 0 auto;
    min-width: max-content;
    scroll-snap-align: start;
    padding: 0.55rem 0.75rem;
    font-size: 0.78rem;
  }

  .pret-form,
  .evenement-form,
  .autre-argent-form,
  .amende-form,
  .role-form {
    grid-template-columns: 1fr;
  }

  .role-form .btn-primary,
  .add-form .btn-primary,
  .pret-form button,
  .evenement-form button,
  .autre-argent-form button,
  .amende-form-actions .btn-primary,
  .amende-form-actions .btn-secondary {
    width: 100%;
    justify-self: stretch;
    min-height: 44px;
  }

  .add-form {
    flex-direction: column;
  }

  .add-form .btn-primary {
    width: 100%;
  }

  .add-form input,
  .modal form input,
  .role-form select,
  .pret-form input,
  .evenement-form input,
  .evenement-form select,
  .amende-form input,
  .amende-form select,
  .autre-argent-form input,
  .autre-argent-form select,
  .pret-repay-input {
    font-size: 16px;
    min-height: 44px;
  }

  .btn-header,
  .btn-primary,
  .btn-secondary,
  .btn-pret-yes,
  .btn-pret-no,
  .btn-pret-delete {
    min-height: 44px;
    padding-top: 0.55rem;
    padding-bottom: 0.55rem;
  }

  .pret-loan-head,
  .evenement-head,
  .evenement-contribution-amount,
  .evenement-reimburse-row,
  .admin-item {
    flex-direction: column;
    align-items: flex-start;
  }

  .bureau-grid {
    flex-wrap: nowrap;
    gap: 0.25rem;
  }

  .bureau-panel,
  .online-panel {
    padding: 0.45rem 0.6rem;
  }

  .bureau-panel h2,
  .online-panel h2 {
    font-size: 0.72rem;
  }

  .online-item {
    padding: 0.28rem 0.5rem 0.28rem 0.35rem;
  }

  .online-name {
    font-size: 0.74rem;
  }

  .bureau-card {
    padding: 0.18rem 0.35rem;
  }

  .bureau-card-name {
    font-size: 0.64rem;
    max-width: 4.5rem;
  }

  .bureau-card-role {
    font-size: 0.54rem;
  }

  .bureau-assign-form {
    flex-direction: column;
    align-items: stretch;
  }

  .bureau-assign-form select {
    font-size: 16px;
    min-height: 40px;
  }

  .bureau-assign-form .btn-compact {
    width: 100%;
    min-height: 40px;
  }

  .evenement-reimburse-row .btn-primary {
    width: 100%;
  }

  .evenement-list-head {
    flex-direction: column;
    align-items: stretch;
  }

  .evenement-reset-closed-btn {
    width: 100%;
  }

  .evenement-close-row {
    flex-direction: column;
    align-items: stretch;
  }

  .evenement-close-row .btn-evenement-close {
    width: 100%;
  }

  .evenement-layout-has-closed {
    flex-direction: column;
  }

  .evenement-closed-aside {
    width: 100%;
    max-height: none;
    opacity: 1;
  }

  .evenement-closed-list {
    flex-direction: row;
    flex-wrap: nowrap;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    overscroll-behavior-x: contain;
    scrollbar-width: none;
    padding-bottom: 0.15rem;
  }

  .evenement-closed-list::-webkit-scrollbar {
    display: none;
  }

  .evenement-closed-chip {
    flex: 0 0 auto;
    width: 6.5rem;
  }

  .pret-vote-actions,
  .pret-financier-actions,
  .pret-repay-form,
  .dette-td-actions {
    width: 100%;
  }

  .dette-block-head {
    flex-direction: column;
    align-items: stretch;
  }

  .dette-block-total {
    align-items: flex-start;
  }

  .pret-vote-actions .btn-pret-yes,
  .pret-vote-actions .btn-pret-no,
  .pret-financier-actions .btn-primary,
  .pret-financier-actions .btn-secondary,
  .pret-repay-form .btn-primary,
  .pret-repay-form .btn-secondary {
    flex: 1 1 calc(50% - 0.2rem);
    min-width: 0;
  }

  .pret-repay-input {
    width: 100%;
    min-width: 0;
  }

  .pret-date-cell-btn,
  .amende-col-date .pret-request-date-input {
    width: 100%;
    max-width: none;
  }

  .member-right,
  .admin-item .btn-delete {
    width: 100%;
  }

  .member-right {
    justify-content: space-between;
  }

  .modal-overlay {
    padding: max(0.75rem, env(safe-area-inset-top)) max(0.75rem, env(safe-area-inset-right)) max(0.75rem, env(safe-area-inset-bottom)) max(0.75rem, env(safe-area-inset-left));
    align-items: flex-end;
  }

  .modal {
    max-width: none;
    border-bottom-left-radius: 0;
    border-bottom-right-radius: 0;
    max-height: 90dvh;
    overflow-y: auto;
  }

  .modal-actions {
    flex-direction: column-reverse;
  }

  .modal-actions .btn-primary,
  .modal-actions .btn-secondary {
    width: 100%;
    min-height: 44px;
  }

  .permissions-table .permissions-tab-col {
    white-space: normal;
    min-width: 5.5rem;
  }

  .cotisation-table,
  .dette-table,
  .finance-table,
  .permissions-table {
    min-width: 100%;
    width: 100%;
  }

  .finance-dashboard {
    grid-template-columns: 1fr 1fr;
  }

  .finance-subtabs,
  .gestion-subtabs {
    flex-wrap: nowrap;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
  }

  .finance-subtabs::-webkit-scrollbar,
  .gestion-subtabs::-webkit-scrollbar {
    display: none;
  }

  .finance-subtab,
  .gestion-subtab {
    flex: 0 0 auto;
  }

  .tournee-unified-table {
    min-width: 100%;
    width: 100%;
  }

  .tournee-month-select,
  .tournee-partner-select,
  .tournee-year-select {
    min-width: 100%;
    font-size: 16px;
    min-height: 40px;
  }

  .evenement-table {
    min-width: 100%;
    width: 100%;
  }

  .evenement-pay-input {
    font-size: 16px;
    min-height: 36px;
    width: 5rem;
  }

  .evenement-pay-actions .btn-primary,
  .evenement-pay-actions .btn-secondary {
    min-height: 36px;
  }

  .btn-amende-edit,
  .btn-amende-delete,
  .btn-delete,
  .btn-clear {
    min-height: 36px;
    padding: 0.35rem 0.55rem;
    font-size: 0.72rem;
  }

  .evenement-table .btn-primary,
  .evenement-table .btn-secondary {
    min-height: 36px;
    padding: 0.35rem 0.55rem;
    font-size: 0.72rem;
  }
}

@media (max-width: 480px) {
  .header {
    flex-direction: column;
    align-items: flex-start;
  }

  .header-actions {
    width: 100%;
    justify-content: flex-start;
  }

  .brand h1 {
    font-size: 1.1rem;
  }

  .member-item {
    flex-direction: column;
    align-items: flex-start;
  }

  .evenement-member-summary,
  .evenement-member-summary-exempt {
    grid-template-columns: 1fr;
  }

  .pret-summary {
    grid-template-columns: 1fr 1fr;
  }

  .pret-summary-main {
    grid-column: 1 / -1;
  }

  .dette-dashboard-chips {
    grid-template-columns: 1fr 1fr;
  }

  .dette-dashboard-grand {
    font-size: 1.4rem;
  }

  .panel h2 {
    font-size: 0.9rem;
  }

  .tab {
    font-size: 0.72rem;
    padding: 0.5rem 0.65rem;
  }
}

@media (max-width: 360px) {
  .app {
    padding-left: max(0.65rem, env(safe-area-inset-left));
    padding-right: max(0.65rem, env(safe-area-inset-right));
  }

  .pret-summary,
  .dette-dashboard-chips {
    grid-template-columns: 1fr;
  }

  .pret-vote-actions .btn-pret-yes,
  .pret-vote-actions .btn-pret-no {
    flex: 1 1 100%;
  }
}

/* === Adaptation tous formats : fluide, tactile, sans débordement === */
img,
svg,
video,
canvas {
  max-width: 100%;
  height: auto;
}

button,
input,
select,
textarea {
  max-width: 100%;
}

.panel,
.modal,
.member-item,
.pret-loan-card,
.evenement-card {
  overflow-wrap: anywhere;
  word-break: break-word;
}

.panel table,
.panel th,
.panel td {
  overflow-wrap: normal;
  word-break: normal;
}

.table-wrap,
.dette-table-wrap,
.finance-table-wrap,
.amende-table-wrap {
  width: 100%;
  max-width: 100%;
}

.table-wrap table,
.dette-table-wrap table,
.finance-table-wrap table,
.amende-table-wrap table {
  width: 100%;
  min-width: 100%;
}

.tournee-planning-table th:nth-child(3),
.tournee-planning-table td:nth-child(3),
.tournee-planning-table th:nth-child(4),
.tournee-planning-table td:nth-child(4) {
  width: 42%;
}

.tournee-order-readout,
.tournee-order-chips,
.tournee-person {
  max-width: 100%;
}

.ancienne-tournee-actions {
  max-width: 100%;
}

@media (min-width: 1100px) {
  :root {
    --app-max: 1120px;
  }

  .member-list {
    grid-template-columns: repeat(4, minmax(0, 1fr));
  }
}

@media (max-width: 900px) {
  .finance-dashboard,
  .pret-summary {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 768px) {
  .header-inner {
    align-items: center;
  }

  .admin-badge {
    max-width: 100%;
    overflow: hidden;
    text-overflow: ellipsis;
  }

  .tabs {
    margin-bottom: 1rem;
  }

  .panel {
    overflow: auto;
  }

  .tournee-unified-table,
  .tournee-planning-table,
  .cotisation-table,
  .dette-table,
  .finance-table,
  .permissions-table,
  .evenement-table,
  .autre-argent-table {
    min-width: 100%;
    width: 100%;
    font-size: 0.74rem;
  }

  .tournee-planning-table {
    min-width: 100%;
  }

  .ancienne-tournee-actions {
    flex-wrap: wrap;
    align-items: center;
  }

  .ancienne-tournee-actions .btn-ancienne-tournee-repay {
    margin-left: auto;
  }

  .tournee-head-actions,
  .panel-head {
    width: 100%;
  }

  .tournee-head-actions .btn-primary,
  .panel-head .btn-primary {
    width: 100%;
  }

  .finance-dashboard {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 640px) {
  .pret-summary,
  .dette-dashboard-chips,
  .evenement-member-summary {
    grid-template-columns: 1fr;
  }

  .pret-summary-main {
    grid-column: auto;
  }

  .header-actions {
    width: 100%;
    justify-content: flex-start;
  }

  .btn-header {
    flex: 1 1 auto;
  }
}

@media (max-width: 480px) {
  .header-inner {
    flex-direction: column;
    align-items: stretch;
  }

  .brand {
    justify-content: flex-start;
  }

  .brand-mark {
    width: 2.6rem;
    height: 2.6rem;
    border-radius: 14px;
  }

  .topbar {
    top: max(0.45rem, env(safe-area-inset-top));
  }

  .tournee-unified-table,
  .tournee-planning-table,
  .cotisation-table,
  .dette-table,
  .finance-table,
  .permissions-table,
  .evenement-table,
  .autre-argent-table {
    min-width: 22rem;
  }
}

@media (hover: none) and (pointer: coarse) {
  .tab,
  .finance-subtab,
  .gestion-subtab,
  .btn-primary,
  .btn-secondary,
  .btn-header {
    min-height: 44px;
  }

  .btn-primary:hover:not(:disabled) {
    background: var(--primary);
  }

  .btn-primary:active:not(:disabled) {
    background: var(--primary-hover);
  }
}

@media (orientation: landscape) and (max-height: 520px) {
  .topbar-card {
    padding-top: 0.55rem;
    padding-bottom: 0.35rem;
  }

  .modal-overlay {
    align-items: stretch;
  }

  .modal {
    max-height: 100dvh;
    border-radius: 12px;
  }
}

/* Chiffres plus visibles */
.member-name {
  font-size: 0.86rem;
}

.member-cotisation,
.amount-readonly,
.pret-summary-amount,
.pret-summary-card strong,
.pret-active-detail-amount,
.evenement-poto-receivable-amount,
.evenement-contribution-amount strong,
.dette-card-amount,
.dette-td-amount,
.dette-status-amount,
.finance-stat strong,
.finance-td-amount,
.ancienne-tournee-row-amount strong,
.ancienne-tournee-amount-cell strong,
.cotisation-table tfoot td:last-child {
  font-family: var(--font-display);
  font-variant-numeric: tabular-nums;
  font-feature-settings: "tnum" 1, "lnum" 1;
  letter-spacing: -0.03em;
}

.member-cotisation {
  font-size: 0.92rem;
  font-weight: 800;
}

.finance-stat {
  padding: 0.9rem 1rem;
}

.finance-stat strong {
  font-size: clamp(1.35rem, 2.4vw, 1.7rem);
  font-weight: 800;
  line-height: 1.1;
}

.pret-summary-amount,
.pret-summary-card strong {
  font-size: 1.35rem;
  font-weight: 800;
}

.dette-status-amount,
.dette-status-title {
  font-size: clamp(1.7rem, 4vw, 2.15rem);
  font-weight: 800;
}

.dette-card-amount {
  font-size: 1.28rem;
  font-weight: 800;
}

.dette-td-amount,
.finance-td-amount,
.amount-readonly {
  font-size: 0.95rem;
  font-weight: 800;
}

.evenement-contribution-amount strong {
  font-size: 1.2rem;
  font-weight: 800;
}

.ancienne-tournee-row-amount strong,
.ancienne-tournee-amount-cell strong {
  font-size: 1.15rem;
  font-weight: 800;
}

.panel-desc strong,
.dette-group-total,
.dette-group-total strong,
.cotisation-table tfoot td:last-child {
  font-family: var(--font-display);
  font-variant-numeric: tabular-nums;
  font-weight: 800;
}

.dette-group-total strong {
  font-size: 1.25rem;
}

/* Header sombre (bandeau) — le reste de la page inchangé */
.topbar {
  width: 100vw;
  max-width: 100vw;
  margin-left: calc(50% - 50vw);
  margin-right: calc(50% - 50vw);
  margin-bottom: 1.15rem;
  padding-top: env(safe-area-inset-top);
  background:
    radial-gradient(800px 180px at 90% -40%, rgba(14, 165, 233, 0.35), transparent 60%),
    linear-gradient(180deg, #0A2740 0%, #072033 100%);
  backdrop-filter: none;
  -webkit-backdrop-filter: none;
  border-bottom: 1px solid rgba(103, 232, 249, 0.18);
  box-shadow: 0 12px 32px rgba(7, 32, 51, 0.22);
}

.topbar-card {
  max-width: var(--app-max);
  margin: 0 auto;
}

.brand .brand-mark {
  display: block;
  width: 2.4rem;
  height: 2.4rem;
  flex-shrink: 0;
  border-radius: 12px;
  overflow: hidden;
  box-shadow: 0 6px 16px rgba(2, 132, 199, 0.35);
}

.brand .brand-mark svg {
  display: block;
  width: 100%;
  height: 100%;
}

.topbar .brand-name {
  color: #F8FCFF;
  font-size: clamp(1.15rem, 2.4vw, 1.45rem);
  font-weight: 600;
}

.topbar .brand-tagline {
  display: block;
  margin-top: 0.12rem;
  font-family: var(--font-body);
  font-size: 0.66rem;
  font-weight: 600;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: rgba(125, 211, 252, 0.85);
}

.topbar .admin-badge {
  padding: 0.4rem 0.8rem;
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.14);
  color: rgba(248, 252, 255, 0.82);
  border-radius: 999px;
}

.topbar .admin-badge.admin-active {
  color: #FDE68A;
  background: rgba(251, 191, 36, 0.14);
  border-color: rgba(251, 191, 36, 0.32);
}

.topbar .admin-badge.member-active {
  color: #E0F2FE;
  background: rgba(14, 165, 233, 0.18);
  border-color: rgba(125, 211, 252, 0.28);
}

.topbar .btn-header {
  background: var(--coral);
  color: #fff;
  box-shadow: 0 8px 18px rgba(251, 113, 133, 0.28);
}

.topbar .btn-header:hover {
  background: #F43F5E;
  color: #fff;
}

.topbar .btn-header-out {
  color: #E0F2FE;
  border: 1px solid rgba(255, 255, 255, 0.18);
  background: rgba(255, 255, 255, 0.08);
  box-shadow: none;
}

.topbar .btn-header-out:hover {
  color: #fff;
  background: rgba(255, 255, 255, 0.16);
  border-color: rgba(255, 255, 255, 0.28);
}

.topbar .tabs {
  gap: 0.3rem;
  border-bottom: 0;
}

.topbar .tab {
  margin: 0 0 0.65rem;
  padding: 0.5rem 0.9rem 0.52rem;
  border-bottom: 0;
  border-radius: 999px;
  color: rgba(226, 242, 254, 0.78);
  background: transparent;
}

.topbar .tab:hover {
  color: #fff;
  background: rgba(255, 255, 255, 0.1);
}

.topbar .tab.active,
.topbar .tab.active:hover {
  color: #072033;
  background: #67E8F9;
  border-bottom-color: transparent;
  border-radius: 999px;
  font-weight: 600;
  box-shadow: 0 6px 16px rgba(103, 232, 249, 0.28);
}

.topbar .tab-admin-entry {
  color: #67E8F9;
  font-weight: 600;
}

.topbar .tab-admin-entry.active,
.topbar .tab-admin-entry.active:hover {
  color: #072033 !important;
  background: #67E8F9 !important;
}

@media (max-width: 640px) {
  .topbar .brand-tagline {
    display: none;
  }

  .topbar .brand-name {
    font-size: 1.12rem;
    white-space: nowrap;
  }
}

@media (max-width: 480px) {
  .topbar {
    top: 0;
  }

  .topbar .brand-mark {
    width: 2.1rem;
    height: 2.1rem;
    border-radius: 10px;
  }
}

.tab-label-short {
  display: none;
}

.modal {
  background: #ffffff;
  backdrop-filter: none;
  -webkit-backdrop-filter: none;
}

.modal-overlay {
  background: rgba(7, 32, 51, 0.48);
}

/* === Correctifs smartphone : header, onglets, lisibilité === */
@media (max-width: 768px) {
  .app {
    padding-left: 0;
    padding-right: 0;
  }

  .main {
    padding-left: max(var(--page-pad), env(safe-area-inset-left));
    padding-right: max(var(--page-pad), env(safe-area-inset-right));
  }

  .simple-view-banner {
    margin-left: max(var(--page-pad), env(safe-area-inset-left));
    margin-right: max(var(--page-pad), env(safe-area-inset-right));
  }

  .topbar {
    width: 100%;
    max-width: 100%;
    margin-left: 0;
    margin-right: 0;
    top: 0;
    padding-top: env(safe-area-inset-top);
  }

  .header-brand-row {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    align-items: center;
    column-gap: 0.55rem;
    row-gap: 0.25rem;
    padding: 0.45rem max(var(--page-pad), env(safe-area-inset-right)) 0.2rem max(var(--page-pad), env(safe-area-inset-left));
  }

  .header-actions {
    display: contents;
    width: auto;
  }

  .brand {
    grid-column: 1;
    grid-row: 1;
    min-width: 0;
  }

  .topbar .btn-header,
  .header-actions .btn-header {
    grid-column: 2;
    grid-row: 1;
    flex: 0 0 auto;
    width: auto;
    justify-self: end;
    white-space: nowrap;
  }

  .topbar .admin-badge {
    grid-column: 1 / -1;
    grid-row: 2;
    justify-self: start;
    max-width: 100%;
    width: auto;
  }

  .topbar .admin-badge:not(.member-active):not(.admin-active) {
    display: none;
  }

  .btn-header-label {
    display: none;
  }

  .topbar .btn-header-out {
    min-width: 44px;
    min-height: 44px;
    padding: 0.5rem;
    justify-content: center;
  }

  .topbar .brand-name {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
  }

  .tabs,
  .topbar .tabs {
    margin-bottom: 0;
    padding: 0 max(var(--page-pad), env(safe-area-inset-right)) 0.45rem max(var(--page-pad), env(safe-area-inset-left));
    mask-image: none;
    -webkit-mask-image: none;
    gap: 0.25rem;
  }

  .topbar .tab {
    margin: 0;
    padding: 0.48rem 0.78rem;
  }

  .tab-admin-entry {
    margin-left: 0;
  }

  .tab-label-full {
    display: none;
  }

  .tab-label-short {
    display: inline;
  }

  .member-name {
    font-size: 0.92rem;
  }

  .member-num,
  .member-date {
    font-size: 0.72rem;
  }

  .member-item .tag-admin,
  .member-item .tag-you,
  .member-item .tag-online,
  .member-item .role-badge {
    font-size: 0.64rem;
    padding: 0.08rem 0.32rem;
  }

  .bureau-grid {
    flex-wrap: wrap;
    overflow-x: visible;
    gap: 0.35rem;
  }

  .bureau-card-name {
    font-size: 0.78rem;
    max-width: none;
  }

  .bureau-card-role {
    font-size: 0.68rem;
  }

  .member-avatar {
    width: 34px;
    height: 34px;
    font-size: 0.78rem;
  }

  .member-item .btn-reset-pwd,
  .member-item .btn-delete {
    min-height: 36px;
    min-width: 36px;
    padding: 0.35rem 0.5rem;
    font-size: 0.72rem;
  }

  .permissions-table {
    min-width: 100%;
    width: 100%;
  }

  .permissions-table input[type="checkbox"] {
    width: 1.25rem;
    height: 1.25rem;
  }

  .cotisation-table th,
  .tournee-planning-table th,
  .tournee-unified-table th {
    white-space: nowrap;
  }

  .topbar .btn-header-out {
    background: rgba(255, 255, 255, 0.14);
    border-color: rgba(255, 255, 255, 0.28);
  }

  .modal-overlay {
    align-items: flex-end;
  }

  .modal {
    background: #ffffff;
  }
}

@media (max-width: 480px) {
  .topbar {
    top: 0;
  }

  .topbar .btn-header:not(.btn-header-out) .btn-header-label {
    display: inline;
  }
}

.finance-stat--in strong,
.finance-td-amount--in {
  color: var(--success);
}

.finance-stat--out strong,
.finance-td-amount--out,
.dette-card.type-absence .dette-card-amount,
.dette-td-amount.type-absence {
  color: var(--danger);
}

.dette-card.type-dette .dette-card-amount,
.dette-td-amount.type-dette,
.dette-status--due .dette-status-amount {
  color: #ea580c;
}

.dette-pill.type-dette,
.dette-pill.type-absence {
  color: var(--danger);
}

.install-login-hint {
  margin: 0.15rem 0 0;
  font-size: 0.8rem;
  line-height: 1.4;
  color: var(--text-muted);
  text-align: center;
}

.install-banner {
  position: fixed;
  left: max(0.75rem, env(safe-area-inset-left));
  right: max(0.75rem, env(safe-area-inset-right));
  bottom: max(0.75rem, env(safe-area-inset-bottom));
  z-index: 160;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  padding: 0.85rem 0.95rem;
  background: #072033;
  color: #f8fcff;
  border: 1px solid rgba(103, 232, 249, 0.22);
  border-radius: 18px;
  box-shadow: 0 12px 32px rgba(7, 32, 51, 0.28);
}

.install-banner[hidden] {
  display: none !important;
}

.install-banner-text {
  display: flex;
  flex-direction: column;
  gap: 0.15rem;
  min-width: 0;
}

.install-banner-text strong {
  font-size: 0.92rem;
  font-weight: 700;
}

.install-banner-text span {
  font-size: 0.78rem;
  color: rgba(226, 242, 254, 0.82);
  line-height: 1.35;
}

.install-banner-actions {
  display: flex;
  align-items: center;
  gap: 0.4rem;
  flex-shrink: 0;
}

.install-banner-actions .btn-secondary {
  background: transparent;
  color: rgba(226, 242, 254, 0.9);
  border-color: rgba(255, 255, 255, 0.18);
  padding: 0.45rem 0.7rem;
  min-height: 40px;
}

.install-banner-actions .btn-primary {
  padding: 0.45rem 0.85rem;
  min-height: 40px;
}

@media (max-width: 640px) {
  .install-banner {
    flex-direction: column;
    align-items: stretch;
  }

  .install-banner-actions {
    width: 100%;
  }

  .install-banner-actions .btn-secondary,
  .install-banner-actions .btn-primary {
    flex: 1;
  }
}

.pret-loan-card.is-notif-target,
#pretVotingList.is-notif-target,
.amende-table tbody tr.is-notif-target {
  box-shadow: 0 0 0 3px rgba(14, 165, 233, 0.45);
  animation: notifPulse 1.2s ease-out 2;
}

@keyframes notifPulse {
  from { box-shadow: 0 0 0 0 rgba(14, 165, 233, 0.5); }
  to { box-shadow: 0 0 0 10px rgba(14, 165, 233, 0); }
}

.pret-notif-item {
  cursor: pointer;
}

.financier-iban {
  display: inline-block;
  margin-left: 0.15rem;
  padding: 0.08rem 0.4rem;
  border-radius: 6px;
  background: #e8f4fc;
  color: var(--navy);
  font-family: ui-monospace, "Cascadia Mono", "Segoe UI Mono", monospace;
  font-size: 0.95em;
  letter-spacing: 0.04em;
  user-select: all;
}

.financier-iban-meta {
  color: var(--text-muted);
}

.financier-pay-box {
  margin: 0.7rem 0 1rem;
  padding: 0.85rem 1rem;
  border-radius: 14px;
  border: 1px solid rgba(2, 132, 199, 0.28);
  background: linear-gradient(180deg, #f0f9ff 0%, #ffffff 100%);
}

.financier-pay-intro {
  margin: 0 0 0.35rem;
  font-size: 0.88rem;
  color: var(--text);
  line-height: 1.4;
}

.financier-pay-account {
  margin: 0;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.35rem 0.55rem;
}

.financier-pay-inline {
  width: 100%;
  margin: 0.45rem 0 0;
  font-size: 0.82rem;
  color: var(--text);
  line-height: 1.4;
}

.amende-ledger {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.amende-hero {
  display: flex;
  align-items: center;
  gap: 1rem;
  padding: 1.15rem 1.25rem;
  border-radius: 20px;
  border: 1px solid var(--border);
  background: linear-gradient(180deg, #ffffff 0%, #f0f9ff 100%);
  box-shadow: var(--shadow-soft);
}

.amende-hero.is-due {
  background: linear-gradient(180deg, #fff1f2 0%, #ffffff 100%);
  border-color: rgba(225, 29, 72, 0.28);
}

.amende-hero.is-clear {
  background: linear-gradient(180deg, #ecfdf5 0%, #ffffff 100%);
  border-color: rgba(13, 148, 136, 0.28);
}

.amende-hero-mark {
  flex-shrink: 0;
  width: 2.4rem;
  height: 2.4rem;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  background: var(--success-light);
  color: var(--success);
  font-size: 1.05rem;
  font-weight: 800;
}

.amende-hero-kicker {
  margin: 0;
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--text-muted);
}

.amende-hero.is-due .amende-hero-kicker {
  color: var(--danger);
}

.amende-hero-amount {
  display: block;
  margin: 0.12rem 0 0.1rem;
  font-family: var(--font-display);
  font-size: clamp(1.55rem, 4vw, 2.05rem);
  font-weight: 800;
  letter-spacing: -0.03em;
  line-height: 1.1;
  color: var(--text);
}

.amende-hero.is-due .amende-hero-amount {
  color: var(--danger);
}

.amende-hero.is-clear .amende-hero-amount {
  color: var(--success);
}

.amende-hero-meta {
  margin: 0;
  font-size: 0.88rem;
  color: var(--text-muted);
}

.amende-table-wrap {
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  border: 1px solid var(--border);
  border-radius: 18px;
  background: #fff;
  box-shadow: var(--shadow-soft);
}

.amende-table {
  width: 100%;
  min-width: 100%;
  table-layout: auto;
  border-collapse: collapse;
  font-size: 0.9rem;
}

.amende-table th,
.amende-table td {
  padding: 0.8rem 1rem;
  text-align: left;
  vertical-align: middle;
  border-bottom: 1px solid rgba(14, 165, 233, 0.12);
  color: var(--text);
  background: transparent;
  font-weight: 500;
  text-transform: none;
  letter-spacing: 0;
}

.amende-table th {
  background: #f0f9ff;
  color: var(--text-muted);
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  white-space: nowrap;
}

.th-short {
  display: none;
}

.amende-table tbody tr:last-child td {
  border-bottom: none;
}

.amende-table tbody tr:hover td {
  background: #f8fbff;
}

.amende-table tbody tr.is-settled td {
  color: var(--text-muted);
}

.amende-table .num {
  text-align: right;
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
  font-family: var(--font-display);
  font-weight: 700;
}

.amende-table .num-paid {
  color: var(--success);
}

.amende-table .num-remain {
  color: var(--danger);
  font-weight: 800;
}

.amende-table .num-remain.is-zero {
  color: var(--success);
}

.amende-chip {
  display: inline-flex;
  align-items: center;
  padding: 0.22rem 0.65rem;
  border-radius: 999px;
  font-size: 0.72rem;
  font-weight: 700;
  white-space: nowrap;
}

.amende-chip.is-open {
  background: var(--warning-light);
  color: #c2410c;
}

.amende-chip.is-paid {
  background: var(--success-light);
  color: var(--success);
}

.amende-chip.is-rejected {
  background: var(--danger-light);
  color: var(--danger);
}

.amende-col-actions {
  min-width: 0;
  white-space: nowrap;
}

.amende-admin-actions {
  display: flex;
  flex-direction: row;
  flex-wrap: nowrap;
  align-items: center;
  gap: 0.35rem;
  white-space: nowrap;
}

.amende-admin-actions .pret-due-dates {
  margin: 0;
  white-space: nowrap;
  font-size: 0.75rem;
}

.amende-table-admin .pret-repay-form {
  display: flex;
  flex-wrap: nowrap;
  gap: 0.3rem;
  align-items: center;
  margin: 0;
  width: auto;
}

.amende-table-admin .pret-repay-input {
  width: 5rem;
  height: 2rem;
  min-height: 2rem;
  padding: 0 0.4rem;
  box-sizing: border-box;
}

.amende-table .pret-financier-controls {
  display: inline-flex;
  flex-direction: row;
  flex-wrap: nowrap;
  align-items: center;
  gap: 0.3rem;
  margin: 0;
  padding: 0;
  border: 0;
}

.amende-table .amende-admin-actions .btn-primary,
.amende-table .amende-admin-actions .btn-secondary,
.amende-table .amende-admin-actions .btn-pret-delete {
  height: 2rem;
  min-height: 2rem;
  padding: 0 0.75rem;
  font-size: 0.78rem;
  line-height: 1;
  box-sizing: border-box;
  border-width: 1px;
  border-style: solid;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  vertical-align: middle;
}

.amende-table .amende-admin-actions .btn-primary {
  border-color: var(--primary);
}

.amende-table .pret-repay-history {
  display: none;
}

.pret-date-cell-btn {
  appearance: none;
  border: 0;
  background: transparent;
  padding: 0;
  margin: 0;
  font: inherit;
  color: inherit;
  cursor: pointer;
  text-align: left;
  white-space: nowrap;
}

.pret-date-cell-btn:hover,
.pret-date-cell-btn:focus-visible {
  text-decoration: underline;
  text-underline-offset: 0.16em;
}

.amende-col-date .pret-request-date-input {
  font: inherit;
  color: inherit;
  border: 1px solid rgba(32, 56, 82, 0.22);
  border-radius: 6px;
  padding: 0.12rem 0.3rem;
  background: #fff;
  width: 9.8rem;
  max-width: 100%;
  margin: 0;
}

.amende-table-admin .pret-repay-input {
  width: 5.2rem;
  height: 2rem;
  min-height: 2rem;
}

.amende-table-admin .pret-financier-controls {
  flex-wrap: nowrap;
  margin: 0;
  padding: 0;
  border: 0;
}

.amende-table-admin .pret-repay-history {
  width: 100%;
  margin: 0;
}

.amende-detail-row td {
  background: #f8fbff;
  padding: 0.45rem 0.7rem 0.95rem;
}

.evenement-card-embedded {
  margin: 0;
  box-shadow: none;
  border: 1px solid var(--border);
}

.pret-vote-inline {
  margin: 0;
  font-size: 0.78rem;
  color: var(--text-muted);
}

.amende-table tfoot td {
  background: #f8fbff;
  font-weight: 800;
  border-bottom: none;
  border-top: 1px solid var(--border);
}

.amende-table tfoot .num-remain {
  color: var(--danger);
}

.amende-empty-row td {
  text-align: center;
  color: var(--text-muted);
  font-style: italic;
  padding: 1.4rem 1rem;
}

.amende-col-detail {
  min-width: 7rem;
  width: 100%;
}

@media (max-width: 900px) {
  .amende-table-wrap {
    overflow: hidden;
    width: 100%;
    border-radius: 12px;
  }

  .amende-table,
  .amende-table thead,
  .amende-table tbody,
  .amende-table tfoot,
  .amende-table tr,
  .amende-table th,
  .amende-table td {
    display: revert;
    width: auto;
  }

  .amende-table {
    min-width: 100%;
    width: 100%;
    max-width: none;
    table-layout: auto;
    border-collapse: collapse;
    font-size: 13px;
    transform-origin: left top;
  }

  .amende-table thead,
  .amende-table tfoot {
    display: table-header-group;
  }

  .amende-table tfoot {
    display: table-footer-group;
  }

  .amende-table th,
  .amende-table td {
    padding: 0.32em 0.38em;
    white-space: nowrap;
    vertical-align: middle;
    font-size: inherit;
    line-height: 1.25;
    border-bottom: 1px solid rgba(14, 165, 233, 0.12);
  }

  .amende-table tbody td[data-label]::before {
    display: none;
  }

  .amende-col-date,
  .amende-col-type,
  .amende-col-status,
  .amende-col-actions,
  .amende-col-amount,
  .amende-col-paid,
  .amende-col-remain {
    grid-area: auto;
    width: auto;
    min-width: 0;
    border-top: 0;
    text-align: inherit;
    font-size: inherit;
    padding-top: 0.32em;
  }

  .amende-col-detail {
    grid-area: auto;
    width: 100%;
    min-width: 0;
    border-top: 0;
    text-align: inherit;
    font-size: inherit;
    padding-top: 0.32em;
  }

  .amende-table .num {
    text-align: right;
  }

  .amende-chip {
    font-size: 0.85em;
    padding: 0.12em 0.4em;
  }

  .amende-table .btn-primary,
  .amende-table .btn-secondary,
  .amende-table .btn-delete,
  .amende-table .btn-autre-argent-delete,
  .amende-table .btn-pret-delete,
  .amende-table .pret-date-cell-btn {
    width: auto !important;
    min-height: 0 !important;
    min-width: 0;
    padding: 0.18em 0.45em;
    font-size: 0.85em;
    white-space: nowrap;
    display: inline-flex;
    align-items: center;
    justify-content: center;
  }

  .amende-table .pret-request-date-input {
    width: auto !important;
    max-width: 8.5em;
    min-height: 0;
    padding: 0.1em 0.2em;
    font-size: inherit;
  }

  .amende-admin-actions {
    flex-direction: row;
    flex-wrap: nowrap;
    align-items: center;
    gap: 0.3em;
    width: auto;
  }

  .amende-table .pret-repay-history {
    display: none;
  }

  .table-wrap {
    overflow: hidden;
  }

  .table-wrap table {
    width: 100%;
    min-width: 100%;
    max-width: none;
    transform-origin: left top;
  }

  .table-wrap th,
  .table-wrap td {
    white-space: nowrap;
    padding: 0.32em 0.4em;
    vertical-align: middle;
  }

  .evenement-pay-actions,
  .dette-td-actions {
    flex-wrap: nowrap;
    min-width: 0;
  }

  .amende-table tbody tr.amende-detail-row {
    display: none;
  }

  .th-full {
    display: none;
  }

  .th-short {
    display: inline;
  }
}

.communication-panel {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.communication-composer {
  padding: 1rem 1.05rem;
  border: 1px solid var(--border);
  border-radius: 16px;
  background: linear-gradient(180deg, #ffffff 0%, #f0f9ff 100%);
}

.communication-composer h3 {
  margin: 0 0 0.75rem;
  font-family: var(--font-display);
  font-size: 1.05rem;
}

.communication-form.pret-form {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

.communication-body-field textarea {
  width: 100%;
  min-height: 12rem;
  padding: 0.75rem 0.9rem;
  border: 1px solid var(--border);
  border-radius: 12px;
  background: #fff;
  color: var(--text);
  font-family: inherit;
  font-size: 0.95rem;
  line-height: 1.5;
  resize: vertical;
}

.communication-body-field textarea:focus {
  outline: none;
  border-color: var(--primary);
  box-shadow: 0 0 0 4px var(--primary-light);
}

.communication-list {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

.communication-empty {
  margin: 0;
  padding: 1.1rem;
  text-align: center;
  color: var(--text-muted);
  border: 1px dashed var(--border);
  border-radius: 16px;
  background: #fff;
}

.communication-card {
  padding: 1rem 1.05rem;
  border: 1px solid var(--border);
  border-radius: 16px;
  background: #fff;
  box-shadow: var(--shadow-soft);
}

.communication-card-head h3 {
  margin: 0 0 0.2rem;
  font-family: var(--font-display);
  font-size: 1.05rem;
  color: var(--navy);
}

.communication-card-meta {
  margin: 0;
  font-size: 0.82rem;
  color: var(--text-muted);
}

.communication-card-body {
  margin: 0.7rem 0 0;
  white-space: pre-wrap;
  line-height: 1.55;
  color: var(--text);
}

.communication-card-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
  margin-top: 0.85rem;
}

.comm-count {
  display: inline-flex;
  min-width: 1.15rem;
  margin-left: 0.35rem;
  padding: 0.05rem 0.4rem;
  border-radius: 999px;
  background: var(--primary);
  color: #fff;
  font-size: 0.72rem;
  font-weight: 700;
  line-height: 1.3;
  vertical-align: middle;
}

@media (display-mode: standalone) {
  .install-banner#installBanner,
  .install-login-hint {
    display: none !important;
  }
}

.backup-panel {
  display: flex;
  flex-direction: column;
  gap: 0.9rem;
}

.backup-status-card {
  padding: 1.05rem 1.1rem;
  border: 1px solid rgba(2, 132, 199, 0.28);
  border-radius: 16px;
  background: linear-gradient(180deg, #f0f9ff 0%, #ffffff 100%);
  box-shadow: var(--shadow-soft);
}

.backup-status-kicker {
  margin: 0 0 0.25rem;
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--primary);
}

.backup-status-card h3 {
  margin: 0 0 0.45rem;
  font-family: var(--font-display);
  font-size: 1.15rem;
  color: var(--navy);
}

.backup-status-copy,
.backup-status-loading {
  margin: 0;
  color: var(--text);
  line-height: 1.5;
  font-size: 0.92rem;
}

.backup-status-stats {
  display: flex;
  flex-wrap: wrap;
  gap: 0.45rem 0.7rem;
  list-style: none;
  margin: 0.85rem 0 0;
  padding: 0;
}

.backup-status-stats li {
  padding: 0.35rem 0.65rem;
  border-radius: 999px;
  background: #fff;
  border: 1px solid var(--border);
  font-size: 0.82rem;
  color: var(--text);
}

.backup-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.55rem;
}

.backup-import-label {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  margin: 0;
}

.backup-keys {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
  gap: 0.45rem;
}

.backup-key-row {
  display: flex;
  justify-content: space-between;
  gap: 0.6rem;
  padding: 0.6rem 0.75rem;
  border-radius: 12px;
  background: #fff;
  border: 1px solid var(--border);
  font-size: 0.85rem;
}

.backup-key-row.is-present strong {
  color: #15803d;
}

.backup-key-row.is-missing strong {
  color: var(--danger);
}

/* Smartphone : tailles compactes, lisibles, légères */
@media (max-width: 767px) {
  :root {
    --font-body: system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
    --font-display: system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
    --font-brand: system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
    --page-pad: 0.7rem;
    --radius: 14px;
    --shadow-card: 0 4px 14px rgba(14, 165, 233, 0.08);
    --shadow-soft: 0 1px 6px rgba(15, 23, 42, 0.04);
  }

  html,
  body {
    overflow-x: clip;
  }

  body {
    font-size: 0.95rem;
    line-height: 1.45;
    background: #e8f4fc;
  }

  button,
  a,
  .tab,
  .gestion-subtab,
  .finance-subtab,
  input,
  select,
  textarea {
    touch-action: manipulation;
    -webkit-tap-highlight-color: rgba(2, 132, 199, 0.18);
  }

  .panel,
  .modal,
  .modal-overlay,
  .communication-composer,
  .amende-hero {
    backdrop-filter: none !important;
    -webkit-backdrop-filter: none !important;
  }

  .tab-content.active,
  .gestion-subpanel.is-active {
    animation: none;
  }

  .app {
    padding-bottom: max(1.25rem, env(safe-area-inset-bottom));
  }

  .topbar {
    top: 0;
    padding-top: env(safe-area-inset-top);
  }

  .header-brand-row {
    padding-top: 0.35rem;
    padding-bottom: 0.1rem;
    column-gap: 0.4rem;
  }

  .brand-name,
  .topbar .brand-name {
    font-size: 1.12rem;
    font-style: normal;
    font-weight: 700;
  }

  .topbar .tab,
  .tab {
    min-height: 40px;
    padding: 0.42rem 0.72rem;
    font-size: 0.8rem;
    border-radius: 999px;
  }

  .panel {
    padding: 0.7rem 0.75rem;
    border-radius: 14px;
    overflow: visible;
  }

  .panel h2 {
    font-size: 1.05rem;
    font-style: normal;
    margin-bottom: 0.35rem;
  }

  .panel-desc,
  .pret-summary-formula,
  .pret-due-dates,
  .pret-loan-date,
  .pret-loan-note {
    font-size: 0.78rem;
    line-height: 1.4;
    white-space: normal;
  }

  .tab-content {
    gap: 0.7rem;
  }

  .pret-summary,
  .finance-dashboard {
    gap: 0.4rem;
    grid-template-columns: 1fr 1fr;
  }

  .pret-summary-card,
  .finance-stat {
    padding: 0.55rem 0.65rem;
    border-radius: 12px;
  }

  .pret-summary-label,
  .finance-stat-label {
    font-size: 0.64rem;
  }

  .pret-summary-amount,
  .pret-summary-card strong,
  .finance-stat strong {
    font-size: 1.05rem;
  }

  .amende-hero {
    padding: 0.75rem 0.8rem;
    gap: 0.65rem;
    border-radius: 14px;
  }

  .amende-hero-amount,
  .amende-hero-copy strong {
    font-size: 1.35rem;
  }

  .amende-hero-meta,
  .amende-hero-kicker {
    font-size: 0.72rem;
  }

  .amende-table tbody tr {
    gap: 0.32rem 0.5rem;
    margin-bottom: 0.55rem;
    padding: 0.7rem 0.75rem;
    border-radius: 14px;
    box-shadow: none;
  }

  .amende-table tbody td[data-label]::before {
    font-size: 0.6rem;
    margin-bottom: 0.06rem;
  }

  .amende-col-date .pret-request-date-input,
  .pret-date-cell-btn {
    width: 100%;
    max-width: 100%;
    font-size: 0.92rem;
  }

  .amende-admin-actions {
    gap: 0.4rem;
    width: 100%;
  }

  .amende-admin-actions .pret-repay-form,
  .amende-admin-actions .btn-primary,
  .amende-admin-actions .btn-secondary,
  .amende-admin-actions .btn-pret-delete {
    width: 100%;
  }

  .pret-repay-form {
    gap: 0.35rem;
  }

  .gestion-subtabs,
  .finance-subtabs {
    gap: 0.25rem;
    padding-bottom: 0.35rem;
  }

  .gestion-subtab,
  .finance-subtab {
    min-height: 38px;
    padding: 0.38rem 0.7rem;
    font-size: 0.78rem;
  }

  .modal-hero {
    padding: 1.15rem 1rem 0.45rem;
  }

  .modal-hero h3,
  .brand-name-modal {
    font-size: 1.2rem;
    font-style: normal;
  }

  .modal form {
    padding: 0.7rem 1rem 1.1rem;
    gap: 0.7rem;
  }

  .communication-body-field textarea {
    min-height: 8rem;
    font-size: 16px;
  }

  .communication-card,
  .communication-composer {
    padding: 0.75rem 0.8rem;
  }

  .member-item,
  .admin-item,
  .pret-loan-card {
    padding: 0.6rem 0.7rem;
  }

  .install-banner {
    padding: 0.7rem 0.75rem;
    border-radius: 14px;
  }
}

@media (max-width: 430px) {
  .pret-summary,
  .finance-dashboard,
  .dette-dashboard-chips {
    grid-template-columns: 1fr;
  }

  .pret-summary-formula,
  .finance-stat-note {
    display: none;
  }

  .tab,
  .topbar .tab {
    padding: 0.4rem 0.62rem;
    font-size: 0.76rem;
  }

  .panel h2 {
    font-size: 0.98rem;
  }
}

@media (max-width: 900px) {
  .amende-table-wrap .amende-table td .btn-primary,
  .amende-table-wrap .amende-table td .btn-secondary,
  .amende-table-wrap .amende-table td .btn-delete,
  .amende-table-wrap .amende-table td .btn-autre-argent-delete,
  .amende-table-wrap .amende-table td .btn-pret-delete,
  .amende-table-wrap .amende-table .pret-date-cell-btn,
  .amende-table-wrap .amende-table .pret-request-date-input {
    width: auto !important;
    max-width: none;
    min-height: 0 !important;
  }

  .amende-table-wrap .amende-admin-actions {
    width: auto;
    flex-wrap: nowrap;
  }
}