/* =====================================================================
   assets/css/base/theme.css — charte de l'application (thème clair).
   Reprise de la charte validée des maquettes (_docs/maquettes/assets/maquette.css,
   26 octobre 2026) suivie des compléments propres à l'application (extra.css,
   concaténé). Variables Bootstrap surchargées ici ; un fichier par module
   dans assets/css/<module>/ pour le reste.
   ===================================================================== */


:root {
  /* Typographie */
  --pos-font: "Public Sans", system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  --pos-mono: "IBM Plex Mono", ui-monospace, "Cascadia Mono", Consolas, monospace;

  /* Couleurs de marque (sobres) */
  --pos-primary: #1d5c8a;
  --pos-primary-hover: #174b71;
  --pos-primary-soft: #e6eff6;
  --pos-success: #1e7f4f;
  --pos-success-soft: #e2f3ea;
  --pos-warning: #a46a10;
  --pos-warning-soft: #fbefd8;
  --pos-danger: #b4322e;
  --pos-danger-soft: #f9e4e3;
  --pos-info: #2f6f9f;
  --pos-info-soft: #e7f0f8;
  --pos-neutral-soft: #eceff3;

  /* Neutres (légèrement bleutés) */
  --pos-bg: #f3f5f8;
  --pos-surface: #ffffff;
  --pos-border: #d8dee6;
  --pos-text: #1b2532;
  --pos-muted: #5b6878;

  /* Barre latérale */
  --pos-sidebar-bg: #15324a;
  --pos-sidebar-text: #d7e3ee;
  --pos-sidebar-muted: #8fa9bf;
  --pos-sidebar-active: #1d5c8a;
  --pos-sidebar-hover: rgba(255, 255, 255, 0.08);

  /* Dimensions */
  --pos-header-h: 56px;
  --pos-tabbar-h: 64px;
  --pos-sidebar-w: 264px;
  --pos-rail-w: 80px;
  --pos-radius: 10px;
  --pos-touch: 48px;
}

html, body { height: 100%; }
body {
  font-family: var(--pos-font);
  background: var(--pos-bg);
  color: var(--pos-text);
  font-size: 15px;
  line-height: 1.45;
  -webkit-font-smoothing: antialiased;
}
h1, h2, h3, h4, h5 { font-weight: 650; letter-spacing: -0.01em; text-wrap: balance; }
.num, .money, td.money, .kpi-value { font-variant-numeric: tabular-nums; }
.mono { font-family: var(--pos-mono); font-size: 0.92em; }
.text-muted { color: var(--pos-muted) !important; }
.small-caps { font-size: 0.72rem; text-transform: uppercase; letter-spacing: 0.06em; font-weight: 600; color: var(--pos-muted); }

/* ---- Surcharges Bootstrap (couleur de marque) ---- */
a { color: var(--pos-primary); }
.btn { border-radius: 8px; font-weight: 600; }
.btn:focus-visible, .form-control:focus-visible, a:focus-visible, button:focus-visible { outline: 3px solid rgba(29, 92, 138, 0.45); outline-offset: 2px; }
.btn-primary {
  --bs-btn-bg: var(--pos-primary); --bs-btn-border-color: var(--pos-primary);
  --bs-btn-hover-bg: var(--pos-primary-hover); --bs-btn-hover-border-color: var(--pos-primary-hover);
  --bs-btn-active-bg: var(--pos-primary-hover); --bs-btn-active-border-color: var(--pos-primary-hover);
  --bs-btn-disabled-bg: #8fa9bf; --bs-btn-disabled-border-color: #8fa9bf;
}
.btn-outline-primary {
  --bs-btn-color: var(--pos-primary); --bs-btn-border-color: var(--pos-primary);
  --bs-btn-hover-bg: var(--pos-primary); --bs-btn-hover-border-color: var(--pos-primary);
  --bs-btn-active-bg: var(--pos-primary); --bs-btn-active-border-color: var(--pos-primary);
}
.btn-success { --bs-btn-bg: var(--pos-success); --bs-btn-border-color: var(--pos-success); --bs-btn-hover-bg: #176a41; --bs-btn-hover-border-color: #176a41; --bs-btn-active-bg: #176a41; --bs-btn-active-border-color: #176a41; }
.btn-danger { --bs-btn-bg: var(--pos-danger); --bs-btn-border-color: var(--pos-danger); --bs-btn-hover-bg: #962a26; --bs-btn-hover-border-color: #962a26; --bs-btn-active-bg: #962a26; --bs-btn-active-border-color: #962a26; }
.btn-outline-danger { --bs-btn-color: var(--pos-danger); --bs-btn-border-color: var(--pos-danger); --bs-btn-hover-bg: var(--pos-danger); --bs-btn-hover-border-color: var(--pos-danger); }
.btn-outline-secondary { --bs-btn-color: var(--pos-text); --bs-btn-border-color: var(--pos-border); --bs-btn-hover-bg: var(--pos-neutral-soft); --bs-btn-hover-color: var(--pos-text); --bs-btn-hover-border-color: var(--pos-border); }
.btn-light { --bs-btn-bg: var(--pos-surface); --bs-btn-border-color: var(--pos-border); --bs-btn-hover-bg: var(--pos-neutral-soft); --bs-btn-hover-border-color: var(--pos-border); }
.text-primary { color: var(--pos-primary) !important; }
.bg-primary { background-color: var(--pos-primary) !important; }
.border { border-color: var(--pos-border) !important; }
.form-control, .form-select { border-color: var(--pos-border); border-radius: 8px; min-height: 44px; }
.form-control:focus, .form-select:focus { border-color: var(--pos-primary); box-shadow: 0 0 0 0.25rem rgba(29, 92, 138, 0.18); }
.form-check-input:checked { background-color: var(--pos-primary); border-color: var(--pos-primary); }
.nav-pills .nav-link { color: var(--pos-text); border-radius: 8px; }
.nav-pills .nav-link.active { background: var(--pos-primary); }
.card { border-color: var(--pos-border); border-radius: var(--pos-radius); }
.card-header { background: transparent; border-bottom-color: var(--pos-border); font-weight: 650; }
.table { --bs-table-border-color: var(--pos-border); }
.table thead th { font-size: 0.75rem; text-transform: uppercase; letter-spacing: 0.05em; color: var(--pos-muted); font-weight: 600; border-bottom-width: 1px; white-space: nowrap; }
.table td { vertical-align: middle; }
.table-hover tbody tr:hover { background: var(--pos-primary-soft); }
.list-group-item { border-color: var(--pos-border); }
.alert { border-radius: var(--pos-radius); }
.alert-warning { background: var(--pos-warning-soft); border-color: #ecd6a6; color: #5e3d06; }
.alert-danger { background: var(--pos-danger-soft); border-color: #efc1be; color: #6f1e1b; }
.alert-success { background: var(--pos-success-soft); border-color: #bfe3cd; color: #124a2e; }
.alert-info { background: var(--pos-info-soft); border-color: #c3d8ea; color: #1b4466; }
.dropdown-menu { border-color: var(--pos-border); border-radius: var(--pos-radius); box-shadow: 0 10px 30px rgba(20, 35, 50, 0.12); }

/* ---- Boutons tactiles ---- */
.btn { min-height: 40px; }
.btn-pos { min-height: 56px; font-size: 1.05rem; padding-inline: 1.25rem; }
.btn-xl { min-height: 72px; font-size: 1.3rem; padding-inline: 1.5rem; border-radius: 12px; }
.btn-icon { display: inline-flex; align-items: center; justify-content: center; gap: 0.5rem; }
.btn-square { width: var(--pos-touch); height: var(--pos-touch); padding: 0; display: inline-flex; align-items: center; justify-content: center; }

/* ---- Icônes ---- */
.ico { width: 1.25em; height: 1.25em; stroke: currentColor; fill: none; stroke-width: 1.9; stroke-linecap: round; stroke-linejoin: round; flex: none; vertical-align: -0.28em; }
.ico-lg { width: 1.6em; height: 1.6em; }
.ico-xl { width: 2.4em; height: 2.4em; stroke-width: 1.6; }

/* =====================================================================
   COQUILLE : barre latérale, en-tête, barre d'onglets
   ===================================================================== */
.pos-app { min-height: 100%; display: flex; }
.pos-body { flex: 1 1 auto; min-width: 0; display: flex; flex-direction: column; min-height: 100vh; }
.pos-main { flex: 1; padding: 1rem; padding-bottom: calc(var(--pos-tabbar-h) + 1.25rem); max-width: 1440px; width: 100%; }

/* Barre latérale (tiroir sur mobile) */
.pos-sidebar {
  position: fixed; top: 0; bottom: 0; left: 0; width: var(--pos-sidebar-w);
  background: var(--pos-sidebar-bg); color: var(--pos-sidebar-text);
  display: flex; flex-direction: column; z-index: 1045;
  transform: translateX(-102%); transition: transform 0.2s ease, width 0.2s ease;
  overflow: hidden;
}
.pos-app.menu-open .pos-sidebar { transform: none; box-shadow: 0 0 40px rgba(0, 0, 0, 0.35); }
.pos-scrim { position: fixed; inset: 0; background: rgba(8, 18, 28, 0.5); z-index: 1040; display: none; }
.pos-app.menu-open .pos-scrim { display: block; }

.pos-brand { display: flex; align-items: center; gap: 0.75rem; padding: 0.9rem 1rem; min-height: var(--pos-header-h); border-bottom: 1px solid rgba(255, 255, 255, 0.08); }
.pos-brand-logo { width: 36px; height: 36px; border-radius: 9px; background: var(--pos-primary); color: #fff; display: grid; place-items: center; flex: none; font-weight: 700; }
.pos-brand-text { min-width: 0; line-height: 1.2; }
.pos-brand-app { font-size: 0.72rem; text-transform: uppercase; letter-spacing: 0.08em; color: var(--pos-sidebar-muted); }
.pos-brand-church { font-weight: 650; color: #fff; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.pos-brand-close { margin-left: auto; background: none; border: 0; color: var(--pos-sidebar-text); width: 40px; height: 40px; border-radius: 8px; display: grid; place-items: center; }
.pos-brand-close:hover { background: var(--pos-sidebar-hover); }

.pos-nav { flex: 1; overflow-y: auto; padding: 0.5rem 0.6rem; }
.pos-nav-group { margin-top: 0.75rem; }
.pos-nav-group-label { font-size: 0.68rem; text-transform: uppercase; letter-spacing: 0.09em; color: var(--pos-sidebar-muted); padding: 0.35rem 0.6rem; font-weight: 600; }
.pos-nav-item {
  display: flex; align-items: center; gap: 0.75rem; padding: 0.55rem 0.65rem; border-radius: 8px;
  color: var(--pos-sidebar-text); text-decoration: none; min-height: 44px; font-weight: 500; position: relative;
}
.pos-nav-item:hover { background: var(--pos-sidebar-hover); color: #fff; }
.pos-nav-item.active { background: var(--pos-sidebar-active); color: #fff; font-weight: 650; }
.pos-nav-item .ico { width: 22px; height: 22px; }
.pos-nav-item .lbl { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.pos-nav-item .lbl-short { display: none; line-height: 1.1; }
.pos-nav-badge { margin-left: auto; background: var(--pos-warning); color: #fff; font-size: 0.7rem; font-weight: 700; border-radius: 999px; padding: 0.1rem 0.5rem; min-width: 1.5rem; text-align: center; }
.pos-nav-item.active .pos-nav-badge { background: #fff; color: var(--pos-primary); }

.pos-sidebar-foot { border-top: 1px solid rgba(255, 255, 255, 0.08); padding: 0.75rem; display: flex; align-items: center; gap: 0.6rem; }
.pos-avatar { width: 36px; height: 36px; border-radius: 50%; background: #e9eef3; color: var(--pos-primary); font-weight: 700; display: grid; place-items: center; font-size: 0.85rem; flex: none; }
.pos-sidebar-foot .who { min-width: 0; line-height: 1.2; flex: 1; }
.pos-sidebar-foot .who .name { color: #fff; font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.pos-sidebar-foot .who .role { font-size: 0.75rem; color: var(--pos-sidebar-muted); }
.pos-sidebar-foot .out { background: none; border: 0; color: var(--pos-sidebar-muted); width: 40px; height: 40px; border-radius: 8px; display: grid; place-items: center; }
.pos-sidebar-foot .out:hover { background: var(--pos-sidebar-hover); color: #fff; }
.pos-collapse-btn { display: none; }

/* En-tête */
.pos-header {
  position: sticky; top: 0; z-index: 1030; min-height: var(--pos-header-h);
  background: var(--pos-surface); border-bottom: 1px solid var(--pos-border);
  display: flex; align-items: center; gap: 0.5rem; padding: 0 0.75rem;
}
.pos-menu-btn { width: 44px; height: 44px; border: 0; background: none; border-radius: 8px; display: grid; place-items: center; color: var(--pos-text); flex: none; }
.pos-menu-btn:hover { background: var(--pos-neutral-soft); }
.pos-titles { min-width: 0; flex: 1; line-height: 1.15; }
.pos-crumb { font-size: 0.72rem; color: var(--pos-muted); text-transform: uppercase; letter-spacing: 0.06em; display: none; }
.pos-title { font-size: 1.05rem; font-weight: 650; margin: 0; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.pos-status { display: flex; align-items: center; gap: 0.4rem; flex: none; }
.pos-pill {
  display: inline-flex; align-items: center; gap: 0.4rem; border: 1px solid var(--pos-border); border-radius: 999px;
  padding: 0.3rem 0.7rem; font-size: 0.8rem; background: var(--pos-surface); color: var(--pos-text); white-space: nowrap; min-height: 36px;
  text-decoration: none; cursor: pointer;
}
.pos-pill .dot { width: 9px; height: 9px; border-radius: 50%; background: var(--pos-success); box-shadow: 0 0 0 3px var(--pos-success-soft); flex: none; }
.pos-pill.is-off .dot { background: var(--pos-danger); box-shadow: 0 0 0 3px var(--pos-danger-soft); }
.pos-pill.is-off { border-color: #efc1be; background: var(--pos-danger-soft); color: #6f1e1b; }
.pos-pill.is-warn .dot { background: var(--pos-warning); box-shadow: 0 0 0 3px var(--pos-warning-soft); }
.pos-pill .sub { color: var(--pos-muted); }
.pos-pill-text { display: none; }
.pos-user-btn { display: inline-flex; align-items: center; gap: 0.5rem; border: 0; background: none; padding: 0.25rem; border-radius: 999px; min-height: 44px; }
.pos-user-btn:hover { background: var(--pos-neutral-soft); }
.pos-user-btn .who { display: none; text-align: left; line-height: 1.15; }
.pos-user-btn .who .name { font-weight: 600; font-size: 0.85rem; }
.pos-user-btn .who .church { font-size: 0.72rem; color: var(--pos-muted); }

/* Bannières d'état */
.pos-banner { display: flex; gap: 0.75rem; align-items: center; padding: 0.6rem 1rem; font-size: 0.9rem; border-bottom: 1px solid transparent; }
.pos-banner .ico { flex: none; }
.pos-banner.offline { background: var(--pos-danger-soft); color: #6f1e1b; border-color: #efc1be; }
.pos-banner.training { background: var(--pos-warning-soft); color: #5e3d06; border-color: #ecd6a6; }
.pos-banner.warn { background: var(--pos-warning-soft); color: #5e3d06; border-color: #ecd6a6; }
.pos-banner .btn { margin-left: auto; white-space: nowrap; }

/* Barre d'onglets (mobile) */
.pos-tabbar {
  position: fixed; left: 0; right: 0; bottom: 0; height: var(--pos-tabbar-h); z-index: 1030;
  background: var(--pos-surface); border-top: 1px solid var(--pos-border); display: flex;
  padding-bottom: env(safe-area-inset-bottom, 0px);
}
.pos-tabbar a, .pos-tabbar button {
  flex: 1; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 3px;
  font-size: 0.7rem; color: var(--pos-muted); text-decoration: none; border: 0; background: none; font-weight: 500; min-width: 0;
}
.pos-tabbar .ico { width: 24px; height: 24px; }
.pos-tabbar .active { color: var(--pos-primary); font-weight: 650; }
.pos-tabbar .active .ico { stroke-width: 2.3; }
.pos-tabbar .lbl { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: 100%; }

/* Feuille d'état / menu utilisateur (mobile) */
.pos-sheet { position: fixed; inset: 0; z-index: 1050; display: none; }
.pos-sheet.open { display: block; }
.pos-sheet .back { position: absolute; inset: 0; background: rgba(8, 18, 28, 0.5); }
.pos-sheet .panel {
  position: absolute; left: 0; right: 0; bottom: 0; background: var(--pos-surface); border-radius: 16px 16px 0 0;
  padding: 0.75rem 1rem calc(1rem + env(safe-area-inset-bottom, 0px)); max-height: 85vh; overflow: auto;
}
.pos-sheet .grip { width: 40px; height: 4px; border-radius: 2px; background: var(--pos-border); margin: 0 auto 0.75rem; }
.pos-sheet .row-item { display: flex; align-items: center; gap: 0.75rem; padding: 0.7rem 0; border-bottom: 1px solid var(--pos-border); }
.pos-sheet .row-item:last-child { border-bottom: 0; }
.pos-sheet .row-item .k { font-size: 0.72rem; text-transform: uppercase; letter-spacing: 0.06em; color: var(--pos-muted); }
.pos-sheet .row-item .v { font-weight: 600; }
.pos-sheet .actions { display: grid; gap: 0.5rem; margin-top: 0.75rem; }
.pos-sheet .actions .btn { justify-content: flex-start; min-height: 48px; }

/* Menu utilisateur (bureau) */
.pos-pop { position: absolute; right: 0.75rem; top: calc(var(--pos-header-h) - 6px); width: 300px; background: var(--pos-surface); border: 1px solid var(--pos-border); border-radius: var(--pos-radius); box-shadow: 0 14px 40px rgba(20, 35, 50, 0.16); z-index: 1060; display: none; padding: 0.5rem; }
.pos-pop.open { display: block; }
.pos-pop .head { padding: 0.6rem 0.75rem; border-bottom: 1px solid var(--pos-border); margin-bottom: 0.4rem; }
.pos-pop .head .name { font-weight: 650; }
.pos-pop .head .sub { font-size: 0.8rem; color: var(--pos-muted); }
.pos-pop a, .pos-pop button { display: flex; align-items: center; gap: 0.6rem; width: 100%; padding: 0.55rem 0.75rem; border: 0; background: none; border-radius: 8px; color: var(--pos-text); text-decoration: none; text-align: left; min-height: 42px; }
.pos-pop a:hover, .pos-pop button:hover { background: var(--pos-primary-soft); }
.pos-pop .lang { display: flex; gap: 0.35rem; padding: 0.4rem 0.75rem; }
.pos-pop .lang .btn { min-height: 34px; padding: 0.15rem 0.6rem; font-size: 0.8rem; }

/* ---- Tablette : rail d'icônes ---- */
@media (min-width: 768px) {
  .pos-tabbar { display: none; }
  .pos-main { padding: 1.25rem 1.5rem; }
  .pos-sidebar { transform: none; width: var(--pos-rail-w); }
  .pos-body { margin-left: var(--pos-rail-w); }
  .pos-app.menu-open .pos-sidebar { width: var(--pos-sidebar-w); }
  .pos-app:not(.menu-open) .pos-brand-text, .pos-app:not(.menu-open) .pos-brand-close,
  .pos-app:not(.menu-open) .pos-nav-group-label, .pos-app:not(.menu-open) .pos-sidebar-foot .who,
  .pos-app:not(.menu-open) .pos-sidebar-foot .out { display: none; }
  .pos-app:not(.menu-open) .pos-brand { justify-content: center; padding-inline: 0.5rem; }
  .pos-app:not(.menu-open) .pos-nav-group { margin-top: 0.4rem; padding-top: 0.4rem; border-top: 1px solid rgba(255, 255, 255, 0.08); }
  .pos-app:not(.menu-open) .pos-nav-group:first-child { border-top: 0; }
  .pos-app:not(.menu-open) .pos-nav { padding-inline: 0.3rem; }
  .pos-app:not(.menu-open) .pos-nav-item { flex-direction: column; gap: 3px; padding: 0.5rem 0.15rem; font-size: 0.64rem; text-align: center; }
  .pos-app:not(.menu-open) .pos-nav-item .lbl { display: none; }
  .pos-app:not(.menu-open) .pos-nav-item .lbl-short { display: block; max-width: 100%; }
  .pos-app:not(.menu-open) .pos-nav-badge { position: absolute; top: 4px; right: 8px; margin: 0; }
  .pos-app:not(.menu-open) .pos-sidebar-foot { justify-content: center; }
  .pos-crumb { display: block; }
  .pos-pill-text { display: inline; }
  .pos-status-compact { display: none !important; }
}

/* ---- Ordinateur : barre latérale complète, repliable ---- */
@media (min-width: 1200px) {
  .pos-sidebar { width: var(--pos-sidebar-w); }
  .pos-body { margin-left: var(--pos-sidebar-w); }
  .pos-menu-btn { display: none; }
  .pos-scrim { display: none !important; }
  .pos-collapse-btn { display: grid; place-items: center; width: 36px; height: 36px; border: 0; background: none; color: var(--pos-sidebar-muted); border-radius: 8px; margin-left: auto; }
  .pos-collapse-btn:hover { background: var(--pos-sidebar-hover); color: #fff; }
  .pos-app:not(.menu-open) .pos-brand-text, .pos-app:not(.menu-open) .pos-nav-group-label,
  .pos-app:not(.menu-open) .pos-sidebar-foot .who, .pos-app:not(.menu-open) .pos-sidebar-foot .out { display: initial; }
  .pos-app:not(.menu-open) .pos-brand { justify-content: flex-start; padding-inline: 1rem; }
  .pos-app:not(.menu-open) .pos-nav-group { border-top: 0; margin-top: 0.75rem; padding-top: 0; }
  .pos-app:not(.menu-open) .pos-nav { padding-inline: 0.6rem; }
  .pos-app:not(.menu-open) .pos-nav-item { flex-direction: row; gap: 0.75rem; padding: 0.55rem 0.65rem; font-size: inherit; text-align: left; }
  .pos-app:not(.menu-open) .pos-nav-item .lbl { display: block; }
  .pos-app:not(.menu-open) .pos-nav-item .lbl-short { display: none; }
  .pos-app:not(.menu-open) .pos-nav-badge { position: static; margin-left: auto; }
  .pos-user-btn .who { display: block; }
  .pos-app:not(.menu-open) .pos-sidebar-foot { justify-content: flex-start; }
  .pos-app:not(.menu-open) .pos-sidebar-foot .who { display: block; }
  .pos-app:not(.menu-open) .pos-sidebar-foot .out { display: grid; }
  /* Replié (bureau) */
  .pos-app.collapsed .pos-sidebar { width: var(--pos-rail-w); }
  .pos-app.collapsed .pos-body { margin-left: var(--pos-rail-w); }
  .pos-app.collapsed .pos-brand-text, .pos-app.collapsed .pos-nav-group-label,
  .pos-app.collapsed .pos-sidebar-foot .who, .pos-app.collapsed .pos-sidebar-foot .out { display: none !important; }
  .pos-app.collapsed .pos-brand { flex-wrap: wrap; justify-content: center; padding-inline: 0.5rem; gap: 0.4rem; }
  .pos-app.collapsed .pos-collapse-btn { margin: 0; }
  .pos-app.collapsed .pos-nav-group { margin-top: 0.4rem; padding-top: 0.4rem; border-top: 1px solid rgba(255, 255, 255, 0.08); }
  .pos-app.collapsed .pos-nav { padding-inline: 0.3rem; }
  .pos-app.collapsed .pos-nav-item { flex-direction: column; gap: 3px; padding: 0.5rem 0.15rem; font-size: 0.64rem; text-align: center; }
  .pos-app.collapsed .pos-nav-item .lbl { display: none; }
  .pos-app.collapsed .pos-nav-item .lbl-short { display: block; }
  .pos-app.collapsed .pos-user-btn .who { display: block; }
  .pos-app.collapsed .pos-nav-badge { position: absolute; top: 4px; right: 8px; margin: 0; }
  .pos-app.collapsed .pos-sidebar-foot { justify-content: center; }
}

/* =====================================================================
   MODE « APRÈS CULTE » (plein écran, gros boutons)
   ===================================================================== */
body.culte { font-size: 17px; }
.culte-bar { position: sticky; top: 0; z-index: 1030; background: var(--pos-sidebar-bg); color: #fff; display: flex; align-items: center; gap: 0.4rem 0.75rem; padding: 0.5rem 0.9rem; min-height: 60px; flex-wrap: wrap; }
.culte-bar .tag { background: var(--pos-warning); color: #fff; font-weight: 700; font-size: 0.75rem; text-transform: uppercase; letter-spacing: 0.08em; padding: 0.25rem 0.6rem; border-radius: 6px; white-space: nowrap; }
.culte-bar .info { font-size: 0.85rem; color: #d7e3ee; min-width: 0; flex: 1 1 100%; order: 3; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.culte-bar .info span + span::before { content: " · "; color: var(--pos-sidebar-muted); }
.culte-bar .info b { color: #fff; }
.culte-bar .btn { margin-left: auto; }
@media (min-width: 768px) { .culte-bar .info { flex: 1 1 auto; order: 0; } }
.culte-main { padding: 0.9rem; max-width: 1440px; }

/* =====================================================================
   COMPOSANTS DE PAGE
   ===================================================================== */
.page-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 1rem; flex-wrap: wrap; margin-bottom: 1rem; }
.page-head h2 { font-size: 1.35rem; margin: 0; }
.page-head .lead-sm { color: var(--pos-muted); font-size: 0.9rem; margin: 0.15rem 0 0; }
.page-actions { display: flex; gap: 0.5rem; flex-wrap: wrap; }

.kpi-grid { display: grid; gap: 0.75rem; grid-template-columns: repeat(2, minmax(0, 1fr)); }
@media (min-width: 768px) { .kpi-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
@media (min-width: 1200px) { .kpi-grid { grid-template-columns: repeat(6, minmax(0, 1fr)); } }
.kpi { background: var(--pos-surface); border: 1px solid var(--pos-border); border-radius: var(--pos-radius); padding: 0.85rem 0.95rem; display: flex; flex-direction: column; gap: 0.2rem; min-width: 0; text-decoration: none; color: inherit; }
.kpi:hover { border-color: var(--pos-primary); }
.kpi-label { font-size: 0.75rem; text-transform: uppercase; letter-spacing: 0.05em; color: var(--pos-muted); font-weight: 600; display: flex; align-items: center; gap: 0.35rem; }
.kpi-value { font-size: 1.45rem; font-weight: 700; line-height: 1.1; white-space: nowrap; }
.kpi-sub { font-size: 0.8rem; color: var(--pos-muted); }
.kpi.warn { border-color: #ecd6a6; background: var(--pos-warning-soft); }
.kpi.danger { border-color: #efc1be; background: var(--pos-danger-soft); }
.kpi.good { border-color: #bfe3cd; background: var(--pos-success-soft); }

/* Badges de statut (identiques partout) */
.st { display: inline-flex; align-items: center; gap: 0.35rem; font-size: 0.75rem; font-weight: 650; border-radius: 999px; padding: 0.2rem 0.6rem; white-space: nowrap; line-height: 1.3; background: var(--pos-neutral-soft); color: var(--pos-text); }
.st::before { content: ""; width: 7px; height: 7px; border-radius: 50%; background: currentColor; opacity: 0.8; }
.st-brouillon { background: var(--pos-neutral-soft); color: #4b5563; }
.st-attente { background: var(--pos-info-soft); color: #1b4466; }
.st-partiel { background: var(--pos-warning-soft); color: #5e3d06; }
.st-credit { background: #ede7f6; color: #4a2f82; }
.st-retard { background: var(--pos-danger-soft); color: #6f1e1b; }
.st-payee { background: var(--pos-success-soft); color: #124a2e; }
.st-annulee { background: #e5e7eb; color: #374151; }
.st-remboursee { background: #fde8d7; color: #7a3b0b; }
.st-sync { background: #e0f2fe; color: #0c4a6e; }
.st-sync::before { animation: pulse 1.4s infinite; }
@keyframes pulse { 0%, 100% { opacity: 0.3; } 50% { opacity: 1; } }
@media (prefers-reduced-motion: reduce) { .st-sync::before { animation: none; } * { transition: none !important; } }

/* Filtres de liste */
.filters { display: flex; gap: 0.5rem; flex-wrap: wrap; align-items: center; margin-bottom: 0.9rem; }
.filters .form-control, .filters .form-select { min-height: 42px; width: auto; }
.filters .search { flex: 1 1 220px; min-width: 0; }
.chips { display: flex; gap: 0.4rem; flex-wrap: wrap; }
.chip { border: 1px solid var(--pos-border); background: var(--pos-surface); border-radius: 999px; padding: 0.3rem 0.75rem; font-size: 0.82rem; min-height: 36px; display: inline-flex; align-items: center; gap: 0.35rem; color: var(--pos-text); font-weight: 500; }
.chip.active { background: var(--pos-primary-soft); border-color: var(--pos-primary); color: var(--pos-primary); font-weight: 650; }

/* Tableaux / cartes de liste */
.table-wrap { overflow-x: auto; background: var(--pos-surface); border: 1px solid var(--pos-border); border-radius: var(--pos-radius); }
.table-wrap .table { margin: 0; }
.row-cards { display: grid; gap: 0.6rem; }
.row-card { background: var(--pos-surface); border: 1px solid var(--pos-border); border-radius: var(--pos-radius); padding: 0.8rem 0.9rem; display: grid; gap: 0.3rem; text-decoration: none; color: inherit; }
.row-card .top { display: flex; justify-content: space-between; gap: 0.5rem; align-items: center; }
.row-card .title { font-weight: 650; }
.row-card .meta { color: var(--pos-muted); font-size: 0.82rem; }
.row-card .amt { font-weight: 700; font-variant-numeric: tabular-nums; }
.only-desktop { display: none; }
@media (min-width: 992px) { .only-desktop { display: block; } .only-mobile { display: none !important; } }

/* Pagination */
.pager { display: flex; justify-content: space-between; align-items: center; gap: 0.5rem; margin-top: 0.75rem; font-size: 0.85rem; color: var(--pos-muted); flex-wrap: wrap; }

/* Listes « à traiter » */
.todo-list .item { display: flex; gap: 0.75rem; align-items: flex-start; padding: 0.7rem 0; border-bottom: 1px solid var(--pos-border); }
.todo-list .item:last-child { border-bottom: 0; }
.todo-list .item .ic { width: 36px; height: 36px; border-radius: 9px; display: grid; place-items: center; flex: none; }
.ic.warn { background: var(--pos-warning-soft); color: var(--pos-warning); }
.ic.danger { background: var(--pos-danger-soft); color: var(--pos-danger); }
.ic.info { background: var(--pos-info-soft); color: var(--pos-info); }
.ic.good { background: var(--pos-success-soft); color: var(--pos-success); }
.ic.neutral { background: var(--pos-neutral-soft); color: var(--pos-muted); }

/* État vide */
.empty { text-align: center; padding: 2.5rem 1rem; color: var(--pos-muted); background: var(--pos-surface); border: 1px dashed var(--pos-border); border-radius: var(--pos-radius); }
.empty .ico { width: 44px; height: 44px; stroke-width: 1.4; color: var(--pos-muted); margin-bottom: 0.5rem; }
.empty h3 { font-size: 1.05rem; color: var(--pos-text); }

/* Caisse */
.pos-layout { display: grid; gap: 1rem; grid-template-columns: minmax(0, 1fr); }
@media (min-width: 992px) { .pos-layout { grid-template-columns: minmax(0, 1.25fr) minmax(360px, 0.9fr); align-items: start; } }
.search-bar { display: flex; gap: 0.5rem; }
.search-bar .form-control { min-height: 52px; font-size: 1.05rem; }
.product-grid { display: grid; gap: 0.6rem; grid-template-columns: repeat(2, minmax(0, 1fr)); }
@media (min-width: 576px) { .product-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
@media (min-width: 1200px) { .product-grid { grid-template-columns: repeat(4, minmax(0, 1fr)); } }
.product { background: var(--pos-surface); border: 1px solid var(--pos-border); border-radius: var(--pos-radius); padding: 0.7rem; display: flex; flex-direction: column; gap: 0.25rem; min-height: 108px; text-align: left; color: inherit; cursor: pointer; }
.product:hover { border-color: var(--pos-primary); background: var(--pos-primary-soft); }
.product .t { font-weight: 600; line-height: 1.25; color: var(--pos-text); } /* titre : .book-title (deux lignes, volume à part) */
.product .a { font-size: 0.78rem; color: var(--pos-muted); }
.product .p { margin-top: auto; display: flex; justify-content: space-between; align-items: baseline; gap: 0.4rem; }
.product .p b { font-size: 1.05rem; font-variant-numeric: tabular-nums; }
.product .stock { font-size: 0.72rem; color: var(--pos-muted); }
.product .stock.low { color: var(--pos-warning); font-weight: 600; }
.product .stock.out { color: var(--pos-danger); font-weight: 600; }
.cart { background: var(--pos-surface); border: 1px solid var(--pos-border); border-radius: var(--pos-radius); display: flex; flex-direction: column; }
.cart-head { display: flex; align-items: center; justify-content: space-between; padding: 0.75rem 0.9rem; border-bottom: 1px solid var(--pos-border); gap: 0.5rem; }
.cart-lines { padding: 0.25rem 0.9rem; }
.cart-line { display: grid; grid-template-columns: minmax(0, 1fr) auto auto; gap: 0.6rem; align-items: center; padding: 0.6rem 0; border-bottom: 1px solid var(--pos-border); }
.cart-line:last-child { border-bottom: 0; }
.cart-line .t { font-weight: 600; line-height: 1.25; color: var(--pos-text); }
.cart-line .s { font-size: 0.78rem; color: var(--pos-muted); }
.qty { display: inline-flex; align-items: center; border: 1px solid var(--pos-border); border-radius: 8px; overflow: hidden; }
.qty button { width: 40px; height: 40px; border: 0; background: var(--pos-surface); color: var(--pos-text); display: grid; place-items: center; }
.qty button:hover { background: var(--pos-neutral-soft); }
.qty span { min-width: 34px; text-align: center; font-weight: 650; font-variant-numeric: tabular-nums; }
.cart-line .amt { font-weight: 650; font-variant-numeric: tabular-nums; min-width: 4.5rem; text-align: right; }
.totals { padding: 0.75rem 0.9rem; border-top: 1px solid var(--pos-border); display: grid; gap: 0.3rem; font-variant-numeric: tabular-nums; }
.totals .r { display: flex; justify-content: space-between; gap: 1rem; color: var(--pos-muted); }
.totals .r.big { color: var(--pos-text); font-size: 1.45rem; font-weight: 750; margin-top: 0.25rem; }
.cart-actions { padding: 0.75rem 0.9rem; display: flex; flex-wrap: wrap; gap: 0.5rem; }
.cart-actions > .btn { flex: 1 1 40%; }
.cart-actions > .btn-primary { flex-basis: 100%; }
.table td.mono, .table td.money, .table td.nw { white-space: nowrap; }
.client-row { display: flex; align-items: center; gap: 0.6rem; padding: 0.6rem 0.9rem; border-bottom: 1px solid var(--pos-border); font-size: 0.9rem; }
.client-row .btn { margin-left: auto; }
/* Barre de panier (mobile) */
.cart-bar { position: fixed; left: 0; right: 0; bottom: var(--pos-tabbar-h); z-index: 1025; background: var(--pos-sidebar-bg); color: #fff; display: flex; align-items: center; gap: 0.75rem; padding: 0.6rem 1rem; }
.cart-bar .sum { flex: 1; line-height: 1.2; }
.cart-bar .sum b { font-size: 1.2rem; font-variant-numeric: tabular-nums; }
.cart-bar .btn { min-height: 48px; }
@media (min-width: 992px) { .cart-bar { display: none; } }
body.has-cart-bar .pos-main { padding-bottom: calc(var(--pos-tabbar-h) + 84px); }
@media (min-width: 768px) { body.has-cart-bar .cart-bar { bottom: 0; } }

/* Grille gros boutons (après culte) */
.quick-grid { display: grid; gap: 0.75rem; grid-template-columns: repeat(2, minmax(0, 1fr)); }
@media (min-width: 576px) { .quick-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
@media (min-width: 992px) { .quick-grid { grid-template-columns: repeat(4, minmax(0, 1fr)); } }
.quick { min-height: 104px; border: 2px solid var(--pos-border); background: var(--pos-surface); border-radius: 14px; padding: 0.8rem; text-align: left; display: flex; flex-direction: column; justify-content: space-between; color: inherit; font-size: 1.05rem; }
.quick:hover { border-color: var(--pos-primary); background: var(--pos-primary-soft); }
.quick b { font-size: 1.25rem; font-variant-numeric: tabular-nums; }
.pay-grid { display: grid; gap: 0.75rem; grid-template-columns: repeat(2, minmax(0, 1fr)); }
.pay-grid .btn-xl { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 0.2rem; min-height: 88px; }
.pay-grid .btn-xl small { font-size: 0.8rem; font-weight: 500; opacity: 0.85; }

/* Toast */
.pos-toast { position: fixed; left: 50%; transform: translateX(-50%); bottom: calc(var(--pos-tabbar-h) + 12px); z-index: 2000; background: var(--pos-text); color: #fff; padding: 0.7rem 1rem; border-radius: 10px; font-size: 0.9rem; box-shadow: 0 10px 30px rgba(0, 0, 0, 0.25); max-width: min(92vw, 480px); }
@media (min-width: 768px) { .pos-toast { bottom: 20px; } }

/* Formulaire de connexion */
.auth-wrap { min-height: 100vh; display: grid; place-items: center; padding: 1rem; background: linear-gradient(180deg, #eef3f8 0%, var(--pos-bg) 100%); }
.auth-card { width: 100%; max-width: 420px; background: var(--pos-surface); border: 1px solid var(--pos-border); border-radius: 14px; padding: 1.5rem; }
.auth-brand { display: flex; align-items: center; gap: 0.75rem; margin-bottom: 1.25rem; }
.auth-lang { display: flex; gap: 0.35rem; justify-content: center; margin-top: 1rem; }

/* Utilitaires */
.gap-05 { gap: 0.5rem; }
.w-100-sm { width: 100%; }
@media (min-width: 576px) { .w-100-sm { width: auto; } }
.muted-note { font-size: 0.82rem; color: var(--pos-muted); }
.demo-note { font-size: 0.78rem; color: var(--pos-muted); border-top: 1px dashed var(--pos-border); margin-top: 2rem; padding-top: 0.6rem; }

/* =====================================================================
   ÉTAPE 2 : composants supplémentaires
   ===================================================================== */
/* Vignettes de couverture (image, ou vignette neutre : icône + initiales) */
.thumb { width: 44px; height: 58px; border-radius: 6px; overflow: hidden; background: var(--pos-neutral-soft); display: grid; place-items: center; flex: none; border: 1px solid var(--pos-border); position: relative; }
.thumb img { width: 100%; height: 100%; object-fit: cover; display: block; }
.thumb-sm { width: 32px; height: 42px; border-radius: 4px; }
.thumb-md { width: 56px; height: 74px; }
.thumb-xl { width: 120px; height: 160px; border-radius: 10px; }
.thumb-lg { width: 100%; height: auto; aspect-ratio: 3 / 4; border-radius: 10px; max-width: 100%; }
.thumb-neutre { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 2px; color: var(--pos-muted); font-size: 0.62rem; font-weight: 700; letter-spacing: 0.04em; }
.thumb-neutre .ico { width: 42%; height: auto; stroke-width: 1.5; }
.thumb-sm.thumb-neutre b { display: none; }
.thumb-lg.thumb-neutre, .thumb-xl.thumb-neutre { font-size: 1rem; gap: 6px; }
.thumb-neutre.t1 { background: #e6eff6; color: #1d5c8a; }
.thumb-neutre.t2 { background: #ece9f4; color: #4a2f82; }
.thumb-neutre.t3 { background: #e5f1ea; color: #1e7f4f; }
.thumb-neutre.t4 { background: #f6eadc; color: #8a5a12; }
.thumb .vol { position: absolute; right: 2px; bottom: 2px; background: rgba(27, 37, 50, 0.85); color: #fff; font-size: 0.6rem; font-weight: 700; padding: 0 4px; border-radius: 4px; line-height: 1.4; }
.thumb-lg .vol, .thumb-xl .vol { font-size: 0.8rem; padding: 1px 6px; right: 6px; bottom: 6px; }

/* Carte produit (résultats de recherche) avec vignette */
.product { flex-direction: row; gap: 0.6rem; align-items: stretch; min-height: 0; }
.product .body { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 0.15rem; }
.product .p { margin-top: auto; flex-wrap: wrap; row-gap: 0; }
.product.is-pack { border-style: dashed; }
.product[disabled], .product.is-off { opacity: 0.7; cursor: default; }
.tag-pack, .tag-vol { display: inline-block; font-size: 0.68rem; font-weight: 700; text-transform: uppercase; letter-spacing: 0.05em; border-radius: 4px; padding: 0.05rem 0.4rem; background: var(--pos-primary-soft); color: var(--pos-primary); vertical-align: middle; }
.tag-pack { background: #ede7f6; color: #4a2f82; }
.st-commande { background: #fdf0e0; color: #7a3b0b; }
.st-reserve { background: #ede7f6; color: #4a2f82; }
.st-actif { background: var(--pos-success-soft); color: #124a2e; }
.st-inactif { background: #e5e7eb; color: #374151; }
.st-invite { background: var(--pos-info-soft); color: #1b4466; }
.st-erreur { background: var(--pos-danger-soft); color: #6f1e1b; }
.st-ok { background: var(--pos-success-soft); color: #124a2e; }

/* Titres de livres (remarque du propriétaire du 27 oct. 2026, Phase 5) : texte
   principal, deux lignes avant toute coupure (coupure seulement visuelle, le
   texte reste entier dans le DOM), volume et pack dans une pastille hors de la
   zone tronquée, titre complet dans l'attribut title. Rendus par book_title()
   (includes/helpers/books.php) et fillBookTitle() (assets/js/core/book.js).
   Jamais de white-space: nowrap + ellipse sur un titre de livre. */
.book-name { display: flex; flex-wrap: wrap; align-items: baseline; gap: 0.2rem 0.4rem; min-width: 0; max-width: 100%; text-align: left; }
.book-title {
  flex: 0 1 auto; min-width: 0; color: var(--pos-text); font-weight: 600; line-height: 1.25;
  white-space: normal; overflow-wrap: break-word;
  display: -webkit-box; -webkit-box-orient: vertical; -webkit-line-clamp: 2; line-clamp: 2; overflow: hidden;
}
.book-title.is-full { display: inline; -webkit-line-clamp: unset; line-clamp: none; overflow: visible; }
a.book-title { color: var(--pos-text); text-decoration: underline; text-decoration-color: rgba(29, 92, 138, 0.35); text-underline-offset: 3px; }
a.book-title:hover, a.book-title:focus-visible { color: var(--pos-primary); text-decoration-color: currentColor; }
.book-vol { flex: none; display: inline-block; white-space: nowrap; font-size: 0.75rem; font-weight: 700; letter-spacing: 0.03em; text-transform: uppercase; line-height: 1.35; border-radius: 4px; padding: 0.05rem 0.4rem; background: var(--pos-primary-soft); color: var(--pos-primary); border: 1px solid #c3d8ea; }
.book-vol.is-pack { background: #ede7f6; color: #4a2f82; border-color: #d9cdee; }
.book-variant { flex: none; font-size: 0.82rem; color: var(--pos-muted); }
.table .book-name { min-width: 11rem; }
.mini-table .book-title { font-size: 0.95rem; }
.min-w-0 { min-width: 0; }
.row-card .title .book-title { font-weight: 650; }

/* Sous-navigation d'un module */
.pos-subnav { display: flex; gap: 0.35rem; flex-wrap: nowrap; overflow-x: auto; margin: 0 0 1rem; padding-bottom: 2px; scrollbar-width: thin; }
.pos-subnav a { border: 1px solid var(--pos-border); background: var(--pos-surface); border-radius: 999px; padding: 0.4rem 0.85rem; font-size: 0.85rem; font-weight: 600; color: var(--pos-text); text-decoration: none; white-space: nowrap; min-height: 38px; display: inline-flex; align-items: center; gap: 0.35rem; }
.pos-subnav a:hover { background: var(--pos-primary-soft); }
.pos-subnav a.active { background: var(--pos-primary); border-color: var(--pos-primary); color: #fff; }

/* Paiement */
.amount-big { font-size: 2.2rem; font-weight: 750; font-variant-numeric: tabular-nums; line-height: 1.1; }
.amount-mid { font-size: 1.4rem; font-weight: 700; font-variant-numeric: tabular-nums; }
.keypad { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 0.5rem; }
.keypad button { min-height: 56px; font-size: 1.25rem; font-weight: 600; border-radius: 10px; }
.quick-amounts { display: flex; gap: 0.4rem; flex-wrap: wrap; }
.quick-amounts .btn { min-height: 44px; }
.pay-tabs { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 0.5rem; margin-bottom: 1rem; }
@media (min-width: 576px) { .pay-tabs { grid-template-columns: repeat(6, minmax(0, 1fr)); } }
.pay-tabs button { border: 2px solid var(--pos-border); background: var(--pos-surface); border-radius: 10px; min-height: 64px; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 2px; font-weight: 600; font-size: 0.85rem; color: var(--pos-text); padding: 0.4rem 0.25rem; }
.pay-tabs button .ico { width: 22px; height: 22px; }
.pay-tabs button.active { border-color: var(--pos-primary); background: var(--pos-primary-soft); color: var(--pos-primary); }
.pay-tabs button:disabled { opacity: 0.45; }
.pay-tabs button small { font-size: 0.68rem; font-weight: 500; color: var(--pos-muted); }
.qr-box { width: 160px; height: 160px; background: #fff; border: 1px solid var(--pos-border); border-radius: 8px; padding: 10px; }
.qr-box svg { width: 100%; height: 100%; }
.summary-box { background: var(--pos-surface); border: 1px solid var(--pos-border); border-radius: var(--pos-radius); padding: 0.9rem 1rem; display: grid; gap: 0.35rem; font-variant-numeric: tabular-nums; }
.summary-box .r { display: flex; justify-content: space-between; gap: 1rem; }
.summary-box .r.big { font-size: 1.3rem; font-weight: 750; border-top: 1px solid var(--pos-border); padding-top: 0.4rem; margin-top: 0.2rem; }
.summary-box .r.muted { color: var(--pos-muted); }

/* Étapes (parcours) */
.steps { display: flex; gap: 0.5rem; align-items: center; flex-wrap: wrap; font-size: 0.8rem; color: var(--pos-muted); margin-bottom: 1rem; }
.steps .s { display: inline-flex; align-items: center; gap: 0.35rem; }
.steps .s .n { width: 22px; height: 22px; border-radius: 50%; border: 1px solid var(--pos-border); display: grid; place-items: center; font-size: 0.72rem; font-weight: 700; }
.steps .s.done .n { background: var(--pos-success); border-color: var(--pos-success); color: #fff; }
.steps .s.now { color: var(--pos-text); font-weight: 650; }
.steps .s.now .n { background: var(--pos-primary); border-color: var(--pos-primary); color: #fff; }
.steps .sep { width: 18px; height: 1px; background: var(--pos-border); }

/* Reçu */
.receipt { background: #fff; border: 1px solid var(--pos-border); border-radius: 12px; padding: 1.25rem; max-width: 420px; margin: 0 auto; font-family: var(--pos-mono); font-size: 0.86rem; }
.receipt .c { text-align: center; }
.receipt .r { display: flex; justify-content: space-between; gap: 1rem; }
.receipt hr { border: 0; border-top: 1px dashed var(--pos-border); margin: 0.6rem 0; }
.receipt .big { font-size: 1.15rem; font-weight: 700; }
.receipt .note { font-family: var(--pos-font); font-size: 0.82rem; color: var(--pos-muted); }

/* Chronologie, définitions, panneaux */
.timeline { list-style: none; margin: 0; padding: 0; }
.timeline li { position: relative; padding: 0 0 0.9rem 1.4rem; border-left: 2px solid var(--pos-border); margin-left: 0.4rem; }
.timeline li:last-child { padding-bottom: 0; }
.timeline li::before { content: ""; position: absolute; left: -7px; top: 3px; width: 12px; height: 12px; border-radius: 50%; background: var(--pos-surface); border: 2px solid var(--pos-primary); }
.timeline li .when { font-size: 0.78rem; color: var(--pos-muted); }
.dl { display: grid; grid-template-columns: minmax(120px, max-content) 1fr; gap: 0.4rem 1rem; margin: 0; }
.dl dt { color: var(--pos-muted); font-weight: 500; }
.dl dd { margin: 0; font-weight: 600; min-width: 0; overflow-wrap: anywhere; }
.confirm-panel { border: 2px solid var(--pos-danger); background: var(--pos-danger-soft); border-radius: var(--pos-radius); padding: 1rem; color: #6f1e1b; }
.confirm-panel h4 { font-size: 1rem; margin-bottom: 0.4rem; }
.confirm-panel .form-control, .confirm-panel .form-select { background: #fff; }
.warn-panel { border: 2px solid #ecd6a6; background: var(--pos-warning-soft); border-radius: var(--pos-radius); padding: 1rem; color: #5e3d06; }
.warn-panel h4 { font-size: 1rem; margin-bottom: 0.4rem; }
.ok-panel { border: 2px solid #bfe3cd; background: var(--pos-success-soft); border-radius: var(--pos-radius); padding: 1rem; color: #124a2e; }
.form-section { background: var(--pos-surface); border: 1px solid var(--pos-border); border-radius: var(--pos-radius); padding: 1rem; }
.form-section h3 { font-size: 1rem; margin-bottom: 0.75rem; }
.form-section + .form-section { margin-top: 1rem; }
.field-note { font-size: 0.8rem; color: var(--pos-muted); margin-top: 0.25rem; }
.inline-fields { display: flex; gap: 0.5rem; flex-wrap: wrap; align-items: center; }
.inline-fields .form-control, .inline-fields .form-select { width: auto; }

/* Échéancier modifiable */
.schedule td .form-control { min-height: 38px; max-width: 150px; }
.schedule .sum td { font-weight: 700; border-top: 2px solid var(--pos-border); }

/* Matrice de permissions */
.matrix-wrap { overflow-x: auto; background: var(--pos-surface); border: 1px solid var(--pos-border); border-radius: var(--pos-radius); }
.matrix { margin: 0; min-width: 640px; }
.matrix th:first-child, .matrix td:first-child { position: sticky; left: 0; background: var(--pos-surface); z-index: 1; min-width: 220px; }
.matrix td { text-align: center; }
.matrix .domain td { background: var(--pos-bg); font-weight: 650; text-align: left; font-size: 0.8rem; text-transform: uppercase; letter-spacing: 0.05em; color: var(--pos-muted); }
.matrix .form-check-input { width: 1.25rem; height: 1.25rem; margin: 0; }
.matrix .lock { color: var(--pos-muted); }

/* Paramètres : navigation de sections */
.settings { display: grid; gap: 1rem; grid-template-columns: minmax(0, 1fr); }
@media (min-width: 992px) { .settings { grid-template-columns: 240px minmax(0, 1fr); align-items: start; } }
.settings-nav { display: flex; gap: 0.35rem; overflow-x: auto; padding-bottom: 2px; }
@media (min-width: 992px) { .settings-nav { flex-direction: column; position: sticky; top: calc(var(--pos-header-h) + 1rem); } }
.settings-nav button { border: 1px solid var(--pos-border); background: var(--pos-surface); border-radius: 8px; padding: 0.55rem 0.8rem; text-align: left; font-weight: 600; font-size: 0.88rem; color: var(--pos-text); white-space: nowrap; min-height: 42px; display: inline-flex; align-items: center; gap: 0.5rem; }
.settings-nav button.active { background: var(--pos-primary); border-color: var(--pos-primary); color: #fff; }

/* Étiquettes */
.labels-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 0.5rem; background: #fff; padding: 0.75rem; border: 1px solid var(--pos-border); border-radius: var(--pos-radius); }
.label { border: 1px dashed var(--pos-border); border-radius: 4px; padding: 0.4rem; font-size: 0.72rem; line-height: 1.2; text-align: center; }
.label .bars { height: 34px; margin: 0.3rem 0; background: repeating-linear-gradient(90deg, #1b2532 0 2px, transparent 2px 4px, #1b2532 4px 5px, transparent 5px 8px, #1b2532 8px 11px, transparent 11px 13px); }
.label .price { font-weight: 700; font-size: 0.95rem; }

/* Graphiques simples (barres) des rapports */
.bars { display: grid; gap: 0.45rem; }
.bar-row { display: grid; grid-template-columns: minmax(90px, 160px) 1fr auto; gap: 0.6rem; align-items: center; font-size: 0.88rem; }
.bar-row .lbl { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; color: var(--pos-text); }
.bar-row .track { height: 14px; background: var(--pos-neutral-soft); border-radius: 4px; overflow: hidden; }
.bar-row .fill { height: 100%; background: var(--pos-primary); border-radius: 4px; }
.bar-row .fill.alt { background: #8fb3d1; }
.bar-row .val { font-variant-numeric: tabular-nums; font-weight: 600; white-space: nowrap; }
.cols { display: flex; align-items: flex-end; gap: 6px; height: 120px; padding-top: 0.5rem; border-bottom: 1px solid var(--pos-border); }
.cols .col { flex: 1; display: flex; flex-direction: column; justify-content: flex-end; align-items: center; gap: 4px; height: 100%; min-width: 0; }
.cols .col .b { width: 100%; max-width: 36px; background: var(--pos-primary); border-radius: 4px 4px 0 0; }
.cols .col .b.prev { background: #c9d6e2; }
.cols .col .l { font-size: 0.68rem; color: var(--pos-muted); white-space: nowrap; }
.legend { display: flex; gap: 1rem; font-size: 0.78rem; color: var(--pos-muted); flex-wrap: wrap; }
.legend .sw { display: inline-block; width: 12px; height: 12px; border-radius: 3px; vertical-align: -2px; margin-right: 4px; background: var(--pos-primary); }
.legend .sw.prev { background: #c9d6e2; }

/* Divers */
.pin-dots { display: flex; gap: 0.6rem; justify-content: center; margin: 1rem 0; }
.pin-dots span { width: 16px; height: 16px; border-radius: 50%; border: 2px solid var(--pos-primary); }
.pin-dots span.on { background: var(--pos-primary); }
.user-pick { display: grid; gap: 0.5rem; grid-template-columns: repeat(auto-fill, minmax(140px, 1fr)); }
.user-pick button { border: 2px solid var(--pos-border); background: var(--pos-surface); border-radius: 12px; padding: 0.8rem; display: flex; flex-direction: column; align-items: center; gap: 0.4rem; font-weight: 600; min-height: 96px; }
.user-pick button.active { border-color: var(--pos-primary); background: var(--pos-primary-soft); }
.consent { display: flex; align-items: center; justify-content: space-between; gap: 0.75rem; padding: 0.6rem 0; border-bottom: 1px solid var(--pos-border); }
.consent:last-child { border-bottom: 0; }
.form-switch .form-check-input { width: 2.6em; height: 1.4em; }
.badge-count { background: var(--pos-warning); color: #fff; border-radius: 999px; font-size: 0.7rem; padding: 0.1rem 0.5rem; font-weight: 700; }
.sticky-actions { position: sticky; bottom: calc(var(--pos-tabbar-h) + 0.5rem); background: var(--pos-surface); border: 1px solid var(--pos-border); border-radius: var(--pos-radius); padding: 0.75rem; display: flex; gap: 0.5rem; flex-wrap: wrap; justify-content: flex-end; box-shadow: 0 -6px 20px rgba(20, 35, 50, 0.08); margin-top: 1rem; z-index: 5; }
@media (min-width: 768px) { .sticky-actions { bottom: 0.5rem; } }
.upload-zone { border: 2px dashed var(--pos-border); border-radius: var(--pos-radius); padding: 1.5rem; text-align: center; color: var(--pos-muted); background: var(--pos-surface); }
.cover-compare { display: grid; gap: 0.75rem; grid-template-columns: repeat(auto-fill, minmax(120px, 1fr)); }
.cover-compare figure { margin: 0; text-align: center; font-size: 0.78rem; color: var(--pos-muted); }
.cover-compare .thumb { margin: 0 auto 0.3rem; }
.kv { display: flex; justify-content: space-between; gap: 1rem; padding: 0.45rem 0; border-bottom: 1px solid var(--pos-border); }
.kv:last-child { border-bottom: 0; }
.kv b { font-variant-numeric: tabular-nums; text-align: right; }
.mini-table th, .mini-table td { padding: 0.35rem 0.5rem; font-size: 0.86rem; }
/* Ligne de panier : le titre prend toute la largeur à côté de la vignette,
   quantité et montant passent dessous (titres lisibles sur mobile comme dans
   la colonne panier de l'ordinateur, remarque du propriétaire Phase 5). */
.cart-line.with-thumb { grid-template-columns: auto minmax(0, 1fr) auto; grid-template-areas: "thumb body body" "thumb qty amt"; row-gap: 0.35rem; }
.cart-line.with-thumb > .thumb { grid-area: thumb; align-self: start; }
.cart-line.with-thumb > .cart-line-body { grid-area: body; min-width: 0; }
.cart-line.with-thumb > .qty { grid-area: qty; justify-self: start; }
.cart-line.with-thumb > .amt { grid-area: amt; }
.cart-line.with-thumb > .line-actions { grid-column: 2 / -1; }
.cart-line .t .book-title { font-size: 1rem; }
.quick .thumb-lg { margin-bottom: 0.4rem; }
.quick { min-height: 0; }
.quick .qt { display: flex; flex-direction: column; align-items: flex-start; gap: 0.15rem; }
.quick .qt .book-name { width: 100%; }
.quick .qt .book-title { font-size: 1.05rem; }
.quick b { white-space: nowrap; }
.quick-grid { grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)) !important; }

/* =====================================================================
   Compléments de l'application (hors maquette) : polices locales, lien
   d'évitement, formulaires de la coquille, puces à cocher, états.
   ===================================================================== */

/* Polices servies localement (hors ligne, cahier 6.2), licence OFL (texte dans
   chaque dossier de assets/fonts/), copiées des dépôts officiels avec l'accord
   du propriétaire (27 oct. 2026) : Public Sans v2.001 (uswds/public-sans),
   IBM Plex Mono 2.5.0 (IBM/plex). Préchargées par le service worker ; la pile
   système de --pos-font et --pos-mono prend le relais tant qu'elles chargent. */
@font-face { font-family: "Public Sans"; font-style: normal; font-weight: 400; font-display: swap; src: url("../../fonts/public-sans/PublicSans-Regular.woff2") format("woff2"); }
@font-face { font-family: "Public Sans"; font-style: normal; font-weight: 500; font-display: swap; src: url("../../fonts/public-sans/PublicSans-Medium.woff2") format("woff2"); }
@font-face { font-family: "Public Sans"; font-style: normal; font-weight: 600; font-display: swap; src: url("../../fonts/public-sans/PublicSans-SemiBold.woff2") format("woff2"); }
@font-face { font-family: "Public Sans"; font-style: normal; font-weight: 700; font-display: swap; src: url("../../fonts/public-sans/PublicSans-Bold.woff2") format("woff2"); }
@font-face { font-family: "IBM Plex Mono"; font-style: normal; font-weight: 400; font-display: swap; src: url("../../fonts/ibm-plex-mono/IBMPlexMono-Regular.woff2") format("woff2"); }
@font-face { font-family: "IBM Plex Mono"; font-style: normal; font-weight: 600; font-display: swap; src: url("../../fonts/ibm-plex-mono/IBMPlexMono-SemiBold.woff2") format("woff2"); }

/* Lien d'évitement (accessibilité) */
.pos-skip { position: absolute; left: -9999px; top: 0; z-index: 3000; background: var(--pos-primary); color: #fff; padding: 0.5rem 1rem; border-radius: 0 0 8px 0; }
.pos-skip:focus { left: 0; }
#contenu:focus { outline: none; }

/* Coquille : formulaires de déconnexion et de langue rendus comme des boutons du menu */
.pos-logout-form { display: contents; }
.pos-sidebar-foot .out { cursor: pointer; }
.pos-pop form { margin: 0; }
.pos-pop form button { display: flex; align-items: center; gap: 0.6rem; width: 100%; padding: 0.55rem 0.75rem; border: 0; background: none; border-radius: 8px; color: var(--pos-text); text-align: left; min-height: 42px; }
.pos-pop form button:hover { background: var(--pos-primary-soft); }
.pos-pop .lang form button, .pos-sheet .lang form button { display: inline-flex; width: auto; min-height: 34px; padding: 0.15rem 0.6rem; }
.pos-sheet .panel .lang { display: flex; gap: 0.35rem; padding: 0.4rem 0; }
.pos-sheet .panel > a, .pos-sheet .panel > form > button { display: flex; align-items: center; gap: 0.6rem; width: 100%; padding: 0.7rem 0; border: 0; background: none; color: var(--pos-text); text-decoration: none; border-bottom: 1px solid var(--pos-border); min-height: 48px; text-align: left; }
.pos-sheet .panel > form { margin: 0; }
.pos-sheet .panel .head { padding: 0.4rem 0 0.6rem; border-bottom: 1px solid var(--pos-border); margin-bottom: 0.3rem; }
.pos-sheet .panel .head .name { font-weight: 650; }
.pos-sheet .panel .head .sub { font-size: 0.8rem; color: var(--pos-muted); }
.pos-banner[hidden] { display: none; }
.pos-pill.is-off .ico { color: var(--pos-danger); }

/* Pages de connexion */
.auth-column { width: 100%; max-width: 420px; }
.auth-column .auth-card { max-width: none; }
.auth-column.auth-column-wide { max-width: 480px; }
.auth-card-wide { max-width: 560px; }
.auth-column .alert { margin-bottom: 0.75rem; }
.auth-lang form { display: inline; }
.auth-wrap .empty { width: 100%; }

/* Puces à cocher (rôles, langues) */
label.chip { cursor: pointer; user-select: none; }
label.chip input { margin: 0; width: 1rem; height: 1rem; }
label.chip:has(input:checked), label.chip.active { background: var(--pos-primary-soft); border-color: var(--pos-primary); color: var(--pos-primary); font-weight: 650; }
label.chip:has(input:focus-visible) { outline: 3px solid rgba(29, 92, 138, 0.45); outline-offset: 2px; }

/* Matrice des permissions : phases à venir en retrait */
.matrix tr.phase-later td:first-child { color: var(--pos-muted); }
.matrix .phase-tag { font-size: 0.68rem; font-weight: 600; text-transform: uppercase; letter-spacing: 0.05em; color: var(--pos-muted); margin-left: 0.4rem; white-space: nowrap; }

/* Divers */
.form-inline-actions { display: inline; }
.form-inline-actions button.btn-link { padding: 0; vertical-align: baseline; }
.btn-text-start { text-align: left; }
.alert-dismissible { padding-right: 3rem; }
.table-wrap .table td, .table-wrap .table th { vertical-align: middle; }
.kv .btn { margin-left: auto; }
.muted-note a { color: inherit; }
.pos-main > .alert[data-state="flash"] { margin-bottom: 1rem; }
.st-platform { background: #ede7f6; color: #4a2f82; }
.st-attente { background: var(--pos-info-soft); color: #1b4466; }
.avatar-lg { width: 52px; height: 52px; font-size: 1.1rem; }
.w-200 { max-width: 200px; }
.form-section h3 .st { margin-left: 0.5rem; vertical-align: middle; }
.password-field .btn { min-width: 48px; }
.empty.mx-auto { max-width: 560px; }
.badge-phase { font-size: 0.68rem; text-transform: uppercase; letter-spacing: 0.05em; background: var(--pos-neutral-soft); color: var(--pos-muted); border-radius: 4px; padding: 0.1rem 0.4rem; font-weight: 600; }
details.pos-details summary { cursor: pointer; font-weight: 600; }
.audit-json { font-family: var(--pos-mono); font-size: 0.78rem; white-space: pre-wrap; word-break: break-word; max-width: 420px; }
@media (max-width: 767.98px) { .pos-status .pos-pill:not([data-network-pill]) { display: none; } }

/* Phase 4 : quantité retournée (tableau serré), trois onglets de type de retour. */
.input-qty { max-width: 70px; }
.pay-tabs-3, .pay-tabs-3.pay-tabs { grid-template-columns: repeat(3, minmax(0, 1fr)); }
