/* ---- Jetons des trois apparences (charte, section 2) ----
   Choisie par chaque membre et posée sur <html data-apparence="…">.
   Aucune couleur en dur ailleurs dans cette feuille : uniquement ces jetons. */
:root,
[data-apparence="abysse"] {
  color-scheme: dark;
  --bg: #0a1020;
  --surface: #111a2d;
  --surface-2: #17223a;
  --line: #24324f;
  --ink: #eef3fb;
  --ink-2: #a3b1c8;
  --ink-3: #7d8ba3;
  --accent: #5cc8f5;
  --accent-ink: #04121d;
  --accent-soft: rgba(92, 200, 245, 0.14);
  --accent-text: #7fd6fa;
  --nav-bg: #0d1526;
  --nav-line: #1d2944;
  --nav-ink: var(--nav-ink);
  --nav-ink-2: var(--ink-3);
  --nav-active: #1b2742;
  --nav-active-ink: #ffffff;
  --nav-mark: #1f3a5a;
  --nav-bar: var(--accent);
  --ok: #4ade80;
  --ok-soft: rgba(74, 222, 128, 0.14);
  --warn: #fbbf24;
  --warn-soft: rgba(251, 191, 36, 0.14);
  --danger: #f87171;
  --danger-soft: rgba(248, 113, 113, 0.14);
  --danger-ink: #2a0a08;
  --field: #0c1424;
  --backdrop: rgba(3, 7, 15, 0.66);
  --shadow: 0 24px 60px rgba(0, 0, 0, 0.35);
  --shadow-pop: 0 18px 44px rgba(0, 0, 0, 0.42);
  --font-display: "Sora", system-ui, -apple-system, "Segoe UI", sans-serif;
  --font-body: "Figtree", system-ui, -apple-system, "Segoe UI", sans-serif;
  --display-weight: 700;
  --r-card: 16px;
  --r-ctl: 10px;
  --r-pill: 999px;
}

[data-apparence="lagon"] {
  color-scheme: light;
  --bg: #f4f7f6;
  --surface: #ffffff;
  --surface-2: #eef4f1;
  --line: #dce7e2;
  --ink: #13201c;
  --ink-2: #4f625c;
  --ink-3: #6b7d77;
  --accent: #0f7f60;
  --accent-ink: #ffffff;
  --accent-soft: #e2f2eb;
  --accent-text: #0f766e;
  --nav-bg: #0f3d35;
  --nav-line: #1c5047;
  --nav-ink: #d9fff2;
  --nav-ink-2: #8fc9b8;
  --nav-active: #185247;
  --nav-active-ink: #ffffff;
  --nav-mark: #1f6b5a;
  --nav-bar: #7ee2c3;
  --ok: #0f7f60;
  --ok-soft: #e2f2eb;
  --warn: #9a5b00;
  --warn-soft: #fff4dc;
  --danger: #b42318;
  --danger-soft: #fdecea;
  --danger-ink: #ffffff;
  --field: #ffffff;
  --backdrop: rgba(15, 61, 53, 0.42);
  --shadow: 0 1px 2px rgba(19, 32, 28, 0.05);
  --shadow-pop: 0 16px 40px rgba(19, 32, 28, 0.16);
  --font-display: "Bricolage Grotesque", system-ui, -apple-system, "Segoe UI", sans-serif;
  --font-body: "Source Sans 3", system-ui, -apple-system, "Segoe UI", sans-serif;
  --display-weight: 700;
  --r-card: 12px;
  --r-ctl: 8px;
  --r-pill: 999px;
}

[data-apparence="carnet"] {
  color-scheme: light;
  --bg: #f6f1e7;
  --surface: #fffdf8;
  --surface-2: #f1eadc;
  --line: #e2d9c6;
  --ink: #1c1b18;
  --ink-2: #57524a;
  --ink-3: #7a7468;
  --accent: #1e3a8a;
  --accent-ink: #ffffff;
  --accent-soft: #e6ebf7;
  --accent-text: #1e3a8a;
  --nav-bg: #fffdf8;
  --nav-line: #e2d9c6;
  --nav-ink: #2b2a26;
  --nav-ink-2: #7a7468;
  --nav-active: #f1eadc;
  --nav-active-ink: #1c1b18;
  --nav-mark: #c2410c;
  --nav-bar: #c2410c;
  --ok: #276738;
  --ok-soft: #e5f1e6;
  --warn: #9a4a07;
  --warn-soft: #fbead8;
  --danger: #b3261e;
  --danger-soft: #f9e3e1;
  --danger-ink: #ffffff;
  --field: #fffdf8;
  --backdrop: rgba(28, 27, 24, 0.38);
  --shadow: none;
  --shadow-pop: 0 16px 40px rgba(28, 27, 24, 0.18);
  --font-display: "Newsreader", Georgia, "Times New Roman", serif;
  --font-body: "IBM Plex Sans", system-ui, -apple-system, "Segoe UI", sans-serif;
  --display-weight: 600;
  --r-card: 6px;
  --r-ctl: 4px;
  --r-pill: 4px;
}

/* Anciens noms, gardés comme alias : les composants existants suivent le
   thème choisi sans être réécrits. */
:root,
[data-apparence] {
  --ease-out: cubic-bezier(0.23, 1, 0.32, 1);
  --display-track: -0.015em;
  --gap: 20px;
  --background: var(--bg);
  --surface-strong: var(--surface);
  --panel: var(--nav-bg);
  --border: var(--line);
  --text: var(--ink);
  --text-strong: var(--ink);
  --muted: var(--ink-2);
  --accent-strong: var(--accent);
  --success: var(--ok);
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  min-height: 100vh;
  min-height: 100dvh;
  font-family: var(--font-body);
  background: var(--bg);
  color: var(--text);
}

/* Une seule police (charte) : sans cette règle, le navigateur donne sa propre
   police aux boutons et aux champs. Les éléments qui en veulent une autre
   (aperçus de style, code) la gardent : leur règle est plus précise. */
button,
input,
select,
textarea {
  font-family: inherit;
}

a {
  color: inherit;
}

/* Nom de membre cliquable (registre, liste des membres) : jeton « liens » de la charte. */
.lien-membre {
  color: var(--accent);
  text-decoration: none;
}

.site-shell {
  display: flex;
  min-height: 100vh;
  min-height: 100dvh;
}

.site-nav-panel {
  width: 234px;
  min-width: 234px;
  padding: 1rem 0.85rem 1rem 1rem;
  transition: none;
}

.site-nav-panel__inner {
  display: flex;
  flex-direction: column;
  min-height: calc(100vh - 2rem);
  min-height: calc(100dvh - 2rem);
  padding: 0.9rem 0.85rem;
  border: 1px solid var(--nav-line);
  border-radius: calc(var(--r-card) + 6px);
  background: var(--panel);
  overflow-x: hidden;
}

.site-brand,
.site-brand__link,
.site-topbar,
.site-topbar__left,
.site-topbar__actions,
.site-user-trigger {
  display: flex;
  align-items: center;
}

.site-brand {
  justify-content: space-between;
  margin-bottom: 1.2rem;
}

.site-brand__link {
  min-width: 0;
  gap: 0.65rem;
  text-decoration: none;
}

.site-brand__mark {
  flex: 0 0 auto;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 2.15rem;
  height: 2.15rem;
  border-radius: 0.8rem;
  background: var(--nav-mark);
  color: #ffffff;
  font-family: var(--font-display);
  font-weight: 700;
  text-decoration: none;
}

/* Le nom d'un club peut être long : deux lignes au plus, puis « … ». */
.site-brand__name {
  display: -webkit-box;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
  overflow: hidden;
  color: var(--nav-active-ink);
  font-family: var(--font-display);
  font-size: 0.95rem;
  font-weight: var(--display-weight);
  line-height: 1.2;
  overflow-wrap: anywhere;
}

.site-nav {
  display: flex;
  flex-direction: column;
  gap: 0.85rem;
  width: 100%;
}

.site-nav__section {
  display: flex;
  flex-direction: column;
  gap: 0.34rem;
  width: 100%;
}

.site-nav__section-title {
  padding: 0 0.45rem;
  color: var(--nav-ink-2);
  font-size: 0.63rem;
  font-weight: 900;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.site-nav__link {
  display: flex;
  align-items: center;
  gap: 0.7rem;
  width: 100%;
  min-height: 2.45rem;
  padding: 0.42rem 0.58rem;
  border-radius: var(--r-ctl);
  color: var(--nav-ink);
  text-decoration: none;
  transition: background-color 120ms ease, color 120ms ease;
}

.site-nav__link:focus-visible,
.site-nav__link.is-active {
  color: var(--nav-active-ink);
  background: var(--nav-active);
}

@media (hover: hover) and (pointer: fine) {
  .site-nav__link:hover {
    color: var(--nav-active-ink);
    background: var(--nav-active);
  }
}

.site-nav__link.is-active {
  font-weight: 600;
  box-shadow: inset 3px 0 0 var(--nav-bar);
}

/* Icônes au trait (balise {% icone %}) */
.icone {
  width: 1.15rem;
  height: 1.15rem;
  flex: 0 0 1.15rem;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.8;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.site-nav__link__libelle,
.site-nav__section-title,
.site-brand__text {
  overflow: hidden;
  white-space: nowrap;
  text-overflow: ellipsis;
  transition: opacity 0.08s linear, transform 0.08s linear, max-width 0.08s linear, margin 0.08s linear;
}

.site-nav__link {
  min-width: 0;
}

.site-nav__link__libelle {
  min-width: 0;
  flex: 1 1 auto;
}

/* Menu déplié : un libellé trop long passe à la ligne au lieu d'être coupé.
   Replié, les libellés restent sur une ligne, sinon leur largeur nulle les
   étirerait en colonne. */
body:not(.site-nav-collapsed) .site-nav__link__libelle,
body:not(.site-nav-collapsed) .site-brand__text {
  white-space: normal;
  line-height: 1.2;
}

.site-nav-toggle,
.site-topbar__menu-btn,
.site-nav-panel__close {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: 1px solid var(--border);
  background: var(--surface-2);
  color: var(--text);
  cursor: pointer;
}

.site-nav-toggle {
  width: 100%;
  height: 2.25rem;
  margin-top: auto;
  border-radius: 12px;
}

.site-nav-panel__close,
.site-topbar__menu-btn {
  display: none;
  width: 2.5rem;
  height: 2.5rem;
  border-radius: 999px;
}

.site-shell__main {
  position: relative;
  z-index: 1;
  display: flex;
  flex: 1;
  flex-direction: column;
  min-width: 0;
  padding: 1rem 1.2rem 1rem 0;
}

.site-topbar {
  position: relative;
  z-index: 40;
  justify-content: space-between;
  gap: 1rem;
  padding: 0.8rem 1rem;
  border: 1px solid var(--border);
  border-radius: 18px;
  background: var(--surface);
}

.site-topbar__left,
.site-topbar__actions {
  gap: 0.75rem;
  min-width: 0;
}

.site-topbar__eyebrow {
  display: block;
  margin-bottom: 0.18rem;
  color: var(--accent);
  font-size: 0.62rem;
  font-weight: 900;
  letter-spacing: 0.16em;
  text-transform: uppercase;
}

.site-topbar__title {
  display: block;
  color: var(--text-strong);
  font-size: 1.45rem;
  letter-spacing: normal;
  font-weight: 900;
  line-height: 1.05;
}

.site-user {
  position: relative;
}

.site-user-trigger {
  gap: 0.65rem;
  padding: 0.3rem 0.45rem;
  border: 1px solid var(--border);
  border-radius: 999px;
  background: var(--surface-2);
  color: var(--text);
  cursor: pointer;
}

/* Avatar : initiales prénom + nom, ou photo ; toujours centré (charte). */
.avatar {
  display: inline-grid;
  place-items: center;
  flex: 0 0 auto;
  width: 1.9rem;
  height: 1.9rem;
  overflow: hidden;
  border-radius: 999px;
  background: var(--accent-soft);
  color: var(--text-strong);
  font-size: 0.75rem;
  font-weight: 800;
  letter-spacing: 0.02em;
  line-height: 1;
  object-fit: cover;
}

.site-user-trigger__avatar {
  width: 2.05rem;
  height: 2.05rem;
}

.site-user-trigger__label {
  display: block;
  max-width: 10rem;
  overflow: hidden;
  color: var(--text-strong);
  font-size: 0.86rem;
  font-weight: 800;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.site-user-menu {
  position: absolute;
  top: calc(100% + 0.65rem);
  right: 0;
  z-index: 1200;
  width: max-content;
  min-width: 21rem;
  max-width: calc(100vw - 1.7rem);
  padding: 0.5rem;
  border: 1px solid var(--surface-2);
  border-radius: 18px;
  background: var(--surface);
  box-shadow: var(--shadow-pop);
}

.site-user-menu__item {
  display: flex;
  align-items: center;
  gap: 0.8rem;
  width: 100%;
  min-height: 3rem;
  padding: 0.72rem 0.8rem;
  border: 0;
  border-radius: 12px;
  background: transparent;
  /* Le menu est posé sur --surface, pas sur la barre de navigation : les
     jetons --nav-* (clairs en Lagon) y seraient illisibles. */
  color: var(--ink);
  font: inherit;
  font-weight: 700;
  text-align: left;
  text-decoration: none;
  white-space: nowrap;
  cursor: pointer;
}

.site-user-menu__item:focus {
  background: var(--surface-2);
  color: var(--ink);
}

@media (hover: hover) and (pointer: fine) {
  .site-user-menu__item:hover {
    background: var(--surface-2);
    color: var(--ink);
  }
}

.site-user-menu__icon {
  width: 1.3rem;
  height: 1.3rem;
  flex: 0 0 1.3rem;
  fill: none;
  stroke: currentColor;
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-width: 1.8;
}

.site-user-menu__divider {
  margin: 0.45rem 0.3rem;
  border-top: 1px solid var(--line);
}

.site-user-menu__form {
  margin: 0;
}

@media (max-width: 419.98px) {
  .site-user-menu {
    width: calc(100vw - 1.7rem);
    min-width: 0;
  }

  .site-user-menu__item {
    white-space: normal;
  }
}

.site-shell__content {
  flex: 1;
}

.site-shell__container {
  padding-top: 1.2rem;
}

.hero-card {
  border: 1px solid var(--border);
  border-radius: var(--r-card);
  background: var(--surface);
  box-shadow: var(--shadow);
}

.hero-card {
  display: flex;
  flex-direction: column;
  gap: 14px;
  width: min(100%, 1080px);
  padding: 20px;
  margin-bottom: 20px;
}

.hero-card > * {
  margin: 0;
}

.eyebrow {
  margin: 0 0 0.5rem;
  color: var(--accent);
  font-size: 0.78rem;
  font-weight: 900;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}

h1 {
  margin: 0;
  color: var(--text-strong);
  font-size: 30px;
  letter-spacing: var(--display-track);
  line-height: 1.15;
}

h2 {
  font-size: 19px;
  line-height: 1.25;
}

@media (max-width: 767.98px) {
  h1 {
    font-size: 26px;
  }
}

p {
  color: var(--muted);
  line-height: 1.6;
}

.action-row {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  margin-top: 1.2rem;
}

/* `display` sur une classe l'emporte sur l'attribut `hidden` du navigateur :
   sans cette règle, un bouton `.btn` masqué reste visible. */
[hidden] {
  display: none !important;
}

.button,
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 2.7rem;
  padding: 0.75rem 1.15rem;
  border: 1px solid transparent;
  border-radius: 999px;
  background: linear-gradient(135deg, var(--accent) 0%, var(--accent-strong) 100%);
  color: var(--accent-ink);
  font-weight: 900;
  text-decoration: none;
  cursor: pointer;
}

.button-secondary,
.btn-secondary,
.btn-warning,
.btn-info {
  border-color: var(--border);
  background: var(--surface-2);
  color: var(--text-strong);
}

.button-danger { border-color: transparent; background: var(--danger); color: var(--danger-ink); }
.passkey-list { list-style: none; margin: 0.9rem 0 0; padding: 0; display: grid; gap: 0.6rem; }
.passkey-list__item { display: flex; align-items: center; justify-content: space-between; gap: 0.75rem; padding: 0.75rem 0.9rem; border: 1px solid var(--border); border-radius: 0.85rem; background: var(--surface-2); }
.passkey-list__date { display: block; color: var(--ink-2); font-size: 0.78rem; }
.passkey-list__actions { display: flex; gap: 0.5rem; }
.passkey-register-form { display: flex; align-items: center; gap: 0.6rem; flex-wrap: wrap; margin-top: 0.6rem; }
.passkey-register-form input { min-height: 2.4rem; }
.confirm-dialog { border: 1px solid var(--border); border-radius: 1rem; padding: 0; background: var(--surface); color: var(--text-strong); }
.confirm-dialog::backdrop { background: var(--backdrop); }
/* Fenêtre ouverte : le défilement ne passe pas à la page derrière. Chrome et
   Firefox récents l'appliquent aussi au fond ; Safari seulement quand le
   contenu de la fenêtre déborde. Pas de overflow: hidden sur <body>. */
dialog:modal { overscroll-behavior: contain; }
dialog::backdrop { overflow: hidden; overscroll-behavior: contain; }
.confirm-dialog__card { padding: 1.5rem; display: grid; gap: 0.6rem; }
.confirm-dialog__eyebrow { margin: 0; color: var(--ink-2); font-size: 0.8rem; text-transform: uppercase; letter-spacing: 0.05em; }
.confirm-dialog { max-width: min(28rem, calc(100vw - 2rem)); }
.installer { display: grid; gap: 16px; }
.installer [data-installer]:not([hidden]) { display: grid; gap: 16px; }
/* Gestes de l'iPhone, dessinés avec les jetons : aucune capture de téléphone. */
.installer__gestes li + li { margin-top: 12px; }
.geste { margin-top: 8px; padding: 8px; border: 1px solid var(--line); border-radius: var(--r-ctl); background: var(--surface-2); color: var(--ink-2); font-size: 13px; }
.geste--barre { display: flex; justify-content: space-between; align-items: center; }
.geste--liste { display: grid; gap: 4px; }
.geste__icone { display: inline-flex; align-items: center; justify-content: center; width: 36px; height: 36px; border-radius: 999px; font-size: 20px; }
.geste__ligne { display: flex; align-items: center; gap: 8px; min-height: 36px; padding: 4px 4px 4px 8px; border-radius: var(--r-ctl); }
.geste .geste__cible { outline: 2px solid var(--accent); background: var(--accent-soft); color: var(--ink); font-weight: 600; }
.installer .button { width: 100%; }
.site-topbar__actions .btn { white-space: nowrap; }
@media (min-width: 1200px) {
  .site-shell__main { display: grid; grid-template-columns: minmax(0, 1fr); grid-template-rows: auto 1fr auto; align-content: start; }
  .site-shell__main > .site-topbar { grid-area: 1 / 1; }
}
/* Les initiales restent dans le cadre : le déclencheur ne rétrécit pas. */
.site-user, .site-user-trigger { flex: 0 0 auto; }
.site-topbar__left { flex: 1 1 auto; }
.selecteur-club { margin: 0; min-width: 0; }
.selecteur-club__menu { position: relative; }
.selecteur-club__choix { display: flex; align-items: center; gap: 8px; width: auto; min-height: 44px; max-width: 14rem; padding: 0 10px 0 5px; cursor: pointer; list-style: none; touch-action: manipulation; user-select: none; -webkit-user-select: none; -webkit-touch-callout: none; }
.selecteur-club__choix::-webkit-details-marker { display: none; }
.selecteur-club__menu[open] > .selecteur-club__choix { outline: 2px solid var(--accent); outline-offset: 1px; }
.selecteur-club__nom { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.selecteur-club__fleche { flex: 0 0 auto; width: 7px; height: 7px; margin: -3px 2px 0 auto; border-right: 2px solid var(--ink-3); border-bottom: 2px solid var(--ink-3); transform: rotate(45deg); }
.selecteur-club__pastille { flex: 0 0 auto; display: inline-grid; place-items: center; width: 32px; height: 32px; overflow: hidden; border-radius: 10px; background: var(--accent-soft); color: var(--accent-text); font-size: 12px; font-weight: 700; letter-spacing: 0.02em; line-height: 1; }
.selecteur-club__pastille img { display: block; width: 100%; height: 100%; object-fit: cover; }
.selecteur-club__liste { position: absolute; top: calc(100% + 8px); right: 0; z-index: 1200; display: flex; flex-direction: column; gap: 2px; width: max-content; min-width: 100%; max-width: calc(100vw - 1.7rem); max-height: 70vh; max-height: 70dvh; overflow-y: auto; overscroll-behavior: contain; -webkit-overflow-scrolling: touch; padding: 6px; border: 1px solid var(--line); border-radius: 14px; background: var(--surface); box-shadow: var(--shadow-pop); }
.selecteur-club__groupe { padding: 8px 10px 4px; color: var(--ink-3); font-size: 12px; font-weight: 700; letter-spacing: 0.06em; text-transform: uppercase; }
.selecteur-club__option { display: flex; align-items: center; gap: 10px; width: 100%; padding: 6px 10px 6px 6px; border: 0; border-radius: 10px; background: transparent; color: var(--ink); font: inherit; font-size: 16px; text-align: left; cursor: pointer; touch-action: manipulation; user-select: none; -webkit-user-select: none; -webkit-touch-callout: none; transition: background-color 100ms ease-out; }
.selecteur-club__option:focus-visible, .selecteur-club__option:active { background: var(--surface-2); }
@media (hover: hover) and (pointer: fine) { .selecteur-club__option:hover { background: var(--surface-2); } }
.selecteur-club__option[aria-current] { background: var(--accent-soft); color: var(--accent-text); font-weight: 600; }
@media (max-width: 767.98px) {
  .selecteur-club__choix { width: auto; padding: 0 8px 0 4px; }
  .selecteur-club__nom { display: none; }
  .selecteur-club__fleche { margin-left: 0; }
}
.confirm-dialog__actions { display: flex; gap: 0.6rem; justify-content: flex-end; margin-top: 0.8rem; }

.message-stack {
  display: grid;
  gap: 0.75rem;
  margin-bottom: 1rem;
}

.message {
  padding: 0.85rem 1rem;
  border: 1px solid var(--border);
  border-radius: 1rem;
  background: var(--surface-2);
}

.site-footer__inner {
  display: flex;
  justify-content: space-between;
  gap: 1rem;
  padding: 1rem 0.2rem 0;
  color: var(--ink-2);
  font-size: 0.8rem;
}

body.site-nav-collapsed .site-nav-panel {
  width: 86px;
  min-width: 86px;
}

body.site-nav-collapsed .site-nav-panel__inner {
  padding-left: 0.55rem;
  padding-right: 0.55rem;
}

body.site-nav-collapsed .site-brand {
  justify-content: center;
}

body.site-nav-collapsed .site-brand__text,
body.site-nav-collapsed .site-nav__section-title,
body.site-nav-collapsed .site-nav__link__libelle {
  max-width: 0;
  margin: 0;
  opacity: 0;
  pointer-events: none;
  transform: translateX(-4px);
}

body.site-nav-collapsed .site-nav,
body.site-nav-collapsed .site-nav__section {
  align-items: center;
}

body.site-nav-collapsed .site-nav__link,
body.site-nav-collapsed .site-nav-toggle {
  justify-content: center;
  width: 2.6rem;
}

body.site-nav-collapsed .site-nav__link {
  min-height: 2.6rem;
  padding: 0.4rem;
}

/* Replié : le compteur devient une pastille posée sur l'angle de l'icône,
   qui reste centrée. Le liseré de la bordure de panneau la détache du fond. */
body.site-nav-collapsed .site-nav__link {
  position: relative;
}

body.site-nav-collapsed .site-nav__link .compteur {
  position: absolute;
  top: 0.2rem;
  right: 0.2rem;
  min-width: 1.05rem;
  height: 1.05rem;
  margin: 0;
  padding: 0 0.28rem;
  box-sizing: border-box;
  box-shadow: 0 0 0 2px var(--nav-bg);
  font-size: 0.65rem;
  line-height: 1.05rem;
}

.auth-body {
  background:
    var(--bg);
}

@media (max-width: 1199.98px) {
  .site-shell__main {
    padding-left: 1rem;
  }

  .site-topbar__menu-btn,
  .site-nav-panel__close {
    display: inline-flex;
  }

  .site-nav-toggle {
    display: none;
  }

  .site-nav-panel {
    position: fixed;
    inset: 0 auto 0 0;
    z-index: 1000;
    width: 242px;
    min-width: 242px;
    transform: translateX(-100%);
  }

  body.site-nav-open .site-nav-panel {
    transform: translateX(0);
  }

  .site-shell__backdrop {
    position: fixed;
    inset: 0;
    z-index: 900;
    display: none;
    background: var(--backdrop);
  }

  body.site-nav-open .site-shell__backdrop {
    display: block;
  }

  body.site-nav-collapsed .site-nav-panel {
    width: 242px;
    min-width: 242px;
  }

  body.site-nav-collapsed .site-brand__text,
  body.site-nav-collapsed .site-nav__section-title,
  body.site-nav-collapsed .site-nav__link__libelle {
    max-width: 16rem;
    opacity: 1;
    pointer-events: auto;
    transform: none;
  }

  body.site-nav-collapsed .site-nav__link {
    justify-content: flex-start;
    width: 100%;
  }

  body.site-nav-collapsed .site-nav__link .compteur {
    position: static;
    min-width: 1.25rem;
    height: auto;
    margin-left: auto;
    padding: 0.05rem 0.4rem;
    box-shadow: none;
    font-size: 0.75rem;
    line-height: 1.2rem;
  }
}

@media (max-width: 767.98px) {
  .site-shell__main {
    padding: 0.85rem;
  }

  .site-user-trigger__meta {
    display: none;
  }

  /* Sans le nom, le bouton se réduit à l'avatar : un cercle, avatar centré. */
  .site-user-trigger {
    padding: 0.25rem;
  }

  .site-topbar__title {
    font-size: 1.15rem;
  }

  .site-footer {
    display: none;
  }

  /* Page Confidentialité : l'édition n'est prévue que sur grand écran. */
  .confidentialite__reglages {
    display: none;
  }
}

.auth-passkey { margin-top: 1.1rem; display: grid; gap: 0.6rem; }
.auth-passkey__divider { display: flex; align-items: center; gap: 0.6rem; color: var(--ink-2); font-size: 0.78rem; }
.auth-passkey__divider::before, .auth-passkey__divider::after { content: ""; flex: 1; height: 1px; background: var(--border); }
.auth-passkey__button { display: flex; align-items: center; justify-content: center; gap: 0.5rem; min-height: 2.6rem; border: 1px solid var(--border); border-radius: 0.7rem; background: var(--surface-2); color: var(--text-strong); cursor: pointer; }
.auth-passkey__icon { width: 18px; height: 18px; fill: none; stroke: currentColor; stroke-width: 1.6; }
.auth-passkey__status { font-size: 0.8rem; color: var(--ink-2); }

/* Dashboard "platform" quick-actions card (super-administrateur) */

.hero-card--platform {
  border-color: var(--line);
  background:
    var(--surface);
}

.button__icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 1.1rem;
  height: 1.1rem;
  margin-right: 0.1rem;
  border-radius: 999px;
  background: rgba(0, 0, 0, 0.12);
  font-weight: 900;
  line-height: 1;
}

/* "Créer un club" form */

/* Lien retour, le même sur toutes les pages (charte). La hauteur de 44 px
   n'agrandit que la zone cliquable, pas le rendu. */
.back-link {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  min-height: 44px;
  margin: -0.6rem 0 0.4rem;
  color: var(--muted);
  font-weight: 700;
  font-size: 0.9rem;
  text-decoration: none;
}

.back-link:focus {
  color: var(--text-strong);
}

@media (hover: hover) and (pointer: fine) {
  .back-link:hover {
    color: var(--text-strong);
  }
}

/* Flèche : la même icône que le retour des chats (charte, Icônes). */
.back-link .icone {
  width: 18px;
  height: 18px;
  flex: 0 0 auto;
}

.hero-card--form {
  position: relative;
  max-width: 34rem;
}

/* La carte espace déjà ses enfants (gap) : pas de marge en plus au-dessus du
   formulaire, maintenant que le titre est dans la barre du haut. */
.hero-card--form > .form-fieldset {
  margin-top: 0;
}

.hero-card__icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 2.75rem;
  height: 2.75rem;
  margin-bottom: 0.9rem;
  border-radius: 0.9rem;
  background: var(--accent-soft);
  color: var(--text-strong);
  font-size: 1.15rem;
  font-weight: 900;
}

.hero-card__lead {
  margin-top: 0.5rem;
  max-width: 30rem;
}

.form-fieldset {
  display: grid;
  gap: 1.1rem;
  margin-top: 1.5rem;
}

.form-field {
  display: grid;
  gap: 0.45rem;
}

.form-field__label {
  display: flex;
  align-items: center;
  gap: 0.4rem;
  color: var(--text-strong);
  font-size: 0.85rem;
  font-weight: 800;
}

.form-fieldset input[type="text"],
.form-fieldset input[type="url"] {
  width: 100%;
  min-height: 2.9rem;
  padding: 0.7rem 0.95rem;
  border: 1px solid var(--border);
  border-radius: var(--r-ctl);
  background: var(--field);
  color: var(--text-strong);
  font: inherit;
  transition: border-color 0.12s ease, box-shadow 0.12s ease;
}

.form-fieldset input[type="text"]::placeholder,
.form-fieldset input[type="url"]::placeholder {
  color: var(--ink-3);
}

.form-fieldset input[type="text"]:focus,
.form-fieldset input[type="url"]:focus {
  outline: none;
  border-color: var(--accent);
  box-shadow: 0 0 0 3px var(--accent-soft);
}

.form-field.has-error input[type="text"],
.form-field.has-error input[type="url"] {
  border-color: var(--danger);
}

.form-field__error {
  margin: 0;
  color: var(--danger);
  font-size: 0.8rem;
  font-weight: 700;
}

.field-help {
  position: relative;
  display: inline-flex;
  outline: none;
}

.field-help__trigger {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 1.05rem;
  height: 1.05rem;
  border: 1px solid var(--border);
  border-radius: 999px;
  color: var(--muted);
  font-size: 0.62rem;
  font-weight: 900;
  font-style: normal;
  cursor: help;
}

.field-help:focus .field-help__trigger,
.field-help:focus-within .field-help__trigger {
  border-color: var(--accent);
  color: var(--accent);
}

@media (hover: hover) and (pointer: fine) {
  .field-help:hover .field-help__trigger {
    border-color: var(--accent);
    color: var(--accent);
  }
}

.field-help__bubble {
  position: absolute;
  bottom: calc(100% + 0.55rem);
  left: 50%;
  z-index: 20;
  visibility: hidden;
  opacity: 0;
  width: 17rem;
  padding: 0.7rem 0.85rem;
  border: 1px solid var(--line);
  border-radius: 0.75rem;
  background: var(--surface);
  box-shadow: var(--shadow-pop);
  color: var(--text);
  font-size: 0.78rem;
  font-weight: 500;
  line-height: 1.5;
  text-transform: none;
  letter-spacing: normal;
  transform: translate(-50%, 4px);
  transition: opacity 0.12s ease, transform 0.12s ease, visibility 0.12s ease;
  pointer-events: none;
}

.field-help__bubble em {
  color: var(--accent);
  font-style: normal;
}

.field-help__bubble::after {
  content: "";
  position: absolute;
  top: 100%;
  left: 50%;
  width: 0.65rem;
  height: 0.65rem;
  background: var(--surface);
  border-right: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
  transform: translate(-50%, -50%) rotate(45deg);
}

.field-help:focus .field-help__bubble,
.field-help:focus-within .field-help__bubble {
  visibility: visible;
  opacity: 1;
  transform: translate(-50%, 0);
}

@media (hover: hover) and (pointer: fine) {
  .field-help:hover .field-help__bubble {
    visibility: visible;
    opacity: 1;
    transform: translate(-50%, 0);
  }
}

.form-toggle {
  display: inline-flex;
  align-items: center;
  gap: 0.75rem;
  cursor: pointer;
}

.form-toggle input[type="checkbox"] {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  opacity: 0;
}

/* Même apparence que `.switch` (charte) : 38 × 22, pastille blanche, `--accent` quand activé. */
.form-toggle__track {
  position: relative;
  flex: 0 0 38px;
  width: 38px;
  height: 22px;
  border-radius: 11px;
  background: var(--line);
  transition: background-color 150ms ease;
}

.form-toggle__thumb {
  position: absolute;
  top: 3px;
  left: 3px;
  width: 16px;
  height: 16px;
  border-radius: 50%;
  background: #fff;
  transition: transform 150ms var(--ease-out);
}

.form-toggle input[type="checkbox"]:checked ~ .form-toggle__track {
  background: var(--accent);
}

.form-toggle input[type="checkbox"]:checked ~ .form-toggle__track .form-toggle__thumb {
  transform: translateX(16px);
}

.form-toggle input[type="checkbox"]:focus-visible ~ .form-toggle__track {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
}

.form-toggle__label {
  display: flex;
  flex-direction: column;
  gap: 0.15rem;
  color: var(--ink);
  font-weight: 600;
}

.form-toggle__label small {
  color: var(--muted);
  font-size: 0.78rem;
  font-weight: 500;
}

/* Calendrier (tâche 16) */

.button-success {
  border-color: transparent;
  background: var(--ok);
  color: var(--accent-ink);
}

.calendrier {
  width: 100%;
  max-width: none;
}

.calendrier__entete {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  margin-bottom: 1.2rem;
}

.calendrier__entete h1 {
  font-size: clamp(1.4rem, 4vw, 2.2rem);
}

.calendrier__grille {
  display: grid;
  gap: 0.5rem;
}

.calendrier__entetes-jours,
.calendrier__semaine {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  gap: 0.5rem;
}

.calendrier__entetes-jours span {
  color: var(--muted);
  font-size: 0.78rem;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  padding: 0 0.2rem;
}

.calendrier__jour {
  min-height: 7rem;
  border: 1px solid var(--border);
  border-radius: 0.85rem;
  background: var(--surface-2);
  padding: 0.5rem;
  display: flex;
  flex-direction: column;
  gap: 0.4rem;
}

.calendrier__jour--hors-mois {
  opacity: 0.4;
}

.calendrier__jour--aujourdhui {
  border-color: var(--accent);
}

.calendrier__jour-numero {
  margin: 0;
  color: var(--text-strong);
  font-weight: 800;
  font-size: 0.85rem;
}

.calendrier__jour-activites {
  display: grid;
  gap: 0.4rem;
}

.carte-activite {
  display: grid;
  gap: 0.35rem;
  border: 1px solid var(--border);
  border-radius: 0.6rem;
  background: var(--surface-2);
  padding: 0.5rem;
  font-size: 0.8rem;
}

.carte-activite--annulee {
  opacity: 0.7;
}

.carte-activite__lien {
  display: grid;
  gap: 0.2rem;
  color: inherit;
  text-decoration: none;
}

.carte-activite__type {
  margin: 0;
  color: var(--muted);
  font-size: 0.72rem;
}

.carte-activite__titre {
  margin: 0;
  font-size: 0.9rem;
  color: var(--text-strong);
}

.carte-activite__horaire {
  margin: 0;
  color: var(--muted);
  font-size: 0.72rem;
}

.carte-activite__badge {
  margin: 0;
  font-size: 0.72rem;
  font-weight: 800;
  color: var(--danger);
}

.carte-activite__badge--annulee {
  color: var(--danger);
}

.carte-activite__badge--inscrit {
  color: var(--ok);
}

.carte-activite__actions {
  display: flex;
}

.carte-activite__actions form {
  margin: 0;
  width: 100%;
}

.carte-activite__actions button {
  width: 100%;
  min-height: 2rem;
  padding: 0.35rem 0.6rem;
  font-size: 0.75rem;
}

.calendrier__liste-mobile {
  display: none;
}

.calendrier__jour-mobile {
  border: 1px solid var(--border);
  border-radius: 0.85rem;
  padding: 0.75rem;
  margin-bottom: 0.75rem;
  display: grid;
  gap: 0.5rem;
}

.calendrier__jour-mobile-date {
  margin: 0;
  color: var(--text-strong);
  font-weight: 800;
}

@media (max-width: 767.98px) {
  .calendrier__grille {
    display: none;
  }

  .calendrier__liste-mobile {
    display: block;
  }
}

.conversation-groupe { margin-top: 1.4rem; }
.conversation-groupe h2 { color: var(--text-strong); font-size: 1.1rem; margin: 0 0 0.6rem; }
.conversation-liste { list-style: none; margin: 0; padding: 0; display: grid; gap: 0.5rem; }
.conversation-liste__item { border: 1px solid var(--border); border-radius: 0.85rem; background: var(--surface-2); }
.conversation-liste__item a { display: block; padding: 0.75rem 0.9rem; text-decoration: none; color: var(--text-strong); font-weight: 700; }

.conversation-fil { display: grid; gap: 0.75rem; margin-top: 1.2rem; max-height: 60vh; overflow-y: auto; padding-right: 0.2rem; }
.conversation-form { margin-top: 1.2rem; }
.conversation-form__apercu { display: flex; flex-wrap: wrap; gap: 0.5rem; margin: 0.5rem 0; }
.conversation-form__apercu-image { width: 4.5rem; height: 4.5rem; object-fit: cover; border-radius: 0.6rem; border: 1px solid var(--border); }

.message-item { border: 1px solid var(--border); border-radius: 0.9rem; background: var(--surface-2); padding: 0.85rem 1rem; }
.message-item--mine { border-color: var(--accent); }
.message-item__meta { margin: 0 0 0.35rem; display: flex; gap: 0.6rem; align-items: baseline; font-size: 0.82rem; color: var(--muted); }
.message-item__corps { margin: 0 0 0.5rem; color: var(--text); white-space: pre-wrap; }
.message-item__corps--supprime { color: var(--muted); }
.message-item__pieces { list-style: none; margin: 0 0 0.5rem; padding: 0; display: grid; gap: 0.3rem; }
.message-item__vignette { max-width: 160px; max-height: 160px; border-radius: 0.6rem; display: block; }

/* Recherche de personnes avec suggestions (choix_personnes.js). */
.choix-personnes {
  position: relative;
  display: grid;
  gap: 0.5rem;
}

.choix-personnes__puces {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
}

.choix-personnes__puces:empty {
  display: none;
}

.choix-personnes__puce {
  border: 1px solid var(--accent);
  border-radius: 999px;
  padding: 0.3rem 0.7rem;
  background: var(--accent-soft);
  color: var(--text-strong);
  font: inherit;
  font-size: 0.85rem;
  cursor: pointer;
}

.choix-personnes__champ {
  width: 100%;
  min-height: 2.6rem;
  padding: 0 0.8rem;
  border: 1px solid var(--border);
  border-radius: 0.75rem;
  background: var(--surface-2);
  color: var(--text-strong);
  font: inherit;
}

.choix-personnes__suggestions {
  position: absolute;
  top: 100%;
  left: 0;
  right: 0;
  z-index: 30;
  margin: 0.3rem 0 0;
  padding: 0.3rem;
  list-style: none;
  border: 1px solid var(--border);
  border-radius: 0.9rem;
  background: var(--surface);
  box-shadow: var(--shadow);
  transform-origin: top center;
  animation: choix-ouvrir 140ms cubic-bezier(0.23, 1, 0.32, 1);
}

@keyframes choix-ouvrir {
  from {
    opacity: 0;
    transform: scale(0.97);
  }
}

@keyframes pop-in {
  from {
    opacity: 0;
    transform: scale(0.96);
  }
}

@media (prefers-reduced-motion: reduce) {
  .choix-personnes__suggestions {
    animation: none;
  }

  .tpop,
  .suggestions-invite.pop-in {
    animation: none;
  }
}

.choix-personnes__option {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  padding: 0.45rem 0.55rem;
  border-radius: 0.6rem;
  cursor: pointer;
}

.choix-personnes__option.est-actif {
  background: var(--surface-2);
}

@media (hover: hover) and (pointer: fine) {
  .choix-personnes__option:hover {
    background: var(--surface-2);
  }
}

.choix-personnes__vide {
  padding: 0.5rem;
  color: var(--muted);
}

/* Canal privé : compteur cliquable et gestion des participants. */
.conversation-meta {
  color: var(--muted);
}

.lien-bouton {
  padding: 0;
  border: 0;
  background: none;
  color: var(--accent);
  font: inherit;
  font-weight: 700;
  text-decoration: underline;
  text-underline-offset: 3px;
  cursor: pointer;
}

.participants-dialog {
  width: min(30rem, calc(100vw - 2rem));
}

.participants-liste {
  display: grid;
  gap: 0.4rem;
  margin: 0;
  padding: 0;
  list-style: none;
}

.participants-liste li {
  display: flex;
  align-items: center;
  gap: 0.6rem;
}

.participants-liste__nom {
  flex: 1 1 auto;
}

.participants-liste__nom small {
  margin-left: 0.4rem;
  color: var(--muted);
}

.participants-ajout,
.participants-visibilite {
  display: grid;
  gap: 0.5rem;
  padding-top: 0.8rem;
  border-top: 1px solid var(--border);
}

.button-small {
  min-height: 2rem;
  padding: 0.3rem 0.8rem;
  font-size: 0.85rem;
}

.case-a-cocher {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  font-weight: 700;
}

.form-field__aide {
  margin: 0.2rem 0 0;
  color: var(--muted);
  font-size: 0.85rem;
}


/* ---- Socle mobile (voir la charte) ----
   Pas de voile gris au toucher : chaque contrôle a son propre retour. */
html {
  -webkit-tap-highlight-color: transparent;
  -webkit-text-size-adjust: 100%;
}

/* viewport-fit=cover : en paysage, le contenu s'écarte de l'encoche. */
body {
  padding-left: env(safe-area-inset-left, 0px);
  padding-right: env(safe-area-inset-right, 0px);
}

/* Réponse immédiate au toucher (pas d'attente du double-tap). */
a,
button,
[role="button"],
summary,
label {
  touch-action: manipulation;
}

/* Un appui long sur un bouton ne sélectionne pas son libellé. */
button,
[role="button"],
.button,
.button-secondary,
.button-danger {
  -webkit-user-select: none;
  user-select: none;
}

/* Retour à l'appui, dès que le doigt se pose. */
.button,
.button-secondary,
.button-danger,
.site-user-trigger {
  transition: transform 120ms cubic-bezier(0.23, 1, 0.32, 1);
}

.button:active,
.button-secondary:active,
.button-danger:active,
.site-user-trigger:active {
  transform: scale(0.97);
}

@media (prefers-reduced-motion: reduce) {
  .button:active,
  .button-secondary:active,
  .button-danger:active,
  .site-user-trigger:active {
    transform: none;
  }
}

/* iOS zoome sur un champ en dessous de 16 px, et ne dézoome pas. */
@media (pointer: coarse) {
  input,
  select,
  textarea {
    font-size: 16px;
  }
}

/* ---- Apparences : typographie et composants propres (charte) ---- */
h1,
h2,
h3,
.site-topbar__title {
  font-family: var(--font-display);
  font-weight: var(--display-weight);
}

.button,
.button-secondary,
.button-danger,
.btn {
  border-radius: var(--r-pill);
}

.carte-activite,
.message-item,
.conversation-liste__item,
.confirm-dialog {
  border-radius: var(--r-card);
}

.compteur {
  min-width: 1.25rem;
  margin-left: auto;
  padding: 0.05rem 0.4rem;
  border-radius: var(--r-pill);
  background: var(--accent);
  color: var(--accent-ink);
  font-size: 0.75rem;
  font-weight: 700;
  line-height: 1.2rem;
  text-align: center;
}

/* Carnet : menu en haut, pas de barre latérale. */
[data-apparence="carnet"] .site-nav-panel,
[data-apparence="carnet"] .site-topbar__menu-btn,
[data-apparence="carnet"] .site-shell__backdrop {
  display: none !important;
}

.barre-haute {
  position: sticky;
  top: 0;
  z-index: 50;
  display: flex;
  align-items: stretch;
  gap: 1.5rem;
  min-height: 3.75rem;
  padding: 0 1.5rem;
  background: var(--nav-bg);
  border-bottom: 2px solid var(--ink);
}

.barre-haute__logo {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  color: var(--ink);
  text-decoration: none;
}

.barre-haute__nom {
  font-family: var(--font-display);
  font-size: 1.35rem;
  font-weight: var(--display-weight);
}

.barre-haute__liens {
  display: flex;
  align-items: stretch;
  gap: 0.25rem;
}

.barre-haute__lien {
  display: flex;
  align-items: center;
  gap: 0.45rem;
  padding: 0 0.7rem;
  margin-bottom: -2px;
  border-bottom: 3px solid transparent;
  color: var(--ink-2);
  font-weight: 600;
  text-decoration: none;
  white-space: nowrap;
  cursor: pointer;
  list-style: none;
}

.barre-haute__lien::-webkit-details-marker {
  display: none;
}

.barre-haute__lien.is-active,
.barre-haute__groupe[open] > .barre-haute__lien {
  color: var(--ink);
  border-bottom-color: var(--nav-bar);
}

@media (hover: hover) and (pointer: fine) {
  .barre-haute__lien:hover {
    color: var(--ink);
  }
}

.barre-haute__lien .icone {
  display: none;
}

.barre-haute__groupe summary .icone {
  display: block;
  width: 0.9rem;
  height: 0.9rem;
  transition: transform 160ms cubic-bezier(0.23, 1, 0.32, 1);
}

.barre-haute__groupe[open] summary .icone {
  transform: rotate(180deg);
}

.barre-haute__groupe {
  position: relative;
  display: flex;
}

.barre-haute__deroulant {
  position: absolute;
  top: calc(100% + 2px);
  left: 0;
  z-index: 60;
  display: grid;
  gap: 0.1rem;
  width: 17rem;
  padding: 0.4rem;
  border: 1px solid var(--line);
  border-radius: var(--r-card);
  background: var(--surface);
  box-shadow: var(--shadow-pop);
  transform-origin: top left;
  animation: apparaitre 160ms cubic-bezier(0.23, 1, 0.32, 1);
}

.deroulant__lien {
  display: flex;
  align-items: center;
  gap: 0.65rem;
  padding: 0.55rem 0.6rem;
  border-radius: var(--r-ctl);
  color: var(--ink);
  text-decoration: none;
}

.deroulant__lien .icone {
  color: var(--ink-3);
}

.deroulant__lien.is-active {
  color: var(--accent-text);
  font-weight: 700;
}

@media (hover: hover) and (pointer: fine) {
  .deroulant__lien:hover {
    background: var(--surface-2);
  }
}

@keyframes apparaitre {
  from {
    opacity: 0;
    transform: scale(0.96);
  }
}

/* Bouton Accueil de la barre du haut (téléphone) */
.site-topbar__accueil {
  display: none;
}

/* ---- Téléphone : barre d'onglets et panneau Menu (charte, section 6) ---- */
.barre-onglets {
  display: none;
}

.feuille {
  margin: auto 0 0;
  width: 100%;
  max-width: 100%;
  max-height: 80dvh;
  padding: 0.5rem 0.75rem calc(1rem + env(safe-area-inset-bottom, 0px));
  border: 0;
  border-radius: calc(var(--r-card) + 6px) calc(var(--r-card) + 6px) 0 0;
  background: var(--surface);
  color: var(--ink);
  overscroll-behavior: contain;
}

.feuille[open] {
  animation: monter 260ms cubic-bezier(0.32, 0.72, 0, 1);
}

.feuille::backdrop {
  background: var(--backdrop);
}

.feuille__poignee {
  width: 2.5rem;
  height: 0.3rem;
  margin: 0.25rem auto 0.6rem;
  border-radius: 999px;
  background: var(--line);
}

.feuille__section {
  display: flex;
  flex-direction: column;
  padding: 0.35rem 0;
  border-top: 1px solid var(--line);
}

.feuille__section:first-of-type {
  border-top: 0;
}

.feuille__titre {
  padding: 0.3rem 0.6rem;
  color: var(--ink-3);
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.feuille__lien {
  display: flex;
  align-items: center;
  gap: 0.8rem;
  width: 100%;
  min-height: 3rem;
  padding: 0 0.6rem;
  border: 0;
  border-radius: var(--r-ctl);
  background: transparent;
  color: var(--ink);
  font: inherit;
  font-size: 1rem;
  text-align: left;
  text-decoration: none;
  cursor: pointer;
}

.feuille__lien .icone {
  width: 1.35rem;
  height: 1.35rem;
  color: var(--ink-3);
}

.feuille__lien.is-active {
  color: var(--accent-text);
  font-weight: 700;
}

.feuille__lien:active {
  background: var(--surface-2);
}

@keyframes monter {
  from {
    transform: translateY(100%);
  }
}

@media (prefers-reduced-motion: reduce) {
  .feuille[open],
  .barre-haute__deroulant {
    animation: none;
  }
}

@media (max-width: 767.98px) {
  /* Sur téléphone, la barre d'onglets remplace menu latéral, tiroir et
     barre du haut de Carnet. */
  .site-nav-panel,
  .site-shell__backdrop,
  .site-topbar__menu-btn,
  .barre-haute {
    display: none !important;
  }

  .site-topbar__accueil {
    display: inline-flex;
    width: 2.25rem;
    height: 2.25rem;
  }

  .site-shell__main {
    padding-bottom: calc(5.5rem + env(safe-area-inset-bottom, 0px));
  }

  .barre-onglets {
    position: fixed;
    right: 0;
    bottom: 0;
    left: 0;
    z-index: 900;
    display: grid;
    grid-auto-columns: minmax(0, 1fr);
    grid-auto-flow: column;
    padding: 0.35rem 0.25rem calc(0.35rem + env(safe-area-inset-bottom, 0px));
    border-top: 1px solid var(--line);
    background: var(--surface);
  }

  .onglet {
    position: relative;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 0.15rem;
    min-height: 3.25rem;
    border: 0;
    border-radius: var(--r-ctl);
    background: transparent;
    color: var(--ink-3);
    font: inherit;
    font-size: 0.72rem;
    font-weight: 600;
    text-decoration: none;
    cursor: pointer;
  }

  .onglet .icone {
    flex: 0 0 1.5rem;
    width: 1.5rem;
    height: 1.5rem;
  }

  .onglet.is-active {
    color: var(--accent-text);
  }

  .onglet:active {
    background: var(--surface-2);
  }

  .onglet .compteur {
    position: absolute;
    top: 0.2rem;
    left: calc(50% + 0.35rem);
    margin: 0;
  }
}

/* ---- Choix de l'apparence (première connexion, Mon profil) ---- */
.choix-apparence__cartes {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 0.9rem;
}

.carte-style {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  padding: 0.65rem;
  border: 2px solid var(--line);
  border-radius: var(--r-card);
  background: var(--surface);
  color: var(--ink);
  font: inherit;
  text-align: left;
  cursor: pointer;
  transition: transform 140ms cubic-bezier(0.23, 1, 0.32, 1), border-color 120ms ease;
}

.carte-style:active {
  transform: scale(0.98);
}

.carte-style.is-on {
  border-color: var(--accent);
}

.carte-style__nom {
  font-family: var(--font-display);
  font-weight: var(--display-weight);
  font-size: 1.05rem;
}

.carte-style__texte {
  color: var(--ink-2);
  font-size: 0.85rem;
  line-height: 1.4;
}

/* L'aperçu porte ses propres jetons (data-apparence) : chaque carte montre
   son style, quel que soit celui de la page. */
.apercu {
  display: flex;
  height: 5.75rem;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: var(--r-ctl);
  background: var(--bg);
}

.apercu__menu {
  width: 26%;
  padding: 0.4rem;
  background: var(--nav-bg);
}

.apercu[data-apparence="carnet"] {
  flex-direction: column;
}

.apercu[data-apparence="carnet"] .apercu__menu {
  width: auto;
  height: 1.4rem;
  padding: 0.2rem 0.4rem;
  border-bottom: 2px solid var(--ink);
}

.apercu__logo {
  display: grid;
  place-items: center;
  width: 1rem;
  height: 1rem;
  border-radius: 0.25rem;
  background: var(--nav-mark);
  color: #ffffff;
  font-size: 0.55rem;
  font-weight: 700;
}

.apercu__carte {
  display: flex;
  flex: 1;
  flex-direction: column;
  gap: 0.3rem;
  margin: 0.4rem;
  padding: 0.5rem;
  border: 1px solid var(--line);
  border-radius: calc(var(--r-card) / 2);
  background: var(--surface);
}

.apercu__titre {
  color: var(--ink);
  font-family: var(--font-display);
  font-weight: var(--display-weight);
  font-size: 0.85rem;
  line-height: 1;
}

.apercu__ligne {
  width: 80%;
  height: 0.3rem;
  border-radius: 0.2rem;
  background: var(--line);
}

.apercu__ligne--courte {
  width: 50%;
}

.apercu__bouton {
  align-self: flex-start;
  margin-top: auto;
  padding: 0.1rem 0.45rem;
  border-radius: var(--r-pill);
  background: var(--accent);
  color: var(--accent-ink);
  font-size: 0.55rem;
  font-weight: 700;
}

@media (max-width: 767.98px) {
  .choix-apparence__cartes {
    grid-template-columns: minmax(0, 1fr);
  }

  .carte-style {
    display: grid;
    grid-template-columns: 7rem minmax(0, 1fr);
    column-gap: 0.75rem;
  }

  .carte-style .apercu {
    grid-row: span 2;
    height: 4.75rem;
  }
}

/* Carnet : la barre du haut coiffe la page, pas de colonne de menu. */
[data-apparence="carnet"] .site-shell {
  flex-direction: column;
}

[data-apparence="carnet"] .site-shell__main {
  width: min(100%, 76rem);
  margin: 0 auto;
  padding-left: 1.2rem;
}

[data-apparence="carnet"] .barre-haute {
  flex: 0 0 auto;
}


/* ---- Composants de la charte (repris du prototype docs/ui/prototype-charte.html) ----
   Mêmes noms et mêmes jetons que le prototype : un écran se porte en
   reprenant son balisage. */
.avatar { width: 30px; height: 30px; flex: 0 0 30px; border-radius: 50%; display: grid; place-items: center; background: var(--accent-soft); color: var(--accent-text); font-weight: 700; font-size: 13px; }
.h1 { font-family: var(--font-display); font-weight: var(--display-weight); letter-spacing: var(--display-track); font-size: 30px; line-height: 1.15; }
.h2 { font-family: var(--font-display); font-weight: var(--display-weight); letter-spacing: var(--display-track); font-size: 19px; line-height: 1.25; }
.muted { color: var(--ink-2); }
.small { font-size: 13px; }
.num { font-variant-numeric: tabular-nums; }
.card { background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-card); padding: 20px; box-shadow: var(--shadow); display: flex; flex-direction: column; gap: 14px; }
.card-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
/* Formulaire d'ajout d'un invité : même espace entre tous les champs, y
   compris sous la grille Prénom / Nom (une seule colonne sur mobile). */
.formulaire-invite { display: flex; flex-direction: column; gap: 20px; }
.formulaire-invite input, .formulaire-invite select { font-size: 16px; }
/* Ajout d'un invité : un seul bloc, deux façons (onglets pleine largeur,
   comme la fenêtre « Ajouter des personnes » des checklists). */
.invite-panneau { display: flex; flex-direction: column; gap: 14px; }
.invite-panneau[hidden] { display: none; }
.invite-panneau__titre { margin: 0; font-size: 15px; font-weight: 600; }
.invite-ajout--onglets .invite-panneau__titre { display: none; }
.invite-onglets { display: flex; width: 100%; }
.invite-onglets[hidden] { display: none; }
.invite-onglets button { flex: 1 1 0; min-height: 40px; touch-action: manipulation; user-select: none; -webkit-user-select: none; transition: background-color 150ms ease, color 150ms ease; }
.invite-onglets button:active { transform: scale(0.97); }
.invite-panneau:not([hidden]) { animation: invite-panneau-in 160ms var(--ease-out, cubic-bezier(0.23, 1, 0.32, 1)); }
@keyframes invite-panneau-in { from { opacity: 0; transform: translateY(4px); } }
@media (prefers-reduced-motion: reduce) { .invite-panneau:not([hidden]) { animation: none; } .invite-onglets button:active { transform: none; } }
.grid-2 { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 20px; }
.grid-3 { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 20px; }
.split { display: grid; grid-template-columns: minmax(0, 1fr) 340px; gap: 20px; align-items: start; }
.row { display: flex; align-items: center; gap: 10px; }
.row-between { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.stack { display: flex; flex-direction: column; gap: 10px; }
.stat { font-family: var(--font-display); font-weight: var(--display-weight); font-size: 32px; line-height: 1; font-variant-numeric: tabular-nums; }
.divider { height: 1px; background: var(--line); }
.chip { display: inline-flex; align-items: center; gap: 6px; padding: 3px 10px; border-radius: var(--r-pill); font-size: 12.5px; font-weight: 600; white-space: nowrap; }
.chip::before { content: ""; width: 6px; height: 6px; border-radius: 50%; background: currentColor; }
.chip-ok { background: var(--ok-soft); color: var(--ok); }
.chip-warn { background: var(--warn-soft); color: var(--warn); }
.chip-danger { background: var(--danger-soft); color: var(--danger); }
.chip-info { background: var(--accent-soft); color: var(--accent-text); }
.chip-neutral { background: var(--surface-2); color: var(--ink-2); }
.alert { display: flex; gap: 12px; align-items: center; justify-content: space-between; padding: 12px 16px; border-radius: var(--r-ctl); background: var(--warn-soft); color: var(--warn); font-weight: 600; font-size: 14px; }
.field { display: flex; flex-direction: column; gap: 6px; }
.field label { font-size: 13px; font-weight: 600; color: var(--ink); }
.field .hint, .champ-et-bouton > .hint { font-size: 12.5px; color: var(--ink-3); }
/* Un champ et son bouton sur une ligne, aide en dessous sur toute la largeur. */
.champ-et-bouton { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 6px 10px; align-items: end; }
.champ-et-bouton > .hint { grid-column: 1 / -1; }
.input { height: 42px; padding: 0 12px; border: 1px solid var(--line); border-radius: var(--r-ctl); background: var(--field); color: var(--ink); font: inherit; width: 100%; }
.input:focus { outline: 2px solid var(--accent); outline-offset: 1px; }
.form-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 16px; }
.seg { display: inline-flex; padding: 3px; gap: 2px; border: 1px solid var(--line); border-radius: var(--r-pill); background: var(--surface-2); }
.seg button { border: 0; background: transparent; color: var(--ink-2); padding: 6px 14px; border-radius: var(--r-pill); font-size: 13.5px; font-weight: 600; cursor: pointer; }
.seg button.is-on { background: var(--surface); color: var(--ink); box-shadow: 0 1px 2px rgba(0, 0, 0, 0.12); }
.toggle { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 10px 0; border-bottom: 1px solid var(--line); }
.switch { width: 38px; height: 22px; padding: 0; border: 0; border-radius: 11px; background: var(--line); position: relative; flex: 0 0 38px; cursor: pointer; transition: background-color 150ms ease; }
.switch::after { transition: left 150ms var(--ease-out); }
.seg button:disabled { cursor: default; }
.switch::after { content: ""; position: absolute; top: 3px; left: 3px; width: 16px; height: 16px; border-radius: 50%; background: #fff; }
.switch.is-on { background: var(--accent); }
.switch.is-on::after { left: 19px; }
.table { width: 100%; border-collapse: collapse; font-size: 14px; }
.table th { text-align: left; font-size: 12px; font-weight: 700; color: var(--ink-3); text-transform: uppercase; letter-spacing: 0.06em; padding: 10px 12px; border-bottom: 1px solid var(--line); }
.table td { padding: 12px; border-bottom: 1px solid var(--line); vertical-align: middle; }
.table tr:last-child td { border-bottom: 0; }
.table .col-bureau { display: none; }
@media (min-width: 768px) and (pointer: fine) { .table .col-bureau { display: table-cell; } }
.table-wrap { background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-card); overflow: hidden; }
.toolbar { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.event { display: grid; grid-template-columns: 58px minmax(0, 1fr) auto; gap: 14px; align-items: center; padding: 12px; border: 1px solid var(--line); border-radius: var(--r-ctl); background: var(--surface); cursor: pointer; text-align: left; color: var(--ink); width: 100%; }
@media (hover: hover) and (pointer: fine) {
  .event:hover { border-color: var(--accent); }
}
.date { display: flex; flex-direction: column; align-items: center; justify-content: center; height: 58px; border-radius: var(--r-ctl); background: var(--accent-soft); color: var(--accent-text); line-height: 1; }
.date b { font-family: var(--font-display); font-size: 22px; }
.date small { font-size: 11px; font-weight: 700; text-transform: uppercase; letter-spacing: 0.06em; margin-top: 3px; }
.event-title { font-weight: 700; font-size: 15.5px; }
.event-meta { color: var(--ink-2); font-size: 13.5px; }
.day-head { font-size: 12px; font-weight: 700; color: var(--ink-3); text-transform: uppercase; letter-spacing: 0.08em; padding-top: 8px; }
.chat { display: grid; grid-template-columns: 300px minmax(0, 1fr); height: 100%; border: 1px solid var(--line); border-radius: var(--r-card); overflow: hidden; background: var(--surface); }
.chan-list { border-right: 1px solid var(--line); padding: 14px 10px; display: flex; flex-direction: column; gap: 14px; overflow: auto; background: var(--surface-2); }
.chan { display: flex; align-items: center; gap: 8px; width: 100%; padding: 8px 10px; border: 0; border-radius: var(--r-ctl); background: transparent; color: var(--ink); cursor: pointer; text-align: left; }
.chan.is-active { background: var(--surface); box-shadow: 0 0 0 1px var(--line); font-weight: 700; }
.chan span { flex: 1 1 auto; }
.thread { display: flex; flex-direction: column; min-height: 0; }
.thread-head { padding: 14px 20px; border-bottom: 1px solid var(--line); }
.msgs { flex: 1 1 auto; overflow: auto; padding: 20px; display: flex; flex-direction: column; gap: 16px; }
.msg { display: grid; grid-template-columns: 34px minmax(0, 1fr); gap: 10px; }
.msg-body { background: var(--surface-2); border-radius: 4px var(--r-card) var(--r-card) var(--r-card); padding: 10px 14px; max-width: 620px; }
.msg.is-me .msg-body { background: var(--accent-soft); }
.composer { display: flex; gap: 10px; padding: 14px 20px; border-top: 1px solid var(--line); }
.map { height: 160px; border-radius: var(--r-ctl); background: repeating-linear-gradient(135deg, var(--surface-2) 0 10px, var(--bg) 10px 20px); display: grid; place-items: center; color: var(--ink-3); font-size: 13px; border: 1px solid var(--line); }
.meta-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 14px; }
.meta dt { font-size: 12px; color: var(--ink-3); font-weight: 700; text-transform: uppercase; letter-spacing: 0.06em; }
.meta dd { margin: 3px 0 0; font-size: 16px; font-weight: 600; }
.avatars { display: flex; }
.avatars .avatar { margin-left: -8px; border: 2px solid var(--surface); }
.avatars .avatar:first-child { margin-left: 0; }
.card { padding: var(--pad, 20px); }
.toast { pointer-events: auto; display: flex; align-items: center; gap: 10px; max-width: 360px; padding: 12px 16px; border-radius: var(--r-card); background: var(--ink); color: var(--bg); font-weight: 600; font-size: 14px; box-shadow: 0 12px 32px rgba(0, 0, 0, 0.24); opacity: 0; transform: translateY(12px); transition: opacity 220ms var(--ease-out), transform 220ms var(--ease-out); }
.toast svg { width: 18px; height: 18px; flex: 0 0 18px; color: var(--ok); }
.toast__action { margin-left: auto; padding: 8px 4px; border: 0; background: none; color: inherit; font: inherit; font-weight: 700; text-decoration: underline; cursor: pointer; }
.toast.is-in { opacity: 1; transform: translateY(0); }
.toast.is-out { opacity: 0; transform: translateY(6px); transition-duration: 160ms; }
.input::placeholder { color: var(--ink-3); opacity: 1; }
.event-side { display: flex; flex-direction: column; align-items: flex-end; gap: 4px; }
.avatar { display: inline-grid; place-items: center; overflow: hidden; line-height: 1; letter-spacing: 0.02em; font-size: 12px; object-fit: cover; }
.avatar-sm { width: 26px; height: 26px; flex: 0 0 26px; font-size: 10.5px; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.dt { display: flex; flex-direction: column; gap: 10px; }
.dt-bar { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.dt-search { position: relative; display: flex; align-items: center; width: 240px; }
.dt-search svg { position: absolute; left: 10px; width: 16px; height: 16px; color: var(--ink-3); pointer-events: none; }
.dt-search .input { height: 36px; padding-left: 32px; font-size: 14px; }
.dt-count { margin-left: auto; }
.fchip { display: inline-flex; align-items: center; gap: 6px; height: 30px; padding: 0 8px 0 10px; border: 1px solid var(--accent); border-radius: var(--r-pill); background: var(--accent-soft); color: var(--accent-text); font-size: 13px; cursor: pointer; }
.fchip b { font-weight: 700; }
.fchip svg { width: 14px; height: 14px; opacity: 0.7; }
@media (hover: hover) and (pointer: fine) {
  .fchip:hover svg { opacity: 1; }
}
.table th { padding: 6px 6px 6px 12px; }
.th { display: flex; align-items: center; gap: 2px; }
.th-sort { display: inline-flex; align-items: center; gap: 4px; padding: 4px 6px 4px 0; border: 0; background: transparent; color: inherit; font: inherit; text-transform: inherit; letter-spacing: inherit; cursor: pointer; white-space: nowrap; }
@media (hover: hover) and (pointer: fine) {
  .th-sort:hover { color: var(--ink); }
}
.sort-ind { width: 14px; height: 14px; opacity: 0.35; }
.sort-ind.is-on { opacity: 1; color: var(--accent-text); }
.th-filter { display: grid; place-items: center; width: 26px; height: 26px; border: 0; border-radius: var(--r-ctl); background: transparent; color: var(--ink-3); cursor: pointer; opacity: 0.55; transition: opacity 120ms ease, background-color 120ms ease; }
.th-filter svg { width: 14px; height: 14px; }
.th-filter:focus-visible,
.th-filter[aria-expanded="true"] { opacity: 1; background: var(--surface-2); }

@media (hover: hover) and (pointer: fine) {
  .table th:hover .th-filter { opacity: 1; background: var(--surface-2); }
}
.th-filter.is-on { opacity: 1; color: var(--accent-text); background: var(--accent-soft); }
.th-actions { width: 1%; }
.td-actions { text-align: right; white-space: nowrap; }
.td-actions > form { display: inline; }
/* Un dialogue placé dans une cellule d'actions n'hérite ni du nowrap ni de l'alignement à droite. */
.td-actions .confirm-dialog { text-align: left; white-space: normal; }
.modeles__actions { display: inline-flex; align-items: center; justify-content: flex-end; gap: 8px; }
.table-empty { text-align: center; padding: 28px !important; color: var(--ink-2); }
.tpop { position: fixed; z-index: 40; width: 260px; background: var(--surface); color: var(--ink); border: 1px solid var(--line); border-radius: var(--r-card); box-shadow: 0 16px 40px rgba(0, 0, 0, 0.22); padding: 12px; display: flex; flex-direction: column; gap: 10px; transform-origin: top right; animation: pop-in 160ms var(--ease-out); font-size: 14px; }
.pop-head { display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.pop-sort { border: 1px solid var(--line); background: var(--surface); color: var(--ink-2); border-radius: var(--r-ctl); padding: 3px 8px; font-size: 12px; cursor: pointer; }
.pop-sort.is-on { border-color: var(--accent); color: var(--accent-text); background: var(--accent-soft); }
.pop-list { display: flex; flex-direction: column; max-height: 240px; overflow: auto; margin: 0 -4px; }
.pop-opt { display: grid; grid-template-columns: 18px minmax(0, 1fr) auto; align-items: center; gap: 8px; padding: 7px 6px; border-radius: var(--r-ctl); cursor: pointer; }
@media (hover: hover) and (pointer: fine) {
  .pop-opt:hover { background: var(--surface-2); }
}
.pop-opt input { width: 16px; height: 16px; margin: 0; accent-color: var(--accent); }
.pop-foot { display: flex; justify-content: space-between; }

/* Boutons de l'application, alignés sur la charte (hauteur 40, 14 px gras). */
.button,
.button-secondary,
.button-danger {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  text-decoration: none;
  min-height: 40px;
  padding: 0 16px;
  font-size: 14px;
  font-weight: 600;
  white-space: nowrap;
}

.button-secondary {
  border: 1px solid var(--line);
  background: var(--surface);
  color: var(--ink);
}

.button-small {
  min-height: 32px;
  padding: 0 12px;
  font-size: 13px;
}

/* En-tête de page : titre à gauche, actions à droite. */
.page-entete {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
  margin-bottom: 20px;
}

.page-entete .actions {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
}

.page {
  display: flex;
  flex-direction: column;
  gap: var(--gap);
  max-width: 1080px;
}

/* Le tableau des inscrits a trop de colonnes pour le gabarit standard : sur
   ordinateur, il profite de toute la largeur disponible au lieu de défiler
   dans un cadre étroit (mobile garde le défilement horizontal, charte
   « Tableaux »). */
.inscrits.page,
.saisie-masse.page {
  max-width: none;
}

@media (max-width: 767.98px) {
  .grid-2,
  .grid-3,
  .split,
  .form-grid,
  .meta-grid {
    grid-template-columns: minmax(0, 1fr);
  }

  .h1 {
    font-size: 26px;
  }

  .dt-search {
    width: 100%;
  }

  .dt-count {
    margin-left: 0;
  }

  .table-wrap {
    overflow-x: auto;
  }
}

/* Un tableau plus large que la page défile dans son cadre au lieu d'être coupé. */
.table-wrap {
  overflow-x: auto;
}

/* Calendrier en liste (charte, Activités) */
.calendrier__mois {
  min-width: 12ch;
  text-align: center;
}

.event {
  position: relative;
}

.event-lien {
  color: var(--ink);
  text-decoration: none;
}

/* Toute la ligne ouvre la fiche ; le bouton S'inscrire reste au-dessus. */
.event-lien::after {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: inherit;
}

.event-action {
  position: relative;
  z-index: 1;
  margin: 2px 0 0;
}

.event--annulee .event-title {
  text-decoration: line-through;
}

[hidden] {
  display: none !important;
}

/* Fiche d'un événement (charte) : grille nommée. Ordinateur : fiche, chat
   puis documents à gauche ; participants (alignés en haut), matériel puis
   lieu à droite. Téléphone : fiche, participants, matériel, lieu, chat,
   documents. */
.fiche {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 340px;
  gap: var(--gap);
  align-items: start;
}

/* Deux colonnes indépendantes : la hauteur d'un bloc à droite ne décale pas
   ceux de gauche. Sur téléphone elles disparaissent (`display: contents`) et
   les zones nommées ordonnent les blocs. */
.fiche__col {
  display: flex;
  flex-direction: column;
  gap: var(--gap);
  min-width: 0;
}

.fiche > section,
.fiche__col > section {
  display: contents;
}

.fiche__main > .card:first-child {
  grid-area: main;
}

.fiche__lieu > .card {
  grid-area: lieu;
}

.fiche__parts > .card {
  grid-area: parts;
}

.fiche__chat > .card {
  grid-area: chat;
}

.fiche__docs > .card {
  grid-area: docs;
}

.fiche__materiel > .card {
  grid-area: materiel;
}

/* Paiements (le mien, ceux des inscrits) : sous la fiche, empilés. */
.fiche__paiements {
  grid-area: paiement;
  display: grid;
  gap: var(--gap);
  min-width: 0;
}

@media (max-width: 767.98px) {
  .fiche {
    grid-template-columns: minmax(0, 1fr);
    grid-template-areas: "main" "paiement" "parts" "materiel" "lieu" "chat" "docs";
    grid-template-rows: none;
  }

  .fiche__col {
    display: contents;
  }

  .meta-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 12px 16px;
  }

  .meta--date {
    grid-column: 1 / -1;
  }
}

/* Action destructrice hors fenêtre de confirmation : discrète (charte). */
.bouton-danger-discret {
  color: var(--danger);
}

/* Supprimer : toujours cette poubelle rouge dans un rond, jamais le mot
   « Supprimer » ni une poubelle grise (charte, section 6). Le nom accessible
   vient d'aria-label ; zone tactile de 44 px au doigt. */
.bouton-supprimer {
  display: inline-grid;
  flex: none;
  place-items: center;
  width: 2rem;
  height: 2rem;
  padding: 0;
  border: 1.5px solid color-mix(in srgb, var(--danger) 55%, transparent);
  border-radius: 50%;
  background: var(--danger-soft);
  color: var(--danger);
  font: inherit;
  cursor: pointer;
  touch-action: manipulation;
  -webkit-tap-highlight-color: transparent;
  transition: transform 160ms ease-out, background 160ms ease-out,
    border-color 160ms ease-out, color 160ms ease-out;
}

.bouton-supprimer .icone {
  width: 1rem;
  height: 1rem;
}

.bouton-supprimer:active {
  transform: scale(0.97);
  border-color: var(--danger);
  background: var(--danger);
  color: var(--danger-ink);
}

.bouton-supprimer:focus-visible {
  outline: 2px solid var(--danger);
  outline-offset: 2px;
}

@media (pointer: coarse) {
  .bouton-supprimer {
    width: 2.5rem;
    height: 2.5rem;
  }
}

@media (hover: hover) and (pointer: fine) {
  .bouton-supprimer:hover {
    border-color: var(--danger);
    background: var(--danger);
    color: var(--danger-ink);
  }
}

@media (prefers-reduced-motion: reduce) {
  .bouton-supprimer {
    transition: none;
  }
}

/* Paramètres / Réglages : un seul bouton sur tout le site (charte, section 6).
   Carré blanc à bordure, engrenage `{% icone "parametres" %}`, 40 px. Le nom
   accessible vient d'aria-label. `__alerte` : pastille rouge en coin. */
.bouton-parametres {
  position: relative;
  display: inline-grid;
  flex: none;
  place-items: center;
  width: 40px;
  height: 40px;
  padding: 0;
  border: 1px solid var(--line);
  border-radius: var(--r-ctl);
  background: var(--surface);
  color: var(--ink-2);
  font: inherit;
  text-decoration: none;
  cursor: pointer;
  touch-action: manipulation;
  -webkit-tap-highlight-color: transparent;
  transition: transform 160ms var(--ease-out), color 160ms ease;
}

.bouton-parametres .icone {
  width: 1.25rem;
  height: 1.25rem;
  flex: none;
}

.bouton-parametres:active {
  transform: scale(0.97);
}

.bouton-parametres:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 1px;
}

@media (hover: hover) and (pointer: fine) {
  .bouton-parametres:hover {
    color: var(--ink);
  }
}

@media (prefers-reduced-motion: reduce) {
  .bouton-parametres {
    transition: none;
  }
}

/* Entrée de menu « Supprimer… » : même poubelle rouge devant le libellé. */
.menu-actions__danger .icone,
.msg-menu__item--danger .icone {
  width: 1em;
  height: 1em;
  margin-right: 0.4em;
  vertical-align: -0.12em;
}

/* Tableau de bord */
.alert--info {
  background: var(--accent-soft);
  color: var(--accent-text);
}

.event--simple {
  color: var(--ink);
  text-decoration: none;
}

.recent {
  display: flex;
  flex-direction: column;
  gap: 2px;
  padding: 8px 10px;
  margin: -8px -10px;
  border-radius: var(--r-ctl);
  color: var(--ink);
  text-decoration: none;
}

.recent b {
  color: var(--accent-text);
}

@media (hover: hover) and (pointer: fine) {
  .recent:hover {
    background: var(--surface-2);
  }
}

/* Liens dans les cartes : couleur d'accent, soulignés seulement au survol
   (charte). */
.card a:not([class]),
.card-head a:not([class]),
.page-entete a:not([class]) {
  color: var(--accent-text);
  font-weight: 600;
  text-decoration: none;
}

@media (hover: hover) and (pointer: fine) {
  .card a:not([class]):hover,
  .card-head a:not([class]):hover {
    text-decoration: underline;
  }
}

.avatars .avatar {
  margin-left: -5px;
}

/* Encodage en masse : retour par ligne après enregistrement. */
.ligne-enregistree td {
  background: var(--ok-soft);
}

.ligne-en-erreur td {
  background: var(--danger-soft);
}

/* Catalogue des niveaux : une ligne par brevet, interrupteur à droite. */
.niveau-ligne {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 10px 0;
  border-bottom: 1px solid var(--line);
}

.niveau-ligne:last-child {
  border-bottom: 0;
}

/* Palanquées : tableau d'équivalence des brevets, replié par défaut. */
.equivalences {
  margin-top: 12px;
  border: 1px solid var(--line);
  border-radius: var(--r-ctl);
  background: var(--surface);
  font-size: 13px;
}

.equivalences summary {
  cursor: pointer;
  padding: 8px 12px;
  min-height: 44px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  font-weight: 600;
  color: var(--accent-text);
  list-style: none;
}

.equivalences summary::-webkit-details-marker {
  display: none;
}

.equivalences summary::after {
  content: "Afficher";
  font-weight: 400;
  color: var(--ink-2);
}

.equivalences[open] summary::after {
  content: "Masquer";
}

.equivalences__defilement {
  overflow-x: auto;
  padding: 0 12px;
}

.equivalences__table {
  width: 100%;
  font-size: 13px;
  border-collapse: collapse;
  font-variant-numeric: tabular-nums;
}

.equivalences__table th {
  text-align: left;
  font-size: 12px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--ink-3);
  padding: 6px 8px;
  border-bottom: 1px solid var(--line);
}

.equivalences__table td {
  padding: 4px 8px;
  border-bottom: 1px solid var(--line);
  color: var(--ink);
  white-space: nowrap;
}

.equivalences__table tr:last-child td {
  border-bottom: 0;
}

.equivalences__note {
  margin: 0;
  padding: 8px 12px;
  color: var(--ink-2);
}

/* ---- Inscrits d'une activité (prototype SCREENS.inscrits) ---- */
/* En-tête comme le `.row-between` du prototype : l'écart vient de `.page`. */
.inscrits .page-entete {
  align-items: center;
  margin-bottom: 0;
}

/* Sur-titre du prototype (l'`.eyebrow` historique est plus espacé). */
.inscrits .eyebrow {
  margin: 0;
  color: var(--accent-text);
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.08em;
}

[data-apparence="carnet"] .inscrits .eyebrow {
  color: var(--nav-mark);
}

.alert--neutre {
  background: var(--surface-2);
  color: var(--ink-2);
}

/* Le libellé `.sr-only` de la colonne d'actions reste dans le cadre qui défile. */
.inscrits .table-wrap {
  position: relative;
}

/* Fenêtre de refus : sur-titre rouge, question et conséquence serrées. */
.confirm-dialog__eyebrow--danger {
  color: var(--danger);
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.08em;
}

.inscrits-dialog h2,
.inscrits-dialog p {
  margin: 0;
}

/* Tableau des inscrits : colonnes serrées pour tenir sans défilement. */
.table-inscrits th,
.table-inscrits td {
  padding: 8px 10px;
  font-size: 0.9rem;
}

/* Retirer : texte rouge sur fond de carte, jamais rouge sur rouge. Le fond
   ne se teinte qu'au survol ; le rouge plein reste à la confirmation. */
.button-retirer {
  border: 1px solid color-mix(in srgb, var(--danger) 45%, transparent);
  background: transparent;
  color: var(--danger);
  font-weight: 600;
  transition:
    background-color 150ms ease,
    border-color 150ms ease,
    transform 120ms cubic-bezier(0.23, 1, 0.32, 1);
}
.button-retirer:active {
  transform: scale(0.97);
}

@media (hover: hover) and (pointer: fine) {
  .button-retirer:hover {
    background: var(--danger-soft);
    border-color: var(--danger);
  }
}
@media (prefers-reduced-motion: reduce) {
  .button-retirer:active {
    transform: none;
  }
}

.inscrits-actions {
  display: inline-flex;
  gap: 6px;
  margin: 0;
}

/* Téléphone : Refuser et Accepter restent des cibles de 44 px. */
@media (pointer: coarse) {
  .inscrits-actions .button-small {
    min-height: 44px;
  }
}

/* ---- Invités à une activité : suggestion inter-club (activites/invites.js) ---- */
/* Ancré au champ « Nom » : la liste se pose dessus, ne pousse rien en dessous. */
#champ-nom-invite {
  position: relative;
}

.suggestions-invite {
  position: absolute;
  z-index: 5;
  top: calc(100% + 4px);
  left: 0;
  right: 0;
  margin: 0;
  padding: 6px;
  list-style: none;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--r-card);
  box-shadow: 0 16px 40px rgba(0, 0, 0, 0.18);
  max-height: 260px;
  overflow-y: auto;
}

.suggestions-invite.pop-in {
  animation: pop-in 160ms var(--ease-out);
}

.suggestions-invite__bouton {
  display: block;
  width: 100%;
  min-height: 44px;
  padding: 10px 12px;
  border: 0;
  border-radius: var(--r-ctl);
  background: transparent;
  color: var(--ink);
  font: inherit;
  font-size: 15px;
  text-align: left;
  cursor: pointer;
  touch-action: manipulation;
  -webkit-tap-highlight-color: transparent;
}

.suggestions-invite__bouton:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: -2px;
  background: var(--surface-2);
}

@media (hover: hover) and (pointer: fine) {
  .suggestions-invite__bouton:hover {
    background: var(--surface-2);
  }
}

/* Le nom du club, si le membre suggéré l'autorise, reste au second plan. */
.suggestions-invite__club {
  margin-left: 2px;
}

.invite-lien {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 8px 16px;
  margin-top: 8px;
  padding: 10px 12px;
  background: var(--surface-2);
  border-radius: var(--r-ctl);
}

.invite-lien__texte {
  margin: 0;
  min-width: 0;
  overflow-wrap: anywhere;
}

/* ---- Messagerie (prototype SCREENS.messages) ----
   Téléphone : la liste des canaux seule, puis la conversation en plein
   écran avec « ← Messages ». Ordinateur : liste à gauche, fil à droite. */
.button-ghost {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 40px;
  padding: 0 10px;
  border: 0;
  border-radius: var(--r-pill);
  background: transparent;
  color: var(--accent-text);
  font: inherit;
  font-size: 14px;
  font-weight: 600;
  text-decoration: none;
  white-space: nowrap;
  -webkit-user-select: none;
  user-select: none;
  transition: transform 120ms cubic-bezier(0.23, 1, 0.32, 1);
}

.button-ghost:active {
  transform: scale(0.97);
}

.messagerie {
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.messagerie__entete {
  flex-wrap: wrap;
}

.messagerie .chat {
  grid-template-columns: minmax(0, 1fr);
  height: auto;
}

.chan-list .nav-title {
  padding: 0 10px 6px;
  color: var(--ink-3);
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.chan {
  min-height: 44px;
  text-decoration: none;
  -webkit-user-select: none;
  user-select: none;
}

.chan:active {
  background: var(--surface-2);
}

.nav-count {
  flex: 0 0 auto;
  min-width: 20px;
  padding: 1px 6px;
  border-radius: var(--r-pill);
  background: var(--accent);
  color: var(--accent-ink);
  font-size: 12px;
  font-weight: 700;
  text-align: center;
}

.msgs-vide .h2,
.msgs-vide p {
  margin: 0;
}

.msgs {
  padding: 16px;
  overscroll-behavior: contain;
}

.msgs-vide {
  margin: auto;
  text-align: center;
  align-items: center;
}

.msg-meta {
  gap: 8px;
  flex-wrap: wrap;
}

.msg-texte {
  overflow-wrap: anywhere;
}

.msg-pieces {
  flex-wrap: wrap;
  gap: 6px;
  margin-top: 8px;
}

.msg-pieces .chip {
  text-decoration: none;
}

/* « Répondre » : poussé à droite, avec le menu « ⋯ » qui le suit. */
.msg-repondre {
  position: relative;
  display: none;
  place-items: center;
  width: 28px;
  height: 22px;
  padding: 0;
  border: 0;
  border-radius: var(--r-ctl);
  background: transparent;
  color: var(--ink-2);
  cursor: pointer;
  touch-action: manipulation;
  user-select: none;
  -webkit-user-select: none;
}

.msg-repondre .icone {
  width: 18px;
  height: 18px;
}

.msg-repondre::after {
  content: "";
  position: absolute;
  inset: -11px -8px;
}

.msg-repondre:active {
  background: var(--surface);
  color: var(--accent-text);
}

/* Réagir, répondre, menu : groupe poussé à droite de la ligne de méta. */
.msg-actions {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-left: auto;
}

.msg-menu {
  position: relative;
}

/* Feuille d'actions : tactile et tablettes, elle s'ouvre depuis le bas. */
.msg-menu__panneau {
  position: fixed;
  right: 0;
  bottom: 0;
  left: 0;
  z-index: 1300;
  display: flex;
  flex-direction: column;
  gap: 2px;
  max-height: 80dvh;
  overflow-y: auto;
  overscroll-behavior: contain;
  padding: 8px 12px calc(12px + env(safe-area-inset-bottom, 0px));
  border-radius: 16px 16px 0 0;
  background: var(--surface);
  box-shadow: var(--shadow);
  animation: feuille-entree 220ms cubic-bezier(0.32, 0.72, 0, 1);
}

.msg-menu[open]::after {
  content: "";
  position: fixed;
  inset: 0;
  z-index: 1299;
  background: var(--backdrop);
  animation: fondu-entree 160ms ease-out;
}

/* Le contenu de la page forme un contexte d'empilement (z-index: 1), sous la
   barre d'onglets : tant qu'une feuille est ouverte, on le monte au-dessus. */
.site-shell__main:has(.msg-menu[open]) {
  z-index: 1300;
}

@keyframes feuille-entree {
  from {
    transform: translateY(100%);
  }
}

@keyframes fondu-entree {
  from {
    opacity: 0;
  }
}

.msg-menu__poignee {
  align-self: center;
  width: 36px;
  height: 4px;
  margin: 2px 0 8px;
  border-radius: 2px;
  background: var(--line);
}

.msg-menu__reactions {
  margin-bottom: 4px;
  padding-bottom: 8px;
  border-bottom: 1px solid var(--line);
}

/* Pastille et barre d'émojis : cachées ici, montrées au survol sur ordinateur. */
.msg-reagir {
  display: none;
}

.reactions-barre {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 2px;
}

.reactions-barre__emoji,
.reactions-barre__plus > summary {
  display: grid;
  flex: 1 1 0;
  place-items: center;
  min-width: 0;
  max-width: 44px;
  height: 48px;
  border: 0;
  border-radius: var(--r-ctl);
  background: transparent;
  color: var(--ink);
  font-size: 26px;
  list-style: none;
  cursor: pointer;
  touch-action: manipulation;
  user-select: none;
  -webkit-user-select: none;
  transition: transform 120ms var(--ease-out);
}

.reactions-barre__plus > summary::-webkit-details-marker {
  display: none;
}

.reactions-barre__plus > summary .icone {
  width: 22px;
  height: 22px;
}

.reactions-barre__emoji:active,
.reactions-barre__plus > summary:active {
  transform: scale(0.88);
}

.reactions-barre__plus {
  flex: 1 1 0;
  min-width: 0;
  max-width: 44px;
}

.reactions-barre__plus > summary {
  max-width: none;
}

.reactions-barre__plus[open] {
  flex-basis: 100%;
  max-width: none;
}

.reactions-barre__plus[open] > summary {
  width: 44px;
}

.msg-reagir__libre {
  display: flex;
  gap: 6px;
  padding: 6px 0;
}

.msg-reagir__libre .input {
  flex: 1 1 auto;
  min-width: 0;
  font-size: 16px;
}

/* Séparateur de jour entre les messages. */
.msg-jour {
  display: flex;
  justify-content: center;
}

.msg-jour span {
  padding: 2px 12px;
  border-radius: var(--r-pill, 999px);
  background: var(--surface-2);
  color: var(--ink-3);
  font-size: 12px;
  font-weight: 600;
  text-transform: capitalize;
}

/* « ↓ » : posé au-dessus du composeur, en bas à droite. */
.composer__bas {
  position: absolute;
  right: 12px;
  bottom: calc(100% + 8px);
  z-index: 2;
  display: grid;
  place-items: center;
  width: 44px;
  height: 44px;
  border: 1px solid var(--line);
  border-radius: 50%;
  background: var(--surface);
  color: var(--ink);
  box-shadow: var(--shadow);
  cursor: pointer;
  touch-action: manipulation;
  animation: bas-entree 160ms var(--ease-out);
  transition: transform 120ms var(--ease-out);
}

.composer__bas[hidden] {
  display: none;
}

.composer__bas:active {
  transform: scale(0.94);
}

.composer__bas .icone {
  width: 20px;
  height: 20px;
}

@keyframes bas-entree {
  from {
    opacity: 0;
    transform: translateY(6px);
  }
}

.msg-menu__bouton {
  display: grid;
  place-items: center;
  width: 28px;
  height: 22px;
  border-radius: var(--r-ctl);
  color: var(--ink-2);
  cursor: pointer;
  list-style: none;
  touch-action: manipulation;
  user-select: none;
  -webkit-user-select: none;
}

.msg-menu__bouton::-webkit-details-marker {
  display: none;
}

/* Cible tactile de 44 px sans grossir la ligne. */
.msg-menu__bouton::after {
  content: "";
  position: absolute;
  inset: -11px -8px;
}

.msg-menu__bouton .icone {
  width: 18px;
  height: 18px;
}

.msg-menu__bouton:active {
  background: var(--surface);
}

.msg-menu__item {
  min-height: 52px;
  padding: 0 12px;
  font-size: 17px;
  border: 0;
  border-radius: var(--r-ctl);
  background: transparent;
  color: var(--ink);
  font: inherit;
  text-align: left;
  cursor: pointer;
  touch-action: manipulation;
  user-select: none;
  -webkit-user-select: none;
}

.msg-menu__item:active {
  background: var(--surface-2);
}

.msg-menu__item--danger {
  color: var(--danger);
}

/* Réactions sous le message. */
.msg-reactions {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-top: 8px;
}

.msg-reaction {
  min-height: 28px;
  padding: 0 10px;
  border: 1px solid var(--line);
  border-radius: var(--r-pill, 999px);
  background: var(--surface);
  color: var(--ink);
  font: inherit;
  font-size: 13px;
  cursor: pointer;
  touch-action: manipulation;
  transition: transform 120ms var(--ease-out);
}

.msg-reaction.is-me {
  border-color: var(--accent);
  background: var(--accent-soft);
  color: var(--accent-text);
}

.msg-reaction:active {
  transform: scale(0.95);
}

.msg-reaction:disabled {
  cursor: default;
}

.msg-epingle {
  font-size: 11px;
}

.msg-voir {
  color: var(--accent-text);
  text-decoration: none;
}

/* Messages épinglés, au-dessus du fil. */
.epingles {
  display: flex;
  flex-direction: column;
  border-bottom: 1px solid var(--line);
}

.epingle {
  display: flex;
  align-items: baseline;
  gap: 8px;
  min-height: 44px;
  padding: 8px 16px;
  color: var(--ink);
  font-size: 13px;
  text-decoration: none;
  touch-action: manipulation;
}

.epingle b {
  flex: 0 0 auto;
  color: var(--accent-text);
}

.epingle span {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.epingle:active {
  background: var(--surface-2);
}

/* Recherche et sourdine, sous l'en-tête du fil. */
.thread-outils {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 6px 16px;
  border-bottom: 1px solid var(--line);
}

.thread-recherche {
  display: flex;
  flex: 1 1 auto;
  align-items: center;
  min-width: 0;
  margin: 0;
}

.thread-recherche .input {
  flex: 1 1 auto;
  min-width: 0;
  font-size: 16px;
}

.thread-sourdine {
  display: inline-flex;
  flex: 0 0 auto;
  align-items: center;
  gap: 6px;
  min-height: 44px;
}

.thread-sourdine .icone {
  width: 18px;
  height: 18px;
}

/* Options d'un chat privé : masquer, quitter, supprimer pour tous.
   Des lignes pleine largeur plutôt que des boutons : chacune dit sa
   conséquence, la plus lourde en dernier et en rouge. */
.thread-options {
  flex: 0 0 auto;
  width: 44px;
  height: 44px;
}

.options-chat__liste {
  display: grid;
  margin: 0;
  padding: 0;
  list-style: none;
  border: 1px solid var(--line);
  border-radius: var(--r-ctl);
  overflow: hidden;
}

.options-chat__liste li + li {
  border-top: 1px solid var(--line);
}

.options-chat__action {
  display: grid;
  gap: 2px;
  width: 100%;
  min-height: 56px;
  padding: 10px 14px;
  border: 0;
  background: var(--surface);
  color: var(--ink);
  font: inherit;
  text-align: left;
  cursor: pointer;
  touch-action: manipulation;
  -webkit-user-select: none;
  user-select: none;
  transition: background-color 120ms ease;
}

.options-chat__action:active {
  background: var(--surface-2);
}

.options-chat__action:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: -2px;
}

.options-chat__libelle {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-weight: 600;
}

.options-chat__effet {
  color: var(--ink-2);
  font-size: 13px;
  line-height: 1.4;
}

.options-chat__action--danger .options-chat__libelle {
  color: var(--danger);
}

.options-chat__action--danger:active {
  background: var(--danger-soft);
}

.options-chat__libelle .bouton-supprimer {
  width: 28px;
  height: 28px;
  pointer-events: none;
}

@media (hover: hover) and (pointer: fine) {
  .options-chat__action:hover {
    background: var(--surface-2);
  }

  .options-chat__action--danger:hover {
    background: var(--danger-soft);
  }
}

/* Fenêtre à trois issues : l'alternative sûre à gauche, puis Annuler et
   l'action. Sur téléphone, l'alternative passe sur sa propre ligne. */
.confirm-dialog__actions--trois {
  flex-wrap: wrap;
}

.confirm-dialog__alternative {
  margin-right: auto;
}

@media (max-width: 480px) {
  .confirm-dialog__alternative {
    flex-basis: 100%;
  }
}

.thread-resultats {
  margin: 0;
  padding: 8px 16px;
  border-bottom: 1px solid var(--line);
}

.sourdine-choix {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

/* Citation du message auquel on répond, en tête de la bulle. */
.msg-citation {
  display: block;
  margin-bottom: 6px;
  padding: 4px 10px;
  border-left: 3px solid var(--accent);
  border-radius: 4px;
  background: var(--surface);
  color: var(--ink-2);
  font-size: 13px;
  text-decoration: none;
  touch-action: manipulation;
}

.msg-citation b,
.msg-citation span {
  display: block;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.msg-citation b {
  color: var(--accent-text);
}

.msg--cible .msg-body {
  animation: msg-cible 1.2s var(--ease-out);
}

@keyframes msg-cible {
  from {
    background: var(--accent-soft);
    outline: 2px solid var(--accent);
  }
  to {
    outline: 2px solid transparent;
  }
}

/* Aperçu de la réponse en cours, au-dessus du champ. */
.composer__reponse {
  display: flex;
  flex: 0 0 100%;
  order: -1;
  align-items: center;
  gap: 4px;
  min-width: 0;
  padding: 4px 4px 4px 10px;
  border-left: 3px solid var(--accent);
  border-radius: 4px;
  background: var(--surface-2);
  font-size: 13px;
}

.composer__reponse[hidden] {
  display: none;
}

.composer__reponse-texte {
  flex: 1 1 auto;
  min-width: 0;
}

.composer__reponse-texte b,
.composer__reponse-texte span {
  display: block;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.composer__reponse-texte b {
  color: var(--accent-text);
}

.composer {
  align-items: center;
  padding: 10px 12px;
}

.composer form {
  margin: 0;
}

.composer--rejoindre {
  justify-content: space-between;
}

/* Chat privé que les autres ont quitté : le composeur cède la place à un
   bandeau qui l'explique et propose un nouveau chat. */
.composer--seul {
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 10px;
}

.composer--seul__texte {
  flex: 1 1 16rem;
  margin: 0;
  color: var(--ink-2);
  font-size: 14px;
  line-height: 1.4;
}

.composer--seul__actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.icon-btn {
  display: grid;
  flex: 0 0 44px;
  place-items: center;
  width: 44px;
  height: 44px;
  border: 0;
  border-radius: var(--r-ctl);
  background: transparent;
  color: var(--ink);
  cursor: pointer;
}

.icon-btn .icone {
  width: 22px;
  height: 22px;
}

.icon-btn:active {
  background: var(--surface-2);
}

/* Menu « + » du composeur : s'ouvre vers le haut, depuis le bouton. */
.composer__plus {
  position: relative;
  flex: 0 0 auto;
}

.composer__plus > summary {
  list-style: none;
}

.composer__plus > summary::-webkit-details-marker {
  display: none;
}

.composer__plus .icone {
  transition: transform 160ms var(--ease-out);
}

.composer__plus[open] .icone {
  transform: rotate(45deg);
}

.composer__plus-panel {
  position: absolute;
  bottom: calc(100% + 8px);
  left: 0;
  z-index: 5;
  min-width: 220px;
  padding: 6px;
  border: 1px solid var(--line);
  border-radius: var(--r-card);
  background: var(--surface);
  box-shadow: 0 16px 40px rgba(0, 0, 0, 0.22);
  transform-origin: bottom left;
  animation: pop-in 160ms var(--ease-out);
}

.composer__plus-item {
  display: flex;
  align-items: center;
  gap: 10px;
  min-height: 44px;
  padding: 0 12px;
  border-radius: var(--r-ctl);
  color: var(--ink);
  font-size: 16px;
  text-decoration: none;
  touch-action: manipulation;
  user-select: none;
  -webkit-user-select: none;
  -webkit-touch-callout: none;
  transition: background-color 120ms ease;
}

.composer__plus-item .icone {
  width: 20px;
  height: 20px;
}

.composer__plus-item:active {
  background: var(--surface-2);
}

@media (hover: hover) and (pointer: fine) {
  .composer__plus-item:hover {
    background: var(--surface-2);
  }
}

@media (prefers-reduced-motion: reduce) {
  .composer__plus .icone {
    transition: none;
  }
}

/* Suggestions de mentions : au-dessus du champ de saisie. */
.composer__mentions {
  position: absolute;
  right: 12px;
  bottom: calc(100% + 8px);
  left: 12px;
  z-index: 5;
  max-height: 232px;
  padding: 6px;
  overflow-y: auto;
  border: 1px solid var(--line);
  border-radius: var(--r-card);
  background: var(--surface);
  box-shadow: 0 16px 40px rgba(0, 0, 0, 0.22);
  transform-origin: bottom left;
  animation: pop-in 160ms var(--ease-out);
}

.composer__mention {
  display: block;
  width: 100%;
  min-height: 44px;
  padding: 0 12px;
  border: 0;
  border-radius: var(--r-ctl);
  background: transparent;
  color: var(--ink);
  font: inherit;
  font-size: 16px;
  text-align: left;
  cursor: pointer;
  touch-action: manipulation;
  user-select: none;
  -webkit-user-select: none;
}

.composer__mention[aria-selected="true"],
.composer__mention:active {
  background: var(--surface-2);
}

.composer__rubrique {
  padding: 8px 12px 2px;
  color: var(--ink-3);
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  user-select: none;
  -webkit-user-select: none;
}

.composer__mention--groupe {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.composer__mention-detail {
  min-width: 0;
  overflow: hidden;
  color: var(--ink-3);
  font-size: 14px;
  text-align: right;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.raccourcis-liste li {
  justify-content: space-between;
}

.raccourcis-liste__codes {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.mention {
  padding: 0 2px;
  border-radius: 4px;
  background: var(--accent-soft);
  color: var(--accent-text);
  font-weight: 600;
}

form.composer {
  flex-wrap: wrap;
}

.composer__champ {
  flex: 1 1 auto;
  min-width: 0;
  height: 42px;
  padding: 10px 12px;
  font-size: 16px;
  line-height: 1.3;
  resize: none;
}

/* Téléphone : « + » au-dessus du trombone, « Envoyer » compact, le champ prend la place. */
@media (max-width: 767px) {
  form.composer {
    display: grid;
    grid-template-columns: auto minmax(0, 1fr) auto;
    align-items: end;
    column-gap: 4px;
    padding: 12px 8px 14px;
  }

  /* Colonne de gauche étroite : « + » et trombone, pour laisser la place au champ. */
  form.composer > .composer__plus > summary,
  form.composer > label.icon-btn {
    flex-basis: 32px;
    width: 32px;
    height: 44px;
  }

  /* Ligne 1 : aperçu de la réponse (vide, donc sans hauteur, quand il est masqué). */
  form.composer > .composer__reponse {
    grid-column: 1 / -1;
    grid-row: 1;
    margin: 0 4px 6px;
  }

  form.composer > .composer__plus {
    grid-column: 1;
    grid-row: 2;
  }

  form.composer > label.icon-btn {
    grid-column: 1;
    grid-row: 3;
  }

  form.composer > .composer__champ {
    grid-column: 2;
    grid-row: 2 / span 2;
    align-self: stretch;
    height: auto;
    min-height: 104px;
  }

  /* Envoi : avion en papier, rond, centré sur la hauteur du champ. */
  form.composer > .composer__envoyer {
    grid-column: 3;
    grid-row: 2 / span 2;
    align-self: center;
    width: 38px;
    min-height: 38px;
    height: 38px;
    padding: 0;
    border-radius: var(--r-pill, 999px);
    justify-content: center;
    touch-action: manipulation;
    transition: transform 120ms cubic-bezier(0.23, 1, 0.32, 1);
  }

  form.composer > .composer__envoyer:active {
    transform: scale(0.94);
  }

  .composer__envoyer .icone {
    width: 18px;
    height: 18px;
  }

  .composer__envoyer-texte {
    position: absolute;
    width: 1px;
    height: 1px;
    overflow: hidden;
    clip-path: inset(50%);
    white-space: nowrap;
  }
}

/* Envoi en cours : bouton atténué, l'avion part en haut à droite. */
.composer__envoyer[aria-busy="true"] {
  opacity: 0.6;
  cursor: progress;
}

.composer__envoyer .icone {
  transition: transform 160ms var(--ease-out);
}

.composer__envoyer[aria-busy="true"] .icone {
  transform: translate(2px, -2px);
}

.composer:has(.composer__envoyer[aria-busy="true"]) .composer__champ {
  opacity: 0.6;
}

@media (prefers-reduced-motion: reduce) {
  .composer__envoyer[aria-busy="true"] .icone {
    transform: none;
  }
}

/* Grand écran : le libellé reste, l'icône est masquée. */
@media (min-width: 768px) {
  .composer__envoyer .icone {
    display: none;
  }
}

@media (prefers-reduced-motion: reduce) {
  .msg-menu__panneau,
  .msg-menu[open]::after,
  .msg-reagir__panneau,
  .composer__bas,
  .msg--cible .msg-body {
    animation: none;
  }

  .reactions-barre__emoji,
  .msg-reaction,
  form.composer > .composer__envoyer {
    transition: none;
  }
}

.composer__erreurs {
  padding: 0 16px 10px;
}

/* Lien vers les chats des événements passés, sous les sorties à venir. */
.chan-passes {
  display: flex;
  align-items: center;
  gap: 8px;
  min-height: 44px;
  padding: 8px 10px;
  border-radius: var(--r-ctl);
  color: var(--accent-text);
  font-size: 13px;
  font-weight: 600;
  text-decoration: none;
}

.chan-passes span {
  flex: 1 1 auto;
}

.chan-passes:active {
  background: var(--surface-2);
}

/* Flèche dessinée plutôt que le caractère « ← », dont la hauteur varie
   d'une police (donc d'une apparence) à l'autre. */
.messagerie__retour-tel {
  gap: 6px;
  line-height: 1;
}

.messagerie__retour-tel .icone {
  width: 18px;
  height: 18px;
  flex: 0 0 18px;
}

/* Mon profil : ordre des groupes de la messagerie. */
.ordre-groupes {
  display: flex;
  flex-direction: column;
  margin: 0;
  padding: 0;
  list-style: none;
}

.ordre-groupes li {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 4px 0;
  border-bottom: 1px solid var(--line);
}

.ordre-groupes li:last-child {
  border-bottom: 0;
}

.ordre-groupes__actions {
  display: flex;
  gap: 4px;
  margin: 0;
}

.ordre-groupes__actions .icon-btn:disabled {
  color: var(--ink-3);
  opacity: 0.4;
  cursor: default;
}

/* Téléphone */
.messagerie--liste .thread,
.messagerie--conversation .chan-list,
.messagerie--conversation .messagerie__entete {
  display: none;
}

.messagerie__retour-tel {
  display: inline-flex;
}

.messagerie--liste .chan-list {
  border-right: 0;
}

.messagerie--conversation .chat {
  /* Au moins l'écran moins barre du haut, lien retour et barre d'onglets ;
     `clip` et non `hidden`, sinon le champ ne colle plus au bas de l'écran. */
  min-height: calc(100dvh - 13.5rem - env(safe-area-inset-bottom, 0px));
  overflow: clip;
  scroll-margin-bottom: calc(4rem + env(safe-area-inset-bottom, 0px));
}

.messagerie--conversation .msgs {
  overflow: visible;
}

/* Le champ reste visible juste au-dessus de la barre d'onglets. */
.messagerie--conversation .composer {
  position: sticky;
  bottom: calc(4rem + env(safe-area-inset-bottom, 0px));
  z-index: 1;
  background: var(--surface);
}

@media (hover: hover) and (pointer: fine) {
  .chan:hover,
  .chan-passes:hover {
    background: var(--surface);
  }

  /* Ordinateur : « Répondre » en ligne, menu déroulant, pastille « Réagir »
     au bord du message (comme WhatsApp), barre d'émojis en pilule. */
  .msg-repondre {
    display: grid;
  }

  .msg-body {
    position: relative;
  }

  .msg-menu__poignee,
  .msg-menu__reactions,
  .msg-menu__item--repondre {
    display: none;
  }

  .msg-menu[open]::after {
    display: none;
  }

  .msg-menu__panneau {
    position: absolute;
    top: calc(100% + 6px);
    right: 0;
    bottom: auto;
    left: auto;
    z-index: 5;
    min-width: 210px;
    max-height: none;
    padding: 6px;
    border: 1px solid var(--line);
    border-radius: var(--r-card);
    transform-origin: top right;
    animation: pop-in 160ms var(--ease-out);
  }

  .msg-menu__item {
    min-height: 44px;
    font-size: inherit;
  }

  /* Trop près du bas du fil : le menu s'ouvre vers le haut. */
  .msg-menu--haut > .msg-menu__panneau,
  .msg-menu--haut > .msg-reagir__panneau {
    top: auto;
    bottom: calc(100% + 6px);
    transform-origin: bottom right;
  }

  /* Dans la ligne de méta, à gauche de « Répondre » et « ⋯ » ; sa place reste
     réservée pour que les autres icônes ne bougent pas au survol. */
  .msg-reagir {
    position: relative;
    z-index: 4;
    display: block;
    opacity: 0;
    transition: opacity 120ms ease-out;
  }

  .msg:hover .msg-reagir,
  .msg:focus-within .msg-reagir,
  .msg-reagir[open] {
    opacity: 1;
  }

  /* Même gabarit que « Répondre » et « ⋯ ». */
  .msg-reagir__bouton {
    display: grid;
    place-items: center;
    width: 28px;
    height: 22px;
    border-radius: var(--r-ctl);
    color: var(--ink-2);
    list-style: none;
    cursor: pointer;
    transition: transform 120ms var(--ease-out);
  }

  .msg-reagir[open] > .msg-reagir__bouton {
    background: var(--surface);
    color: var(--accent-text);
  }

  .msg-reagir__bouton::-webkit-details-marker {
    display: none;
  }

  .msg-reagir__bouton .icone {
    width: 18px;
    height: 18px;
  }

  .msg-reagir__bouton:active {
    transform: scale(0.94);
  }

  .msg-reagir__panneau {
    position: absolute;
    top: calc(100% + 6px);
    right: 0;
    padding: 4px 6px;
    border: 1px solid var(--line);
    border-radius: 999px;
    background: var(--surface);
    box-shadow: var(--shadow);
    transform-origin: top right;
    animation: pop-in 160ms var(--ease-out);
  }

  .reactions-barre {
    flex-wrap: nowrap;
  }

  .reactions-barre__emoji,
  .reactions-barre__plus > summary {
    flex: 0 0 38px;
    width: 38px;
    height: 38px;
    border-radius: 50%;
    font-size: 22px;
  }

  .reactions-barre__emoji:hover,
  .reactions-barre__plus > summary:hover {
    background: var(--surface-2);
    transform: scale(1.15);
  }

  .reactions-barre__plus {
    position: relative;
    flex: 0 0 38px;
    max-width: none;
  }

  .reactions-barre__plus[open] {
    flex-basis: 38px;
  }

  .reactions-barre__plus[open] > summary {
    width: 38px;
  }

  .reactions-barre__plus .msg-reagir__libre {
    position: absolute;
    top: calc(100% + 10px);
    right: 0;
    width: 260px;
    padding: 8px;
    border: 1px solid var(--line);
    border-radius: var(--r-card);
    background: var(--surface);
    box-shadow: var(--shadow);
  }

  .msg-menu__item:hover {
    background: var(--surface-2);
  }

  .msg-reaction:hover:not(:disabled) {
    border-color: var(--accent);
  }
}

@media (min-width: 768px) {
  .messagerie .chat,
  .messagerie--conversation .chat {
    grid-template-columns: 300px minmax(0, 1fr);
    height: calc(100dvh - 17rem);
    min-height: 420px;
    overflow: hidden;
  }

  .messagerie--conversation .msgs {
    overflow: auto;
  }

  /* Carnet : barre de menu en haut, le fil commence plus bas. */
  [data-apparence="carnet"] .messagerie .chat {
    height: calc(100dvh - 21rem);
  }

  /* Plus collante, mais repère des suggestions de mentions. */
  .messagerie--conversation .composer {
    position: relative;
    bottom: auto;
  }

  .messagerie--liste .thread,
  .messagerie--conversation .chan-list,
  .messagerie--conversation .messagerie__entete {
    display: flex;
  }

  /* La liste des chats est déjà à gauche : pas de lien « Tous les chats ». */
  .messagerie__retour-tel {
    display: none;
  }

  /* Le titre est dans la barre du haut : les boutons restent à droite. */
  .messagerie__entete > .row {
    margin-left: auto;
  }


  .messagerie--liste .chan-list {
    border-right: 1px solid var(--line);
  }

  .chan {
    min-height: 38px;
  }

  .msgs {
    padding: 20px;
  }

  .composer {
    padding: 14px 20px;
  }

  .composer__champ {
    font-size: 15px;
  }
}

@media (min-width: 768px) and (pointer: coarse) {
  .composer__champ {
    font-size: 16px;
  }
}

/* ---- Formulaire d'activité : dates de début et de fin sur une ligne ---- */
.form-ligne-dates {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
  /* Sur téléphone, « Date de fin (optionnelle) » passe sur deux lignes : les champs restent alignés. */
  align-items: end;
}

.form-ligne-dates input {
  width: 100%;
  min-width: 0;
}

/* ---- Canal privé : fenêtres « Nouveau canal privé » et participants
   (prototype, dialogs() canal et participants) ---- */
.canal-dialog,
.participants-dialog {
  width: min(440px, calc(100vw - 2rem));
  max-width: min(440px, calc(100vw - 2rem));
  max-height: calc(100dvh - 2rem);
  overscroll-behavior: contain;
}

.canal-dialog .confirm-dialog__card,
.participants-dialog .confirm-dialog__card,
.canal-carte {
  gap: 12px;
}

.canal-formulaire {
  display: flex;
  flex-direction: column;
  gap: 12px;
  margin: 0;
}

.canal-formulaire .h2,
.canal-formulaire p,
.participants-dialog .h2,
.participants-dialog p {
  margin: 0;
}

.canal-formulaire__eyebrow {
  margin: 0;
  color: var(--accent-text);
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

[data-apparence="carnet"] .canal-formulaire__eyebrow {
  color: var(--nav-mark);
}

.canal-carte {
  max-width: 440px;
}

.canal-formulaire__case {
  gap: 8px;
  min-height: 44px;
  font-weight: 600;
}

.canal-formulaire__case input {
  width: 18px;
  height: 18px;
  margin: 0;
  accent-color: var(--accent);
}

.field .hint--erreur {
  color: var(--danger);
}

.sugg-wrap {
  position: relative;
}

.choix-personnes .choix-personnes__puces {
  gap: 6px;
}

.fchip.choix-personnes__puce {
  min-height: 30px;
  font: inherit;
  font-size: 13px;
  -webkit-user-select: none;
  user-select: none;
}

.choix-personnes .input {
  height: 42px;
  font-size: 16px;
}

.sugg.choix-personnes__suggestions {
  top: calc(100% + 4px);
  margin: 0;
  padding: 4px;
  border-color: var(--line);
  border-radius: var(--r-card);
}

.sugg__opt.choix-personnes__option {
  gap: 10px;
  min-height: 44px;
  padding: 7px 8px;
  border-radius: var(--r-ctl);
  color: var(--ink);
}

.sugg__opt:active {
  background: var(--surface-2);
}

.choix-personnes__vide {
  padding: 8px;
}

.participants-liste {
  gap: 0;
}

.participants-liste li {
  gap: 10px;
  min-height: 44px;
  padding: 6px 0;
}

.participants-ajout,
.participants-visibilite {
  padding-top: 0;
  border-top: 0;
}

.participants-visibilite.toggle {
  display: flex;
  border-bottom: 0;
}

/* Pop-up « Ajouter un participant » (SCREENS.inscrits) : liste défilante,
   ligne estompée une fois l'ajout confirmé. */
.participants-liste--ajout {
  max-height: min(50vh, 22rem);
  overflow-y: auto;
}

.participants-liste--ajout li.is-ajoute {
  opacity: 0.55;
}

.participants-liste--ajout li[hidden] {
  display: none;
}

@media (min-width: 768px) {
  .choix-personnes .input {
    font-size: 15px;
  }
}

/* ---- Mon profil (prototype SCREENS.profil) ---- */
.profil {
  max-width: 760px;
}

.profil .h1,
.profil .h2,
.profil .card p {
  margin: 0;
}

/* Contact d'urgence à compléter : bordure orange (prototype). */
.card--alerte {
  border-color: var(--warn);
}

.profil .input:disabled {
  color: var(--ink-2);
  cursor: default;
}

.profil select.input {
  padding-right: 32px;
}

.profil .toggle {
  min-height: 44px;
}

.profil .toggle input[type="checkbox"] {
  flex: 0 0 auto;
  width: 22px;
  height: 22px;
  margin: 0;
  accent-color: var(--accent);
}

/* Le n° de contrat DAN n'apparaît que si la case « affilié » est cochée. */


/* Notifications : une ligne par type, une colonne E-mail et une colonne Push. */
.notifications-grille {
  width: 100%;
  border-collapse: collapse;
  font-size: 14px;
}

.notifications-grille thead th {
  padding: 0 0 6px;
  color: var(--ink-3);
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  text-align: center;
}

.notifications-grille tbody th {
  padding: 4px 8px 4px 0;
  font-weight: 400;
  text-align: left;
}

.notifications-grille tbody tr {
  border-top: 1px solid var(--line);
}

/* Ligne « Tout sélectionner » : cases maîtresses, séparées des types par un trait plus net. */
.notifications-grille__tout {
  background: var(--surface-2);
  border-bottom: 2px solid var(--line);
}

.notifications-grille .notifications-grille__tout th {
  padding: 4px 8px;
  color: var(--ink);
  font-size: 14px;
  font-weight: 600;
  letter-spacing: normal;
  text-transform: none;
  text-align: left;
}



/* Toute la cellule est cliquable : cible de 44 px autour de la case. */
.notifications-grille__case {
  display: grid;
  place-items: center;
  min-height: 44px;
  cursor: pointer;
}

.notifications-grille input[type="checkbox"] {
  width: 22px;
  height: 22px;
  margin: 0;
  accent-color: var(--accent);
}



.profil__push {
  flex-wrap: wrap;
}

/* Photo de profil (membres/profil/_photo.html, membres/photo.js). */


.photo-profil__actions {
  gap: 8px;
  flex-wrap: wrap;
}

.photo-profil__choisir {
  cursor: pointer;
}



.avatar.avatar-lg {
  width: 64px;
  height: 64px;
  flex: 0 0 64px;
  font-size: 22px;
}



.recadrage {
  position: relative;
  width: min(320px, 100%);
  aspect-ratio: 1;
  margin: 4px auto 0;
  overflow: hidden;
  border-radius: var(--r-card);
  background: var(--surface-2);
  cursor: grab;
  touch-action: none;
  user-select: none;
  -webkit-user-select: none;
}

.recadrage.is-glisse {
  cursor: grabbing;
}



.recadrage__image {
  position: absolute;
  top: 0;
  left: 0;
  max-width: none;
  transform-origin: 0 0;
  pointer-events: none;
}

/* Voile hors du rond : on voit ce que montrera l'avatar. */
.recadrage__masque {
  position: absolute;
  inset: 0;
  border-radius: 50%;
  box-shadow: 0 0 0 999px rgba(0, 0, 0, 0.55);
  outline: 2px solid rgba(255, 255, 255, 0.85);
  pointer-events: none;
}

.recadrage__zoom {
  display: flex;
  align-items: center;
  gap: 10px;
  width: min(320px, 100%);
  margin: 0 auto;
  color: var(--ink-2);
  font-weight: 700;
}

.recadrage__zoom input {
  flex: 1;
  min-width: 0;
  accent-color: var(--accent);
}

/* Cible de 44 px : se touche au pouce sans viser. */
.recadrage__pas {
  display: grid;
  place-items: center;
  width: 44px;
  height: 44px;
  flex: 0 0 44px;
  border: 1px solid var(--line);
  border-radius: 50%;
  background: var(--surface);
  color: var(--ink);
  font-size: 24px;
  font-weight: 600;
  line-height: 1;
  cursor: pointer;
  touch-action: manipulation;
  user-select: none;
  -webkit-user-select: none;
  transition: transform 140ms var(--ease-out);
}

.recadrage__pas:active {
  transform: scale(0.94);
}



@media (prefers-reduced-motion: reduce) {
  .recadrage__pas:active {
    transform: none;
  }
}




@media (max-width: 767.98px) {
  .profil .grid-2,
  .profil .form-grid {
    gap: 12px;
  }
}

/* ---- Mon profil, mise en page « Tableau » : colonne d'état + accordéons ---- */


.profil__colonnes {
  display: grid;
  grid-template-columns: 280px minmax(0, 1fr);
  gap: var(--gap);
  align-items: start;
}

.profil__apercu {
  position: sticky;
  top: 84px;
}

[data-apparence="carnet"] .profil__apercu {
  top: 76px;
}

.profil__identite {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 12px;
}

.avatar--grand {
  width: 68px;
  height: 68px;
  flex: 0 0 68px;
  font-size: 24px;
}

.profil__nom {
  font-family: var(--font-display);
  font-weight: var(--display-weight);
  letter-spacing: var(--display-track);
  font-size: 22px;
  line-height: 1.2;
}

.profil__statuts {
  display: flex;
  flex-direction: column;
  margin: 0;
  padding: 0;
  list-style: none;
}

.profil__statuts li {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 9px 0;
  border-top: 1px solid var(--line);
  color: var(--ink-2);
  font-size: 13.5px;
}

.profil__acc {
  display: flex;
  flex-direction: column;
  gap: 10px;
  min-width: 0;
}

/* Accordéon : un thème, un résumé d'une ligne, un état. */
.acc {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--r-card);
  box-shadow: var(--shadow);
}

.acc[open] {
  border-color: var(--ink-3);
}

.acc--alerte {
  border-color: var(--warn);
}

.acc > summary {
  display: grid;
  grid-template-columns: 32px minmax(0, 1fr) auto 16px;
  align-items: center;
  gap: 12px;
  min-height: 60px;
  padding: 8px 16px;
  cursor: pointer;
  list-style: none;
  -webkit-user-select: none;
  user-select: none;
}

.acc > summary::-webkit-details-marker {
  display: none;
}

.acc > summary:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: -2px;
  border-radius: var(--r-card);
}

.acc__ico {
  display: grid;
  place-items: center;
  width: 32px;
  height: 32px;
  border-radius: var(--r-ctl);
  background: var(--accent-soft);
  color: var(--accent-text);
}

.acc__ico .icone {
  width: 18px;
  height: 18px;
}

.acc__texte {
  display: flex;
  flex-direction: column;
  min-width: 0;
}

.acc__titre {
  font-family: var(--font-display);
  font-weight: var(--display-weight);
  letter-spacing: var(--display-track);
  font-size: 16px;
  line-height: 1.25;
}

.acc__resume {
  overflow: hidden;
  color: var(--ink-2);
  font-size: 13px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.acc > summary > .icone {
  width: 16px;
  height: 16px;
  color: var(--ink-3);
  transition: transform 160ms var(--ease-out);
}

.acc[open] > summary > .icone {
  transform: rotate(180deg);
}

.acc__corps {
  display: flex;
  flex-direction: column;
  gap: 14px;
  padding: 16px;
  border-top: 1px solid var(--line);
  animation: acc-ouvre 160ms var(--ease-out);
}

@keyframes acc-ouvre {
  from {
    opacity: 0;
    transform: translateY(-4px);
  }
}

.acc__corps p {
  margin: 0;
}

.acc__corps > section {
  display: flex;
  flex-direction: column;
  gap: 10px;
  padding-top: 14px;
  border-top: 1px solid var(--line);
}

.acc__corps > section:first-child {
  padding-top: 0;
  border-top: 0;
}

.acc__corps .toggle:last-child {
  border-bottom: 0;
}

.sous-titre {
  color: var(--ink-3);
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

/* Spécialisations préparées, sous le niveau dans l'aperçu de Mon profil. */
.profil__specialites {
  display: flex;
  flex-wrap: wrap;
  gap: 4px;
  margin: 8px 0 0;
}

/* Accordéon « Exercices » : spécialisations préparées puis checklist par milieu. */
.exo__specialites {
  display: flex;
  flex-direction: column;
  gap: 8px;
  min-width: 0;
  margin: 0;
  padding: 0;
  border: 0;
}

.exo__specialites legend {
  padding: 0;
}

.exo__choix {
  display: flex;
  flex-wrap: wrap;
  gap: 4px 20px;
}

.exo__choix-case {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  min-height: 44px;
  cursor: pointer;
}

/* Spécialisation déjà obtenue : visible, mais plus à préparer. */
.exo__choix-case:has(input:disabled) {
  color: var(--ink-3);
  cursor: default;
}

.exo__choix-case input,
.exo__fait {
  flex: 0 0 auto;
  width: 22px;
  height: 22px;
  margin: 0;
  accent-color: var(--accent);
}

.exo__liste {
  display: flex;
  flex-direction: column;
  margin: 0;
  padding: 0;
  list-style: none;
}

.exo__groupe {
  padding: 12px 0 4px;
  color: var(--accent-text);
  font-size: 13px;
  font-weight: 600;
}

.exo {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 4px 12px;
  padding: 4px 0;
  border-top: 1px solid var(--line);
}

.exo__groupe + .exo,
.exo__liste > .exo:first-child {
  border-top: 0;
}

.exo__libelle {
  flex: 1 1 200px;
  display: flex;
  align-items: center;
  min-width: 0;
  min-height: 44px;
  cursor: pointer;
}

.exo__code {
  margin-right: 8px;
  color: var(--ink-2);
  font-size: 13px;
  font-variant-numeric: tabular-nums;
}

.exo__date-champ .input {
  width: 160px;
  height: 36px;
}

/* La date n'a de sens que si l'exercice est fait : affichée à la coche,
   sans transition (action fréquente, souvent au clavier). */
.exo__fait:not(:checked) ~ .exo__date-champ {
  display: none;
}

.exo__erreur {
  flex-basis: 100%;
  color: var(--danger);
}

/* Barre collante : visible dès qu'un champ du formulaire principal change. */
.barre-enregistrement {
  position: sticky;
  bottom: 16px;
  z-index: 7;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 10px 12px 10px 16px;
  background: var(--surface);
  border: 1px solid var(--accent);
  border-radius: var(--r-card);
  box-shadow: 0 12px 32px rgba(0, 0, 0, 0.18);
  font-size: 14px;
  font-weight: 600;
  animation: acc-ouvre 180ms var(--ease-out);
}

.barre-enregistrement[hidden] {
  display: none;
}

@media (max-width: 899.98px) {
  .profil__colonnes {
    grid-template-columns: minmax(0, 1fr);
  }

  .profil__apercu {
    position: static;
  }

  .acc > summary {
    grid-template-columns: 32px minmax(0, 1fr) 16px;
  }

  .acc__etat {
    display: none;
  }

  .barre-enregistrement {
    bottom: calc(76px + env(safe-area-inset-bottom));
  }
}

@media (max-width: 479.98px) {
  .barre-enregistrement {
    flex-direction: column;
    align-items: stretch;
  }

  .barre-enregistrement .row {
    justify-content: flex-end;
  }

  /* La date passe sous le libellé, alignée sur le texte (case 22 + écart 12). */
  .exo__date-champ {
    flex-basis: 100%;
    padding-left: 34px;
  }

  .exo__date-champ .input {
    width: 100%;
    height: 42px;
  }

  
}

@media (prefers-reduced-motion: reduce) {
  .acc__corps,
  .barre-enregistrement {
    animation: none;
  }
}

@media (min-width: 768px) and (pointer: coarse) {
  .choix-personnes .input {
    font-size: 16px;
  }
}

/* ---- Inviter un membre et demandes d'inscription (prototype SCREENS.inviter, SCREENS.demandes) ---- */
.invitation .h1,
.invitation .h2,
.invitation .card p,
.demandes .h1,
.demandes .h2,
.demandes .card p,
.demandes-dialog h2,
.demandes-dialog p {
  margin: 0;
}

/* Champs à 16 px sur téléphone : iOS zoome en dessous. */
.invitation .input {
  font-size: 16px;
}

.invitation select.input {
  padding-right: 32px;
}

.invitation .eyebrow {
  margin: 0;
  color: var(--accent-text);
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.08em;
}

[data-apparence="carnet"] .invitation .eyebrow {
  color: var(--nav-mark);
}

.invitation__principal {
  gap: var(--gap);
  margin: 0;
}

.card--verification {
  border-color: var(--accent);
}

.invitation__choix {
  gap: 4px;
}

.invitation .pop-opt,
.demande .pop-opt {
  grid-template-columns: 18px minmax(0, 1fr);
  min-height: 44px;
  touch-action: manipulation;
}

.invitation .pop-opt input,
.demande .pop-opt input {
  width: 18px;
  height: 18px;
}

.invitation .pop-opt:active,
.demande .pop-opt:active {
  background: var(--surface-2);
}

.pop-opt.pop-opt--inactif {
  opacity: 0.7;
  cursor: default;
}

.pop-opt--inactif .chip {
  white-space: normal;
}

.invitation__actions,
.demande__actions {
  justify-content: flex-end;
  flex-wrap: wrap;
}

.invitations .row-between {
  flex-wrap: wrap;
  min-height: 28px;
}

.invitations__email {
  min-width: 0;
  overflow-wrap: anywhere;
}

.demandes {
  max-width: 820px;
}

.demande .row-between {
  flex-wrap: wrap;
  align-items: center;
}

.demande__appartenance {
  display: flex;
  flex-direction: column;
  gap: 4px;
  margin: 0;
  padding: 0;
  border: 0;
  min-width: 0;
}

.demande__appartenance legend {
  margin-bottom: 4px;
  padding: 0;
}

.demande form {
  margin: 0;
}

.demande__message {
  color: var(--ink);
}

/* Densité et Carnet du prototype (.dir-*), limités à ces écrans. */
[data-apparence="abysse"] :is(.invitation, .demandes) {
  --pad: 16px;
  --gap: 16px;
}

[data-apparence="lagon"] :is(.invitation, .demandes) {
  --pad: 22px;
  --gap: 22px;
}

[data-apparence="carnet"] :is(.invitation, .demandes) {
  --pad: 22px;
  --gap: 24px;
  width: 100%;
  margin-inline: auto;
}

[data-apparence="carnet"] :is(.invitation, .demandes) .card {
  border-top: 3px solid var(--ink);
}

[data-apparence="carnet"] .invitation .card.card--verification {
  border-color: var(--accent);
}

.demandes__vide {
  align-items: center;
  text-align: center;
  padding: 40px;
}

/* Téléphone : boutons de 44 px au doigt. */
@media (pointer: coarse) {
  .invitation .button,
  .invitation .button-secondary,
  .demande .button,
  .demande .button-secondary {
    min-height: 44px;
  }
}

@media (hover: none) {
  @media (hover: hover) and (pointer: fine) {
    .invitation .pop-opt:hover,
    .demande .pop-opt:hover {
      background: transparent;
    }
  }

  .invitation .pop-opt:active,
  .demande .pop-opt:active {
    background: var(--surface-2);
  }
}

@media (min-width: 768px) {
  .demande .row-between {
    flex-wrap: nowrap;
  }

  [data-apparence="carnet"] :is(.invitation, .demandes) .h1 {
    font-size: 36px;
  }
}

@media (min-width: 768px) and (pointer: fine) {
  .invitation .input {
    font-size: 15px;
  }
}

/* ---- Validations de niveau (lignes « à valider » de SCREENS.inscrits) ---- */
.validations > p {
  margin: 0;
}

.validations__vide {
  align-items: center;
  text-align: center;
  padding: 40px;
}

/* Niveau requis sous le niveau du plongeur, sur une ligne. */
.validations td:nth-child(3) .small {
  white-space: nowrap;
}

/* ---- Créer / modifier une activité et modèles (prototype SCREENS.creer) ---- */
/* Positionné : le bouton par défaut `.sr-only` ne fait pas déborder la page. */
.activite-form,
.modeles .table-wrap {
  position: relative;
}

.activite-form {
  margin: 0;
}

.activite-form .h1,
.activite-form .h2,
.activite-form p,
.modeles .h1,
.modeles .h2,
.modeles p {
  margin: 0;
}

.activite-form .page-entete,
.modeles .page-entete {
  align-items: center;
  margin-bottom: 0;
}





.activite-form__seul {
  display: flex;
  flex-direction: column;
  max-width: 760px;
}

/* Champs à 16 px sur téléphone : iOS zoome en dessous. */
.activite-form .input {
  font-size: 16px;
}

.activite-form select.input {
  padding-right: 32px;
}

.activite-form textarea.input {
  height: auto;
  min-height: 88px;
  padding: 10px 12px;
  line-height: 1.45;
  resize: vertical;
}

/* iOS centre la date et l'heure et ignore la hauteur sans ceci. */
.activite-form input[type="date"].input,
.activite-form input[type="time"].input {
  min-width: 0;
  min-height: 42px;
  -webkit-appearance: none;
  appearance: none;
}



.activite-form fieldset {
  position: relative;
  min-width: 0;
  margin: 0;
  padding: 0;
  border: 0;
}

.activite-form legend {
  padding: 0;
  margin-bottom: 6px;
  color: var(--ink);
  font-size: 13px;
  font-weight: 600;
}

.activite-form .hint--erreur {
  font-size: 12.5px;
  color: var(--danger);
}

/* Barre d'étapes du configurateur : six cases de même largeur (trois par
   ligne sur téléphone), pour que la 6e s'aligne sur les autres. Faite :
   pastille verte cochée ; en cours : case accent ; à faire : pastille grise. */
.etapes {
  display: grid;
  grid-template-columns: repeat(6, minmax(0, 1fr));
  gap: 6px;
  width: 100%;
}
.etape {
  display: flex;
  align-items: center;
  gap: 8px;
  min-height: 44px;
  padding: 6px 10px;
  border: 1px solid var(--line);
  border-radius: var(--r-ctl);
  background: var(--surface);
  color: var(--ink-2);
  font-size: 13px;
  font-weight: 600;
  line-height: 1.2;
  text-decoration: none;
  touch-action: manipulation;
  -webkit-user-select: none;
  user-select: none;
  transition: border-color 120ms var(--ease-out), transform 100ms var(--ease-out);
}
.etape:active { transform: scale(0.98); }
.etape__num {
  display: grid;
  flex: none;
  place-items: center;
  width: 24px;
  height: 24px;
  border: 1.5px solid var(--ink-3);
  border-radius: 50%;
  color: var(--ink-3);
  font-size: 12px;
  font-weight: 700;
}
.etape__num svg { width: 14px; height: 14px; }
/* Césure française (« Héber-gement ») plutôt qu'une coupure n'importe où. */
.etape__titre { min-width: 0; -webkit-hyphens: auto; hyphens: auto; }
.etape.is-faite { color: var(--ink); }
.etape.is-faite .etape__num { border-color: var(--ok); background: var(--ok); color: var(--surface); }
.etape.is-on {
  border-color: var(--accent);
  background: var(--accent-soft);
  box-shadow: inset 0 0 0 1px var(--accent);
  color: var(--ink);
  font-weight: 700;
}
.etape.is-on .etape__num { border-color: var(--accent); background: var(--accent); color: var(--accent-ink); }
@media (hover: hover) and (pointer: fine) {
  .etape:not(.is-on):hover { border-color: var(--ink-3); }
}
@media (max-width: 599.98px) {
  .etapes { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .etape { gap: 5px; padding: 6px 7px; font-size: 12px; }
  .etape__num { width: 20px; height: 20px; font-size: 11px; }
}
/* Étape plongées : deux façons de créer, en cartes à radio visible
   (même langage que « Mode du sondage »). La choisie est bordée d'accent. */
.plongees-mode {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
}
.plongees-mode__carte {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  padding: 12px 14px;
  border: 1px solid var(--line);
  border-radius: var(--r-ctl);
  background: var(--surface);
  color: var(--ink);
  text-decoration: none;
  touch-action: manipulation;
  -webkit-user-select: none;
  user-select: none;
  transition: border-color 120ms ease, transform 100ms var(--ease-out);
}
.plongees-mode__carte:active { transform: scale(0.98); }
.plongees-mode__radio {
  flex: 0 0 18px;
  width: 18px;
  height: 18px;
  margin-top: 2px;
  border: 2px solid var(--ink-3);
  border-radius: 50%;
}
.plongees-mode__texte { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.plongees-mode__texte span { color: var(--ink-2); font-size: 13px; line-height: 1.35; }
.plongees-mode__carte.is-on {
  border-color: var(--accent);
  background: var(--accent-soft);
  box-shadow: inset 0 0 0 1px var(--accent);
}
.plongees-mode__carte.is-on .plongees-mode__radio {
  border-color: var(--accent);
  box-shadow: inset 0 0 0 4px var(--surface);
  background: var(--accent);
}
[data-apercu-plongees] h3,
[data-apercu-plongees] ol { margin: 0; }
[data-apercu-plongees] ol { padding-left: 1.4em; line-height: 1.5; }
.plongees-mode__retour { margin: 0; font-weight: 400; justify-content: flex-start; }
@media (max-width: 599.98px) {
  .plongees-mode { grid-template-columns: minmax(0, 1fr); }
}
@media (prefers-reduced-motion: reduce) {
  .plongees-mode__carte:active { transform: none; }
}

/* Le bloc titre des pages secondaires est limité à 64ch : la barre
   d'étapes, elle, prend toute la largeur de la page. */
.configurateur .secondaire__titre { max-width: none; }
@media (prefers-reduced-motion: reduce) {
  .etape { transition: none; }
  .etape:active { transform: none; }
}

/* Type d'activité : `.seg` en boutons radio ; il passe à la ligne s'il y a
   beaucoup de types. */
.seg--choix {
  display: flex;
  flex-wrap: wrap;
  border-radius: var(--r-card);
}

.seg--choix label {
  position: relative;
  display: flex;
}

.seg--choix input,
.toggle__case,
.jour input {
  position: absolute;
  width: 1px;
  height: 1px;
  margin: 0;
  opacity: 0;
  pointer-events: none;
}

.seg--choix span {
  display: inline-flex;
  align-items: center;
  min-height: 30px;
  padding: 0 14px;
  border-radius: var(--r-pill);
  color: var(--ink-2);
  font-size: 13.5px;
  font-weight: 600;
  cursor: pointer;
  -webkit-user-select: none;
  user-select: none;
  transition: background-color 120ms ease, color 120ms ease;
}

.seg--choix input:checked + span {
  background: var(--surface);
  color: var(--ink);
  box-shadow: 0 1px 2px var(--backdrop);
}

.seg--choix input:focus-visible + span,
.jour input:focus-visible + span {
  outline: 2px solid var(--accent);
  outline-offset: 1px;
}

.seg--choix label:active span {
  background: var(--surface);
}

[data-apparence="carnet"] .seg--choix {
  border-radius: var(--r-ctl);
}

[data-apparence="carnet"] .seg--choix span {
  border-radius: calc(var(--r-ctl) - 1px);
}

/* Interrupteurs : une case à cocher (role="switch") dessinée par `.switch`.
   Écartés comme les enfants d'une `.card` du prototype. */
.toggles {
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.activite-form .toggle {
  position: relative;
  min-height: 44px;
  cursor: pointer;
  -webkit-user-select: none;
  user-select: none;
}

.journal .toggle {
  position: relative;
  min-height: 44px;
  cursor: pointer;
  -webkit-user-select: none;
  user-select: none;
}

.journal-tout {
  position: relative;
  display: inline-flex;
  align-items: center;
  gap: 10px;
  min-height: 44px;
  margin-bottom: 8px;
  cursor: pointer;
  -webkit-user-select: none;
  user-select: none;
}

.toggles .toggle:last-of-type {
  border-bottom: 0;
}

.toggle__case {
  right: 0;
  top: 50%;
}

.toggle__case:checked + .switch {
  background: var(--accent);
}

.toggle__case:checked + .switch::after {
  left: 19px;
}

.toggle__case:focus-visible + .switch {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
}

/* Champs hors prototype : repliés sous « Plus d'options ». */
.card.activite-form__plus {
  display: block;
}

.activite-form__plus summary {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  min-height: 44px;
  cursor: pointer;
  list-style: none;
  -webkit-user-select: none;
  user-select: none;
}

.activite-form__plus summary::-webkit-details-marker {
  display: none;
}

.activite-form__plus summary svg {
  flex: 0 0 20px;
  width: 20px;
  height: 20px;
  color: var(--ink-3);
  transition: transform 160ms var(--ease-out);
}

.activite-form__plus[open] summary svg {
  transform: rotate(180deg);
}

.activite-form__resume {
  gap: 2px;
}

.activite-form__plus-corps {
  gap: 14px;
  margin-top: 14px;
}

/* Type et titre sur une ligne (« Répéter » en plus à la création) ; le titre prend la place. */
.activite-form__titre-ligne {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 2fr);
  gap: 16px;
  align-items: start;
}

.activite-form__titre-ligne--3 {
  grid-template-columns: minmax(0, 1fr) minmax(0, 2fr) minmax(0, 1fr);
}

/* Type choisi à l'écran précédent : son champ est masqué, le titre prend la place. */
.activite-form__titre-ligne--sans-type {
  grid-template-columns: minmax(0, 1fr);
}

.activite-form__titre-ligne--3.activite-form__titre-ligne--sans-type {
  grid-template-columns: minmax(0, 2fr) minmax(0, 1fr);
}

/* Date, Jusqu'au, Mise à l'eau, Rendez-vous sur une ligne. */
.form-grid--4 {
  grid-template-columns: repeat(4, minmax(0, 1fr));
}

/* Durée seule sur sa ligne : l'aide (durée du type) prend toute la ligne,
   le champ garde la largeur d'une colonne. */
.activite-form__duree > .field {
  grid-column: 1 / -1;
}

.activite-form__duree .input {
  max-width: 12rem;
}

.activite-form__repas-reglages {
  align-items: end;
}

.repas-options__ligne {
  gap: 8px;
  align-items: center;
}

.repas-options__ligne .input {
  flex: 1 1 auto;
  min-width: 0;
}

.repas-options__ligne .repas-options__prix {
  flex: 0 0 7rem;
}

@media (max-width: 767.98px) {
  .activite-form__titre-ligne,
  .activite-form__titre-ligne--3.activite-form__titre-ligne--sans-type {
    grid-template-columns: minmax(0, 1fr);
  }

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

/* Réponses closes : en orange, pour expliquer pourquoi le choix est grisé. */
.repas__clos {
  color: var(--warn);
  font-weight: 600;
}

/* Choix du repas d'un participant : une ligne par plat, case à droite. */
.repas__options {
  display: flex;
  flex-direction: column;
  margin: 0;
  padding: 0;
  border: 0;
}

.repas__option {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  min-height: 44px;
  padding: 8px 0;
  border-bottom: 1px solid var(--line);
}

.repas__option:last-child {
  border-bottom: 0;
}

.repas__option > label:first-child {
  flex: 1;
  cursor: pointer;
}

.repas__option > input {
  width: 20px;
  height: 20px;
  margin: 0;
  accent-color: var(--accent);
}

/* La quantité ne compte que pour un plat coché. */
.repas__quantite input {
  width: 64px;
  min-height: 36px;
  text-align: center;
}



/* Partir d'un modèle : une ligne `.event` par modèle, sans pavé de date. */
.event.event--modele {
  grid-template-columns: minmax(0, 1fr);
  color: var(--ink);
  text-decoration: none;
  touch-action: manipulation;
}

.event--modele .stack {
  gap: 2px;
}

/* Répéter : jours de la semaine en pastilles de 44 px. */
.jours {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.jour {
  position: relative;
}

.jour span {
  display: grid;
  place-items: center;
  min-width: 44px;
  min-height: 44px;
  padding: 0 8px;
  border: 1px solid var(--line);
  border-radius: var(--r-ctl);
  background: var(--surface);
  color: var(--ink-2);
  font-size: 13.5px;
  font-weight: 600;
  cursor: pointer;
  -webkit-user-select: none;
  user-select: none;
}

.jour input:checked + span {
  border-color: var(--accent);
  background: var(--accent-soft);
  color: var(--accent-text);
}

.modeles__vide {
  align-items: center;
  text-align: center;
  padding: 40px;
}

/* Densité et Carnet du prototype (.dir-*), comme Inviter un membre. */
[data-apparence="abysse"] :is(.activite-form, .modeles) {
  --pad: 16px;
  --gap: 16px;
}

[data-apparence="lagon"] :is(.activite-form, .modeles) {
  --pad: 22px;
  --gap: 22px;
}

[data-apparence="carnet"] :is(.activite-form, .modeles) {
  --pad: 22px;
  --gap: 24px;
  width: 100%;
  margin-inline: auto;
}

[data-apparence="carnet"] :is(.activite-form, .modeles) .card {
  border-top: 3px solid var(--ink);
}

@media (pointer: coarse) {
  .activite-form .button,
  .activite-form .button-secondary {
    min-height: 44px;
  }

  .seg--choix span {
    min-height: 44px;
  }
}

@media (hover: hover) and (pointer: fine) {
  .seg--choix label:hover span {
    color: var(--ink);
  }

  .activite-form__plus summary:hover .h2 {
    color: var(--accent-text);
  }
}

/* Fenêtre « Partir d'un modèle » : feuille du bas sur téléphone. */
.choix-modele .confirm-dialog__card {
  max-height: min(34rem, 80dvh);
  overflow-y: auto;
  overscroll-behavior: contain;
}

.choix-modele .feuille__poignee {
  display: none;
}

.choix-modele__tete {
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.choix-modele__tete .h2 {
  flex: 1 1 auto;
  margin: 0;
}

.choix-modele__retour,
.choix-modele__fermer {
  min-height: 44px;
  padding: 0 0.6rem;
  border: 0;
  border-radius: var(--r-ctl);
  background: transparent;
  color: var(--accent-text);
  font: inherit;
  touch-action: manipulation;
  cursor: pointer;
}

.choix-modele__fermer {
  min-width: 44px;
  color: var(--ink-2);
}

.choix-modele__fermer .icone {
  width: 1.2rem;
  height: 1.2rem;
}

.choix-modele__retour:active,
.choix-modele__fermer:active {
  background: var(--surface-2);
}

.choix-modele__liste {
  display: grid;
  gap: 0.5rem;
}

.choix-modele__liste[hidden],
.choix-modele__retour[hidden] {
  display: none;
}

@media (max-width: 767px) {
  .choix-modele.confirm-dialog {
    width: 100%;
    max-width: 100%;
    margin: auto 0 0;
    border: 0;
    border-radius: calc(var(--r-card) + 6px) calc(var(--r-card) + 6px) 0 0;
  }

  .choix-modele[open] {
    animation: monter 260ms cubic-bezier(0.32, 0.72, 0, 1);
  }

  .choix-modele .confirm-dialog__card {
    padding-bottom: calc(1rem + env(safe-area-inset-bottom, 0px));
  }

  .choix-modele .feuille__poignee {
    display: block;
  }
}

@media (prefers-reduced-motion: reduce) {
  .choix-modele[open] {
    animation: none;
  }
}

@media (hover: none) {
  @media (hover: hover) and (pointer: fine) {
    .event--modele:hover {
      border-color: var(--line);
    }
  }

  .event--modele:active {
    background: var(--surface-2);
  }
}

@media (min-width: 768px) {
  [data-apparence="carnet"] :is(.activite-form, .modeles) .h1 {
    font-size: 36px;
  }
}

@media (min-width: 768px) and (pointer: fine) {
  .activite-form .input {
    font-size: 15px;
  }
}

/* ---- Plateforme : tableau de bord du super-administrateur, clubs, webmasters
   (prototype SCREENS.dash profil superadmin, SCREENS.clubs, SCREENS.club) ---- */
/* Positionné : les `.sr-only` des tableaux ne font pas déborder la page. */
.plateforme,
.plateforme .table-wrap {
  position: relative;
}

.plateforme {
  margin: 0;
}





.plateforme .h1,
.plateforme .h2,
.plateforme p,
.plateforme-dialog h2,
.plateforme-dialog p {
  margin: 0;
}

.plateforme__titre {
  gap: 4px;
}

.plateforme .row-between {
  flex-wrap: wrap;
}

.plateforme__lien {
  color: var(--accent-text);
  font-weight: 600;
  text-decoration: none;
}



.plateforme__vide {
  align-items: center;
  text-align: center;
  padding: 40px;
}

.plateforme__actions {
  justify-content: flex-end;
  flex-wrap: wrap;
}

.plateforme__boutons {
  flex-wrap: wrap;
}

/* Champs à 16 px sur téléphone : iOS zoome en dessous. */
.plateforme .input {
  font-size: 16px;
}

.plateforme select.input {
  padding-right: 32px;
}

.field--adresse {
  grid-column: 1 / -1;
}

/* Sous-domaine et domaine du site : un seul contrôle, le domaine en
   complément grisé à droite du champ. */
.plateforme__adresse {
  display: flex;
  align-items: stretch;
  min-width: 0;
  border: 1px solid var(--line);
  border-radius: var(--r-ctl);
  background: var(--field);
  overflow: hidden;
}



.plateforme__adresse .input {
  flex: 1 1 10ch;
  min-width: 8ch;
  border: 0;
  border-radius: 0;
  background: transparent;
}

.plateforme__adresse .input:focus {
  outline: 0;
}

.plateforme__domaine {
  display: flex;
  align-items: center;
  flex: 0 1 auto;
  padding: 0 12px;
  border-left: 1px solid var(--line);
  background: var(--surface-2);
  color: var(--ink-2);
  font-size: 14px;
  overflow-wrap: anywhere;
}

@media (max-width: 560px) {
  .plateforme__adresse {
    flex-wrap: wrap;
  }

  .plateforme__adresse .input {
    flex-basis: 100%;
  }

  .plateforme__domaine {
    flex: 1 1 100%;
    padding: 10px 12px;
    border-left: 0;
    border-top: 1px solid var(--line);
  }
}

.plateforme fieldset {
  position: relative;
  min-width: 0;
  margin: 0;
  padding: 0;
  border: 0;
}

.plateforme .hint--erreur {
  font-size: 12.5px;
  color: var(--danger);
}

.plateforme .toggle {
  position: relative;
  min-height: 44px;
  border-bottom: 0;
  cursor: pointer;
  -webkit-user-select: none;
  user-select: none;
}

.plateforme__recherche {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.plateforme__recherche .field {
  flex: 1 1 auto;
}

.plateforme-dialog .confirm-dialog__card {
  gap: 10px;
}

/* Densité et Carnet du prototype (.dir-*), comme Inviter un membre. */
[data-apparence="abysse"] .plateforme {
  --pad: 16px;
  --gap: 16px;
}

[data-apparence="lagon"] .plateforme {
  --pad: 22px;
  --gap: 22px;
}

[data-apparence="carnet"] .plateforme {
  --pad: 22px;
  --gap: 24px;
  width: 100%;
  margin-inline: auto;
}

[data-apparence="carnet"] .plateforme .card {
  border-top: 3px solid var(--ink);
}

[data-apparence="carnet"] .plateforme .card.card--verification {
  border-color: var(--accent);
}

@media (pointer: coarse) {
  .plateforme .button,
  .plateforme .button-secondary,
  .plateforme-dialog .button-secondary,
  .plateforme-dialog .button-danger {
    min-height: 44px;
  }
}

@media (hover: hover) and (pointer: fine) {
  .plateforme__lien:hover {
    text-decoration: underline;
  }
}

@media (min-width: 768px) {
  .plateforme__recherche {
    flex-direction: row;
    align-items: flex-end;
  }

  [data-apparence="carnet"] .plateforme .h1 {
    font-size: 36px;
  }
}

@media (min-width: 768px) and (pointer: fine) {
  .plateforme .input {
    font-size: 15px;
  }
}

/* ---- Sites de plongée : doublons venus de cyana.be (prototype SCREENS.sites) ---- */
.sites-fusions__comparaison th,
.sites-fusions__comparaison td {
  padding: 8px 10px;
  font-size: 13px;
}

.sites-fusions__comparaison tbody th {
  color: var(--ink-2);
  font-weight: 600;
  text-transform: none;
  letter-spacing: 0;
  white-space: nowrap;
}

/* ---- Connexion et mot de passe (prototype login()) ----
   Hors coque : une carte centrée sur le fond de l'apparence. */
.login {
  display: grid;
  place-items: center;
  min-height: 100vh;
  min-height: 100dvh;
  padding: calc(16px + env(safe-area-inset-top, 0px)) 16px calc(16px + env(safe-area-inset-bottom, 0px));
  background: var(--bg);
  color: var(--ink);
}

.login-card {
  display: flex;
  flex-direction: column;
  gap: 28px;
  width: min(440px, 100%);
  padding: 28px 24px;
  border: 1px solid var(--line);
  border-radius: var(--r-card);
  background: var(--surface);
  box-shadow: var(--shadow);
  animation: login-entree 280ms var(--ease-out) both;
}

/* Page vue rarement : une entrée discrète, sans mouvement si réduit. */
@keyframes login-entree {
  from {
    opacity: 0;
    transform: translateY(8px);
  }
}

@media (prefers-reduced-motion: reduce) {
  .login-card {
    animation-name: login-entree-fondu;
  }

  @keyframes login-entree-fondu {
    from {
      opacity: 0;
    }
  }
}

.login-card__titre {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.login-card__titre .muted {
  font-size: 15px;
  line-height: 1.45;
}

.login-card__identifiant {
  display: flex;
  flex-direction: column;
  gap: 4px;
  padding: 12px 14px;
  border: 1px solid var(--line);
  border-radius: var(--r-ctl);
  background: var(--accent-soft);
  font-size: 13px;
  color: var(--ink-2);
}

.login-card__identifiant input {
  width: 100%;
  padding: 0;
  border: 0;
  background: transparent;
  font: inherit;
  font-size: 18px;
  font-weight: 700;
  color: var(--ink);
  text-overflow: ellipsis;
}

.login-card__identifiant input:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
}

.login-card .h1,
.login-card .h2,
.login-card p {
  margin: 0;
}

.login-card__marque {
  align-self: flex-start;
  color: var(--ink);
  text-decoration: none;
}

.login-card__marque .site-brand__mark {
  width: 44px;
  height: 44px;
  border-radius: calc(var(--r-ctl) + 2px);
}

.login-card__marque {
  gap: 14px;
}

.login-card__marque .h2,
.login-card__marque .muted {
  display: block;
}

.login-form {
  display: flex;
  flex-direction: column;
  gap: 20px;
  margin: 0;
}

/* Activation en étapes : chaque écran commence en haut (pas de carte centrée qui
   saute d'une étape à l'autre). */
.login--haut { place-items: start center; }
.activation__etape { display: flex; flex-direction: column; gap: 20px; }
.activation__etape[hidden] { display: none; }
.activation__case { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 10px 0; border-bottom: 1px solid var(--line); }
.activation__case input { flex: none; width: 22px; height: 22px; }
.activation__nav { display: flex; gap: 12px; }
.activation__nav[hidden] { display: none; }
.activation__nav [data-activation-suivant], .activation__nav [data-activation-envoyer] { flex: 1; }
.activation__nav [hidden] { display: none; }

.login-form .field {
  gap: 8px;
}

.login-form__actions {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.login-form__autres,
.login-form--secours {
  gap: 10px;
  padding-top: 20px;
  border-top: 1px solid var(--line);
}

.login-form__autres {
  display: flex;
  flex-direction: column;
}

.login-form--secours {
  margin-top: -8px;
}

.login-card .button-secondary {
  min-height: 44px;
}

.login-card .button-ghost {
  min-height: 44px;
}

/* Les champs de Django n'ont pas la classe `.input` : même rendu. */
.login-card .field input:not([type="radio"]):not([type="checkbox"]) {
  width: 100%;
  height: 48px;
  padding: 0 14px;
  border: 1px solid var(--line);
  border-radius: var(--r-ctl);
  background: var(--field);
  color: var(--ink);
  font: inherit;
  font-size: 16px;
  transition: border-color 150ms ease, box-shadow 150ms ease;
}

.login-card .field input:not([type="radio"]):not([type="checkbox"]):focus {
  outline: 2px solid transparent;
  border-color: var(--accent);
  box-shadow: 0 0 0 3px var(--accent-soft);
}

@media (forced-colors: active) {
  .login-card .field input:not([type="radio"]):not([type="checkbox"]):focus {
    outline-color: Highlight;
  }
}

.login-card .field .hint ul {
  margin: 4px 0 0;
  padding-left: 18px;
}

.login-card .hint--erreur {
  color: var(--danger);
}

.login-card .button {
  min-height: 48px;
}

.login-card__liens {
  flex-wrap: wrap;
  justify-content: center;
  gap: 0 24px;
  padding-top: 8px;
  border-top: 1px solid var(--line);
}

.login-card__liens a {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  color: var(--accent-text);
  text-decoration: none;
}

.login-card .auth-passkey {
  margin-top: 0;
}

.login-card .auth-passkey__button {
  min-height: 44px;
  border: 1px solid var(--line);
  border-radius: var(--r-pill);
  background: var(--surface);
  color: var(--ink);
  font: inherit;
  font-weight: 600;
  font-size: 14px;
}

.login-card .auth-passkey__button:active {
  transform: scale(0.97);
}

@media (hover: hover) and (pointer: fine) {
  .login-card__liens a:hover {
    text-decoration: underline;
  }
}

@media (min-width: 768px) {
  .login-card {
    padding: 44px;
  }

  .login-card__liens {
    padding-top: 20px;
  }

  .login-card__liens a {
    min-height: 0;
  }

  [data-apparence="carnet"] .login-card .h1 {
    font-size: 36px;
  }
}

@media (min-width: 768px) and (pointer: fine) {
  .login-card .field input {
    font-size: 15px;
  }
}

/* Pages d'activation de la double authentification (même carte). */
.login-card .field label:has(> input[type="radio"]) {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 14px;
  border: 1px solid var(--line);
  border-radius: var(--r-ctl);
  background: var(--field);
  font-weight: 500;
  cursor: pointer;
  transition: border-color 150ms ease, box-shadow 150ms ease;
}

.login-card .field label:has(> input[type="radio"]:checked) {
  border-color: var(--accent);
  box-shadow: 0 0 0 3px var(--accent-soft);
}

.login-card .field label:has(> input[type="radio"]:focus-visible) {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
}

.login-card .field div:has(> label > input[type="radio"]) {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.login-card input[type="radio"],
.login-card input[type="checkbox"] {
  width: 18px;
  height: 18px;
  margin: 0;
  accent-color: var(--accent);
}

.login-qr {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 12px;
  text-align: center;
}

.login-qr__image {
  width: 200px;
  height: 200px;
  padding: 10px;
  border-radius: var(--r-ctl);
  background: #fff;
}

.login-qr__secret {
  font-size: 13px;
  overflow-wrap: anywhere;
  color: var(--accent-text);
}

.login-codes {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.login-codes li {
  padding: 10px 12px;
  border: 1px solid var(--line);
  border-radius: var(--r-ctl);
  background: var(--field);
  font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
  font-size: 15px;
  text-align: center;
}

.login-card .button-danger {
  min-height: 48px;
}

/* Sécurité du compte : liste des passkeys et encarts dans la carte. */
.login-card .passkey-list {
  margin: 0;
}

.login-card .passkey-list__item {
  flex-wrap: wrap;
  border-color: var(--line);
  border-radius: var(--r-ctl);
}

.login-card .passkey-list__actions {
  flex-wrap: wrap;
}

.login-card .passkey-register-form {
  margin-top: 12px;
}

.login-card .passkey-register-form label {
  flex-basis: 100%;
  font-size: 13px;
  font-weight: 600;
}

.login-card .passkey-register-form input {
  flex: 1 1 160px;
  min-height: 44px;
  padding: 0 14px;
  border: 1px solid var(--line);
  border-radius: var(--r-ctl);
  background: var(--field);
  color: var(--ink);
  font: inherit;
}

.login-card .auth-alert-warning {
  display: flex;
  flex-direction: column;
  gap: 12px;
  margin-top: 12px;
  padding: 14px 16px;
  border: 0;
  border-radius: var(--r-ctl);
  background: var(--warn-soft);
  color: var(--ink);
  font-size: 14px;
}

.login-card .auth-alert-warning p {
  margin: 0;
}

/* ---- Palanquées et covoiturage (absents du prototype : style de la fiche) ---- */
.sortie .h1,
.sortie .h2,
.sortie p,
.sortie-dialog h2,
.sortie-dialog p {
  margin: 0;
}

.sortie .page-entete {
  align-items: center;
  margin-bottom: 0;
}

.sortie .page-entete form {
  margin: 0;
}

.sortie__titre {
  gap: 4px;
}

.sortie__disposition,
.sortie__cote {
  gap: var(--gap);
}

.sortie__personne {
  gap: 10px;
  min-width: 0;
}

.sortie__vide {
  align-items: center;
  text-align: center;
  padding: 32px;
}

.sortie .card-head {
  align-items: flex-start;
}

.sortie ul {
  display: flex;
  flex-direction: column;
  gap: 4px;
  margin: 0;
  padding: 0;
  list-style: none;
}

/* Téléphone : « À assigner » avant les palanquées (on touche d'abord un plongeur). */
.palanquees-a-assigner {
  order: -1;
}

.palanquees-grille {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: var(--gap);
  align-content: start;
}

.palanquee-carte__titre,
.covoiturage-carte__titre {
  gap: 2px;
  min-width: 0;
}

.palanquee-carte__place,
.palanquees-a-assigner__ligne,
.covoiturage-carte__passager {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  min-height: 44px;
}

.palanquee-carte__pied,
.covoiturage-carte__actions {
  justify-content: flex-end;
  flex-wrap: wrap;
}

.covoiturage-carte__actions form {
  margin: 0;
}

.covoiturage-carte__sous-titre {
  margin: 4px 0 0;
  font-size: 0.8125rem;
  font-weight: 600;
  color: var(--muted);
}

.covoiturage-carte__demande-actions {
  gap: 8px;
  align-items: center;
}

.covoiturage-carte__demande-actions form {
  margin: 0;
}

.covoiturage-carte__ajout {
  gap: 8px;
  align-items: center;
  flex-wrap: wrap;
  margin: 0;
}

.covoiturage-carte__ajout .input {
  flex: 0 1 15rem;
  width: auto;
  min-width: 0;
  max-width: 100%;
}

.covoiturage-sans-solution__ligne {
  display: flex;
  flex-direction: column;
  align-items: stretch;
  gap: 8px;
}

/* Poubelle rouge entourée de rouge, comme dans Checklists. */
.covoiturage-supprimer {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 2.25rem;
  height: 2.25rem;
  padding: 0;
  border: 1.5px solid var(--danger);
  border-radius: 50%;
  background: var(--danger-soft);
  color: var(--danger);
  font: inherit;
  font-size: 1.15rem;
  line-height: 1;
  cursor: pointer;
  touch-action: manipulation;
  transition: transform 120ms ease-out, background 150ms ease, color 150ms ease;
}

.covoiturage-supprimer:active {
  transform: scale(0.95);
}

@media (hover: hover) and (pointer: fine) {
  .covoiturage-supprimer:hover,
  .covoiturage-supprimer:focus-visible {
    background: var(--danger);
    color: var(--danger-ink);
  }
}

/* Un plongeur se touche : toute la ligne est la cible. */
.palanquees-a-assigner__ligne {
  margin: 0 -10px;
  padding: 0 10px;
  border: 1px solid transparent;
  border-radius: var(--r-ctl);
  cursor: pointer;
  -webkit-user-select: none;
  user-select: none;
  touch-action: manipulation;
  transition: background-color 120ms ease, border-color 120ms ease;
}

.palanquees-a-assigner__ligne:active {
  background: var(--surface-2);
}

.palanquees-a-assigner__ligne--selectionnee,
.palanquees-a-assigner__ligne--selectionnee:active {
  border-color: var(--accent);
  background: var(--accent-soft);
}

.palanquees-a-assigner__destinations {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.palanquees-a-assigner__form {
  margin: 0;
}

/* Pendant la sélection, chaque palanquée devient une destination. */
.palanquees-grille--cible .palanquee-carte {
  border-color: var(--accent);
  cursor: pointer;
}

.palanquees-grille--cible .palanquee-carte:active {
  background: var(--accent-soft);
}

.covoiturage-trajets {
  gap: var(--gap);
}

.covoiturage-proposer__form {
  gap: 14px;
  margin: 0;
}

.sortie .input {
  font-size: 16px;
}

.sortie textarea.input {
  height: auto;
  min-height: 72px;
  padding: 10px 12px;
  line-height: 1.45;
  resize: vertical;
}

.sortie input[type="time"].input {
  -webkit-appearance: none;
  appearance: none;
  min-width: 0;
}

.sortie .hint--erreur {
  font-size: 12.5px;
  color: var(--danger);
}

.sortie-dialog .confirm-dialog__card {
  gap: 10px;
}

/* Densité et Carnet du prototype (.dir-*), comme la fiche. */
[data-apparence="abysse"] .sortie {
  --pad: 16px;
  --gap: 16px;
}

[data-apparence="lagon"] .sortie {
  --pad: 22px;
  --gap: 22px;
}

[data-apparence="carnet"] .sortie {
  --pad: 22px;
  --gap: 24px;
  width: 100%;
  margin-inline: auto;
}

[data-apparence="carnet"] .sortie .card {
  border-top: 3px solid var(--ink);
}

[data-apparence="carnet"] .sortie .palanquees-grille--cible .palanquee-carte {
  border-color: var(--accent);
}

@media (pointer: coarse) {
  .sortie .button,
  .sortie .button-secondary,
  .sortie-dialog .button-secondary,
  .sortie-dialog .button-danger {
    min-height: 44px;
  }
}

@media (hover: hover) and (pointer: fine) {
  .palanquees-a-assigner__ligne:hover {
    background: var(--surface-2);
  }

  .palanquees-a-assigner__ligne--selectionnee:hover {
    background: var(--accent-soft);
  }
}

@media (min-width: 768px) {
  .palanquees-a-assigner {
    order: 0;
    position: sticky;
    top: 16px;
  }

  .palanquees-grille {
    grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
  }

  [data-apparence="carnet"] .sortie .h1 {
    font-size: 36px;
  }
}

@media (min-width: 768px) and (pointer: fine) {
  .sortie .input {
    font-size: 15px;
  }
}

/* ---- Écrans secondaires (calendriers, série, fiche membre, imports, encodage,
   canaux) : absents du prototype, style de la fiche ---- */
/* Positionné : les `.sr-only` (libellés, colonnes d'actions) restent dans la page. */
.secondaire,
.secondaire .table-wrap {
  position: relative;
}

.secondaire {
  margin: 0;
}

.secondaire--etroite {
  max-width: 760px;
}

.secondaire .h1,
.secondaire .h2,
.secondaire p,
.secondaire dl,
.secondaire-dialog h2,
.secondaire-dialog p {
  margin: 0;
}

.secondaire .page-entete {
  align-items: flex-end;
  margin-bottom: 0;
}

.secondaire__titre {
  gap: 4px;
  max-width: 64ch;
}

.secondaire__disposition,
.secondaire__colonne {
  gap: var(--gap);
}

.secondaire__actions {
  justify-content: flex-end;
  flex-wrap: wrap;
}

.secondaire__form {
  gap: 14px;
  margin: 0;
}

.secondaire__vide {
  align-items: center;
  text-align: center;
  padding: 32px;
}

.secondaire ul.secondaire__lignes {
  display: flex;
  flex-direction: column;
  gap: 2px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.secondaire__lignes > li {
  min-height: 36px;
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 4px 10px;
}

.secondaire__lien {
  color: var(--ink);
  text-decoration: none;
}



.secondaire .input {
  font-size: 16px;
}

.secondaire select.input {
  padding-right: 32px;
}

.secondaire input[readonly].input {
  color: var(--ink-2);
  font-size: 14px;
  text-overflow: ellipsis;
}

.secondaire legend {
  padding: 0;
  margin-bottom: 6px;
  color: var(--ink);
  font-size: 13px;
  font-weight: 600;
}

.secondaire fieldset {
  min-width: 0;
  margin: 0;
  padding: 0;
  border: 0;
}

.secondaire .hint--erreur {
  font-size: 12.5px;
  color: var(--danger);
}

.secondaire .toggle {
  position: relative;
  min-height: 44px;
  cursor: pointer;
  -webkit-user-select: none;
  user-select: none;
}

.secondaire-dialog .confirm-dialog__card {
  gap: 10px;
}

/* Mes calendriers : un abonnement = portée, adresse, actions. */
.abonnement {
  gap: 10px;
}

.abonnement__portee {
  flex-wrap: wrap;
  gap: 6px 8px;
}

.abonnement__pied {
  flex-wrap: wrap;
}

/* Fiche membre */
.avatar.avatar-lg {
  width: 56px;
  height: 56px;
  flex: 0 0 56px;
  font-size: 20px;
}



/* Actions de gestion de la fiche : une rangée qui passe à la ligne. Les
   formulaires s'effacent pour que leur bouton soit un élément de la rangée. */
.fiche-membre__actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.fiche-membre__actions:not(:has(.button, .button-secondary)) {
  display: none;
}

.fiche-membre__actions form {
  display: contents;
}

@media (max-width: 639px) {
  .fiche-membre__actions > * {
    flex: 1 1 auto;
  }

  
}

.fiche-membre__pastilles {
  flex-wrap: wrap;
  gap: 6px;
}

.secondaire .meta dd {
  overflow-wrap: anywhere;
}

.secondaire .meta dd a {
  color: var(--accent-text);
  text-decoration: none;
}

.meta--large {
  grid-column: 1 / -1;
}

/* Imports */
.secondaire .input.import__fichier {
  height: auto;
  min-height: 44px;
  padding: 8px 10px;
  font-size: 14px;
}

/* Champ fichier d'un formulaire : bouton et texte centrés dans la zone. */
.input[type="file"] {
  height: auto;
  min-height: 44px;
  padding: 6px 10px;
  display: flex;
  align-items: center;
  font-size: 14px;
  color: var(--ink-2);
}

/* Bouton natif du champ fichier, aux couleurs du `.button-secondary`. */
.import__fichier::file-selector-button,
.input[type="file"]::file-selector-button {
  min-height: 32px;
  margin-right: 10px;
  padding: 0 12px;
  border: 1px solid var(--line);
  border-radius: var(--r-pill);
  background: var(--surface);
  color: var(--ink);
  font: inherit;
  font-weight: 600;
  cursor: pointer;
}

.import__case {
  display: grid;
  place-items: center;
  width: 44px;
  height: 44px;
  margin: -12px 0;
  cursor: pointer;
}

.import__case input {
  width: 20px;
  height: 20px;
  margin: 0;
  accent-color: var(--accent);
}

/* Encodage en masse : champs étroits dans le tableau qui défile. */
.saisie-masse .table .input {
  min-width: 96px;
}

/* Nouveau canal : groupes en pastilles à cocher. */
.canal-groupes {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.canal-groupes .jour span {
  padding: 0 12px;
}

/* Densité et Carnet du prototype (.dir-*), comme la fiche. */
[data-apparence="abysse"] .secondaire {
  --pad: 16px;
  --gap: 16px;
}

[data-apparence="lagon"] .secondaire {
  --pad: 22px;
  --gap: 22px;
}

[data-apparence="carnet"] .secondaire {
  --pad: 22px;
  --gap: 24px;
  width: 100%;
  margin-inline: auto;
}

[data-apparence="carnet"] .secondaire .card {
  border-top: 3px solid var(--ink);
}

@media (pointer: coarse) {
  .secondaire .button,
  .secondaire .button-secondary,
  .secondaire-dialog .button,
  .secondaire-dialog .button-secondary,
  .secondaire-dialog .button-danger {
    min-height: 44px;
  }
}

@media (hover: hover) and (pointer: fine) {
  .secondaire__lien:hover,
  .secondaire .meta dd a:hover {
    text-decoration: underline;
  }
}

@media (min-width: 768px) {
  .secondaire .meta--large {
    grid-column: span 2;
  }

  [data-apparence="carnet"] .secondaire .h1 {
    font-size: 36px;
  }
}

@media (min-width: 768px) and (pointer: fine) {
  .secondaire .input {
    font-size: 15px;
  }
}

/* Designer d'apparence */
/* Polices de la charte, hébergées ici (licence OFL, fichiers dans polices/). */
@font-face { font-family: "Bricolage Grotesque"; font-style: normal; font-weight: 400; font-display: swap; src: url("polices/bricolage-grotesque-latin-400.c078650665c0.woff2") format("woff2"); }
@font-face { font-family: "Bricolage Grotesque"; font-style: normal; font-weight: 600; font-display: swap; src: url("polices/bricolage-grotesque-latin-600.72280bf66ee0.woff2") format("woff2"); }
@font-face { font-family: "Bricolage Grotesque"; font-style: normal; font-weight: 700; font-display: swap; src: url("polices/bricolage-grotesque-latin-700.48e4b00b03b4.woff2") format("woff2"); }
@font-face { font-family: "Figtree"; font-style: normal; font-weight: 400; font-display: swap; src: url("polices/figtree-latin-400.7bfd10a3def3.woff2") format("woff2"); }
@font-face { font-family: "Figtree"; font-style: normal; font-weight: 600; font-display: swap; src: url("polices/figtree-latin-600.4376f5953b85.woff2") format("woff2"); }
@font-face { font-family: "Figtree"; font-style: normal; font-weight: 700; font-display: swap; src: url("polices/figtree-latin-700.70aaa6879de5.woff2") format("woff2"); }
@font-face { font-family: "IBM Plex Sans"; font-style: normal; font-weight: 400; font-display: swap; src: url("polices/ibm-plex-sans-latin-400.77bc02670657.woff2") format("woff2"); }
@font-face { font-family: "IBM Plex Sans"; font-style: normal; font-weight: 600; font-display: swap; src: url("polices/ibm-plex-sans-latin-600.196e3cbc5fee.woff2") format("woff2"); }
@font-face { font-family: "IBM Plex Sans"; font-style: normal; font-weight: 700; font-display: swap; src: url("polices/ibm-plex-sans-latin-700.c277d7b83f8a.woff2") format("woff2"); }
@font-face { font-family: "Newsreader"; font-style: normal; font-weight: 400; font-display: swap; src: url("polices/newsreader-latin-400.48b72fa720bf.woff2") format("woff2"); }
@font-face { font-family: "Newsreader"; font-style: normal; font-weight: 600; font-display: swap; src: url("polices/newsreader-latin-600.7cc0808d6d69.woff2") format("woff2"); }
@font-face { font-family: "Newsreader"; font-style: normal; font-weight: 700; font-display: swap; src: url("polices/newsreader-latin-700.07c071f34838.woff2") format("woff2"); }
@font-face { font-family: "Sora"; font-style: normal; font-weight: 400; font-display: swap; src: url("polices/sora-latin-400.a87be5f51483.woff2") format("woff2"); }
@font-face { font-family: "Sora"; font-style: normal; font-weight: 600; font-display: swap; src: url("polices/sora-latin-600.4c3aca48be0c.woff2") format("woff2"); }
@font-face { font-family: "Sora"; font-style: normal; font-weight: 700; font-display: swap; src: url("polices/sora-latin-700.b2758c7ec7e6.woff2") format("woff2"); }
@font-face { font-family: "Source Sans 3"; font-style: normal; font-weight: 400; font-display: swap; src: url("polices/source-sans-3-latin-400.27ab01c4cb50.woff2") format("woff2"); }
@font-face { font-family: "Source Sans 3"; font-style: normal; font-weight: 600; font-display: swap; src: url("polices/source-sans-3-latin-600.9a35cba76eda.woff2") format("woff2"); }
@font-face { font-family: "Source Sans 3"; font-style: normal; font-weight: 700; font-display: swap; src: url("polices/source-sans-3-latin-700.9b13bd3653e3.woff2") format("woff2"); }

:root:has(.designer[open]) {
  overflow: hidden;
}

.designer {
  width: 100%;
  max-width: none;
  height: 100vh;
  height: 100dvh;
  max-height: none;
  margin: 0;
  padding: 0;
  border: 0;
  background: var(--bg);
  color: var(--ink);
}

.designer::backdrop {
  background: var(--backdrop);
}

.designer[open] {
  animation: designer-entree 200ms var(--ease-out);
}

@keyframes designer-entree {
  from {
    opacity: 0;
    transform: translateY(8px);
  }
}

/* Sans JavaScript, le lien #designer-<clé> affiche le formulaire en place. */
.designer:target:not([open]) {
  position: static;
  display: block;
  height: auto;
  margin-top: 16px;
  border: 1px solid var(--line);
  border-radius: var(--r-card);
  overflow: hidden;
}



.designer__form {
  display: flex;
  flex-direction: column;
  height: 100%;
  padding-left: env(safe-area-inset-left, 0px);
  padding-right: env(safe-area-inset-right, 0px);
}

.designer__entete {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
  padding: calc(12px + env(safe-area-inset-top, 0px)) 20px 12px;
  border-bottom: 1px solid var(--line);
  background: var(--surface);
}

.designer__titres,
.designer__titres .h2,
.designer__titres .eyebrow,
.designer-confirmation h2,
.designer-confirmation p {
  margin: 0;
}



.designer__largeur button {
  min-height: 32px;
}

.designer__apercu {
  display: flex;
  justify-content: center;
  min-height: 0;
  padding: 12px;
  background: var(--surface-2);
}

.designer__cadre {
  width: 100%;
  height: 100%;
  border: 1px solid var(--line);
  border-radius: var(--r-card);
  overflow: hidden;
  background: var(--bg);
}

.designer__cadre--telephone {
  width: min(390px, 100%);
}

.designer__cadre iframe {
  display: block;
  width: 100%;
  height: 100%;
  border: 0;
}

.designer__reglages {
  display: flex;
  flex-direction: column;
  gap: 12px;
  padding: 16px 20px;
  background: var(--surface);
}

.designer__bloc {
  display: flex;
  flex-direction: column;
  gap: 14px;
  padding-bottom: 16px;
  border-bottom: 1px solid var(--line);
}

.designer__groupe {
  border-bottom: 1px solid var(--line);
}

.designer__groupe summary {
  min-height: 44px;
  padding: 12px 0;
  font-weight: 700;
  cursor: pointer;
}

.designer__groupe summary:focus-visible,
.designer__couleur input[type="color"]:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
}

.designer__couleurs {
  display: flex;
  flex-direction: column;
  gap: 8px;
  padding-bottom: 14px;
}

.designer__couleur {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 44px 104px;
  align-items: center;
  gap: 8px;
}

.designer__couleur label {
  font-size: 14px;
  color: var(--ink);
}

.designer__couleur input[type="color"] {
  width: 44px;
  height: 44px;
  padding: 3px;
  border: 1px solid var(--line);
  border-radius: var(--r-ctl);
  background: var(--field);
  cursor: pointer;
}

.designer__hex {
  color: var(--ink-2);
  font-variant-numeric: tabular-nums;
}

.designer .input {
  font-size: 15px;
}

.designer__pied {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 8px;
  flex-wrap: wrap;
  padding: 12px 20px calc(12px + env(safe-area-inset-bottom, 0px));
  border-top: 1px solid var(--line);
  background: var(--surface);
}

.designer__pied [data-designer-retablir] {
  margin-right: auto;
}

@media (pointer: coarse) {
  .designer .input {
    font-size: 16px;
  }

  .designer__largeur button,
  .designer__pied .button,
  .designer__pied .button-secondary,
  .designer-confirmation .button-secondary,
  .designer-confirmation .button-danger {
    min-height: 44px;
  }
}

@media (min-width: 900px) {
  .designer__form {
    display: grid;
    grid-template-columns: 360px minmax(0, 1fr);
    grid-template-rows: auto minmax(0, 1fr) auto;
    grid-template-areas:
      "entete entete"
      "reglages apercu"
      "pied pied";
  }

  .designer__entete { grid-area: entete; }
  .designer__apercu { grid-area: apercu; }
  .designer__pied { grid-area: pied; }

  .designer__reglages {
    grid-area: reglages;
    min-height: 0;
    overflow-y: auto;
    overscroll-behavior: contain;
    border-right: 1px solid var(--line);
  }
}

/* Téléphone : aperçu collé en haut, réglages dessous, pied collé en bas. */
@media (max-width: 899.98px) {
  

  

  .designer__reglages {
    flex: 1 0 auto;
  }

  

  .designer__pied [data-designer-retablir] {
    order: -1;
    flex: 1 1 100%;
    margin-right: 0;
  }

  .designer__pied .button,
  .designer__pied > .button-secondary:not([data-designer-retablir]) {
    flex: 1 1 0;
  }
}

@media (prefers-reduced-motion: reduce) {
  .designer[open] {
    animation-name: designer-fondu;
  }
}

@keyframes designer-fondu {
  from {
    opacity: 0;
  }
}

/* Page d'aperçu (contenu fictif) */
.apercu__titre {
  gap: 4px;
}

.apercu__pastilles,
.apercu__boutons {
  flex-wrap: wrap;
}



.apercu__evenement {
  gap: 2px;
  min-width: 0;
}

.apercu__evenement-titre {
  flex-wrap: wrap;
  gap: 6px 10px;
}

/* Documents (PDF du club, PDF d'une sortie) : une liste par catégorie. */
.documents-categorie {
  margin-bottom: var(--gap);
  gap: 6px;
}

.documents-categorie > p {
  margin: 0;
}

.aide-suggestion {
  gap: 6px;
}

.aide-suggestion > p {
  margin: 0;
}

.aide-suggestion > .button-secondary {
  align-self: flex-start;
  margin-top: 6px;
}

.documents-liste {
  list-style: none;
  margin: 4px 0 0;
  padding: 0;
}

.document-ligne {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 10px 0;
  border-top: 1px solid var(--line);
}

.document-ligne:first-child {
  border-top: 0;
}

.document-ligne__icone {
  flex: none;
  display: grid;
  place-items: center;
  margin-right: -4px;
  width: 36px;
  height: 36px;
  border-radius: 10px;
  background: var(--accent-soft);
  color: var(--accent-text);
}

.changelog__revision {
  padding-top: 16px;
  margin-top: 16px;
  border-top: 1px solid var(--line);
}

.changelog__version {
  display: flex;
  align-items: baseline;
  gap: 8px;
  margin: 0 0 8px;
  font-size: 16px;
}

.changelog__revision .sous-titre {
  margin: 12px 0 4px;
}

.changelog__puces {
  margin: 0;
  padding-left: 20px;
}

.changelog__puces li {
  margin: 4px 0;
}

.document-ligne__texte {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
  overflow-wrap: anywhere;
}

.document-ligne__actions {
  flex: none;
  display: flex;
  align-items: center;
  gap: 8px;
}

/* Documents à remplir : sur téléphone, les boutons passent sous le titre. */
.document-ligne--remplir {
  flex-wrap: wrap;
}

.document-ligne__actions--remplir {
  flex-wrap: wrap;
}

/* Choix des modèles : une case par ligne, zone tactile de 44 px. */
.documents-type {
  margin: 12px 0 0;
  padding: 0;
  border: 0;
}

.documents-type__case {
  display: flex;
  align-items: center;
  gap: 10px;
  min-height: 44px;
  cursor: pointer;
}

/* Zone tactile de 44 px, retour à l'appui. */
.document-ligne__modifier {
  display: grid;
  place-items: center;
  width: 44px;
  height: 44px;
  border: 1px solid transparent;
  border-radius: 10px;
  background: transparent;
  color: var(--ink-2);
  cursor: pointer;
  touch-action: manipulation;
  -webkit-tap-highlight-color: transparent;
}

.document-ligne__modifier:active {
  transform: scale(0.97);
  background: var(--danger-soft);
}

.document-ligne__modifier:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
}

/* Aide : deux boutons par ligne, qui passent sous le texte sur téléphone. */
@media (max-width: 560px) {
  .document-ligne:has(.document-ligne__actions .button-secondary + .button-secondary) {
    flex-wrap: wrap;
  }

  .document-ligne:has(.document-ligne__actions .button-secondary + .button-secondary)
    .document-ligne__actions {
    flex: 1 0 100%;
    justify-content: flex-start;
    padding-left: 48px;
  }
}

@media (hover: hover) and (pointer: fine) {
  .document-ligne__modifier:hover {
    background: var(--surface-2);
    color: var(--ink);
  }
}

.documents-formulaire input {
  font-size: 16px;
}

/* Téléphone : le titre prend la ligne, les actions passent dessous. */
@media (max-width: 575.98px) {
  .document-ligne {
    flex-wrap: wrap;
  }

  .document-ligne__texte {
    flex-basis: calc(100% - 48px);
  }

  .document-ligne__actions {
    width: 100%;
    justify-content: space-between;
    padding-left: 48px;
  }
}

/* Palette des types d'activité, par style. Hors de la liste des jetons que
   le club peut personnaliser (clubs/apparence.py) : le webmaster choisit un
   nom de couleur, pas une valeur. */
[data-apparence="abysse"] {
  --type-bleu: #60a5fa;
  --type-turquoise: #2dd4bf;
  --type-vert: #4ade80;
  --type-ambre: #fbbf24;
  --type-orange: #fb923c;
  --type-rose: #f472b6;
  --type-violet: #a78bfa;
  --type-ardoise: #94a3b8;
  --type-tint: 26%;
}
[data-apparence="lagon"] {
  --type-bleu: #2563eb;
  --type-turquoise: #0d9488;
  --type-vert: #16a34a;
  --type-ambre: #d97706;
  --type-orange: #ea580c;
  --type-rose: #db2777;
  --type-violet: #7c3aed;
  --type-ardoise: #64748b;
  --type-tint: 16%;
}
[data-apparence="carnet"] {
  --type-bleu: #2f4f9e;
  --type-turquoise: #1f7a6f;
  --type-vert: #3f7a45;
  --type-ambre: #b7791f;
  --type-orange: #c2571a;
  --type-rose: #b04a78;
  --type-violet: #6b4fa0;
  --type-ardoise: #6b7280;
  --type-tint: 18%;
}

/* Calendrier : filtres et vue mensuelle (lundi au dimanche). */
.seg a { border: 0; background: transparent; color: var(--ink-2); padding: 6px 14px; border-radius: var(--r-pill); font-size: 13.5px; font-weight: 600; text-decoration: none; }
.seg a.is-on { background: var(--surface); color: var(--ink); box-shadow: 0 1px 2px rgba(0, 0, 0, 0.12); }
.calendrier__filtres { margin-bottom: 16px; }
.calendrier__filtres .input { width: auto; min-width: 0; }
.calendrier__clubs { display: flex; align-items: center; gap: 8px; }

/* Couleur d'un type d'activité : le jeton du style choisi (`--type-<nom>`). */








.pastille-type { display: inline-block; width: 18px; height: 18px; border-radius: 50%; background: var(--c); }

/* Catégories du calendrier : quatre couleurs, réglées par le club dans
   Paramètres (le contexte surcharge ces jetons, `_css_categories`). */
:root {
  --cat-plongee: #2563eb;
  --cat-apprendre: #7c3aed;
  --cat-vie: #d97706;
  --cat-autre: #64748b;
}
.cat-plongee { --c: var(--cat-plongee); }
.cat-apprendre { --c: var(--cat-apprendre); }
.cat-vie { --c: var(--cat-vie); }
.cat-autre { --c: var(--cat-autre); }

/* Monogramme (ou logo) du club : plein = principal, contour = secondaire,
   pointillé = invité. N'apparaît que si l'écran montre plusieurs clubs. */
.monogramme { display: inline-grid; place-items: center; min-width: 24px; height: 20px; padding: 0 4px; border-radius: var(--r-ctl); font-size: 10.5px; font-weight: 800; letter-spacing: 0.02em; line-height: 1; overflow: hidden; border: 1px solid var(--ink-2); color: var(--ink-2); background: var(--surface); }
.monogramme--principal { background: var(--ink); border-color: var(--ink); color: var(--surface); }
.monogramme--invite { border-style: dashed; }
.monogramme img { width: 100%; height: 100%; object-fit: cover; display: block; }
.monogramme--logo { padding: 0; width: 20px; }

/* Cartes du calendrier. Fond = teinte du type ; inscrit = plus marqué ;
   absent ou passé = estompé (mêmes couleurs, plus transparentes). */
.mois { border: 1px solid var(--line); border-radius: var(--r-card); background: var(--surface); overflow: hidden; }
.mois__entetes,
.mois__semaine { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); }
.mois__entetes span { padding: 10px 8px; text-align: center; font-size: 12px; font-weight: 700; color: var(--ink-3); text-transform: uppercase; letter-spacing: 0.06em; border-bottom: 1px solid var(--line); }
.mois__jour { min-height: 112px; padding: 6px; display: flex; flex-direction: column; gap: 5px; min-width: 0; border-right: 1px solid var(--line); border-bottom: 1px solid var(--line); }
.mois__jour:nth-child(7n) { border-right: 0; }

.mois__jour--hors { background: var(--surface-2); }
.mois__jour--hors .mois__numero { color: var(--ink-3); }

.mois__numero { align-self: flex-end; font-size: 13px; font-weight: 700; color: var(--ink-2); }
.mois__nom-jour { display: none; }
.mois__ajout { align-self: flex-start; display: inline-flex; align-items: center; justify-content: center; width: 24px; height: 24px; margin-top: auto; border-radius: var(--r-pill); color: var(--ink-3); opacity: 0; transition: opacity 150ms var(--ease-out), background-color 150ms var(--ease-out); }
.mois__ajout svg { width: 14px; height: 14px; }
.mois__ajout:focus-visible { opacity: 1; }

@media (hover: hover) and (pointer: fine) {
  .mois__jour:hover .mois__ajout { opacity: 1; }
}
@media (hover: hover) and (pointer: fine) {
  .mois__ajout:hover { background: var(--surface-2); color: var(--ink); }
}
@media (hover: none) { .mois__ajout { opacity: 1; } }
.mois__anniv { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 2px; }
.mois__anniv li { position: relative; display: flex; align-items: center; gap: 4px; min-width: 0; font-size: 11.5px; line-height: 1.3; color: var(--ink-2); }

.mois__anniv svg { width: 13px; height: 13px; flex: none; color: var(--accent); }
.mois__evt { display: flex; flex-direction: column; gap: 3px; padding: 5px 7px 5px 8px; border-radius: var(--r-ctl); background: var(--surface-2); border-left: 3px solid var(--barre, var(--line)); color: var(--ink); font-size: 12.5px; line-height: 1.3; min-width: 0; transition: opacity 220ms var(--ease-out); }
/* Barre fine à gauche : la catégorie du type (`categorie_effective`). */




.mois__evt[hidden] { display: none; }

@keyframes reponse-entree { from { opacity: 0; transform: scale(0.8); } to { opacity: 1; transform: scale(1); } }
.mois__evt--passee { opacity: 0.5; }
.mois__evt--annulee { opacity: 0.55; }

.pastille-sejour { display: inline-flex; align-items: center; gap: 4px; max-width: 100%; padding: 0 6px; border-radius: var(--r-pill); background: var(--accent-soft); color: var(--accent-text); font-size: 11.5px; font-weight: 600; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.sejour-programme { display: flex; flex-direction: column; gap: 10px; }
.sejour-programme__liste { display: flex; flex-direction: column; gap: 6px; margin: 0; padding: 0; list-style: none; }
.sejour-programme__liste li { display: flex; align-items: center; flex-wrap: wrap; gap: 4px 12px; }
.sejour-programme__liste li > a:first-child { flex: 1 1 auto; min-width: 0; }
.sejour-programme__ajouter, .sejour-programme__existante { flex-wrap: wrap; }
.sejour-parent { display: flex; flex-wrap: wrap; align-items: center; gap: 4px 12px; margin: 0; }
.sejour-logements { flex-wrap: wrap; }
.sejour-options { display: flex; flex-direction: column; gap: 10px; margin: 0; }
.sejour-options > summary { cursor: pointer; }
.sejour-completer { display: flex; flex-direction: column; gap: 10px; padding: 12px; border: 1px solid var(--line); border-radius: var(--r-ctl); background: var(--warn-soft); }
/* Logements d'un hébergement : choix, gestion et répartition. */
.logements__mode, .logements__option { display: flex; align-items: center; gap: 10px; min-height: 44px; }
.logements__option { padding: 8px 12px; border: 1px solid var(--line); border-radius: var(--r-ctl); background: var(--surface); cursor: pointer; }
.logements__option:has(input:checked) { border-color: var(--accent); background: var(--accent-soft); }
.logements__option:has(input:disabled) { opacity: 0.6; cursor: not-allowed; }
.logements__detail { display: flex; flex-direction: column; flex: 1 1 auto; min-width: 0; }
.logements__titre { margin: 8px 0 0; color: var(--ink); font-size: 13px; font-weight: 600; }

.lignes__ligne .input { flex: 1 1 auto; min-width: 0; }
/* Chaque case a son libellé (lu aussi par les lecteurs d'écran) ; sur ordinateur, il ne
   s'affiche qu'au-dessus de la première ligne, comme un titre de colonne. */
.lignes__champ { flex: 1 1 auto; min-width: 0; gap: 4px; }
.lignes__libelle { font-size: 13px; font-weight: 600; color: var(--ink); }
.lignes__ordre { flex: 0 0 92px; }
/* Parcours guidé d'un séjour : une puce par étape. */
.parcours__fil { display: flex; flex-wrap: wrap; gap: 6px; margin: 0; padding: 0; list-style: none; }
.parcours__puce { width: 28px; height: 8px; border-radius: var(--r-pill); background: var(--line); }
.parcours__puce--faite { background: var(--ok); }
.parcours__puce--passee { background: var(--warn); }
.parcours__puce--courante { background: var(--accent); }
.parcours__reponses form { margin: 0; }
/* Synthèse d'un séjour : tableau qui défile sur mobile, détail au toucher. */
.synthese__tableau { overflow-x: auto; }

.synthese__totaux td { border-top: 2px solid var(--line); }
.col--repas, .col--hebergement { border-left: 1px solid var(--line); }
.case-detail summary { cursor: pointer; list-style: none; }
.case-detail summary::-webkit-details-marker { display: none; }
.case-detail > span { display: block; max-width: 22ch; }
.bilan__total { border-top: 1px solid var(--line); padding-top: 6px; }

.lignes__compteur { display: inline-flex; align-items: center; gap: 4px; flex: 0 0 auto; }
.lignes__compte { min-width: 3.2ch; font-weight: 600; font-variant-numeric: tabular-nums; text-align: right; }

/* Lignes-phrases sans libellés (« Dès 3 plongée(s) : 40 € ») : centrées, cases étroites. */

.lignes__ligne > .input[name$="prix"] { flex: 0 0 8rem; }
.lignes__ligne .input[name="seuil"] { flex: 0 0 5rem; }


.logements__personne .logements__placer { margin-left: auto; flex-wrap: nowrap; }
.logements__placer .input, .logements__renommer .input { height: 36px; }
.logements__placer select.input { width: auto; max-width: 11rem; }
.souhait { padding-bottom: 1px; }
.souhait--reciproque { border-bottom: 2px solid var(--ok); }
.souhait--attente { border-bottom: 2px dashed var(--warn); }
.souhait--libre { font-style: italic; color: var(--ink-2); }
@media (max-width: 767.98px) {
  .logements__grille { grid-template-columns: minmax(0, 1fr); }
  .lignes__ligne { flex-wrap: wrap; }
}
.mois__evt-lien { display: flex; flex-direction: column; gap: 2px; color: inherit; text-decoration: none; min-width: 0; }

.mois__heure { font-weight: 700; margin-right: 2px; }
.mois__evt-titre { font-weight: 600; overflow-wrap: break-word; hyphens: auto; }
.pastille-sejour svg { width: 13px; height: 13px; flex: none; }
.mois__valise { width: 14px; height: 14px; margin-right: 3px; vertical-align: -2px; color: var(--ink-2); }
.mois__evt-etat { font-size: 11px; font-weight: 700; color: var(--warn); }
/* Pied : compteur (et club) à gauche, réponse ✓ / ✗ à droite. */
.mois__evt-pied { display: flex; flex-wrap: nowrap; align-items: center; gap: 6px; min-height: 28px; }
.mois__evt-infos { display: inline-flex; align-items: center; gap: 6px; min-width: 0; }
.mois__compte { display: inline-flex; align-items: center; gap: 3px; color: var(--ink-2); font-size: 11.5px; font-weight: 600; white-space: nowrap; }
.mois__compte svg { width: 13px; height: 13px; flex: none; }

/* Boutons ✓ / ✗ : les deux tant que rien n'est décidé, seul le choix sinon. */
.reponse { display: flex; gap: 4px; margin-left: auto; }
.reponse form { margin: 0; }
.reponse__btn { display: inline-grid; place-items: center; width: 24px; height: 24px; padding: 0; border: 1px solid var(--line); border-radius: var(--r-ctl); background: var(--surface); cursor: pointer; transition: transform 150ms var(--ease-out), background-color 150ms var(--ease-out); }
.reponse__btn svg { width: 14px; height: 14px; }
.reponse__btn:active { transform: scale(0.94); }
.reponse__btn:focus-visible { outline: 2px solid var(--accent); outline-offset: 1px; }
.reponse__btn--oui { color: var(--ok); }
.reponse__btn--non { color: var(--danger); }
@media (hover: hover) and (pointer: fine) {
  .reponse__btn--oui:hover { border-color: var(--ok); background: var(--ok-soft); }
}
@media (hover: hover) and (pointer: fine) {
  .reponse__btn--non:hover { border-color: var(--danger); background: var(--danger-soft); }
}
.reponse__btn--choisi.reponse__btn--oui { background: var(--ok); border-color: var(--ok); color: var(--surface); }
.reponse__btn--choisi.reponse__btn--non { background: var(--danger); border-color: var(--danger); color: var(--surface); }
.reponse__btn--attente { background: var(--warn); border-color: var(--warn); color: var(--surface); }
.reponse__btn:disabled { opacity: 0.6; cursor: progress; }
@media (hover: none) { .reponse__btn { width: 40px; height: 40px; } .reponse__btn svg { width: 18px; height: 18px; } }
.calendrier__legende { display: flex; flex-wrap: wrap; gap: 4px 16px; margin: 0 0 8px; }
.calendrier__legende span { display: inline-flex; align-items: center; gap: 4px; white-space: nowrap; }
.calendrier__legende svg { width: 14px; height: 14px; }



/* Liste du mois en cours : activités passées masquées tant que la case
   « Passées », à droite de la première semaine visible, n'est pas cochée. */
.calendrier__semaine-tete { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.calendrier__semaine-tete .day-head { padding-top: 0; }
.calendrier__passees { display: inline-flex; align-items: center; min-height: 28px; padding: 0 12px; border: 1px solid var(--line); border-radius: var(--r-pill); background: var(--surface); color: var(--ink-2); font-size: 12.5px; font-weight: 600; white-space: nowrap; cursor: pointer; user-select: none; -webkit-user-select: none; touch-action: manipulation; transition: transform 140ms var(--ease-out); }
.calendrier__passees:active { transform: scale(0.97); }

.calendrier__passees-masquer,
.calendrier:has(#voir-passees:checked) .calendrier__passees-voir,
.calendrier:has(#voir-passees:checked) .calendrier__passees--apres,
.calendrier:has(#voir-passees:not(:checked)) .calendrier__passees--avant { display: none; }

.calendrier:has(#voir-passees:not(:checked)) .event--passee { display: none; }

/* Cases de la carte du mois : 28 px avec la souris, 44 px au toucher (charte). */
.mois__evt .reponse { gap: 4px; align-items: center; }
.mois__evt .reponse__btn { width: 28px; height: 28px; border-color: transparent; background: var(--surface); }
.mois__evt .reponse__btn--choisi.reponse__btn--oui { background: var(--ok-soft); border-color: transparent; color: var(--ok); }
.mois__evt .reponse__btn--choisi.reponse__btn--non { background: var(--danger-soft); border-color: transparent; color: var(--danger); }
.mois__evt .reponse__btn--attente { background: var(--warn-soft); border-color: transparent; color: var(--warn); }
.mois__evt .reponse__btn:has(.reponse__fleche) { width: auto; padding: 0 5px; grid-auto-flow: column; gap: 1px; }
.mois__evt .reponse__fleche { width: 11px; height: 11px; opacity: 0.8; }
.reponse__complet { font-size: 11.5px; font-weight: 700; color: var(--ink-2); white-space: nowrap; }
@media (hover: none), (max-width: 767.98px) {
  .mois__evt .reponse { gap: 12px; }
  .mois__evt .reponse__btn { width: 44px; height: 44px; }
  .mois__evt .reponse__btn:has(.reponse__fleche) { width: auto; min-width: 44px; padding: 0 8px; }
  .mois__evt .reponse__btn svg { width: 18px; height: 18px; }
  
}
@media (prefers-reduced-motion: reduce) { .mois__evt, .reponse__btn { transition: none; }  }

/* Liste : mêmes couleurs que les cartes du mois. Ligne neutre, barre à
   gauche = catégorie (quatre au plus), activités passées estompées. */
.event--cat-plongee { border-left: 4px solid var(--cat-plongee); }
.event--cat-apprendre { border-left: 4px solid var(--cat-apprendre); }
.event--cat-vie { border-left: 4px solid var(--cat-vie); }
.event--cat-autre { border-left: 4px solid var(--cat-autre); }
.event--passee { opacity: 0.55; }
.event { transition: opacity 220ms var(--ease-out); }
.event-side .reponse { position: relative; z-index: 1; margin-left: 0; }
/* Boutons ✓ / ✗ / ⏱ : ceux des cartes du mois (teinte douce, flèche). */
.event .reponse { gap: 4px; align-items: center; }
.event .reponse__btn { width: 32px; height: 32px; border-color: transparent; background: var(--surface-2); }
.event .reponse__btn--choisi.reponse__btn--oui { background: var(--ok-soft); color: var(--ok); }
.event .reponse__btn--choisi.reponse__btn--non { background: var(--danger-soft); color: var(--danger); }
.event .reponse__btn--attente { background: var(--warn-soft); color: var(--warn); }
.event .reponse__btn:has(.reponse__fleche) { width: auto; padding: 0 6px; grid-auto-flow: column; gap: 1px; }
.event .reponse__fleche { width: 11px; height: 11px; opacity: 0.8; }
@media (hover: none) {
  .event .reponse { gap: 12px; }
  .event .reponse__btn { width: 44px; height: 44px; }
  .event .reponse__btn:has(.reponse__fleche) { width: auto; min-width: 44px; padding: 0 8px; }
  .event .reponse__btn svg { width: 18px; height: 18px; }
  .event .reponse__btn .reponse__fleche { width: 12px; height: 12px; }
}
.event.mois__evt--maj .reponse__btn { animation: reponse-entree 180ms var(--ease-out); }

@media (max-width: 767.98px) {
  .mois__entetes { display: none; }
  .mois__semaine { display: block; }
  .mois__jour { min-height: 0; border-right: 0; }
  .mois__jour--vide,
  .mois__jour--hors { display: none; }
  
  
  /* Liste d'une colonne : titre et compteur à gauche, réponse à droite, même contenu que sur grand écran. */
  .mois__evt { display: grid; grid-template-columns: minmax(0, 1fr) auto; grid-template-areas: "lien rep" "infos rep"; align-items: center; column-gap: 10px; min-height: 56px; padding-right: 6px; font-size: 14px; }
  .mois__evt-lien { grid-area: lien; align-self: end; }
  
  .mois__evt-infos { grid-area: infos; align-self: start; }
  .mois__evt .reponse { grid-area: rep; }
}

/* Paramètres : choix de la couleur d'un type d'activité. */
.couleur-type { border: 0; padding: 0; margin: 0 0 16px; min-width: 0; }
.couleur-type__choix { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 6px; }
.couleur-type__option { display: inline-flex; align-items: center; gap: 6px; padding: 4px 10px 4px 6px; border: 1px solid var(--line); border-radius: var(--r-pill); background: var(--surface); cursor: pointer; font-size: 13.5px; }
.couleur-type__option input { position: absolute; opacity: 0; pointer-events: none; }
.couleur-type__option:has(input:checked) { border-color: var(--ink); box-shadow: inset 0 0 0 1px var(--ink); }
.couleur-type__option:has(input:focus-visible) { outline: 2px solid var(--accent); outline-offset: 2px; }

/* Messages courts (toasts) du calendrier. */
.toasts { position: fixed; right: 24px; bottom: 24px; z-index: 60; display: flex; flex-direction: column; align-items: flex-end; gap: 8px; pointer-events: none; }
.toast--error { border-left: 4px solid var(--danger); }
.toast--success { border-left: 4px solid var(--ok); }
.toast--warning { border-left: 4px solid var(--warn); }
@media (max-width: 767.98px) { .toasts { left: 16px; right: 16px; bottom: 88px; align-items: stretch; } }

/* Envoi d'un formulaire en cours (core/envoi.js) : le bouton répond tout de
   suite, puis « Envoi en cours… » si la page tarde. */
form[data-envoi-en-cours] :is(button, input)[type="submit"]:disabled { cursor: progress; }
form[data-envoi-en-cours] [aria-busy="true"] { opacity: 0.6; }
.toast__roue { flex: 0 0 16px; width: 16px; height: 16px; border: 2px solid currentColor; border-right-color: transparent; border-radius: 50%; animation: envoi-roue 700ms linear infinite; }
@keyframes envoi-roue { to { transform: rotate(360deg); } }
@media (prefers-reduced-motion: reduce) { .toast__roue { animation-duration: 2s; } }

/* Bandeau du mode « agir en tant que l'enfant ». */
.bandeau-agir { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 8px 16px; padding: 10px 16px; margin-bottom: 16px; border: 1px solid var(--accent); border-radius: var(--r-card); background: var(--accent-soft); color: var(--ink); font-size: 14px; }
.bandeau-agir form { margin: 0; }

/* ---- Matériel (parc, fiche d'une pièce, suivi, affectation) ---- */
.materiel .card p,
.materiel .card ul {
  margin: 0;
}

/* Barre de filtres : Compact ou Complet ; vide = Compact sur téléphone, Complet sur ordinateur. */
.materiel-entete-modes {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: flex-end;
  gap: 8px;
}

.materiel-style {
  margin: 0;
}

/* Aucun choix enregistré : le style appliqué (Compact sur téléphone, Complet sur
   ordinateur) est mis en évidence sans être enregistré. */
.materiel-style[data-style=""] .seg button[value="compact"] {
  background: var(--surface);
  color: var(--ink);
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.12);
}

@media (min-width: 768px) {
  .materiel-style[data-style=""] .seg button[value="compact"] {
    background: transparent;
    color: var(--ink-2);
    box-shadow: none;
  }

  .materiel-style[data-style=""] .seg button[value="complet"] {
    background: var(--surface);
    color: var(--ink);
    box-shadow: 0 1px 2px rgba(0, 0, 0, 0.12);
  }
}

.materiel-barre .materiel-compact {
  display: flex;
}

.materiel-barre .materiel-complet {
  display: none;
}

.materiel-barre[data-style="complet"] .materiel-compact {
  display: none;
}

.materiel-barre[data-style="complet"] .materiel-complet {
  display: block;
}

.materiel-barre[data-style="compact"] .materiel-compact {
  display: flex;
}

.materiel-barre[data-style="compact"] .materiel-complet {
  display: none;
}

@media (min-width: 768px) {
  .materiel-barre[data-style=""] .materiel-compact {
    display: none;
  }

  .materiel-barre[data-style=""] .materiel-complet {
    display: block;
  }
}

.materiel-compact {
  align-items: center;
  flex-wrap: nowrap;
  gap: 8px;
}

.materiel-compact .materiel-recherche {
  flex: 1;
  min-width: 0;
}

.materiel-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  min-width: 0;
  margin-left: auto;
}

.materiel-action--icone {
  width: 40px;
  padding: 0;
}

.materiel-long {
  display: none;
}

@media (min-width: 640px) {
  .materiel-long {
    display: inline;
  }
}

@media (max-width: 639.98px) {
  .materiel-compact {
    flex-wrap: wrap;
  }

  .materiel-compact .materiel-recherche {
    flex-basis: 100%;
    order: 3;
  }

  .materiel-actions {
    margin-left: 0;
    flex: 1;
    justify-content: flex-end;
  }
}

/* Mode gestion : beaucoup d'actions, la recherche passe sur sa ligne jusqu'à 900 px. */
@media (min-width: 640px) and (max-width: 899.98px) {
  .materiel-compact--gestion {
    flex-wrap: wrap;
  }

  .materiel-compact--gestion .materiel-recherche {
    flex-basis: 100%;
    order: 3;
  }

  .materiel-compact--gestion .materiel-actions {
    margin-left: 0;
    flex: 1;
    justify-content: flex-end;
  }
}

.materiel-recherche {
  margin: 0;
}

.materiel-emoji {
  font-size: 18px;
  line-height: 1;
}

/* Menus déroulants : <details>, sans script. */
.materiel-menu {
  position: relative;
}

.materiel-menu > summary {
  list-style: none;
  cursor: pointer;
  touch-action: manipulation;
}

.materiel-menu > summary::-webkit-details-marker {
  display: none;
}

.materiel-menu__liste {
  position: absolute;
  z-index: 40;
  top: calc(100% + 6px);
  left: 0;
  display: flex;
  flex-direction: column;
  min-width: 220px;
  padding: 6px;
  border: 1px solid var(--line);
  border-radius: var(--r-card);
  background: var(--surface);
  box-shadow: var(--shadow-pop);
  transform-origin: top left;
  animation: materiel-menu-entree 160ms var(--ease-out);
}

.materiel-menu--plus .materiel-menu__liste {
  left: auto;
  right: 0;
  transform-origin: top right;
}

.materiel-menu__liste a,
.materiel-menu__liste button {
  display: flex;
  align-items: center;
  gap: 10px;
  min-height: 44px;
  padding: 10px;
  border: 0;
  border-radius: var(--r-ctl);
  background: transparent;
  color: var(--ink);
  font: inherit;
  font-size: 14px;
  font-weight: 600;
  text-align: left;
  text-decoration: none;
  cursor: pointer;
  touch-action: manipulation;
}

.materiel-menu__liste [aria-current="true"] {
  background: var(--accent-soft);
  color: var(--accent-text);
}

.materiel-menu__nombre {
  margin-left: auto;
  font-variant-numeric: tabular-nums;
  font-weight: 600;
  color: var(--ink-3);
}

.materiel-menu__liste [aria-current="true"] .materiel-menu__nombre {
  color: inherit;
}

.materiel-menu__liste a:focus-visible,
.materiel-menu__liste button:focus-visible,
.materiel-menu > summary:focus-visible,
.materiel-tuiles a:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
}

@keyframes materiel-menu-entree {
  from {
    opacity: 0;
    transform: scale(0.96);
  }
}

/* Complet : une tuile par type, puis la barre de recherche et d'actions. */
.materiel-tuiles {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(92px, 1fr));
  gap: 8px;
  margin-bottom: 12px;
}

.materiel-tuiles a {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
  padding: 10px 6px;
  border: 1px solid var(--line);
  border-radius: var(--r-card);
  background: var(--surface);
  color: var(--ink-2);
  font-size: 13px;
  text-align: center;
  text-decoration: none;
  touch-action: manipulation;
  transition: transform 140ms var(--ease-out);
}

.materiel-tuiles a:active {
  transform: scale(0.97);
}

.materiel-tuiles a b {
  font-weight: 600;
}

.materiel-tuiles .materiel-emoji {
  font-size: 24px;
}

.materiel-tuiles small {
  font-size: 12px;
  color: var(--ink-3);
}

.materiel-tuiles a[aria-current="true"] {
  border-color: var(--accent);
  background: var(--accent-soft);
  color: var(--accent-text);
}

.materiel-tuiles a[aria-current="true"] small {
  color: inherit;
}

.materiel-complet__barre {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
}

.materiel-complet__barre .materiel-recherche {
  flex: 1;
  min-width: 160px;
}

@media (hover: hover) and (pointer: fine) {
  .materiel-menu__liste a:hover,
  .materiel-menu__liste button:hover {
    background: var(--surface-2);
  }

  .materiel-menu__liste [aria-current="true"]:hover {
    background: var(--accent-soft);
  }
}

/* Cibles de 44 px au doigt. */
@media (pointer: coarse) {
  .materiel-barre a,
  .materiel-barre button,
  .materiel-barre summary,
  .materiel-barre .input,
  .materiel-entete-modes a,
  .materiel-entete-modes button {
    min-height: 44px;
  }

  .materiel-action--icone {
    width: 44px;
  }
}

@media (prefers-reduced-motion: reduce) {
  .materiel-menu__liste {
    animation: none;
  }

  .materiel-tuiles a:active {
    transform: none;
  }
}

.materiel-tableau {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

/* Une carte par pièce sur téléphone ; le tableau prend le relais au-delà. */
.materiel-cartes {
  display: none;
  margin: 0;
  padding: 0;
  list-style: none;
  flex-direction: column;
  gap: 10px;
}

.materiel-carte {
  position: relative;
  display: flex;
  flex-direction: column;
  gap: 6px;
  padding: 14px 16px;
  border: 1px solid var(--line);
  border-radius: var(--r-card);
  background: var(--surface);
}

.materiel-carte__haut {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.materiel-carte__numero {
  font-family: var(--font-display);
  font-weight: var(--display-weight);
  font-size: 18px;
  font-variant-numeric: tabular-nums;
}

.materiel-carte__numero a {
  color: var(--ink);
  text-decoration: none;
}

/* Toute la carte ouvre la fiche (gestionnaire). */
.materiel-carte--lien .materiel-carte__numero a::after {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: inherit;
}

.materiel-carte--lien {
  transition: transform 140ms var(--ease-out);
}

.materiel-carte--lien:active {
  transform: scale(0.99);
}

.materiel-carte--lien:has(a:focus-visible) {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
}

.materiel-carte__numero a:focus-visible {
  outline: none;
}

.materiel-detenteur,
.materiel-affectation__qui {
  display: flex;
  align-items: center;
  gap: 8px;
  min-width: 0;
}

.materiel-detenteur__texte {
  display: flex;
  flex-direction: column;
  min-width: 0;
  font-size: 14px;
  overflow-wrap: anywhere;
}

/* Fiche d'une pièce : titre et pastille d'état sur une ligne. */
.materiel-fiche__titre {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 8px 12px;
}

.materiel-calendrier,
.materiel-liste {
  margin: 0;
  padding: 0;
  list-style: none;
}

.materiel-affectation {
  display: grid;
  grid-template-columns: minmax(0, 13rem) minmax(0, 1fr) auto;
  align-items: center;
  gap: 8px 16px;
  padding: 12px 0;
  border-top: 1px solid var(--line);
}

.materiel-affectation:first-child,
.materiel-liste__ligne:first-child {
  border-top: 0;
}

.materiel-affectation__etat {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  flex-wrap: wrap;
  gap: 8px;
}

.materiel-liste__ligne {
  border-top: 1px solid var(--line);
}

.materiel-liste__lien {
  display: grid;
  grid-template-columns: minmax(0, 10rem) minmax(0, 1fr) auto;
  align-items: center;
  gap: 8px 16px;
  min-height: 44px;
  padding: 12px 0;
  color: var(--ink);
  text-decoration: none;
  touch-action: manipulation;
}

.materiel-liste__lien:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
  border-radius: var(--r-ctl);
}

/* Affecter : une colonne, les deux dates côte à côte dès qu'il y a la place. */
.materiel-motif {
  border: 0;
  margin: 0;
  padding: 0;
  min-width: 0;
}

.materiel-periode {
  border: 0;
  margin: 0;
  padding: 0;
  min-width: 0;
}

.materiel-periode legend {
  padding: 0;
  margin-bottom: var(--space-2);
  font-weight: 600;
}

.materiel-motif .seg--choix label {
  flex: 1 1 auto;
}

.materiel-motif .seg--choix span {
  justify-content: center;
  width: 100%;
  min-height: 40px;
}

.materiel-dates {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
}

.materiel [data-pour-motif] {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.materiel .materiel-dates[data-pour-motif] {
  display: grid;
}

.materiel [data-pour-motif][hidden] {
  display: none;
}

.materiel-prix {
  display: flex;
  gap: 8px;
}

.materiel-prix .input {
  flex: 1;
  font-variant-numeric: tabular-nums;
}

.materiel-prix .button-secondary {
  flex: none;
}

.materiel-affecter__actions {
  display: flex;
  justify-content: flex-end;
  gap: 10px;
}

/* Réservations : « Réserver » passe au-dessus du lien qui couvre la carte. */
.materiel-carte__reserver {
  position: relative;
  z-index: 1;
  align-self: flex-start;
  margin-top: 4px;
}

.materiel-tableau__actions {
  display: inline-flex;
  justify-content: flex-end;
  gap: 8px;
}

.materiel-affectation__etat form {
  margin: 0;
}

.materiel-occupee {
  display: flex;
  flex-direction: column;
  gap: 4px;
  padding: 12px 16px;
  border-radius: var(--r-ctl);
  background: var(--surface-2);
}

.materiel-occupee__titre {
  font-size: 13px;
  font-weight: 600;
  color: var(--ink-2);
}

.materiel-occupee__liste,
.materiel-tarifs {
  display: flex;
  flex-direction: column;
  gap: 4px;
  margin: 0;
  padding: 0;
  list-style: none;
  font-size: 14px;
}

.materiel-tarifs li {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  padding: 8px 0;
  border-top: 1px solid var(--line);
}

.materiel-tarifs li:first-child {
  border-top: 0;
}

.materiel-prix-indicatif {
  display: flex;
  align-items: baseline;
  flex-wrap: wrap;
  gap: 4px 8px;
}

.materiel-note {
  margin-top: 8px;
}

@media (hover: hover) and (pointer: fine) {
  .materiel-carte--lien:hover,
  .materiel-liste__lien:hover {
    background: var(--surface-2);
  }

  .materiel-carte--lien,
  .materiel-liste__lien {
    transition: background-color 120ms ease, transform 140ms var(--ease-out);
  }
}

@media (max-width: 767.98px) {
  .materiel-cartes {
    display: flex;
  }

  .materiel-tableau {
    display: none;
  }

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

  .materiel-liste__piece {
    grid-column: 1 / -1;
  }

  /* Dates, personne, puis l'état et « Restituer » sur leur propre ligne. */
  .materiel-affectation {
    grid-template-columns: minmax(0, 1fr);
  }

  .materiel-affectation__etat {
    justify-content: space-between;
  }

  /* Le bouton principal en pleine largeur, à portée de pouce. */
  .materiel-affecter__actions {
    flex-direction: column-reverse;
  }

  .materiel-affecter__actions > * {
    width: 100%;
  }
}

/* Cibles de 44 px au doigt. */
@media (pointer: coarse) {
  .materiel-affectation__restituer,
  .materiel-affectation__action,
  .materiel-carte__reserver,
  .materiel-motif .seg--choix span {
    min-height: 44px;
  }
}

@media (max-width: 419.98px) {
  .materiel-dates {
    grid-template-columns: minmax(0, 1fr);
  }
}

@media (prefers-reduced-motion: reduce) {
  .materiel-carte--lien:active {
    transform: none;
  }
}

/* ---- Actualités du club ---- */
.actualite {
  display: flex;
  flex-direction: column;
  gap: 8px;
  scroll-margin-top: 16px;
}

.actualite p {
  margin: 0;
}

.actualite__corps {
  color: var(--ink);
  overflow-wrap: anywhere;
}

.actualite__corps p + p {
  margin-top: 8px;
}

textarea.actualite-corps {
  height: auto;
  min-height: 140px;
  padding: 10px 12px;
  line-height: 1.45;
  resize: vertical;
}

/* ---- Sondages du club ---- */
.sondage-carte {
  flex-direction: row;
  align-items: center;
  gap: 6px;
}

.sondage-carte__lien {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 6px;
  color: inherit;
  text-decoration: none;
  touch-action: manipulation;
  -webkit-tap-highlight-color: transparent;
  transition: transform 140ms cubic-bezier(0.23, 1, 0.32, 1);
}

.sondage-carte__lien:active {
  transform: scale(0.98);
}

/* Crayon : zone tactile de 44 px, retour à l'appui. */
.sondage-modifier {
  flex: none;
  padding: 0;
  border: 0;
  background: none;
  cursor: pointer;
  display: grid;
  place-items: center;
  width: 44px;
  height: 44px;
  border-radius: 10px;
  color: var(--ink-2);
  touch-action: manipulation;
  -webkit-tap-highlight-color: transparent;
}

.sondage-modifier:active {
  transform: scale(0.97);
  background: var(--surface-2);
}

.sondage-modifier:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
}

@media (hover: hover) and (pointer: fine) {
  .sondage-carte:hover {
    border-color: var(--accent);
  }

  .sondage-modifier:hover {
    background: var(--surface-2);
    color: var(--ink);
  }
}

/* Barre du haut : retour à gauche, réglages et « + » à droite (tous écrans). */
.sondages-barre {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  margin-bottom: 0.4rem;
}

.sondages-barre .back-link {
  margin: 0;
}

.sondages-barre__actions {
  display: flex;
  align-items: center;
  gap: 8px;
}

.sondages-plus {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex: none;
  width: 44px;
  height: 44px;
  border-radius: 999px;
  background: var(--accent);
  color: var(--accent-ink);
  touch-action: manipulation;
  transition: transform 120ms cubic-bezier(0.23, 1, 0.32, 1);
}

.sondages-plus:active {
  transform: scale(0.95);
}

.sondages-plus .icone {
  width: 1.4rem;
  height: 1.4rem;
}

/* Côté droit d'une carte : crayon et corbeille, puis le nombre de votes en
   dessous, répartis en trois espaces égaux (tiers). */
.sondage-carte__cote {
  align-self: stretch;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: space-evenly;
}

.sondage-carte__actions {
  display: flex;
  align-items: center;
}

.sondage-carte__votes {
  white-space: nowrap;
}

.sondage__statut {
  margin: 0;
}

.sondage-options {
  display: flex;
  flex-direction: column;
  gap: 14px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.sondage-option form {
  margin: 0;
}

.sondage-choix {
  position: relative;
  display: grid;
  grid-template-columns: 28px 1fr;
  grid-template-areas: "coche libelle" ". total";
  column-gap: 12px;
  row-gap: 2px;
  align-items: center;
  width: 100%;
  min-height: 56px;
  padding: 10px 14px;
  overflow: hidden;
  border: 1.5px solid var(--line);
  border-radius: var(--r-ctl);
  background: var(--surface);
  color: var(--ink);
  font: inherit;
  text-align: left;
  cursor: pointer;
  touch-action: manipulation;
  user-select: none;
  -webkit-user-select: none;
  -webkit-tap-highlight-color: transparent;
  transition: transform 140ms cubic-bezier(0.23, 1, 0.32, 1);
}

.sondage-choix:active:not(:disabled) {
  transform: scale(0.98);
}

.sondage-choix:disabled {
  cursor: default;
}

/* Envoi en cours : les options ne répondent plus, le curseur le dit. */
.sondage-options.is-envoi .sondage-choix {
  cursor: progress;
}

.sondage-choix:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
}

@media (hover: hover) and (pointer: fine) {
  .sondage-choix:hover:not(:disabled) {
    border-color: var(--accent);
  }
}

/* Barre de proportion : un calque pleine largeur réduit par `scaleX`. */
.sondage-choix__barre {
  position: absolute;
  inset: 0;
  background: var(--accent-soft);
  transform-origin: left center;
  transform: scaleX(calc(var(--part, 0) / 100));
  animation: sondage-barre 420ms cubic-bezier(0.23, 1, 0.32, 1) both;
  pointer-events: none;
}

@keyframes sondage-barre {
  from {
    transform: scaleX(0);
  }
}

.sondage-choix__coche,
.sondage-choix__libelle,
.sondage-choix__total {
  position: relative;
}

.sondage-choix__coche {
  grid-area: coche;
  width: 24px;
  height: 24px;
  border: 2px solid var(--line);
  border-radius: 50%;
  background: var(--surface);
  display: grid;
  place-items: center;
}

.sondage-choix__libelle {
  grid-area: libelle;
  font-size: 16px;
  font-weight: 600;
  overflow-wrap: anywhere;
}

.sondage-choix__total {
  grid-area: total;
  font-size: 13px;
  color: var(--ink-2);
  font-variant-numeric: tabular-nums;
}

/* État « choisi » : bordure et pastille pleines, pas seulement une teinte. */
.sondage-option.is-choisie .sondage-choix {
  border-color: var(--accent);
  box-shadow: 0 0 0 1px var(--accent);
}

.sondage-option.is-choisie .sondage-choix__coche {
  border-color: var(--accent);
  background: var(--accent);
}

.sondage-option.is-choisie .sondage-choix__coche::after {
  content: "";
  width: 6px;
  height: 11px;
  margin-top: -2px;
  border: solid var(--surface);
  border-width: 0 2px 2px 0;
  transform: rotate(45deg);
}

.sondage-votants {
  margin: 6px 4px 0;
  font-size: 13px;
  line-height: 1.5;
  color: var(--ink-2);
  overflow-wrap: anywhere;
}

.sondage-champs {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.sondage-champs__ligne .input {
  font-size: 16px;
}

.sondage-ajout {
  align-self: flex-start;
  min-height: 44px;
}

.sondage-ajout[hidden] {
  display: none;
}

@media (min-width: 900px) {
  .sondage {
    max-width: 860px;
  }

  .sondage-choix {
    grid-template-columns: 28px 1fr auto;
    grid-template-areas: "coche libelle total";
    min-height: 52px;
  }
}

@media (prefers-reduced-motion: reduce) {
  .sondage-choix__barre {
    animation: none;
  }

  .sondage-choix:active:not(:disabled),
  .sondage-carte__lien:active,
  .sondages-plus:active,
  .sondage-modifier:active {
    transform: none;
  }
}

/* ---- Mes données (export et effacement, spec §33) : une colonne, centrée
   et étroite sur ordinateur ; cibles de 44 px, champs de 16 px sur téléphone. ---- */
.mes-donnees {
  max-width: 40rem;
  margin-inline: auto;
  display: flex;
  flex-direction: column;
  gap: var(--gap, 20px);
}

.mes-donnees__action {
  align-self: stretch;
  min-height: 44px;
  touch-action: manipulation;
}

.mes-donnees__danger {
  border-color: var(--danger);
}



.mes-donnees__sous-titre {
  margin: 0 0 6px;
  font-size: 14px;
  font-weight: 700;
  color: var(--ink);
}

.mes-donnees__liste {
  margin: 0;
  padding-left: 1.1rem;
  display: grid;
  gap: 4px;
  font-size: 14px;
  color: var(--ink-2);
}

.mes-donnees__erreur {
  color: var(--danger);
  font-size: 14px;
  font-weight: 600;
}

.mes-donnees__dialogue form {
  display: grid;
  gap: 12px;
}

.mes-donnees__dialogue .input {
  font-size: 16px;
  min-height: 44px;
}

.mes-donnees__dialogue .confirm-dialog__actions .button-secondary,
.mes-donnees__dialogue .confirm-dialog__actions .button-danger {
  min-height: 44px;
}

.mes-donnees__dialogue .confirm-dialog__card {
  padding-bottom: calc(1.5rem + env(safe-area-inset-bottom, 0px));
}




/* ---- Paramètres : navigation à gauche, un panneau par catégorie ---- */
/* Valeurs : docs/ui/prototype-parametres.html. Sans JavaScript (pas de
   data-parametres-pret), tous les panneaux restent affichés. */
.parametres [hidden] {
  display: none !important;
}

.parametres__disposition {
  display: grid;
  grid-template-columns: 260px minmax(0, 1fr);
  align-items: start;
  gap: 28px;
}

.parametres__disposition > * {
  min-width: 0;
}

.parametres__nav {
  position: sticky;
  top: 16px;
  display: flex;
  flex-direction: column;
  gap: 12px;
}







.parametres__recherche .icone {
  position: absolute;
  left: 11px;
  top: 12px;
  width: 16px;
  height: 16px;
  color: var(--ink-2);
  pointer-events: none;
}

.parametres__recherche .input {
  width: 100%;
  height: 40px;
  padding: 0 34px 0 34px;
  font-size: 16px;
}

.parametres__recherche kbd {
  position: absolute;
  right: 10px;
  top: 10px;
  padding: 0 5px;
  border: 1px solid var(--line);
  border-radius: 4px;
  color: var(--ink-2);
  font: 12px var(--font-body);
}

.parametres__cats,
.parametres__souscats {
  margin: 0;
  padding: 0;
  list-style: none;
}

.parametres__cats {
  display: grid;
  gap: 2px;
}

.parametres__cat {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 8px 10px;
  border-radius: var(--r-ctl);
  color: var(--ink-2);
  font-weight: 600;
  text-decoration: none;
  transition: background-color 120ms ease, color 120ms ease;
}

.parametres__cat[aria-current="true"] {
  background: var(--accent-soft);
  color: var(--ink);
}

.parametres__ico {
  display: grid;
  flex: none;
  place-items: center;
  width: 28px;
  height: 28px;
  border-radius: 7px;
  background: var(--surface-2);
}

.parametres__ico .icone {
  width: 18px;
  height: 18px;
}





.parametres__modif {
  width: 7px;
  height: 7px;
  margin-left: auto;
  border-radius: 50%;
  background: var(--warn);
  opacity: 0;
  transition: opacity 150ms ease;
}



.parametres__souscats {
  display: none;
  margin: 2px 0 6px 48px;
}

.parametres__cat[aria-current="true"] + .parametres__souscats:not(:empty) {
  display: grid;
}

.parametres__souscats a {
  display: block;
  padding: 3px 0;
  color: var(--ink-2);
  font-size: 13px;
  text-decoration: none;
}

.parametres__souscats a.est-actif {
  color: var(--accent);
  font-weight: 600;
}

@media (hover: hover) and (pointer: fine) {
  .parametres__cat:hover {
    background: var(--surface-2);
    color: var(--ink);
  }

  .parametres__souscats a:hover {
    color: var(--ink);
  }
}

/* Panneaux : un seul à la fois une fois le JavaScript prêt ; pendant une
   recherche, tous ceux qui ont un résultat. */
[data-parametres-pret] .parametres__panneau {
  display: none;
}

[data-parametres-pret] .parametres__panneau.est-actif {
  display: flex;
  animation: parametres-entree 160ms var(--ease-out);
}





@keyframes parametres-entree {
  from {
    opacity: 0;
    transform: translateY(4px);
  }
}

.parametres__panneau {
  flex-direction: column;
  gap: 16px;
}

.parametres__tete h2,
.parametres__tete p {
  margin: 0;
}

.parametres__tete p {
  margin-top: 2px;
  font-size: 14px;
}

.parametres__bloc {
  display: flex;
  flex-direction: column;
  gap: 16px;
  min-width: 0;
}



.parametres__aucun {
  padding: 40px;
  text-align: center;
}

.parametres__saut {
  display: none;
}

/* Réglages en lignes : libellé et aide à gauche, contrôle à droite */
.reglages__groupe {
  gap: 4px;
}

.reglages__groupe h3,
.reglages__groupe p {
  margin: 0;
}

.reglages__grille {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  column-gap: 36px;
}

.reglage-ligne {
  position: relative;
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  column-gap: 14px;
  min-height: 52px;
  padding: 6px 0;
  border-bottom: 1px solid var(--line);
}

.reglage-ligne.est-trouve {
  background: var(--accent-soft);
}



.reglage-ligne__l {
  display: flex;
  flex-direction: column;
  gap: 1px;
  min-width: 0;
}

.reglage-ligne__t {
  font-size: 14.5px;
  font-weight: 600;
}

.reglage-ligne__aide {
  color: var(--ink-3);
  font-size: 12.5px;
  line-height: 1.35;
}

.reglage-ligne__erreur {
  grid-column: 1 / -1;
}

.reglage-ligne--bascule {
  cursor: pointer;
  -webkit-user-select: none;
  user-select: none;
}

.reglage-ligne--bascule .toggle__case {
  position: absolute;
  right: 0;
  top: 50%;
  width: 38px;
  height: 22px;
  margin: -11px 0 0;
  opacity: 0;
  pointer-events: none;
}

/* 16 px : pas de zoom automatique d'iOS au focus. */
.reglage-ligne .input {
  height: 36px;
  padding: 0 10px;
  font-size: 16px;
}

.reglage-ligne input[type="number"] {
  width: 84px;
  text-align: right;
  font-variant-numeric: tabular-nums;
  -moz-appearance: textfield;
  appearance: textfield;
}

/* Pas de flèches d'incrément : on tape la valeur. */
.reglage-ligne input[type="number"]::-webkit-inner-spin-button,
.reglage-ligne input[type="number"]::-webkit-outer-spin-button {
  -webkit-appearance: none;
  margin: 0;
}

.reglage-ligne select.input {
  width: auto;
  min-width: 150px;
  max-width: 100%;
  padding-right: 28px;
  appearance: auto;
}

.reglage-ligne--large .input {
  width: 260px;
}

.reglage-ligne--large select.input {
  width: 260px;
  min-width: 0;
}

@media (min-width: 861px) {
  .reglages__grille:not(.reglages__grille--colonne) {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  
}

/* Nombre suivi de son unité, dans un cadre commun : « 30 jours » */
.reglage-ligne__nombre {
  display: inline-flex;
  align-items: center;
  border: 1px solid var(--line);
  border-radius: var(--r-ctl);
  background: var(--surface);
}



.reglage-ligne .reglage-ligne__nombre .input {
  width: 56px;
  height: 34px;
  padding: 0 6px;
  border: 0;
  background: none;
  outline: none;
}

.reglage-ligne__unite {
  padding-right: 10px;
  color: var(--ink-2);
  font-size: 13px;
}

/* Les listes gardent leur largeur naturelle : « Organisateur et responsables » reste lisible */
.reglage-ligne select.input {
  flex: none;
}

/* Aide courte au-dessus, détail replié, avertissement en rouge */
.reglages__aide {
  margin: 0;
  color: var(--ink-2);
}

.reglages__aide summary {
  display: inline;
  color: var(--accent);
  font-weight: 600;
  cursor: pointer;
  list-style: none;
}

.reglages__aide summary::-webkit-details-marker {
  display: none;
}

.reglages__aide[open] p {
  margin: 6px 0 0;
  padding: 10px 12px;
  border-radius: var(--r-ctl);
  background: var(--surface-2);
}

.reglages__avertissement {
  color: var(--danger);
  font-weight: 600;
}

/* Sections : tuiles à bascule */
.reglages__tuiles {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
  gap: 10px;
  margin: 8px 0;
}

.reglage-tuile {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 10px 12px;
  border: 1px solid var(--line);
  border-radius: var(--r-ctl);
  cursor: pointer;
  -webkit-user-select: none;
  user-select: none;
  transition: border-color 150ms ease, background-color 150ms ease;
}

.reglage-tuile:has(:checked) {
  border-color: var(--accent);
  background: var(--accent-soft);
}

.reglage-tuile.est-trouve {
  background: var(--accent-soft);
}

.reglage-tuile__l {
  flex: 1;
  min-width: 0;
}

.reglage-tuile__t {
  font-size: 14px;
}

.reglage-tuile small {
  display: block;
  color: var(--ink-2);
  font-size: 12px;
}

.reglage-tuile .toggle__case {
  position: absolute;
  inset: 0;
  z-index: 1;
  width: 100%;
  height: 100%;
  margin: 0;
  opacity: 0;
  cursor: pointer;
}

/* Le crayon passe au-dessus de la case invisible qui couvre la tuile. */
.reglage-tuile__crayon {
  position: relative;
  z-index: 2;
  flex: none;
  display: grid;
  place-items: center;
  width: 36px;
  height: 36px;
  padding: 0;
  border: 0;
  border-radius: var(--r-ctl);
  background: none;
  color: var(--ink-2);
  cursor: pointer;
  transition: background-color 150ms ease, color 150ms ease;
}

.reglage-tuile__crayon .icone {
  width: 16px;
  height: 16px;
}



@media (hover: hover) {
  .reglage-tuile__crayon:hover {
    background: var(--surface-2);
    color: var(--ink);
  }
}

.reglage-tuile__crayon:active {
  transform: scale(0.94);
}

.reglage-tuile--nom {
  cursor: default;
}

.reglage-tuile__t {
  overflow-wrap: anywhere;
}

/* Tableau « Par type d'activité » */
.parametres .table-wrap.reglages-tableau,
.parametres .card > .table-wrap {
  overflow-x: auto;
  border: 0;
  border-top: 1px solid var(--line);
  border-radius: 0;
  background: none;
}

.reglages-types th,
.reglages-types td {
  white-space: nowrap;
}

.reglages-types tbody th {
  position: sticky;
  left: 0;
  background: var(--surface);
  font-size: 14px;
  font-weight: 600;
  letter-spacing: 0;
  text-transform: none;
  color: var(--ink);
}

.reglages-types select.input {
  width: auto;
  max-width: 150px;
  height: 34px;
  padding: 0 22px 0 8px;
  font-size: 14px;
}

/* 16 px au doigt : sur iPhone, un champ sous 16 px fait zoomer la page, qui ne
   dézoome plus (la règle générale ne suffit pas, .input hérite du tableau). */
@media (pointer: coarse) {
  .reglages-types select.input {
    font-size: 16px;
  }
}

.reglages-types .cellule-double {
  display: flex;
  align-items: center;
  gap: 8px;
}

.reglages-types .switch-cellule {
  position: relative;
  display: flex;
  flex: none;
}

.reglages-types .switch-cellule .toggle__case {
  position: absolute;
  inset: 0;
  z-index: 1;
  width: 100%;
  height: 100%;
  margin: 0;
  opacity: 0;
  pointer-events: auto;
  cursor: pointer;
}

/* Couleurs des quatre catégories, au-dessus du tableau : nom à gauche,
   teintes à droite ; deux colonnes sur grand écran. */
.couleurs-categories {
  margin: 16px 0 20px;
  padding: 14px 16px;
  border: 1px solid var(--line);
  border-radius: var(--r-ctl);
  background: var(--surface-2);
}

.couleurs-categories__titre {
  margin: 0 0 2px;
  font-size: 15px;
  font-weight: 700;
}

.couleurs-categories__grille {
  display: grid;
  grid-template-columns: 1fr;
  gap: 10px 32px;
  margin-top: 12px;
}

@media (min-width: 900px) {
  .couleurs-categories__grille { grid-template-columns: 1fr 1fr; }
}

.couleur-categorie {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 4px 16px;
  min-height: 44px;
}

.couleur-categorie__nom {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
}

.couleur-categorie__nom .pastille-type {
  width: 4px;
  height: 18px;
  border-radius: 2px;
}

.couleur-categorie__saisie {
  display: inline-flex;
  align-items: center;
  gap: 10px;
}

.couleur-categorie__hex {
  font-variant-numeric: tabular-nums;
  text-transform: uppercase;
}

/* Nuancier natif : une pastille ronde de 32 px, cible tactile de 44 px. */
.couleur-categorie__nuancier {
  width: 44px;
  height: 44px;
  padding: 6px;
  border: 0;
  background: none;
  cursor: pointer;
  -webkit-appearance: none;
  appearance: none;
}

.couleur-categorie__nuancier::-webkit-color-swatch-wrapper { padding: 0; }
.couleur-categorie__nuancier::-webkit-color-swatch {
  border: 1px solid var(--line);
  border-radius: 50%;
}
.couleur-categorie__nuancier::-moz-color-swatch {
  border: 1px solid var(--line);
  border-radius: 50%;
}

.couleur-categorie__nuancier:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 0;
  border-radius: 50%;
}

/* Colonne Catégorie : la pastille suit la catégorie choisie, sans JS. */
.reglages-types .categorie-cellule {
  display: flex;
  align-items: center;
  gap: 8px;
}

.reglages-types .categorie-cellule .pastille-type {
  flex: none;
  width: 12px;
  height: 12px;
  --c: var(--cat-autre);
}

.categorie-cellule:has(option[value="plongee"]:checked) .pastille-type { --c: var(--cat-plongee); }
.categorie-cellule:has(option[value="apprendre"]:checked) .pastille-type { --c: var(--cat-apprendre); }
.categorie-cellule:has(option[value="vie"]:checked) .pastille-type { --c: var(--cat-vie); }

.reglages-types .couleur-type {
  min-width: 0;
  margin: 0;
  padding: 0;
  border: 0;
}

.reglages-types .couleur-type__choix {
  display: flex;
  gap: 4px;
}

.reglages-types .couleur-type__option {
  position: relative;
  display: block;
  width: 18px;
  height: 18px;
  padding: 0;
  border: 0;
  background: none;
  cursor: pointer;
}

.reglages-types .couleur-type__option input {
  position: absolute;
  inset: 0;
  margin: 0;
  opacity: 0;
  cursor: pointer;
}

.reglages-types .pastille-type {
  display: block;
  width: 18px;
  height: 18px;
  border-radius: 50%;
}

.reglages-types .couleur-type__option:has(input:checked) .pastille-type {
  box-shadow: 0 0 0 2px var(--surface), 0 0 0 4px var(--ink);
}

.reglages-types .couleur-type__option:has(input:focus-visible) .pastille-type {
  outline: 2px solid var(--accent);
  outline-offset: 4px;
}

.docs-btn {
  height: 30px;
  padding: 0 10px;
  border: 1px solid var(--line);
  border-radius: var(--r-ctl);
  background: var(--surface);
  color: var(--accent);
  font-size: 13px;
  font-weight: 600;
  transition: transform 140ms var(--ease-out);
}

.docs-btn[data-n="0"] {
  color: var(--ink-2);
  font-weight: 400;
}

.docs-btn:active {
  transform: scale(0.97);
}

.docs-pop {
  inset: auto;
  min-width: 240px;
  margin: 0;
  padding: 8px;
  border: 1px solid var(--line);
  border-radius: var(--r-card);
  background: var(--surface);
  color: var(--ink);
  box-shadow: 0 12px 32px rgb(0 0 0 / 0.18);
  opacity: 1;
  transform: none;
  transform-origin: top left;
  transition: opacity 150ms var(--ease-out), transform 150ms var(--ease-out),
    display 150ms allow-discrete, overlay 150ms allow-discrete;
}

@starting-style {
  .docs-pop:popover-open {
    opacity: 0;
    transform: scale(0.97);
  }
}

.docs-pop p {
  margin: 2px 6px 6px;
  color: var(--ink-2);
  font-size: 12px;
}

.docs-pop label {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 7px 6px;
  border-radius: 6px;
  font-size: 14px;
  cursor: pointer;
}

.docs-pop input {
  width: 16px;
  height: 16px;
  accent-color: var(--accent);
}

@media (hover: hover) and (pointer: fine) {
  .docs-pop label:hover {
    background: var(--surface-2);
  }
}

/* Rôles et groupes : tableau compact, titulaires en pastilles */
.roles-table th,
.roles-table td {
  vertical-align: middle;
}



.roles-table__nom {
  display: block;
  font-weight: 600;
}

.roles-table__note {
  display: block;
  color: var(--ink-2);
  font-size: 12.5px;
  font-weight: 400;
}

.roles-table__actions {
  width: 48px;
  text-align: right;
}

.personnes {
  display: flex;
  flex-wrap: wrap;
  gap: 4px;
}

.personne {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 2px 10px 2px 2px;
  border: 0;
  border-radius: 999px;
  background: var(--surface-2);
  color: var(--ink);
  font-size: 13px;
  touch-action: manipulation;
  transition: transform 140ms var(--ease-out);
}

button.personne {
  cursor: pointer;
}

button.personne:active {
  transform: scale(0.97);
}

.personnes__vide {
  color: var(--ink-2);
  font-size: 13px;
  font-style: italic;
}

.personnes__ajout {
  padding: 2px 10px;
  border: 1px dashed var(--line);
  border-radius: 999px;
  background: none;
  color: var(--accent);
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  touch-action: manipulation;
}

@media (hover: hover) and (pointer: fine) {
  button.personne:hover {
    background: var(--danger-soft);
  }

  .personnes__ajout:hover {
    background: var(--accent-soft);
  }
}

/* Menu ⋯ : un bouton qui déplie ses actions */
.menu-actions {
  position: relative;
  display: inline-block;
}

/* Le menu déborde du tableau : sans cela, les dernières lignes le voient coupé. */
.table-wrap:has(.menu-actions) {
  overflow: visible;
}

.menu-actions > summary {
  display: grid;
  place-items: center;
  width: 36px;
  height: 36px;
  border: 1px solid var(--line);
  border-radius: var(--r-ctl);
  background: var(--surface);
  color: var(--ink-2);
  cursor: pointer;
  list-style: none;
  touch-action: manipulation;
}

.menu-actions > summary::-webkit-details-marker {
  display: none;
}

.menu-actions .icone {
  width: 18px;
  height: 18px;
}

.menu-actions__liste {
  position: absolute;
  right: 0;
  z-index: 8;
  display: grid;
  min-width: 190px;
  margin-top: 4px;
  padding: 4px;
  border: 1px solid var(--line);
  border-radius: var(--r-card);
  background: var(--surface);
  box-shadow: 0 12px 32px rgb(0 0 0 / 0.18);
  text-align: left;
}

.menu-actions__liste button {
  min-height: 40px;
  padding: 0 10px;
  border: 0;
  border-radius: 6px;
  background: none;
  color: var(--ink);
  font-size: 14px;
  text-align: left;
  cursor: pointer;
}

.menu-actions__liste .menu-actions__danger {
  color: var(--danger);
}

@media (hover: hover) and (pointer: fine) {
  .menu-actions__liste button:hover {
    background: var(--surface-2);
  }
}

.pied-carte {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
  padding-top: 12px;
  border-top: 1px solid var(--line);
}



.pied-carte .input {
  flex: 1 1 220px;
  max-width: 320px;
  height: 36px;
  font-size: 16px;
}

/* Retour en haut : téléphone seulement */
.parametres__haut {
  display: none;
}

/* ---- Téléphone : utilisable, pas optimisé ---- */
@media (max-width: 860px) {
  .parametres {
    padding-top: 10px;
  }

  .parametres .h1 {
    margin: 0;
    font-size: 22px;
  }

  .parametres__disposition {
    grid-template-columns: minmax(0, 1fr);
    gap: 8px;
  }

  

  /* L'état du club : seulement ses lignes en alerte */
  .parametres__nav .profil__apercu:not(:has(.est-alerte)) {
    display: none;
  }

  

  .parametres__nav .profil__identite,
  .parametres__nav .profil__statuts li:not(.est-alerte) {
    display: none;
  }

  .parametres__nav .profil__statuts li {
    border-top: 0;
    padding: 4px 0;
  }

  .parametres__recherche .input {
    height: 36px;
  }

  

  

  .parametres__cats {
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 6px;
  }

  .parametres__cat {
    position: relative;
    flex-direction: column;
    justify-content: center;
    gap: 2px;
    min-height: 46px;
    padding: 4px 2px;
    border: 1px solid var(--line);
    background: var(--surface);
    font-size: 11.5px;
    line-height: 1.1;
    text-align: center;
  }

  .parametres__cat[aria-current="true"] {
    border-color: var(--accent);
  }

  .parametres__ico {
    width: 22px;
    height: 22px;
    border-radius: 6px;
  }

  .parametres__ico .icone {
    width: 15px;
    height: 15px;
  }

  .parametres__cat-long {
    display: none;
  }

  

  .parametres__modif {
    position: absolute;
    top: 5px;
    right: 5px;
    margin: 0;
  }

  .parametres__souscats {
    display: none !important;
  }

  /* « Aller à » : liste native, collante pendant le défilement */
  .parametres__saut {
    position: sticky;
    top: 0;
    z-index: 5;
    display: flex;
    align-items: center;
    gap: 8px;
    /* Pleine largeur : suit le retrait de la page (.site-shell__main, 0.85rem). */
    margin: 0 -0.85rem 6px;
    padding: 6px 0.85rem;
    border-bottom: 1px solid var(--line);
    background: color-mix(in srgb, var(--bg) 92%, transparent);
    -webkit-backdrop-filter: blur(8px);
    backdrop-filter: blur(8px);
  }

  .parametres__saut.est-seule {
    display: none;
  }

  .parametres__saut span {
    color: var(--ink-2);
    font-size: 13px;
    font-weight: 600;
    white-space: nowrap;
  }

  .parametres__saut .input {
    flex: 1;
    min-width: 0;
    height: 36px;
    font-size: 16px;
    font-weight: 600;
  }

  

  

  

  

  

  

  .reglage-ligne--large,
  .reglage-ligne:has(select.input) {
    grid-template-columns: minmax(0, 1fr);
    row-gap: 6px;
    padding: 10px 0;
  }

  .reglage-ligne--large .input,
  .reglage-ligne--large select.input,
  .reglage-ligne:has(select.input) select.input {
    width: 100%;
  }

  /* Retour en haut : au-dessus des onglets, remonté quand la barre d'enregistrement est visible */
  .parametres__haut {
    position: fixed;
    right: 16px;
    bottom: calc(88px + env(safe-area-inset-bottom, 0px));
    z-index: 9;
    display: grid;
    place-items: center;
    width: 44px;
    height: 44px;
    border: 1px solid var(--line);
    border-radius: 50%;
    background: var(--surface);
    color: var(--ink);
    box-shadow: 0 6px 18px rgb(0 0 0 / 0.18);
    opacity: 0;
    transform: translateY(8px) scale(0.95);
    pointer-events: none;
    transition: opacity 200ms var(--ease-out), transform 200ms var(--ease-out);
    touch-action: manipulation;
  }

  .parametres__haut.est-visible {
    opacity: 1;
    transform: none;
    pointer-events: auto;
  }

  

  
}

@media (prefers-reduced-motion: reduce) {
  

  .parametres__haut {
    transform: none;
  }
}

/* Journal d'audit (lecture seule) : tableau sur ordinateur, cartes sur téléphone */
.journal__filtres {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 12px;
}
.journal__actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}
.journal__actions .button { min-height: 44px; }
.journal__date { white-space: nowrap; font-variant-numeric: tabular-nums; }
.journal__details { color: var(--ink-2); overflow-wrap: anywhere; }
.journal__pages {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}
.journal__pages .button { min-height: 44px; }
.journal__pages-vide { min-width: 1px; }
.journal__vide { align-items: flex-start; }
.journal__vide p { margin: 0; }
@media (min-width: 720px) {
  .journal__filtres { grid-template-columns: repeat(3, minmax(0, 1fr)); align-items: end; }
  .journal__filtres .field:last-of-type { grid-column: span 3; }
  .journal__actions { grid-column: span 3; }
}
@media (max-width: 719px) {
  .journal .table-wrap { background: transparent; border: 0; overflow: visible; }
  .journal__table, .journal__table tbody, .journal__table tr, .journal__table td { display: block; }
  .journal__table thead {
    position: absolute;
    width: 1px;
    height: 1px;
    overflow: hidden;
    clip-path: inset(50%);
  }
  .journal__table tr {
    background: var(--surface);
    border: 1px solid var(--line);
    border-radius: var(--r-card);
    padding: 12px 16px;
    margin-bottom: 12px;
  }
  .journal__table td, .journal__table tr:last-child td {
    display: grid;
    grid-template-columns: 7.5rem minmax(0, 1fr);
    gap: 8px;
    padding: 6px 0;
    border-bottom: 0;
    overflow-wrap: anywhere;
  }
  .journal__table td::before {
    content: attr(data-label);
    font-size: 12px;
    font-weight: 700;
    color: var(--ink-3);
    text-transform: uppercase;
    letter-spacing: 0.06em;
  }
  .journal__table td .chip { white-space: normal; justify-self: start; }
}

/* Groupes du club (Paramètres) : un volet par groupe, boutons à 44 px au doigt */
.groupes { display: flex; flex-direction: column; gap: 8px; margin-top: 12px; }
.groupe {
  background: var(--surface-2);
  border: 1px solid var(--line);
  border-radius: var(--r-ctl);
}
.groupe__resume {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  min-height: 48px;
  padding: 8px 14px;
  cursor: pointer;
  list-style: none;
  font-weight: 600;
}
.groupe__resume::-webkit-details-marker { display: none; }
.groupe__resume::after {
  content: "";
  flex: 0 0 auto;
  margin-left: auto;
  width: 8px;
  height: 8px;
  border-right: 2px solid var(--ink-3);
  border-bottom: 2px solid var(--ink-3);
  transform: rotate(45deg);
  transition: transform 160ms ease-out;
}
.groupe[open] > .groupe__resume::after { transform: rotate(-135deg); }
.groupe__nom { flex: 1 1 7rem; min-width: 0; overflow-wrap: anywhere; }
.groupe__puces { display: flex; flex-wrap: wrap; gap: 6px; margin-left: auto; }
.groupe__corps { padding: 0 14px 14px; display: flex; flex-direction: column; gap: 12px; }
.groupe__actions { display: flex; flex-wrap: wrap; gap: 8px; }
.groupe__actions .button-small { min-height: 44px; }
.groupe__membres, .stockage__liste { list-style: none; margin: 0; padding: 0; }
.groupe__membre, .stockage__ligne {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  min-height: 52px;
  padding: 6px 0;
  border-top: 1px solid var(--line);
}
.groupe__personne { display: flex; align-items: center; gap: 10px; min-width: 0; }
.groupe__identite { display: flex; flex-direction: column; min-width: 0; overflow-wrap: anywhere; }
.groupe__membre .button-small, .stockage__ligne .button-small { min-height: 44px; flex: 0 0 auto; }
.groupe__creation { display: flex; flex-direction: column; gap: 12px; }
.groupe__creation .button-secondary { min-height: 44px; }
@media (min-width: 640px) {
  .groupe__creation { flex-direction: row; align-items: flex-end; }
  .groupe__creation .field { flex: 1 1 auto; }
  .groupe__actions .button-small, .groupe__membre .button-small, .stockage__ligne .button-small { min-height: 32px; }
}
@media (prefers-reduced-motion: reduce) {
  .groupe__resume::after { transition: none; }
}

/* Groupes hors club (Paramètres › Club, page plateforme) : le nom et
   l'adresse passent au-dessus du statut sur un téléphone. */
.groupe-hors-club { flex-wrap: wrap; }
.groupe-hors-club > .stack { flex: 1 1 16rem; min-width: 0; gap: 2px; overflow-wrap: anywhere; }
.groupe-hors-club > .row { flex-wrap: wrap; }

/* Stockage du club (Paramètres) : jauge et liste des éléments les plus lourds. */
.jauge { height: 8px; background: var(--surface-2); border-radius: var(--r-pill); overflow: hidden; }
.jauge__remplissage { display: block; height: 100%; background: var(--accent); }
.jauge--alerte .jauge__remplissage { background: var(--warn); }
.stockage__element { display: flex; flex-direction: column; min-width: 0; overflow-wrap: anywhere; }
.stockage__taille { display: flex; align-items: center; gap: 12px; flex: 0 0 auto; }

/* La grille des permissions défile dans sa carte au lieu d'élargir la page. */
.parametres, .parametres__section, .parametres .card { min-width: 0; max-width: 100%; }
/* Les libellés `.sr-only` des cases sont absolus : sans ancêtre positionné ils
   échappent au défilement du tableau et élargissent la page. */


/* En-tête d'un rôle : les boutons passent à la ligne au lieu d'élargir la page. */
.role__entete { flex-wrap: wrap; }
.role__titre { min-width: 0; overflow-wrap: anywhere; }
.role__actions { flex-wrap: wrap; }
.role__actions .button-small { min-height: 32px; }
@media (max-width: 639px) {
  .role__actions .button-small { min-height: 44px; }
}

/* Ajouter du matériel */
.form-grid.form-grid--2 {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.materiel-ajouter__type {
  margin: 12px 0;
}

.materiel-ajouter__type summary {
  color: var(--accent-text);
  font-size: 13.5px;
  font-weight: 600;
  cursor: pointer;
}

.materiel-ajouter__type .form-grid {
  margin-top: 10px;
}

@media (max-width: 767.98px) {
  .form-grid.form-grid--2 {
    grid-template-columns: minmax(0, 1fr);
  }
}

/* Compacité (retours d'usage, 2026-10-07) ------------------------------- */

/* Icône du club : image rognée dans sa pastille, jamais à sa taille d'origine. */
.site-brand__mark--image {
  overflow: hidden;
  background: transparent;
}

.site-brand__mark img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
  border-radius: inherit;
}







.icone-club__titre .h2,
.icone-club__titre p {
  margin: 0;
}

.icone-club__apercu {
  flex: 0 0 48px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 48px;
  height: 48px;
  border-radius: 12px;
  background: var(--nav-mark);
  color: #ffffff;
  font-family: var(--font-display);
  font-size: 22px;
  font-weight: 700;
  overflow: hidden;
}

.icone-club__apercu img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.icone-club__form {
  display: flex;
  align-items: flex-start;
  flex-wrap: wrap;
  gap: 8px 12px;
}

.icone-club__champ {
  flex: 1 1 280px;
  min-width: 0;
  gap: 4px;
}

.icone-club__actions {
  flex: 0 0 auto;
}

/* Pages larges : le tableau prend toute la largeur disponible. */
.page.page--large {
  max-width: none;
}

/* Fil d'un chat : les plus anciens messages sont derrière ce bouton. */
.msgs-precedents { align-self: center; }

/* Administration des chats : toute la largeur, une ligne par chat (actions
   côte à côte, pas empilées), réglage de la fenêtre du fil au-dessus. */
.chats-admin .secondaire__actions { flex-wrap: nowrap; }
.chats-admin .table td { padding-top: 8px; padding-bottom: 8px; }
.chats-admin__reglage { padding: 0 16px; }
.chats-admin__reglage .reglage-ligne { border-bottom: 0; }
.chats-admin__reglage .reglage-ligne__ctl { display: flex; align-items: center; gap: 8px; }
@media (max-width: 767.98px) {
  .chats-admin__reglage .reglage-ligne { grid-template-columns: minmax(0, 1fr); row-gap: 8px; padding: 10px 0; }
}

/* Bouton carré à icône seule (export, réglages). Mêmes règles que sur la page
   « Paiements du club » : garder les deux identiques. */
.bouton-icone {
  position: relative;
  display: inline-grid;
  place-items: center;
  width: 40px;
  height: 40px;
  padding: 0;
  border: 1px solid var(--line);
  border-radius: var(--r-ctl);
  background: var(--surface);
  color: var(--ink-2);
  cursor: pointer;
  touch-action: manipulation;
  -webkit-tap-highlight-color: transparent;
  transition: transform 160ms var(--ease-out), color 160ms ease;
}

.bouton-icone:active {
  transform: scale(0.97);
}

.bouton-icone:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 1px;
}

@media (hover: hover) and (pointer: fine) {
  .bouton-icone:hover {
    color: var(--ink);
  }
}

/* Page « Ancienneté et AG » (registre). */
.anciennete {
  display: flex;
  flex-direction: column;
  gap: 24px;
}

.anciennete__regle {
  margin: 4px 0 0;
  font-size: 13px;
}

.ag-listes {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 16px;
  margin-top: 12px;
}



.ag-liste p {
  margin: 0;
}



.ag-liste__titre {
  font-weight: 600;
}

.ag-liste__copier {
  align-self: flex-start;
  margin-top: auto;
}

.anciennete__periodes span {
  display: block;
  white-space: nowrap;
}

.anciennete__effectif {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  white-space: nowrap;
}

.anciennete__case {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 13px;
  color: var(--ink-2);
  cursor: pointer;
}





/* Menu replié ou non : le bouton de réduction ne touche jamais le dernier lien. */
.site-nav {
  padding-bottom: 0.9rem;
}

.site-nav-toggle {
  flex: 0 0 auto;
  margin-bottom: 0.35rem;
}

/* Calendrier : titre du mois, filtres et « Créer une activité » serrés. */
.calendrier.page {
  gap: 10px;
}

.calendrier .page-entete {
  margin-bottom: 0;
}

.calendrier .calendrier__mois {
  min-width: 11ch;
  font-size: 22px;
}

.calendrier .calendrier__filtres {
  margin-bottom: 0;
  gap: 8px;
}

.calendrier__filtres .input {
  height: 34px;
  font-size: 13.5px;
}



.calendrier__creer {
  margin-left: auto;
  min-height: 34px;
}

/* Téléphone : pas de choix Liste / Calendrier (liste en portrait, mois en
   paysage, voir calendrier.js) ; les filtres tiennent sur une seule ligne
   défilante, « Créer » en premier. */

/* Ordinateur : en-tête et filtres comme avant ; boutons « + » et « Filtres » absents. */
.calendrier__tete,
.calendrier__selects {
  display: contents;
}

.calendrier__plus,
.calendrier__bouton-filtres {
  display: none;
}

.calendrier__badge {
  min-width: 1.3rem;
  margin-left: 0.4rem;
  padding: 0 0.35rem;
  border-radius: 999px;
  background: var(--accent);
  color: var(--accent-ink);
  font-size: 12px;
  line-height: 1.3rem;
  text-align: center;
}

.calendrier__badge[hidden] {
  display: none;
}

/* Téléphone : en-tête collant (mois, « + », filtres) ; clubs, type et statut
   vivent dans une feuille du bas (calendrier.js déplace le bloc). */
@media (max-width: 767.98px) {
  .calendrier__tete {
    display: flex;
    flex-direction: column;
    gap: 8px;
    position: sticky;
    top: env(safe-area-inset-top, 0px);
    z-index: 30;
    margin-top: -0.4rem;
    padding: 0 0 4px;
    background: var(--bg);
  }

  .calendrier.page {
    gap: 4px;
  }

  .calendrier .page-entete {
    flex-wrap: nowrap;
    align-items: center;
    justify-content: space-between;
  }

  .calendrier__plus {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    flex: none;
    width: 44px;
    height: 44px;
    border-radius: 999px;
    background: var(--accent);
    color: var(--accent-ink);
    touch-action: manipulation;
    transition: transform 120ms cubic-bezier(0.23, 1, 0.32, 1);
  }

  .calendrier__plus:active {
    transform: scale(0.95);
  }

  .calendrier__plus .icone {
    width: 1.4rem;
    height: 1.4rem;
  }

  

  

  .calendrier__bouton-filtres {
    display: inline-flex;
    align-items: center;
    flex: none;
    min-height: 38px;
    margin-left: auto;
    padding: 0 14px;
    font-size: 14px;
  }

  

  

  .calendrier__feuille[open] {
    display: block;
  }

  .calendrier__feuille-corps {
    display: grid;
    margin: 0.6rem 0;
  }

  .calendrier__feuille .calendrier__clubs {
    display: grid;
    gap: 6px;
  }

  .calendrier__feuille .input {
    width: 100%;
    height: 44px;
    font-size: 16px;
  }

  .calendrier__feuille .sr-only {
    position: static;
    width: auto;
    height: auto;
    overflow: visible;
    clip: auto;
    margin-top: 6px;
    color: var(--ink-3);
    font-size: 13px;
    font-weight: 600;
    white-space: normal;
  }
}

/* Lignes d'activité : une ligne basse (accueil et calendrier). */
.event {
  grid-template-columns: 44px minmax(0, 1fr) auto;
  gap: 12px;
  padding: 7px 10px;
}

.event .date {
  height: 44px;
}

.event .date b {
  font-size: 18px;
}

.event .date small {
  margin-top: 2px;
  font-size: 10px;
}

.event-side {
  flex-direction: row;
  align-items: center;
  gap: 10px;
}

.event-action {
  margin: 0;
}

.event-etat {
  display: inline-flex;
  align-items: center;
  gap: 10px;
}

/* Téléphone (accueil et calendrier, même rendu) : le statut et le nombre de
   participants passent sous le titre, pour que le titre garde toute la
   largeur ; seuls ✓ / ✗ ou « S'inscrire » restent à droite. */
@media (max-width: 767.98px) {
  .event:has(> .event-side) {
    grid-template-columns: 44px minmax(0, 1fr) auto;
    grid-template-areas:
      "date main action"
      "date etat club";
    column-gap: 10px;
    row-gap: 4px;
  }
  .event:has(> .event-side) > .date { grid-area: date; align-self: start; }
  .event:has(> .event-side) > .stack { grid-area: main; }
  .event-side { display: contents; }
  .event-side > .reponse,
  .event-side > .event-action { grid-area: action; align-self: start; }
  .event-etat { grid-area: etat; gap: 8px; flex-wrap: wrap; }
  .event-side > .event-club { grid-area: club; align-self: end; justify-self: end; }
}

/* Mode du sondage : deux cartes à radio visible, la choisie bordée en accent. */
.sondage-mode__choix {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
}

.sondage-mode__carte {
  position: relative;
  display: flex;
  align-items: flex-start;
  gap: 12px;
  padding: 12px 14px;
  border: 1px solid var(--line);
  border-radius: var(--r-ctl);
  background: var(--surface);
  cursor: pointer;
  touch-action: manipulation;
  transition: border-color 120ms ease, background-color 120ms ease;
}

.sondage-mode__carte input {
  position: absolute;
  width: 1px;
  height: 1px;
  margin: 0;
  opacity: 0;
  pointer-events: none;
}

.sondage-mode__radio {
  flex: 0 0 18px;
  width: 18px;
  height: 18px;
  margin-top: 2px;
  border: 2px solid var(--ink-3);
  border-radius: 50%;
  background: transparent;
  transition: border-color 120ms ease, box-shadow 120ms ease;
}

.sondage-mode__texte {
  display: flex;
  flex-direction: column;
  gap: 2px;
  min-width: 0;
}

.sondage-mode__texte .hint {
  margin: 0;
  font-size: 12.5px;
  color: var(--ink-3);
}

.sondage-mode__carte:has(input:checked) {
  border-color: var(--accent);
  background: var(--accent-soft);
  box-shadow: 0 0 0 1px var(--accent);
}

.sondage-mode__carte:has(input:checked) .sondage-mode__radio {
  border-color: var(--accent);
  box-shadow: inset 0 0 0 3px var(--surface), inset 0 0 0 9px var(--accent);
}

.sondage-mode__carte:has(input:focus-visible) {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
}

@media (max-width: 767.98px) {
  .sondage-mode__choix {
    grid-template-columns: minmax(0, 1fr);
  }
}

/* Fenêtre « Notifications du responsable » : un seul bloc, texte à gauche, interrupteur à droite. */
.materiel-notifications .confirm-dialog__card {
  gap: 16px;
  padding: 24px;
}

.materiel-notifications .h2 {
  margin: 0;
}

.materiel-notifications .toggle {
  position: relative;
  align-items: flex-start;
  gap: 20px;
  padding: 16px;
  border: 1px solid var(--line);
  border-radius: var(--r-ctl);
  background: var(--surface-2);
  cursor: pointer;
  transition: border-color 120ms ease;
}

.materiel-notifications .toggle:has(input:checked) {
  border-color: var(--accent);
}

.materiel-notifications .toggle:has(input:focus-visible) {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
}

.materiel-notifications .switch {
  margin-top: 2px;
}

.materiel-notifications__texte {
  display: flex;
  flex-direction: column;
  gap: 6px;
  min-width: 0;
}

.materiel-notifications__texte b {
  font-size: 15px;
  line-height: 1.35;
}

.materiel-notifications__texte .hint {
  font-size: 13px;
  font-weight: 400;
  line-height: 1.5;
  color: var(--ink-2);
}

.materiel-notifications .confirm-dialog__actions {
  margin-top: 0;
}

/* Tarifs du matériel : le tableau devient une liste de lignes sur téléphone. */
.materiel-tarifs__actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  justify-content: flex-end;
}

@media (max-width: 639px) {
  .materiel-tarifs__table thead {
    position: absolute;
    width: 1px;
    height: 1px;
    overflow: hidden;
    clip: rect(0 0 0 0);
  }

  .materiel-tarifs__table,
  .materiel-tarifs__table tbody,
  .materiel-tarifs__table tr,
  .materiel-tarifs__table td {
    display: block;
  }

  .materiel-tarifs__table tr {
    padding: 8px 0;
    border-bottom: 1px solid var(--line);
  }

  .materiel-tarifs__table tr:last-child {
    border-bottom: 0;
  }

  .materiel-tarifs__table td {
    display: flex;
    justify-content: space-between;
    gap: 12px;
    padding: 4px 12px;
    border-bottom: 0;
  }

  .materiel-tarifs__table td[data-label]::before {
    content: attr(data-label);
    color: var(--ink-3);
  }

  .materiel-tarifs__actions {
    justify-content: flex-start;
    padding-top: 8px;
  }
}

.materiel-tarifs__tete {
  flex-wrap: wrap;
}

@media (pointer: coarse) {
  .materiel-tarifs .button-small {
    min-height: 44px;
  }
}

/* Tarifs du matériel : niveaux cochés, groupés par fédération (pastilles 44 px). */
.tarif-niveaux {
  grid-column: 1 / -1;
  gap: 12px;
}

.tarif-niveaux__federation legend {
  color: var(--ink-3);
  font-weight: 600;
}

.tarif-niveaux__cases {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.tarif-niveaux__cases .jour span {
  padding: 0 12px;
  text-align: center;
}

.materiel-tarifs__table td[data-label="Prix"] {
  white-space: nowrap;
}

@media (max-width: 639px) {
  .materiel-tarifs__table td[data-label] {
    text-align: right;
  }
}

/* ---- Statistiques : chiffres clés, histogramme, classements, jauges ---- */
.stat-annee {
  width: auto;
  min-width: 96px;
  font-weight: 600;
}

.stat-annee__libelle {
  color: var(--ink-2);
  font-size: 13px;
  font-weight: 600;
}

.stat-cles {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: var(--gap);
}

.stat-cle {
  display: flex;
  flex-direction: column;
  gap: 8px;
  min-width: 0;
}

.stat-cle .stat {
  font-size: 40px;
}

.stat-cle__t {
  color: var(--ink-2);
  font-size: 13px;
  font-weight: 600;
}

.stat-cle__s {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  color: var(--ink-2);
  font-size: 13px;
}

/* Histogramme : les barres sont des SVG étirés, les libellés du vrai texte. */
.histo {
  display: grid;
  grid-template-columns: repeat(12, minmax(0, 1fr));
  gap: 6px;
  align-items: end;
  margin: 8px 0 0;
  padding: 0;
  list-style: none;
}

.histo__mois {
  display: flex;
  flex-direction: column;
  align-items: stretch;
  gap: 6px;
  min-width: 0;
  text-align: center;
}

.histo__valeur {
  min-height: 18px;
  color: var(--ink-2);
  font-size: 13px;
  font-variant-numeric: tabular-nums;
}

.histo__barre {
  display: block;
  width: 100%;
  height: 160px;
  border-bottom: 1px solid var(--line);
}

.histo__barre rect {
  fill: color-mix(in srgb, var(--accent) 45%, var(--surface));
}

.histo__mois--pic .histo__barre rect {
  fill: var(--accent);
}

.histo__mois--pic .histo__valeur {
  color: var(--ink);
  font-weight: 700;
}

.histo__libelle {
  color: var(--ink-3);
  font-size: 12px;
}

.stat-duo {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: var(--gap);
}

/* Classement : nom, total, puis une barre pleine largeur dessous. */
.classement {
  display: flex;
  flex-direction: column;
  gap: 14px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.classement__ligne {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  column-gap: 12px;
  row-gap: 6px;
}

.classement__nom {
  min-width: 0;
  overflow: hidden;
  font-weight: 600;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.classement__total {
  font-variant-numeric: tabular-nums;
  font-weight: 700;
}

.classement__ligne .classement__barre {
  grid-column: 1 / -1;
}

progress.classement__barre {
  appearance: none;
  width: 100%;
  height: 8px;
  border: 0;
  border-radius: 999px;
  background: var(--surface-2);
  overflow: hidden;
}

progress.classement__barre::-webkit-progress-bar {
  background: var(--surface-2);
}

progress.classement__barre::-webkit-progress-value {
  background: var(--accent);
  border-radius: 999px;
}

progress.classement__barre::-moz-progress-bar {
  background: var(--accent);
  border-radius: 999px;
}

.classement__cellule {
  display: inline-flex;
  align-items: center;
  justify-content: flex-end;
  gap: 12px;
}

.classement__cellule progress.classement__barre {
  width: 120px;
}

.classement__cellule b {
  min-width: 2ch;
  text-align: right;
}

/* Jauge en anneau : le pourcentage est la longueur du trait (circonférence = 100). */
.jauge-bloc {
  display: flex;
  align-items: center;
  gap: 20px;
}

.jauge-bloc__texte {
  margin: 0;
}

.jauge {
  position: relative;
  flex: 0 0 auto;
  width: 132px;
  height: 132px;
}

.jauge svg {
  display: block;
  width: 100%;
  height: 100%;
  transform: rotate(-90deg);
}

.jauge circle {
  fill: none;
  stroke-width: 3.4;
}

.jauge__piste {
  stroke: var(--surface-2);
}

.jauge__valeur {
  stroke: var(--accent);
  stroke-linecap: round;
}

.jauge__centre {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: baseline;
  justify-content: center;
  padding-top: 44px;
  gap: 2px;
}

.jauge__unite {
  color: var(--ink-2);
  font-size: 14px;
  font-weight: 600;
}

.stat-puces {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px 24px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.stat-puces__n {
  margin-right: 4px;
  font-family: var(--font-display);
  font-size: 20px;
  font-variant-numeric: tabular-nums;
  font-weight: var(--display-weight);
}

@media (max-width: 899.98px) {
  .stat-cles {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .stat-duo {
    grid-template-columns: minmax(0, 1fr);
  }
}

@media (max-width: 479.98px) {
  .stat-cle .stat {
    font-size: 32px;
  }

  .histo {
    gap: 3px;
  }

  .histo__valeur,
  .histo__libelle {
    font-size: 11px;
  }

  .histo__barre {
    height: 120px;
  }

  .jauge-bloc,
  .jauge-bloc--large {
    flex-direction: column;
    align-items: flex-start;
  }

  .stat-puces {
    grid-template-columns: minmax(0, 1fr);
  }

  .classement__cellule progress.classement__barre {
    width: 72px;
  }
}

/* Bulle d'aide (« ? ») : s'ouvre au toucher, au clic ou au clavier. */


.titre-aide .sous-titre {
  margin: 0;
}

.bulle-aide__bouton {
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 22px;
  height: 22px;
  padding: 0;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: transparent;
  color: var(--ink-2);
  font-size: 12px;
  font-weight: 700;
  cursor: pointer;
  transition: transform 140ms var(--ease-out), border-color 120ms ease, color 120ms ease;
}

/* Zone de toucher de 44 px sans agrandir le rond visible. */


.bulle-aide__bouton:active {
  transform: scale(0.97);
}

.bulle-aide__bouton[aria-expanded="true"] {
  border-color: var(--accent);
  color: var(--accent);
}

@media (hover: hover) and (pointer: fine) {
  .bulle-aide__bouton:hover {
    border-color: var(--accent);
    color: var(--accent);
  }
}

.bulle-aide {
  position: absolute;
  top: calc(100% + 8px);
  left: 0;
  z-index: 20;
  width: min(22rem, 100%);
  padding: 14px 16px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: var(--surface);
  box-shadow: var(--shadow-pop);
  color: var(--ink);
  font-size: 13px;
  line-height: 1.5;
  opacity: 0;
  transform: scale(0.96);
  transform-origin: top left;
  transition: opacity 160ms var(--ease-out), transform 160ms var(--ease-out);
}

.bulle-aide.est-ouverte {
  opacity: 1;
  transform: scale(1);
}





.bulle-aide__titre {
  margin: 0;
  font-weight: 700;
  color: var(--accent);
}

.bulle-aide__note {
  margin: 0;
  color: var(--ink-2);
  font-size: 12.5px;
}

@media (prefers-reduced-motion: reduce) {
  .bulle-aide {
    transform: none;
  }

  .bulle-aide__bouton:active {
    transform: none;
  }
}

/* Sélecteur « Qui peut voir et s'inscrire ? » (sorties réservées / privées). */
.acces { display: grid; gap: 12px; margin-top: 16px; }
.acces__modes { display: grid; gap: 8px; margin: 0; padding: 0; border: 0; }
.acces__mode { display: flex; align-items: center; gap: 10px; min-height: 44px; padding: 8px 12px; border: 1px solid var(--line); border-radius: var(--r-ctl); background: var(--surface); cursor: pointer; transition: border-color 150ms var(--ease-out), background-color 150ms var(--ease-out); }
.acces__mode:has(input:checked) { border-color: var(--accent); background: var(--accent-soft); }
.acces__resume { margin: 0; color: var(--ink-2); font-size: 14px; }
.acces__panneau { display: grid; gap: 10px; padding: 12px; border: 1px solid var(--line); border-radius: var(--r-card); background: var(--surface-2); animation: acces-entree 180ms var(--ease-out); }
.acces__panneau[hidden] { display: none; }
.acces__outils { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; }
.acces__recherche { flex: 1 1 200px; font-size: 16px; }
.acces__espace { flex: 1 1 0; }
.acces__compteur { font-variant-numeric: tabular-nums; color: var(--ink-2); font-size: 14px; }
.acces__liste { display: grid; max-height: 320px; margin: 0; padding: 0; overflow: auto; list-style: none; }
.acces__ligne label { display: flex; align-items: center; gap: 10px; min-height: 44px; padding: 0 10px; border-radius: var(--r-ctl); cursor: pointer; transition: transform 100ms var(--ease-out), background-color 100ms var(--ease-out); }
.acces__ligne label:active { transform: scale(0.98); }
.acces__ligne[data-actif="1"] label { background: var(--accent-soft); }
.acces__niveau { margin-left: auto; color: var(--ink-3); font-size: 13px; }
.acces__sous { display: none; color: var(--warn); font-size: 12px; }
.acces__ligne[data-conserve] .acces__sous { display: inline; }
.acces mark { padding: 0; border-radius: 2px; background: var(--accent-soft); color: var(--accent-text); }
@media (hover: hover) and (pointer: fine) {
  .acces__ligne label:hover { background: var(--surface); }
}
@keyframes acces-entree { from { opacity: 0; transform: translateY(4px); } to { opacity: 1; transform: none; } }
@keyframes acces-fondu { from { opacity: 0; } to { opacity: 1; } }
@media (prefers-reduced-motion: reduce) {
  .acces__panneau { animation-name: acces-fondu; }
  .acces__ligne label:active { transform: none; }
}

/* ---- Progression des exercices (moniteurs) : aucune animation, page de consultation ---- */
.suivi {
  display: flex;
  flex-direction: column;
  gap: 20px;
}
/* Le formulaire d'actions (champs cachés, relié aux boutons par form=) ne
   prend pas de place : sinon il ajoute un second écart sous les filtres. */
.suivi > #suivi-actions { display: none; }
/* Filtres collés au premier niveau : 12 px au lieu de l'écart de 20 px. */
.suivi > .suivi__filtres { margin-bottom: -8px; }

/* Séances de baptême à signer, en bas de page, pour le moniteur désigné. */
.mes-signatures__titre { display: flex; align-items: center; gap: 8px; font-size: 13px; font-weight: 700; color: var(--ink-3); text-transform: uppercase; letter-spacing: .06em; margin: 6px 0 8px; }
.mes-signatures__liste { list-style: none; margin: 0; padding: 0; background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-card); }
.mes-signatures__liste li { display: flex; align-items: center; gap: 12px; padding: 12px 14px; border-bottom: 1px solid var(--line); }
.mes-signatures__liste li:last-child { border-bottom: 0; }
.mes-signatures__texte { flex: 1 1 auto; min-width: 0; display: grid; gap: 2px; }

@media (pointer: coarse) { .mes-signatures__liste .button { min-height: 44px; padding: 0 18px; } }

/* Filtres serrés : milieu en contrôle segmenté, case et bouton sur la même
   ligne quand la place le permet. */
.suivi__filtres {
  --pad: 10px 14px;
  flex-direction: row;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px 16px;
}

.suivi__milieux {
  min-width: 0;
  margin: 0;
  padding: 0;
  border: 0;
}

.suivi__masquer {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  min-height: 36px;
  font-size: 14px;
  cursor: pointer;
}

.suivi__masquer input {
  flex: 0 0 auto;
  width: 18px;
  height: 18px;
  margin: 0;
  accent-color: var(--accent);
}

/* Exercices d'un plongeur : une feuille du bas sur téléphone, une fenêtre
   centrée ailleurs. Code dans une colonne fixe pour qu'on lise la liste d'un
   coup d'œil, libellé sur toute la largeur restante. */
/* Bouton « n à faire » : texte d'accent et chevron vers la droite, pour qu'il
   se lise comme une entrée vers le détail, pas comme une étiquette. */
.suivi__voir {
  display: inline-flex; align-items: center; gap: 6px;
  min-height: 34px; padding: 0 8px 0 12px;
  border: 1px solid var(--line); border-radius: var(--r-ctl);
  background: var(--accent-soft); color: var(--accent-text);
  font: inherit; font-size: 14px; font-weight: 600; white-space: nowrap;
  cursor: pointer; touch-action: manipulation; -webkit-user-select: none; user-select: none;
  transition: transform 120ms var(--ease-out);
}
.suivi__voir:active { transform: scale(0.97); }

.suivi__voir .icone { width: 16px; height: 16px; transform: rotate(-90deg); }
.suivi__voir-libelle { display: none; }
.suivi-feuille { display: flex; flex-direction: column; padding-bottom: 0; }
.suivi-feuille:not([open]) { display: none; }
.suivi-feuille__corps { flex: 1 1 auto; min-height: 0; overflow-y: auto; overscroll-behavior: contain; padding: 4px 8px 12px; }

.suivi-feuille__tete p { margin: 0; }
.suivi-feuille__nom { margin: 0; font-family: var(--font-display); font-weight: var(--display-weight); letter-spacing: var(--display-track); font-size: 20px; line-height: 1.2; }
.suivi-feuille__section { padding-top: 12px; border-top: 1px solid var(--line); }
.suivi-feuille__section + .suivi-feuille__section { margin-top: 12px; }
.suivi-feuille__titre { display: flex; align-items: center; gap: 8px; margin: 0 0 4px; font-size: 13px; font-weight: 700; letter-spacing: 0.06em; text-transform: uppercase; }
.suivi-feuille__titre .icone { width: 18px; height: 18px; flex: none; }
.suivi-feuille__compte { min-width: 22px; padding: 1px 7px; border-radius: var(--r-pill); font-size: 12px; letter-spacing: 0; text-align: center; font-variant-numeric: tabular-nums; }
/* À faire : accent (ce qui reste à travailler). Faits : vert, coche. */
.suivi-feuille__section--a-faire .suivi-feuille__titre { color: var(--accent-text); }
.suivi-feuille__section--a-faire .suivi-feuille__compte { background: var(--accent-soft); }
.suivi-feuille__section--faits .suivi-feuille__titre { color: var(--ok); }
.suivi-feuille__section--faits .suivi-feuille__compte { background: var(--ok-soft); }
.suivi-feuille__section--faits .suivi-exos__code { color: var(--ok); }
.suivi-milieu { margin-top: 8px; padding: 4px 0 0 12px; border-left: 2px solid var(--line); }
.suivi-milieu__titre { display: flex; align-items: center; gap: 6px; margin: 0; color: var(--ink-2); font-size: 12.5px; font-weight: 600; }
.suivi-milieu__titre .icone { width: 15px; height: 15px; color: var(--ink-3); }
.suivi-feuille__section p { margin: 0; }
.suivi-feuille__pied { display: flex; justify-content: flex-end; padding: 10px 8px calc(10px + env(safe-area-inset-bottom, 0px)); border-top: 1px solid var(--line); }
.suivi-exos { display: grid; margin: 0; padding: 0; list-style: none; }
.suivi-exos li { display: grid; grid-template-columns: 4.75rem minmax(0, 1fr); gap: 2px 12px; align-items: baseline; padding: 8px 0; border-bottom: 1px solid var(--line); }
.suivi-exos li:last-child { border-bottom: 0; }
.suivi-exos--faits li { grid-template-columns: 4.75rem minmax(0, 1fr) auto; color: var(--ink-2); }
.suivi-exos__code { color: var(--ink-3); font-size: 13px; font-weight: 600; font-variant-numeric: tabular-nums; }
.suivi-exos__libelle { font-size: 15px; line-height: 1.4; }
.suivi-exos__date { color: var(--ink-3); font-size: 13px; font-variant-numeric: tabular-nums; white-space: nowrap; }
.suivi-feuille .feuille__poignee { flex: none; }
@media (min-width: 768px) {
  .suivi-feuille { width: min(36rem, calc(100vw - 2rem)); max-height: min(80dvh, 44rem); margin: auto; padding-top: 16px; border: 1px solid var(--line); border-radius: var(--r-card); }
  .suivi-feuille .feuille__poignee { display: none; }
  .suivi-feuille[open] { animation: acc-ouvre 200ms var(--ease-out); }
}
@media (max-width: 479.98px) {
  /* Date sous le libellé : le libellé garde toute la largeur. */
  
  .suivi-exos__date { grid-column: 2; }
}
@media (prefers-reduced-motion: reduce) {
  .suivi-feuille[open] { animation: none; }
}

/* Téléphone : une carte par plongeur. Nom et bouton « n à faire » sur la
   première ligne, barre de progression dessous ; les spécialités et l'examen
   ne s'affichent que s'ils disent quelque chose. En-têtes en bande de pastilles
   qui défile (tri et filtre restent utilisables). */
@media (max-width: 767.98px) {
  .table-wrap:has(> .suivi__table) { background: transparent; border: 0; overflow: visible; }
  .suivi__table, .suivi__table thead, .suivi__table tbody { display: block; }
  .suivi__table thead { margin-bottom: 6px; }
  .suivi__table thead tr { display: flex; gap: 4px; overflow-x: auto; overscroll-behavior-x: contain; scrollbar-width: none; }
  .suivi__table thead tr::-webkit-scrollbar { display: none; }
  .suivi__table th { flex: 0 0 auto; padding: 0 2px 0 10px; border: 1px solid var(--line); border-radius: var(--r-pill); background: var(--surface); font-size: 11px; }
  .suivi__table th[data-sans-filtre] { display: none; }
  /* Nom : trié par prénom, la recherche suffit. Examen : déjà dans les filtres du haut. */
  .suivi__table th.suivi__sans-pastille { display: none; }
  .suivi__table tbody tr {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    align-items: center;
    gap: 6px 10px;
    margin-bottom: 6px;
    padding: 10px 12px;
    border: 1px solid var(--line);
    border-radius: var(--r-ctl);
    background: var(--surface);
  }
  
  .suivi__table td { display: block; padding: 0; border: 0; min-width: 0; }
  .suivi__table .suivi__nom { grid-column: 1 / -1; font-size: 15px; }
  .suivi__table .suivi__nom .avatar { display: none; }
  .suivi__table .suivi__exos { grid-column: 1 / -1; order: 9; }
  .suivi__table .suivi__progression { grid-column: 1 / -1; }
  .suivi__table .classement__cellule { display: flex; align-items: center; gap: 10px; }
  
  .suivi__table .classement__cellule b { font-size: 13px; color: var(--ink-2); }
  
  
  
  .suivi__voir-libelle { display: inline; margin-right: auto; }
  
}

/* Niveaux préparés : accordéons serrés, l'un sous l'autre. */
.suivi .suivi__groupe + .suivi__groupe { margin-top: -10px; }
.suivi__groupe .acc__titre { margin: 0; }
.suivi__groupe > summary { min-height: 52px; grid-template-columns: 32px minmax(0, 1fr) auto 16px; }
.suivi__groupe .acc__corps { padding: 12px; }
.suivi .classement__cellule b { white-space: nowrap; }
/* Export et « Créer un groupe » à droite du titre ; un clic sur eux ne plie pas l'accordéon. */



.suivi__groupe-creer { display: inline-flex; align-items: center; gap: 6px; }
.suivi__groupe-creer .icone { width: 16px; height: 16px; }

.suivi-groupe-dialogue__existe { display: grid; gap: 8px; margin-top: 12px; padding: 12px; border: 1px solid var(--line); border-radius: var(--r-ctl); background: var(--surface-2); }
.suivi-groupe-dialogue__existe[hidden] { display: none; }
.suivi-groupe-dialogue__existe label { display: flex; gap: 8px; align-items: flex-start; }
@media (max-width: 599px) {
  .suivi__libelle { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }
  .suivi__groupe-creer { width: 40px; height: 40px; min-height: 0; justify-content: center; padding: 0; border-radius: var(--r-ctl); }
  /* Place pour le titre : sans pastille d'icône, il tient sur une ligne. */
  .suivi__groupe > summary { grid-template-columns: minmax(0, 1fr) auto 16px; gap: 10px; padding: 8px 12px 8px 14px; }
  .suivi__groupe .acc__ico { display: none; }
}

/* Téléphone : les milieux sur une seule ligne qui défile, la case dessous. */
@media (max-width: 767.98px) {
  
  
  .suivi__milieux .seg--choix { flex-wrap: nowrap; border-radius: var(--r-pill); overflow-x: auto; overscroll-behavior-x: contain; scrollbar-width: none; }
  
  /* Les choix se partagent toute la largeur (espace égal autour de chacun) ;
     s'ils ne tiennent pas, la ligne défile. */
  
  .suivi__milieux .seg--choix span { justify-content: center; width: 100%; min-height: 32px; padding: 0 6px; font-size: 13px; white-space: nowrap; }
  .suivi__masquer { min-height: 32px; padding-left: 4px; font-size: 13px; }
}

/* ---- Tableaux de membres compacts (registre, liste des membres) : sur
   téléphone, une ligne par membre (nom, niveau, pastilles d'état, sans
   avatar) ; toucher la ligne déplie le détail, chaque valeur précédée de son
   intitulé. Les en-têtes restent utilisables : bande de tri et filtre qui
   défile. ---- */
@media (max-width: 767.98px) {
  .table-wrap:has(> .table-compacte) { background: transparent; border: 0; overflow: visible; }
  .table-compacte,
  .table-compacte thead,
  .table-compacte tbody { display: block; }

  .table-compacte thead { margin-bottom: 6px; }
  .table-compacte thead tr {
    display: flex;
    gap: 4px;
    overflow-x: auto;
    overscroll-behavior-x: contain;
    scrollbar-width: none;
  }
  .table-compacte thead tr::-webkit-scrollbar { display: none; }
  /* Une colonne sans tri ni filtre (Téléphone, E-mail…) n'a rien à faire
     dans la bande qui défile : son détail s'ouvre avec la ligne, pas ici. */
  .table-compacte th[data-sans-filtre] { display: none; }
  .table-compacte th {
    flex: 0 0 auto;
    padding: 0 2px 0 10px;
    border: 1px solid var(--line);
    border-radius: var(--r-pill);
    background: var(--surface);
    font-size: 11px;
  }

  .table-compacte tbody tr {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 4px 8px;
    margin-bottom: 4px;
    padding: 7px 10px;
    border: 1px solid var(--line);
    border-radius: var(--r-ctl);
    background: var(--surface);
    cursor: pointer;
    touch-action: manipulation;
    -webkit-user-select: none;
    user-select: none;
  }
  .table-compacte td { display: block; padding: 0; border: 0; }
  .table-compacte .compacte__detail,
  .table-compacte .col-bureau { display: none; }

  /* Le nom reste toujours lisible en entier : pas d'avatar, retour à la
     ligne plutôt que coupure. */
  
  .table-compacte .compacte__nom .avatar { display: none; }
  .table-compacte .compacte__niveau { color: var(--ink-2); font-size: 12.5px; }

  /* Repliée : chaque état n'est qu'une pastille de couleur (le libellé reste
     lu par les lecteurs d'écran). */
  .table-compacte .compacte__etat .chip {
    width: 9px;
    height: 9px;
    padding: 0;
    gap: 0;
    background: transparent;
    font-size: 0;
  }
  

  /* Chevron : bas replié, haut déplié. */
  .table-compacte tbody tr::after {
    content: "";
    width: 7px;
    height: 7px;
    margin: 0 2px 3px 2px;
    border-right: 2px solid var(--ink-3);
    border-bottom: 2px solid var(--ink-3);
    transform: rotate(45deg);
    transition: transform 160ms var(--ease-out);
  }
  .table-compacte tbody tr.is-ouvert::after { margin-bottom: -3px; transform: rotate(-135deg); }
  .table-compacte tbody tr:has(.table-empty)::after { content: none; }

  /* Dépliée : saut de ligne, puis intitulé + valeur pour chaque cellule. */
  .table-compacte tbody tr.is-ouvert::before { content: ""; order: 1; flex-basis: 100%; height: 0; }
  .table-compacte .is-ouvert .compacte__etat,
  .table-compacte .is-ouvert .compacte__detail {
    order: 2;
    display: inline-flex;
    align-items: center;
    gap: 5px;
    font-size: 13px;
  }
  .table-compacte .is-ouvert td[data-libelle]::before {
    content: attr(data-libelle);
    color: var(--ink-3);
    font-size: 11.5px;
  }
  
  
  
  
  
  
}

@media (max-width: 767.98px) and (prefers-reduced-motion: reduce) {
  .table-compacte tbody tr::after { transition: none; }
}

/* Recherche de personnes dans une fenêtre : la liste de suggestions prend sa
   place dans la fenêtre (qui défile) au lieu de flotter par-dessus ses boutons. */
.confirm-dialog .choix-personnes__suggestions {
  position: static;
  max-height: 14rem;
  overflow-y: auto;
  box-shadow: none;
}

/* Éditeur de modèle de document : la page d'édition reste blanche dans les
   trois styles, seul le cadre suit les jetons. */

.cotisations-compact__tete { display: flex; flex-wrap: wrap; align-items: baseline; gap: 2px 14px; }
.cotisations-compact__tete .h2 { margin: 0; font-size: 17px; }
.cotisations-compact__aide { margin: 0; }
.cotisations-liste { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 4px 28px; }
@media (max-width: 900px) { .cotisations-liste { grid-template-columns: 1fr; } }
.cotisation-ligne { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 10px; }
.cotisation-ligne--liste { display: grid; grid-template-columns: minmax(0, 1fr) auto 12rem; align-items: center; gap: 6px 12px; padding: 3px 0; border-bottom: 1px solid var(--line); }
.cotisation-ligne__actions { display: grid; grid-template-columns: 5.5rem 5.5rem; justify-content: end; gap: 6px; }
.cotisation-ligne__actions .button-small { width: 100%; justify-content: center; }
.cotisation-ligne__nom .input { width: 100%; }
[data-nom-affiche][hidden], [data-nom-champ][hidden] { display: none; }
.cotisation-ligne__nom { flex: 1 1 12rem; min-width: 0; font-size: 14px; }
.cotisation-ligne .input { width: auto; padding-top: 6px; padding-bottom: 6px; min-height: 0; }


/* Lignes à remplir : libellé au-dessus de chaque case, cases alignées en bas. */

.cotisation-ligne__titre { font-size: 14px; flex: none; }
.cotisation-ligne--liste .cotisation-ligne__montant { display: inline-flex; align-items: center; gap: 4px; }
.cotisation-ligne__montant .input { width: 6.5rem; text-align: right; font-variant-numeric: tabular-nums; }
/* Gestion des membres (proposition A) : chiffres à traiter, tableau, actions à droite. */
/* Titre porté par la barre du haut : les actions seules restent à droite. */
@media (min-width: 768px) {
  .page-entete > .actions:only-child { margin-left: auto; }
}
.relance__bas { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 12px 24px; }
.relance__modeles { margin: 0; font-size: 16px; }
.page.invitation { max-width: none; }
.invitation .split { grid-template-columns: minmax(0, 1fr); }
.invitation__grille > .card { margin: 0; }
.champs-3--identite { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); }
.champs-3--identite > :nth-child(3) { grid-column: 1 / -1; }
@media (max-width: 760px) { .champs-3--identite { grid-template-columns: 1fr; } }
.invitation__grille { display: grid; grid-template-columns: minmax(0, 1fr); gap: var(--gap); align-items: start; }
@media (min-width: 1100px) { .invitation__grille { grid-template-columns: minmax(0, 5fr) minmax(0, 6fr); } }
.invitation .card { display: grid; gap: 12px; align-content: start; }
.invitation .card .field { margin: 0; }
.champs-3 { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px 16px; align-items: start; }
@media (max-width: 760px) { .champs-3 { grid-template-columns: 1fr; } }
.invitation__interrupteurs { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px 20px; }
@media (max-width: 760px) { .invitation__interrupteurs { grid-template-columns: 1fr; } }
.invitation__parent { display: grid; gap: 8px; padding-top: 12px; border-top: 1px solid var(--line); }
.invitation__parent[hidden] { display: none; }
.invitation__sous-titre { margin: 0; font-family: var(--font-display); font-size: 16px; }
.invitation__cotisation { display: grid; grid-template-columns: minmax(0, 2fr) minmax(0, 1fr); gap: 12px 16px; align-items: start; }
.invitation__cotisation [data-demande] { grid-column: 1 / -1; }
@media (max-width: 760px) { .invitation__cotisation { grid-template-columns: 1fr; } }
.invitation__editeur { display: grid; gap: 8px; }
.champs-ligne { display: grid; grid-template-columns: minmax(0, 18rem) minmax(0, 11rem); gap: 12px 20px; align-items: start; }
@media (max-width: 640px) { .champs-ligne { grid-template-columns: 1fr; } }

.page--gestion > .page-entete { margin: 0; }
.page--gestion .gestion-kpis { margin: 0; }
@media (min-width: 1200px) { .page--gestion { margin-top: -0.9rem; } }
.gestion-kpis { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 10px; margin-bottom: 12px; }
.gestion-kpi { display: flex; align-items: baseline; gap: 10px; text-align: left; padding: 8px 14px; background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-card); transition: border-color 150ms var(--ease-out), background-color 150ms var(--ease-out), transform 160ms var(--ease-out); cursor: pointer; color: inherit; font: inherit; }
.gestion-kpi:active { transform: scale(0.97); }
.gestion-kpi[aria-pressed="true"] { border-color: var(--accent); background: var(--accent-soft); }
.gestion-kpi__valeur { font-family: var(--font-display); font-weight: var(--display-weight, 700); font-size: 28px; line-height: 1.1; font-variant-numeric: tabular-nums; }
.gestion-kpi--alerte .gestion-kpi__valeur { color: var(--warn); }
.gestion-kpi__libelle { color: var(--ink-2); font-size: 15px; line-height: 1.2; }
.gestion-deux { display: grid; grid-template-columns: minmax(0, 1fr) 340px; gap: 16px; align-items: start; }


.gestion-groupe__titre { margin: 0 0 6px; padding: 0 8px; font-family: var(--font-body); font-size: 14px; font-weight: 700; color: var(--ink-2); }
.gestion-action { display: flex; align-items: center; gap: 12px; padding: 9px 8px; text-decoration: none; border-radius: var(--r-ctl); color: var(--ink); transition: background-color 120ms var(--ease-out); }
.gestion-action__texte { flex: 1; min-width: 0; display: grid; gap: 1px; }
.gestion-action__texte b { font-weight: 600; line-height: 1.25; }

.gestion-action__icone { width: 34px; height: 34px; flex: none; display: grid; place-items: center; border-radius: var(--r-ctl); background: var(--accent-soft); color: var(--accent-text); }
.gestion-action__icone svg { width: 20px; height: 20px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.compteur-action { display: inline-grid; place-items: center; min-width: 22px; height: 22px; padding: 0 7px; border-radius: var(--r-pill); background: var(--danger); color: var(--danger-ink, #fff); font-size: 12px; font-weight: 700; font-variant-numeric: tabular-nums; }
.compteur-action--discret { background: var(--surface-2); color: var(--ink-2); }
@media (hover: hover) and (pointer: fine) { .gestion-action:hover { background: var(--surface-2); } }
/* Liste des membres : bouton Baptêmes à droite de la recherche, sur la même
   ligne (pas de zone vide). Mobile : sans le texte explicatif, aligné sur le
   champ ; grand écran : avec le texte, aligné en bas de la barre. */
.liste-haut { display: grid; grid-template-columns: minmax(0, 1fr) auto; align-items: start; gap: 10px; }
.liste-haut > * { grid-column: 1 / -1; }
.liste-haut > .dt-bar { grid-column: 1; grid-row: 1; }
.liste-haut > .liste-haut__action { grid-column: 2; grid-row: 1; }
.liste-haut__action { padding: 6px 14px 6px 6px; background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-card); touch-action: manipulation; -webkit-user-select: none; user-select: none; transition: background-color 120ms var(--ease-out), transform 160ms var(--ease-out); }
.liste-haut__action:active { transform: scale(0.97); }
.liste-haut__action .gestion-action__texte .muted { display: none; }
@media (min-width: 768px) {
  
  
  .liste-haut__action .gestion-action__texte .muted { display: block; }
}

.modes-courriel { border: 0; padding: 0; margin: 0; display: grid; gap: 8px; }
@media (min-width: 900px) { .modes-courriel { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
.modes-courriel legend { font-weight: 600; margin-bottom: 6px; padding: 0; }
.mode-courriel { display: flex; gap: 10px; align-items: flex-start; padding: 10px 12px; border: 1px solid var(--line); border-radius: var(--r-ctl); cursor: pointer; transition: border-color 150ms var(--ease-out), background-color 150ms var(--ease-out); }
.mode-courriel:has(input:checked) { border-color: var(--accent); background: var(--accent-soft); }
.mode-courriel:active { transform: scale(0.99); }
.mode-courriel__texte { display: grid; gap: 2px; }
.invitation__courriel { display: grid; gap: 4px; margin: 16px 0; }
[data-demande] { transition: opacity 150ms var(--ease-out); }
[data-demande].est-inactif { opacity: 0.5; }
.page-texte { max-width: 46rem; line-height: 1.55; }
.page-texte table { border-collapse: collapse; width: 100%; }
.page-texte td, .page-texte th { border: 1px solid var(--line); padding: 6px 8px; vertical-align: top; }
.page-texte .align-center { text-align: center; }
.page-texte .align-right { text-align: right; }
.editeur-modele {
  display: grid;
  gap: 16px;
}

.editeur-modele__actions {
  justify-content: flex-end;
  flex-wrap: wrap;
}

.editeur-modele__mise-en-page {
  display: grid;
  gap: 12px;
}

@media (min-width: 720px) {
  .editeur-modele__mise-en-page {
    grid-template-columns: minmax(0, 220px) 1fr;
    align-items: end;
  }
}

.editeur-modele .tox-tinymce {
  border-color: var(--line);
  border-radius: var(--r-ctl);
}

.donnees-liste {
  display: grid;
  gap: 4px;
  max-height: 50dvh;
  overflow-y: auto;
  overscroll-behavior: contain;
}

.donnee-choix {
  min-height: 44px;
  padding: 0 12px;
  border: 1px solid var(--line);
  border-radius: var(--r-ctl);
  background: var(--surface);
  color: var(--ink);
  font: inherit;
  text-align: left;
  touch-action: manipulation;
  user-select: none;
  -webkit-user-select: none;
  transition: transform 140ms cubic-bezier(0.23, 1, 0.32, 1);
}

.donnee-choix:active {
  transform: scale(0.97);
}

@media (hover: hover) and (pointer: fine) {
  .donnee-choix:hover {
    background: var(--surface-2);
  }
}

@media (prefers-reduced-motion: reduce) {
  .donnee-choix {
    transition: none;
  }
  .donnee-choix:active {
    transform: none;
  }
}

/* Analyse de risque d'un site : une case par ligne, cible tactile ≥ 44 px. */
.analyse-risque {
  display: grid;
  gap: 1.1rem;
  min-width: 0;
  margin: 0;
  padding: 0;
  border: 0;
}

.cases-liste {
  display: grid;
  gap: 0.25rem;
}

.cases-liste__ligne {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  min-height: 2.75rem;
  padding: 0.35rem 0.5rem;
  border-radius: 0.6rem;
  color: var(--text-strong);
  cursor: pointer;
  touch-action: manipulation;
}

.cases-liste__ligne input[type="checkbox"] {
  flex: none;
  width: 1.25rem;
  height: 1.25rem;
  accent-color: var(--accent);
}

.analyse-risque textarea,
.analyse-risque input[type="text"] {
  width: 100%;
  padding: 0.7rem 0.95rem;
  border: 1px solid var(--border);
  border-radius: var(--r-ctl);
  background: var(--field);
  color: var(--text-strong);
  font: inherit;
  font-size: 1rem;
}

/* Choix de la portée d'un nouveau modèle de document. */
.portees {
  display: grid;
  gap: 0.75rem;
}

@media (min-width: 640px) {
  .portees {
    grid-template-columns: 1fr 1fr;
  }
}

.portee-carte {
  display: grid;
  gap: 0.25rem;
  min-height: 2.75rem;
  padding: 0.85rem 1rem;
  border: 1px solid var(--border);
  border-radius: 0.85rem;
  color: var(--text-strong);
  text-decoration: none;
  touch-action: manipulation;
}

.portee-carte.is-on {
  border-color: var(--accent);
  box-shadow: 0 0 0 3px var(--accent-soft);
}

/* FAQ par rôle : onglets de rôles, sections en lecture et en édition. */
.faq-roles {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin-bottom: 1rem;
}

.faq-section {
  display: grid;
  gap: 0.75rem;
  margin: 0 0 1.25rem;
  padding: 1rem;
  border: 1px solid var(--border);
  border-radius: 0.85rem;
}



/* Checklist sécurité d'une sortie. */
.checklist__bandeau {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  padding: 0.75rem 1rem;
  border-radius: 0.85rem;
  background: var(--accent-soft);
}

.checklist__bandeau p {
  margin: 0;
}

.checklist__role {
  margin: 1rem 0 0.25rem;
  font-size: 0.85rem;
  font-weight: 800;
  color: var(--text-strong);
}

/* La checklist utilise toute la largeur de la page. */
.page.checklist {
  max-width: none;
}

.checklist__pieces,
.checklist__demandes {
  display: grid;
  gap: 0.25rem;
  margin: 0;
  padding: 0;
  list-style: none;
}

.checklist__pression {
  display: grid;
  gap: 0.25rem;
  padding: 0 0.5rem 0.5rem 2.5rem;
}

.checklist__pression .input {
  font-size: 1rem;
  max-width: 12rem;
}

.checklist__pression p {
  margin: 0;
}

/* Une pièce à pression tient sur une ligne : case, pression, rappel, autonomie. */
@media (min-width: 700px) {
  .checklist__piece:has(.checklist__pression) {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    column-gap: 1rem;
  }

  .checklist__piece:has(.checklist__pression) > .form-field__error {
    flex-basis: 100%;
    padding-left: 2.5rem;
  }

  .checklist__pression {
    display: flex;
    flex: 1 1 auto;
    flex-wrap: wrap;
    align-items: center;
    column-gap: 1rem;
    padding: 0.25rem 0.5rem;
  }
}

.checklist-people {
  display: grid;
  gap: 0.75rem;
}

.checklist-people__row {
  display: grid;
  gap: 0.25rem;
}

.checklist-people__row .input {
  font-size: 1rem;
}

@media (min-width: 600px) {
  .checklist-people__row {
    grid-template-columns: minmax(0, 1fr) minmax(12rem, 18rem);
    align-items: center;
    column-gap: 1rem;
  }

  .checklist-people__row .form-field__error {
    grid-column: 1 / -1;
  }
}

.checklist-piece--out-of-service {
  color: var(--danger);
}

.checklist-piece--out-of-service .checklist-piece__name {
  text-decoration: line-through;
}

.checklist__risque {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  min-height: 2.75rem;
}

.checklist__ajout {
  display: grid;
  gap: 0.5rem;
  margin-top: 0.75rem;
}

.checklist__ajout .input {
  font-size: 1rem;
}

@media (min-width: 640px) {
  .checklist__ajout {
    grid-template-columns: 1fr auto;
  }
}

.documents-sortie__entete {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.5rem 0.75rem;
  margin: 0 0 0.75rem;
}

/* ---- Page guidée du formulaire d'activité (charte §3, « Formulaire guidé ») ---- */


.form-section--erreur {
  border-color: var(--danger);
}











.form-section .num {
  display: grid;
  flex: none;
  place-items: center;
  width: 26px;
  height: 26px;
  border-radius: 50%;
  background: var(--accent);
  color: var(--accent-ink);
  font-size: 13px;
  font-weight: 700;
}

.form-section .num--opt {
  background: var(--surface-2);
  color: var(--ink-2);
}

.form-section__texte {
  display: flex;
  flex-direction: column;
  gap: 2px;
  min-width: 0;
}

.form-section__titre {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 4px 10px;
}

.form-section__resume {
  color: var(--ink-2);
  font-size: 13px;
}

.form-section__corps {
  display: flex;
  flex-direction: column;
  gap: 16px;
  animation: form-section-entre 160ms var(--ease-out);
}

.form-section__corps[hidden],
.form-section__repas-reglages[hidden] {
  display: none;
}

.form-section__repas {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

@keyframes form-section-entre {
  from {
    opacity: 0;
    transform: translateY(-4px);
  }
}

.chip--req {
  background: var(--accent-soft);
  color: var(--accent-text);
}

.chip--ok {
  background: var(--ok-soft);
  color: var(--ok);
}

.chip--err {
  background: var(--danger-soft);
  color: var(--danger);
}

.facultatif {
  color: var(--ink-2);
  font-weight: 400;
}

.field--erreur .input {
  border-color: var(--danger);
  box-shadow: 0 0 0 1px var(--danger);
}

.field--erreur > label {
  color: var(--danger);
}

/* Écrans de connexion : leurs champs n'ont pas la classe `.input`. */
.login-card .field--erreur input {
  border-color: var(--danger);
  box-shadow: 0 0 0 1px var(--danger);
}

.field--secoue {
  animation: champ-secoue 320ms var(--ease-out);
}

@keyframes champ-secoue {
  20% {
    transform: translateX(-4px);
  }
  50% {
    transform: translateX(4px);
  }
  80% {
    transform: translateX(-2px);
  }
}

/* Choix à deux positions (Sortie / Stage). */
.segment {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 4px;
  padding: 4px;
  border-radius: calc(var(--r-ctl) + 2px);
  background: var(--surface-2);
}

.segment[hidden] {
  display: none;
}

.segment button {
  min-height: 44px;
  padding: 0 8px;
  border: 0;
  border-radius: var(--r-ctl);
  background: transparent;
  color: var(--ink-2);
  font: inherit;
  font-weight: 600;
  cursor: pointer;
  touch-action: manipulation;
  -webkit-user-select: none;
  user-select: none;
  transition: background 120ms ease, transform 100ms var(--ease-out);
}

.segment button:active {
  transform: scale(0.97);
}

.segment button[aria-pressed="true"] {
  background: var(--surface);
  color: var(--ink);
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.08);
}

.note {
  margin: 0;
  padding: 10px 12px;
  border-radius: var(--r-ctl);
  background: var(--surface-2);
  color: var(--ink-2);
  font-size: 13px;
}

.note--warn {
  background: var(--warn-soft);
  color: var(--warn);
}

.note[hidden] {
  display: none;
}

/* Cartes à radio : un choix par ligne, le choisi bordé d'accent. */
.choix {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.choix label {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: var(--r-ctl);
  cursor: pointer;
  touch-action: manipulation;
}

.choix label:has(input:checked) {
  border-color: var(--accent);
  background: var(--accent-soft);
}

.choix input {
  margin-top: 3px;
  accent-color: var(--accent);
}

.choix small {
  display: block;
  color: var(--ink-2);
  font-size: 13px;
}

[data-ou-payer][hidden] {
  display: none;
}

/* Récapitulatif des erreurs, en haut de page après un envoi refusé. */
.resume-erreurs {
  padding: 16px 18px;
  border: 1px solid var(--danger);
  border-radius: var(--r-card);
  background: var(--danger-soft);
  transition: opacity 200ms ease, transform 200ms var(--ease-out);
}

@starting-style {
  .resume-erreurs {
    opacity: 0;
    transform: translateY(-6px);
  }
}

.resume-erreurs .h2 {
  color: var(--danger);
  font-size: 17px;
}

.resume-erreurs ul {
  display: flex;
  flex-direction: column;
  gap: 4px;
  margin: 8px 0 0;
  padding: 0;
  list-style: none;
}

.resume-erreurs a {
  color: var(--danger);
  font-weight: 600;
  text-underline-offset: 3px;
}

/* Barre d'action collante en bas de la page guidée. */
.barre-action {
  position: sticky;
  bottom: 12px;
  z-index: 7;
  padding: 10px 12px 10px 16px;
  border: 1px solid var(--line);
  border-radius: var(--r-card);
  background: color-mix(in srgb, var(--surface) 92%, transparent);
  -webkit-backdrop-filter: blur(8px);
  backdrop-filter: blur(8px);
}

.barre-action__in {
  display: flex;
  align-items: center;
  gap: 12px;
}

.barre-action__etat {
  flex: 1;
  min-width: 0;
  font-size: 13px;
}

.barre-action__etat button {
  padding: 0;
  border: 0;
  background: none;
  color: var(--danger);
  font: inherit;
  font-weight: 700;
  text-align: left;
  text-decoration: underline;
  text-underline-offset: 3px;
  cursor: pointer;
  touch-action: manipulation;
}

/* Même largeur que les cartes de la page : sans cela la barre déborde à droite. */


/* « Prêt à publier » absent avant la fin : la place reste, les boutons ne bougent pas. */


@media (max-width: 767.98px) {
  .barre-action {
    bottom: calc(76px + env(safe-area-inset-bottom, 0px));
  }
}

@media (prefers-reduced-motion: reduce) {
  .field--secoue,
  .form-section__corps {
    animation: none;
  }

  
}

/* ---- Gonflages de Zélande : lignes de la fiche de sortie et du séjour ---- */
.gonflages-liste { list-style: none; margin: 0; padding: 0; }
.gonflage-ligne {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 4px 12px;
  padding: 6px 0;
  border-top: 1px solid var(--line);
}
.gonflage-ligne:first-child { border-top: 0; }
.gonflage-ligne__titre { flex: 1 1 12rem; min-width: 0; font-weight: 600; }
.gonflage-ligne__pastilles { display: flex; flex-wrap: wrap; gap: 6px; }
.gonflage-ligne__sites { flex-basis: 100%; }
.gonflage-ligne a { display: inline-flex; align-items: center; min-height: 44px; }
.gonflage-ligne__case { display: flex; align-items: center; gap: 10px; min-height: 44px; cursor: pointer; }
.gonflage-ligne__case input { flex: none; }

/* Paiements : bloc « Mon paiement », champs à copier, liste des inscrits. */

/* Un QR se lit en noir sur blanc, quelle que soit l'apparence : jetons à part,
   hors des trois blocs d'apparence. */
:root {
  --qr-fond: #ffffff;
  --qr-trait: #000000;
}
.bloc-paiement__tete,
.feuille-paiement__tete {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
}

.bloc-paiement__titre {
  flex: 1;
  min-width: 0;
}

.bloc-paiement__tete {
  align-items: center;
}

.bloc-paiement__tete .chip {
  align-self: flex-start;
}

.bloc-paiement__montant {
  font-family: var(--font-display);
  font-size: 26px;
  font-weight: var(--display-weight);
  line-height: 1.1;
}

.qr-bloc {
  display: grid;
  justify-items: center;
  gap: 8px;
}

.qr-bloc__qr {
  width: min(240px, 100%);
  padding: 10px;
  border-radius: var(--r-ctl);
  background: var(--qr-fond);
}

.qr-bloc--compact .qr-bloc__qr {
  width: 96px;
  padding: 5px;
}

.bloc-paiement__details {
  margin-top: 12px;
  padding-top: 4px;
  border-top: 1px solid var(--line);
}

.bloc-paiement__resume {
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-height: 44px;
  font-size: 14px;
  font-weight: 600;
  color: var(--ink-2);
  cursor: pointer;
  list-style: none;
  touch-action: manipulation;
  -webkit-user-select: none;
  user-select: none;
}

.bloc-paiement__resume::-webkit-details-marker {
  display: none;
}

.bloc-paiement__resume::after {
  content: "";
  width: 8px;
  height: 8px;
  margin-right: 4px;
  border-right: 2px solid currentColor;
  border-bottom: 2px solid currentColor;
  transform: translateY(-2px) rotate(45deg);
  transition: transform 160ms var(--ease-out);
}

.bloc-paiement__details[open] > .bloc-paiement__resume::after {
  transform: translateY(2px) rotate(225deg);
}

.bloc-paiement__corps {
  display: grid;
  gap: 8px;
  padding-bottom: 2px;
}

.bloc-paiement__corps .champs-copie {
  gap: 6px;
}

.bloc-paiement__corps .champ-copie {
  padding: 6px 6px 6px 12px;
}

.bloc-paiement__corps .champ-copie dd {
  font-size: 15px;
}

.bloc-paiement__corps .champ-copie__bouton {
  min-height: 36px;
  padding-inline: 12px;
}

@media (min-width: 640px) {
  .bloc-paiement__corps .champs-copie {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (prefers-reduced-motion: reduce) {
  .bloc-paiement__resume::after {
    transition: none;
  }
}

.qr-bloc__qr svg {
  display: block;
  width: 100%;
  height: auto;
}

.qr-bloc__qr svg path {
  fill: var(--qr-trait);
}

.champs-copie {
  display: grid;
  gap: 8px;
  margin: 0;
}

.champ-copie {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  gap: 2px 12px;
  padding: 10px 12px;
  border-radius: var(--r-ctl);
  background: var(--surface-2);
}

.champ-copie dt {
  grid-column: 1;
  font-size: 13px;
  font-weight: 600;
  color: var(--ink-2);
}

.champ-copie dd {
  grid-column: 1;
  margin: 0;
  font-size: 16px;
  font-weight: 600;
  font-variant-numeric: tabular-nums;
  overflow-wrap: anywhere;
}

.champ-copie__bouton {
  grid-column: 2;
  grid-row: 1 / span 2;
  min-height: 44px;
  user-select: none;
  -webkit-user-select: none;
  touch-action: manipulation;
}

.champ-copie__bouton.is-copie {
  background: var(--accent);
  border-color: var(--accent);
  color: var(--accent-ink);
}

.liste-paiements__liste {
  display: grid;
  margin: 0;
  padding: 0;
  list-style: none;
}

.liste-paiements__ligne {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto auto;
  align-items: center;
  gap: 12px;
  width: 100%;
  min-height: 52px;
  padding: 10px 2px;
  border: 0;
  border-top: 1px solid var(--line);
  background: transparent;
  color: inherit;
  font: inherit;
  text-align: left;
  touch-action: manipulation;
  transition: transform 140ms cubic-bezier(0.23, 1, 0.32, 1);
}

.liste-paiements__liste li:first-child .liste-paiements__ligne {
  border-top: 0;
}

button.liste-paiements__ligne:not(:disabled) {
  cursor: pointer;
}

button.liste-paiements__ligne:not(:disabled):active {
  transform: scale(0.98);
}

.liste-paiements__nom {
  display: grid;
  min-width: 0;
  font-weight: 600;
  overflow-wrap: anywhere;
}

.liste-paiements__montant {
  font-weight: 600;
}

@media (hover: hover) and (pointer: fine) {
  button.liste-paiements__ligne:not(:disabled):hover {
    background: var(--surface-2);
  }
}

.feuille-paiement {
  max-height: 92dvh;
  overflow-y: auto;
}

.feuille-paiement > * + * {
  margin-top: 14px;
}

.feuille-paiement .champs-copie,
.feuille-paiement #feuille-paiement-corps {
  display: grid;
  gap: 14px;
}

@media (prefers-reduced-motion: reduce) {
  .liste-paiements__ligne {
    transition: none;
  }

  button.liste-paiements__ligne:not(:disabled):active {
    transform: none;
  }
}




.remboursement {
  display: grid;
  gap: 12px;
  padding-top: 14px;
  border-top: 1px solid var(--line);
}

.remboursement:first-of-type {
  padding-top: 0;
  border-top: 0;
}



.remboursement__montant {
  font-weight: 700;
}

.remboursement__iban {
  display: grid;
  gap: 8px;
  align-items: end;
}

@media (min-width: 768px) {
  .remboursement__iban {
    grid-template-columns: minmax(0, 1fr) auto;
  }
}

.remboursement__actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

/* Virements à vérifier : deux listes côte à côte, de largeur bornée. */


.virement-attribution .form-field,
.virement-attribution .hint {
  margin: 0;
}


/* Procédure numérotée (Banque du club) : une étape par ligne. */
.procedure {
  display: grid;
  gap: var(--s-3, 12px);
  margin: 0;
  padding-left: 1.4em;
  color: var(--ink);
  font-size: 15px;
  line-height: 1.45;
}
.procedure li::marker { color: var(--accent-text); font-weight: 700; }

/* Champ mot de passe avec bouton œil (core/mot_de_passe.js). */
.mot-de-passe {
  position: relative;
  display: block;
}

.mot-de-passe input {
  padding-right: 48px !important;
}

.mot-de-passe__oeil {
  position: absolute;
  top: 50%;
  right: 4px;
  transform: translateY(-50%);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  padding: 0;
  border: 0;
  border-radius: var(--r-ctl);
  background: transparent;
  color: var(--ink-2);
  cursor: pointer;
  -webkit-tap-highlight-color: transparent;
  touch-action: manipulation;
}

.mot-de-passe__oeil:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 1px;
}

@media (hover: hover) {
  .mot-de-passe__oeil:hover {
    color: var(--ink);
  }
}

/* Page « Paiements du club » : en-tête, remboursements compacts, fenêtres. */
.club-entete {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 8px 12px;
}



/* La banque ne demande presque jamais rien : une pastille discrète. */
.club-banque {
  border: 0;
  font: inherit;
  font-size: 12.5px;
  font-weight: 600;
  cursor: pointer;
  touch-action: manipulation;
}

.bouton-icone {
  position: relative;
  display: inline-grid;
  place-items: center;
  width: 40px;
  height: 40px;
  padding: 0;
  border: 1px solid var(--line);
  border-radius: var(--r-ctl);
  background: var(--surface);
  color: var(--ink-2);
  cursor: pointer;
  touch-action: manipulation;
  -webkit-tap-highlight-color: transparent;
  transition: transform 160ms var(--ease-out), color 160ms ease;
}

.bouton-icone:active {
  transform: scale(0.97);
}

.bouton-icone:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 1px;
}

.bouton-parametres__alerte {
  position: absolute;
  top: 6px;
  right: 6px;
  width: 9px;
  height: 9px;
  border-radius: 50%;
  background: var(--danger);
  box-shadow: 0 0 0 2px var(--surface);
}

@media (hover: hover) and (pointer: fine) {
  .bouton-icone:hover {
    color: var(--ink);
  }
}

.confirm-dialog--large {
  max-width: min(34rem, calc(100vw - 2rem));
  max-height: calc(100dvh - 2rem);
}

.confirm-dialog--large .confirm-dialog__card {
  gap: 14px;
}

.reglage {
  display: grid;
  gap: 8px;
  padding-top: 14px;
  border-top: 1px solid var(--line);
}

.reglage__titre {
  margin: 0;
  font-size: 15px;
}



.export-form__annees {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin: 0;
  padding: 0;
  border: 0;
}

.export-form__annees legend {
  width: 100%;
  padding: 0;
  margin-bottom: 6px;
}



.pastille-choix input {
  position: absolute;
  opacity: 0;
  pointer-events: none;
}

.pastille-choix span {
  display: inline-flex;
  align-items: center;
  min-height: 36px;
  padding: 0 14px;
  border: 1px solid var(--line);
  border-radius: var(--r-pill);
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  touch-action: manipulation;
  user-select: none;
  -webkit-user-select: none;
}

.pastille-choix input:checked + span {
  border-color: var(--accent);
  background: var(--accent-soft);
  color: var(--accent-text);
}

.pastille-choix input:focus-visible + span {
  outline: 2px solid var(--accent);
  outline-offset: 1px;
}

/* Remboursements : lignes serrées, séparées par un simple filet. */


.remb {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: start;
  gap: 6px 12px;
  padding: 10px 0;
  border-top: 1px solid var(--line);
}



.remb__montant {
  font-weight: 700;
}






/* Même largeur que les listes de « Virements à vérifier ». */


.remb__actions {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}


/* Section repliable (paiements reçus) : le titre est le bouton. */
.repliable__resume {
  display: grid;
  gap: 2px;
  cursor: pointer;
  list-style: none;
  touch-action: manipulation;
}

.repliable__resume::-webkit-details-marker {
  display: none;
}

.repliable__resume .h2 {
  margin: 0;
}

.repliable[open] > .repliable__resume {
  margin-bottom: 12px;
}

/* « Mon paiement » sur grand écran : montant, QR et détails se suivent au lieu
   de s'écarter aux deux bords de la carte. */
@media (min-width: 900px) {
  .bloc-paiement--qr {
    display: grid;
    grid-template-columns: max-content minmax(0, 1fr);
    grid-template-areas:
      "titre details"
      "chip details"
      "qr details";
    grid-template-rows: auto auto 1fr;
    align-items: start;
    column-gap: 32px;
    row-gap: 10px;
  }

  .bloc-paiement--qr .bloc-paiement__tete {
    display: contents;
  }

  .bloc-paiement--qr .bloc-paiement__titre {
    grid-area: titre;
  }

  .bloc-paiement--qr .bloc-paiement__tete .chip {
    grid-area: chip;
    justify-self: start;
  }

  .bloc-paiement--qr .qr-bloc {
    grid-area: qr;
  }

  .bloc-paiement--qr .qr-bloc--compact .qr-bloc__qr {
    width: 160px;
    padding: 8px;
  }

  .bloc-paiement--qr .bloc-paiement__details {
    grid-area: details;
    margin-top: 0;
    padding: 0 0 0 32px;
    border-top: 0;
    border-left: 1px solid var(--line);
  }
}

/* Bloc « Paiement » du formulaire d'activité : acompte du séjour en sous-bloc
   aéré, champs espacés. */
.regle-acompte-formulaire {
  display: grid;
  gap: 16px;
  margin-top: 8px;
  padding-top: 20px;
  border-top: 1px solid var(--line);
}



.regle-acompte-formulaire__tete .h3 {
  margin: 0;
  font-size: 17px;
}

.regle-acompte-formulaire__tete .muted {
  margin: 0;
}

.regle-acompte {
  display: grid;
  gap: 16px;
}

.regle-acompte > div {
  display: grid;
  gap: 16px;
}

.regle-acompte [hidden] {
  display: none;
}

.regle-acompte-formulaire > .note,
.regle-acompte > .note {
  margin: 0;
}

/* Paiements du club : « Paiements reçus » repliable, recherche, remboursements aérés. */
.repliable__resume {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.repliable__texte {
  display: grid;
  gap: 2px;
}

.repliable__chevron {
  flex: 0 0 auto;
  width: 9px;
  height: 9px;
  margin-right: 6px;
  border-right: 2px solid var(--ink-2);
  border-bottom: 2px solid var(--ink-2);
  transform: translateY(-2px) rotate(45deg);
  transition: transform 160ms var(--ease-out);
}

.repliable[open] > .repliable__resume .repliable__chevron {
  transform: translateY(2px) rotate(225deg);
}

.repliable[open] .repliable__indice {
  display: none;
}

@media (prefers-reduced-motion: reduce) {
  .repliable__chevron {
    transition: none;
  }
}

.filtres-recherche {
  display: flex;
  align-items: flex-end;
  gap: 8px;
  margin-bottom: 16px;
}

.filtres-recherche .form-field {
  flex: 1;
  max-width: 26rem;
}





/* Nom et pastille sur une ligne : la pastille garde sa largeur de contenu. */
.remb__nom {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 4px 8px;
}

.remb__actions {
  gap: 8px;
  margin-top: 2px;
}

/* Fiche : zone « Organisation », réservée à qui gère la sortie. Fond
   secondaire et en-tête propre pour ne pas la confondre avec les actions
   de participation juste au-dessus. */
.fiche__actions {
  flex-wrap: wrap;
}

.fiche__gestion {
  display: grid;
  gap: 12px;
  margin-top: 4px;
  padding: 14px 16px 16px;
  border: 1px solid var(--line);
  border-radius: var(--r-ctl);
  background: var(--surface-2);
}

.fiche__gestion-titre {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 4px 8px;
  margin: 0;
  color: var(--ink-2);
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.fiche__gestion-titre .icone {
  width: 16px;
  height: 16px;
}

.fiche__gestion-note {
  color: var(--ink-3);
  font-weight: 400;
  letter-spacing: 0;
  text-transform: none;
}



.fiche__gestion-actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px;
}

/* Fin de ligne, poussée à droite : Modifier, puis Annuler, puis la poubelle.
   Sur une seule ligne dès que la place le permet. */
.fiche__gestion-fin {
  display: flex;
  flex-wrap: nowrap;
  align-items: center;
  gap: 6px;
  margin-left: auto;
}

/* Grand écran : boutons resserrés pour tenir sur une seule ligne. */
@media (min-width: 1100px) {
  

  .fiche__gestion-actions :is(.button, .button-secondary) {
    padding-inline: 0.85rem;
  }
}

/* Écran étroit : une colonne alignée à gauche, chaque action pleine largeur
   (cibles de 44 px). Modifier en tête, puis Annuler et la poubelle sur une ligne. */
@media (max-width: 699px) {
  .fiche__gestion-actions {
    flex-direction: column;
    align-items: stretch;
  }

  .fiche__gestion-actions :is(.button, .button-secondary) {
    justify-content: center;
    min-height: 44px;
  }

  .fiche__gestion-fin {
    flex-wrap: wrap;
    justify-content: stretch;
    margin-left: 0;
    gap: 10px;
  }

  

  

  
}

/* Exercice demandé : liste et bouton sur une ligne dès que la place le permet. */
.exercice-demande {
  display: flex;
  flex: 1 1 100%;
  flex-wrap: wrap;
  align-items: flex-end;
  gap: 8px 10px;
  margin: 0;
}

.exercice-demande .form-field {
  flex: 1 1 260px;
  min-width: 0;
  margin: 0;
}

.exercice-demande__date {
  flex-basis: 100%;
}

.fiche__docs-ajout {
  flex-wrap: wrap;
}

/* Lieu : chiffres courts en tuiles, textes longs en lignes pleine largeur. */


.lieu-carte .card-head .h2,
.lieu-carte__adresse {
  margin: 0;
}





/* Icônes des informations du site, comme sur cyana.be. */
.lieu-carte__icone {
  display: inline-block;
  width: 1.25em;
  margin-right: 4px;
  font-size: 14px;
  letter-spacing: 0;
  text-align: center;
}



.lieu-carte__chiffres {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(110px, 1fr));
  gap: 8px;
  margin: 0;
}

.lieu-carte__chiffres > div {
  padding: 8px 12px;
  border-radius: var(--r-ctl);
  background: var(--surface-2);
}

.lieu-carte dt {
  color: var(--ink-3);
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.lieu-carte__chiffres dd {
  margin: 2px 0 0;
  font-family: var(--font-display);
  font-size: 18px;
  font-variant-numeric: tabular-nums;
}

.lieu-carte__infos {
  display: grid;
  margin: 0;
}

.lieu-carte__infos > div {
  display: grid;
  gap: 2px;
  padding: 10px 0;
  border-top: 1px solid var(--line);
}



.lieu-carte__infos dd {
  margin: 0;
  color: var(--ink);
  font-size: 14px;
  line-height: 1.45;
}



/* Synthèse d'un séjour : géré sur ordinateur, toute la largeur ; montants sur
   une ligne. La barre de défilement horizontale (superposée sur macOS) ne
   doit pas masquer la ligne des totaux : place réservée sous le tableau.
   Le nom reste visible quand on fait défiler les colonnes. */




.synthese__tableau th:first-child,
.synthese__tableau td:first-child {
  position: sticky;
  left: 0;
  z-index: 1;
  background: var(--surface);
}

/* Bouton « Enregistrer … » : teinté et avec son icône, pour se détacher du
   fond de la carte (un secondaire a la couleur du fond). */
.button-enregistrer {
  gap: 6px;
}

.button-secondary.button-enregistrer {
  border-color: color-mix(in srgb, var(--accent) 45%, transparent);
  background: var(--accent-soft);
  color: var(--ink);
}

.button-enregistrer .icone {
  width: 1rem;
  height: 1rem;
  flex-basis: 1rem;
  color: var(--accent);
}

.button.button-enregistrer .icone {
  color: currentColor;
}

/* Organisation d'un séjour : « Gérer les logements », icône maison. */


.button-logements .icone {
  width: 1rem;
  height: 1rem;
  flex-basis: 1rem;
}

/* Parcours d'un séjour, étape « Plongées » : quatre choix, puis le tableau
   jour × heure seulement pour « Personnalisé ». */
.parcours-plongees__modes {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 8px;
  margin: 0;
  padding: 0;
  border: 0;
}

.parcours-plongees__mode {
  display: flex;
  align-items: center;
  gap: 10px;
  min-height: 44px;
  padding: 10px 14px;
  border: 1px solid var(--line);
  border-radius: var(--r-ctl);
  background: var(--surface);
  cursor: pointer;
  touch-action: manipulation;
  -webkit-tap-highlight-color: transparent;
}

.parcours-plongees__mode:has(input:checked) {
  border-color: var(--accent);
  background: var(--accent-soft);
}





.grille-plongees {
  width: 100%;
  border-collapse: separate;
  border-spacing: 4px;
}

.grille-plongees th {
  padding: 4px 8px;
  color: var(--ink-2);
  font-size: 13px;
  font-weight: 700;
  text-align: left;
  white-space: nowrap;
}



.grille-plongees td {
  padding: 0;
}

.grille-plongees__case {
  position: relative;
  display: grid;
  place-items: center;
  min-width: 56px;
  height: 44px;
  border: 1px solid var(--line);
  border-radius: var(--r-ctl);
  background: var(--surface);
  cursor: pointer;
  touch-action: manipulation;
  -webkit-tap-highlight-color: transparent;
  transition: transform 140ms var(--ease-out), background-color 140ms ease;
}

.grille-plongees__case:active {
  transform: scale(0.97);
}

.grille-plongees__case input {
  position: absolute;
  opacity: 0;
  pointer-events: none;
}



.grille-plongees__case:has(input:checked) {
  border-color: var(--accent);
  background: var(--accent);
}





.grille-plongees__note {
  position: absolute;
  bottom: 2px;
  font-size: 11px;
  font-weight: 700;
}

/* Récapitulatif du parcours : une section par catégorie, ce qui est choisi
   à gauche, ce que ça coûte à droite. */
.recap {
  gap: 0;
}

.recap__section {
  display: grid;
  gap: 8px;
  padding: 14px 0;
  border-bottom: 1px solid var(--line);
}





.recap__titre {
  display: flex;
  align-items: center;
  gap: 8px;
  margin: 0;
  font-family: var(--font-display);
  font-size: 17px;
}

.recap__icone {
  font-size: 18px;
}




.recap__corps p {
  margin: 0;
}



.recap__puces,
.recap__etapes,
.recap__montants {
  margin: 0;
  padding: 0;
  list-style: none;
}

.recap__puces {
  display: flex;
  flex-wrap: wrap;
  gap: 4px;
}

.recap__puces li {
  padding: 2px 8px;
  border-radius: var(--r-pill);
  background: var(--surface-2);
  color: var(--ink-2);
  font-size: 12.5px;
  white-space: nowrap;
}

.recap__etapes li {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 6px 8px;
  padding: 3px 0;
}

.recap__montants li {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  padding: 3px 0;
  font-size: 14px;
}



.recap__total {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  padding: 14px 0 4px;
  font-family: var(--font-display);
  font-size: 18px;
}

/* Décompte final : corrections d'une personne ou de plusieurs, chacune sur
   une ligne de champs ajustés à leur contenu sur grand écran. */
.corrections__bloc {
  display: grid;
  gap: 10px;
  padding-top: 14px;
  border-top: 1px solid var(--line);
}

.corrections__bloc .sous-titre {
  margin: 0;
}

.corrections__erreurs {
  margin: 0;
  padding-left: 1.2em;
}



.corrections__ligne .field {
  margin: 0;
}


.corrections__cibles {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin: 0;
  padding: 0;
  border: 0;
}

.corrections__cible,
.corrections__personne {
  position: relative;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  min-height: 36px;
  padding: 6px 14px;
  border: 1px solid var(--line);
  border-radius: var(--r-pill);
  background: var(--surface);
  font-size: 14px;
  cursor: pointer;
  touch-action: manipulation;
  -webkit-tap-highlight-color: transparent;
}

.corrections__cible input {
  position: absolute;
  opacity: 0;
  pointer-events: none;
}

.corrections__cible:has(input:checked) {
  border-color: var(--accent);
  background: var(--accent-soft);
  color: var(--ink);
  font-weight: 700;
}



.corrections__personne {
  min-height: 32px;
  padding: 4px 12px;
  border-radius: var(--r-ctl);
}

.corrections__personne:has(input:checked) {
  border-color: var(--accent);
}



.corrections__selection .hint {
  margin: 0;
}

.corrections__personnes {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}





/* Bandeau « Vous faites les choix de … » : le lien reste une cible tactile. */
.parcours__pour {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: var(--space-2) var(--space-3);
  margin: 0;
}



/* Fiche d'un séjour : bande des jours (une colonne par jour, chaque plongée
   par son heure), l'hébergement en bande sous toute la période. */
.bande-jours {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(64px, 1fr));
  gap: 6px;
}

.bande-jours__jour {
  display: grid;
  align-content: start;
  gap: 4px;
  min-height: 96px;
  padding: 8px 5px;
  border-radius: var(--r-ctl);
  background: var(--surface-2);
}

.bande-jours__jour--vide {
  border: 1px dashed var(--line);
  background: transparent;
}

.bande-jours__date {
  line-height: 1.1;
  text-align: center;
}

.bande-jours__date span {
  color: var(--ink-3);
  font-size: 11.5px;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.bande-jours__date b {
  display: block;
  font-family: var(--font-display);
  font-size: 18px;
}

.bande-jours__plongee,
.bande-jours__autre {
  display: block;
  padding: 4px 0;
  border-radius: 6px;
  font-size: 13px;
  font-variant-numeric: tabular-nums;
  text-align: center;
  text-decoration: none;
  touch-action: manipulation;
  -webkit-tap-highlight-color: transparent;
  transition: transform 140ms var(--ease-out), background-color 140ms ease;
}

.bande-jours__plongee {
  border: 1px solid color-mix(in srgb, var(--accent) 40%, transparent);
  background: var(--accent-soft);
  color: var(--accent);
  font-weight: 700;
}

.bande-jours__plongee--inscrit {
  border-color: var(--accent);
  background: var(--accent);
  color: var(--accent-ink);
}

.bande-jours__autre {
  color: var(--ink-2);
  font-size: 12px;
}

.bande-jours__autre--inscrit {
  color: var(--ink);
  font-weight: 700;
}

.bande-jours__plongee:active,
.bande-jours__autre:active {
  transform: scale(0.97);
}

.bande-jours__logement {
  display: flex;
  grid-column: 1 / -1;
  align-items: center;
  gap: 8px;
  padding: 6px 12px;
  border-radius: var(--r-pill);
  background: color-mix(in srgb, var(--warn) 16%, var(--surface));
  color: var(--ink);
  font-size: 13px;
  font-weight: 600;
  text-decoration: none;
}

.bande-jours__logement .muted {
  margin-left: auto;
  font-weight: 400;
}

.bande-jours__legende {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 6px;
  margin: 0;
}

.bande-jours__pastille {
  display: inline-block;
  width: 10px;
  height: 10px;
  border: 1px solid var(--accent);
  border-radius: 3px;
  background: var(--accent-soft);
}

.bande-jours__pastille--inscrit {
  background: var(--accent);
}

/* Tarif dégressif en marches ; options en puces. */
.sejour-bloc {
  display: grid;
  gap: 8px;
}

.sejour-bloc .sous-titre {
  margin: 0;
}

.tarif-marches,
.options-puces {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 6px;
}

.tarif-marches__marche {
  display: grid;
  padding: 6px 12px;
  border: 1px solid var(--line);
  border-radius: var(--r-ctl);
  line-height: 1.2;
}

.tarif-marches__marche b {
  font-family: var(--font-display);
  font-size: 16px;
}

.tarif-marches__marche span {
  color: var(--ink-3);
  font-size: 12px;
}

.tarif-marches__fleche {
  color: var(--ink-3);
}

.options-puces__option {
  display: inline-flex;
  align-items: baseline;
  gap: 8px;
  padding: 6px 12px;
  border-radius: var(--r-ctl);
  background: var(--surface-2);
  font-size: 14px;
}

/* Fiche : sur grand écran, la colonne principale prend la largeur
   disponible (moins de hauteur) ; la colonne de droite grandit un peu. */


@media (min-width: 1400px) {
  .page--fiche .fiche {
    grid-template-columns: minmax(0, 1fr) 380px;
  }
}

/* Bande des jours : tous les jours sur une rangée dès que la carte est
   assez large (jusqu'à 14 jours), sinon autant de colonnes qu'il en tient. */
.sejour-programme,
.sejour-choix {
  container-type: inline-size;
}

@container (min-width: 620px) {
  .bande-jours--ligne {
    grid-template-columns: repeat(var(--jours), minmax(0, 1fr));
  }
}

/* « Mes choix » : un panneau par sujet, côte à côte quand la carte est
   large, chacun avec son titre et son statut. */
.sejour-choix__grille {
  display: grid;
  gap: 12px;
}

@container (min-width: 720px) {
  .sejour-choix__grille {
    grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
    align-items: start;
  }
}

.choix-panneau {
  display: grid;
  gap: 10px;
  padding: 14px 16px 16px;
  border: 1px solid var(--line);
  border-radius: var(--r-ctl);
  background: var(--surface-2);
}

.choix-panneau form {
  display: grid;
  gap: 8px;
}

.choix-panneau__tete {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 6px 10px;
  padding-bottom: 10px;
  border-bottom: 1px solid var(--line);
}

.choix-panneau__titre {
  display: flex;
  align-items: center;
  gap: 8px;
  margin: 0;
  font-family: var(--font-display);
  font-size: 16px;
  font-weight: 700;
}

.choix-panneau p,
.choix-panneau .hint {
  margin: 0;
}

.choix-panneau__sous {
  padding-top: 8px;
  border-top: 1px dashed var(--line);
}

/* « Mon bilan » : les prix gardent leur colonne à droite, alignés sur la
   première ligne ; seul le libellé passe à la ligne. */
.bilan > li.row-between {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: start;
  column-gap: 16px;
}

.bilan > li.row-between > .num,
.bilan > li.row-between > b.num {
  white-space: nowrap;
  text-align: right;
}

/* En-tête de la fiche : autant de colonnes que la largeur le permet, le
   lieu sur toute la largeur, en dernier. */
@media (min-width: 1100px) {
  .page--fiche .meta-grid {
    grid-template-columns: repeat(auto-fill, minmax(170px, 1fr));
    gap: 14px 24px;
  }
}

.page--fiche .meta--lieu {
  grid-column: 1 / -1;
}

/* Premier et dernier jour sans plongée : « Arrivée », « Retour ». */
.bande-jours__evt {
  color: var(--ink-2);
  font-size: 12px;
  text-align: center;
}

.checklist__mesures-site {
  margin: 0 0 12px;
  padding: 12px;
  border-radius: var(--r-ctl);
  background: var(--surface-2);
}

/* Ajout de matériel : deux grands choix, plongée ou sécurité. */
.materiel-genre {
  display: grid;
  gap: 8px;
}

@media (min-width: 640px) {
  .materiel-genre {
    grid-template-columns: 1fr 1fr;
  }
}

.materiel-genre__choix {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  min-height: 44px;
  padding: 12px 16px;
  border: 1px solid var(--line);
  border-radius: var(--r-card);
  cursor: pointer;
  touch-action: manipulation;
  -webkit-tap-highlight-color: transparent;
  transition: border-color 160ms ease-out, background-color 160ms ease-out;
}

.materiel-genre__choix:has(input:checked) {
  border-color: var(--accent);
  background: var(--surface-2);
}

.materiel-genre__choix:has(input:focus-visible) {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
}

.materiel-genre__choix input {
  flex: none;
  width: 20px;
  height: 20px;
  margin-top: 2px;
  accent-color: var(--accent);
}

.materiel-genre__texte {
  display: grid;
  gap: 2px;
}

/* Invitation : le bloc « Parent de l'enfant » n'apparaît que pour un compte enfant. */
.invitation__parent {
  display: none;
}

.invitation:has(#id_compte_enfant:checked) .invitation__parent {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

/* Visite guidée (visite.js) : carte posée contre l'entrée de menu. */
.visite {
  position: fixed;
  z-index: 1400;
  width: min(22rem, calc(100vw - 24px));
  padding: 16px;
  display: grid;
  gap: 8px;
  background: var(--surface);
  color: var(--ink);
  border: 1px solid var(--line);
  border-radius: var(--r-card);
  box-shadow: var(--shadow-pop);
  opacity: 0;
  transform: scale(0.97);
  transition: opacity 150ms var(--ease-out), transform 150ms var(--ease-out);
}
.visite[hidden] { display: none; }
.visite.est-ouverte { opacity: 1; transform: none; }
.visite[data-place="droite"] { transform-origin: left top; }
.visite[data-place="dessous"] { transform-origin: left top; }
.visite[data-place="bas"],
.visite[data-place="libre"] { right: 12px; left: auto; transform-origin: bottom right; }
.visite[data-place="bas"] { left: 12px; width: auto; }
.visite__sur-titre { margin: 0; display: flex; justify-content: space-between; gap: 12px; font-size: 12px; font-weight: 700; letter-spacing: 0.08em; text-transform: uppercase; color: var(--ink-2); }
.visite__compteur { font-variant-numeric: tabular-nums; }
.visite__titre { outline: none; margin: 0; font-size: 19px; font-family: var(--font-display, inherit); color: var(--ink); }
.visite__texte { margin: 0; font-size: 15px; line-height: 1.45; color: var(--ink-2); max-height: 40vh; max-height: 40dvh; overflow-y: auto; overscroll-behavior: contain; }
.visite__lien { font-size: 15px; font-weight: 600; color: var(--ink); text-decoration: underline; text-underline-offset: 3px; }
.visite__lien[hidden] { display: none; }
.visite__actions { display: flex; align-items: center; justify-content: space-between; gap: 8px; margin-top: 4px; }
.visite__nav { display: flex; gap: 8px; }
.visite-cible { outline: 2px solid var(--accent); outline-offset: 2px; border-radius: var(--r-ctl); }
@media (prefers-reduced-motion: reduce) {
  .visite { transition: opacity 150ms linear; transform: none; }
}

/* Proposition de la visite : feuille du bas, petite fenêtre sur ordinateur. */
.visite-accueil { padding: 0; }
.visite-accueil .visite__titre { outline: none; }
.visite-accueil__corps { display: grid; gap: 8px; padding: 8px 16px calc(16px + env(safe-area-inset-bottom, 0px)); }
.visite-accueil__actions { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; margin-top: 8px; }
.visite-accueil__actions button { width: 100%; min-height: 44px; }
@keyframes visite-accueil-entree {
  from { opacity: 0; transform: scale(0.96); }
}
@media (min-width: 768px) {
  .visite-accueil { width: min(26rem, calc(100vw - 2rem)); margin: auto; border-radius: var(--r-card); }
  .visite-accueil__corps { padding: 20px; }
  .visite-accueil .feuille__poignee { display: none; }
}
@media (min-width: 768px) and (prefers-reduced-motion: no-preference) {
  .visite-accueil[open] { animation: visite-accueil-entree 200ms var(--ease-out); }
}


/* « Mes invités » : une carte par personne gérée (charte : jetons seulement). */
.invite-gere { display: flex; flex-direction: column; gap: 20px; }
.invite-gere__tete { display: flex; align-items: center; gap: 14px; }
.invite-gere__avatar { width: 44px; height: 44px; flex-basis: 44px; font-size: 15px; }
.invite-gere__identite { min-width: 0; }
.invite-gere__identite .h2 { margin: 0; }
.invite-gere__identite p { margin: 2px 0 0; }
.invite-gere__form { display: flex; flex-direction: column; gap: 16px; }
.invite-gere__form .grid-2 { gap: 16px 20px; align-items: start; }
.invite-gere__activites { border-top: 1px solid var(--line); padding-top: 16px; }
.invite-gere__activites .sous-titre { margin: 0 0 6px; }
.invite-gere__activite { display: flex; align-items: center; justify-content: space-between; gap: 12px; min-height: 44px; }
.invite-gere__activite + .invite-gere__activite { border-top: 1px solid var(--line); }
.invite-gere__activite-nom { display: flex; flex-direction: column; min-width: 0; }
.invite-gere__activite-nom a { overflow-wrap: anywhere; }
.invite-gere__pied { display: flex; flex-wrap: wrap; gap: 8px; border-top: 1px solid var(--line); padding-top: 16px; }
@media (max-width: 640px) {
  .invite-gere__form .grid-2 { grid-template-columns: minmax(0, 1fr); }
}
/* Assistant d'ajout d'une pièce de matériel : pied avec indicateur et boutons. */
.equipment-wizard__footer {
  display: grid;
  gap: 8px;
}

.equipment-wizard__indicator {
  margin: 0;
}

.equipment-wizard [data-step][hidden],
.equipment-wizard [data-volume-pressure-block][hidden],
.equipment-wizard [data-rentable][hidden] {
  display: none;
}

.equipment-wizard h3 {
  margin: 0;
  font-size: 15px;
}

@media (pointer: coarse) {
  .equipment-wizard .materiel-affecter__actions .button,
  .equipment-wizard .materiel-affecter__actions .button-secondary {
    min-height: 44px;
  }
}

/* Réglages des types de matériel (fenêtre du parc en mode gestion) :
   deux lignes par type, libellés des champs lus à l'écran seulement par les
   cases ; la fenêtre reste courte même avec une dizaine de types. */
.equipment-types.confirm-dialog--large {
  max-width: min(40rem, calc(100vw - 2rem));
}

.equipment-types .confirm-dialog__card {
  gap: 8px;
}

.equipment-types__list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: 8px;
}

.equipment-types__row {
  display: grid;
  gap: 2px;
  padding: 8px 12px;
  border: 1px solid var(--line);
  border-radius: var(--r-ctl);
}

.equipment-types__names {
  display: grid;
  grid-template-columns: 3.5rem minmax(0, 1fr) auto;
  align-items: start;
  gap: 8px;
}

.equipment-types__names .field {
  margin: 0;
}

.equipment-types__role {
  margin: 0;
  padding-top: 10px;
  white-space: nowrap;
}

.equipment-types__checks {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0 16px;
}

.equipment-types__check {
  display: flex;
  align-items: center;
  gap: 6px;
  min-height: 32px;
  font-size: 13px;
  cursor: pointer;
  touch-action: manipulation;
}

.equipment-types__check input {
  width: 18px;
  height: 18px;
  accent-color: var(--accent);
}

.equipment-types__delete {
  margin-left: auto;
}

@media (pointer: coarse) {
  .equipment-types__check {
    min-height: 44px;
  }
}

@media (max-width: 479.98px) {
  .equipment-types__names {
    grid-template-columns: 3.5rem minmax(0, 1fr);
  }

  .equipment-types__role {
    grid-column: 1 / -1;
    padding-top: 0;
  }
}


.equipment-types [hidden] {
  display: none;
}

/* Fiche d'un événement : bloc Matériel compact. */


.fiche-materiel .h2 {
  margin: 0;
}

.fiche-materiel__titre {
  display: flex;
  align-items: center;
  gap: 6px;
  margin: 8px 0 0;
  font-size: 0.75rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--accent);
}

.fiche-materiel__titre .icone {
  width: 16px;
  height: 16px;
  flex: none;
}

/* Texte aligné sous le titre, à droite de l'icône (16 px + 6 px d'écart). */
.fiche-materiel__liste {
  margin: 0;
  padding: 0 0 0 22px;
  list-style: none;
  font-size: 0.9375rem;
  line-height: 1.35;
}



.fiche-materiel .button-secondary {
  margin-top: 8px;
}

/* Partage de fichiers : zone de dépôt, jauge d'espace, champs en deux colonnes
   dès que la place le permet ; lignes de la liste qui passent sous le nom. */
.partage__carte {
  gap: 16px;
}

.partage__formulaire {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

/* Le champ natif reste dans la page (clavier, lecteur d'écran) mais invisible. */
.partage__fichier {
  position: absolute;
  width: 1px;
  height: 1px;
  opacity: 0;
  overflow: hidden;
}

.partage__depot {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 18px;
  border: 1.5px dashed var(--line);
  border-radius: var(--r-card);
  background: var(--surface-2);
  cursor: pointer;
  touch-action: manipulation;
  -webkit-tap-highlight-color: transparent;
  transition: border-color 160ms ease-out, background-color 160ms ease-out,
    transform 160ms ease-out;
}

.partage__depot:active {
  transform: scale(0.99);
}

.partage__fichier:focus-visible + .partage__depot {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
}

.partage__zone.is-survol .partage__depot,
.partage__zone.is-rempli .partage__depot {
  border-color: var(--accent);
  background: var(--accent-soft);
}

.partage__zone.is-rempli .partage__depot {
  border-style: solid;
}

@media (hover: hover) and (pointer: fine) {
  .partage__depot:hover {
    border-color: var(--accent);
  }
}

.partage__depot-icone {
  flex: none;
  display: grid;
  place-items: center;
  width: 48px;
  height: 48px;
  border-radius: 14px;
  background: var(--accent-soft);
  color: var(--accent-text);
}

.partage__depot-icone .icone {
  width: 24px;
  height: 24px;
}

.partage__depot-texte {
  display: flex;
  flex-direction: column;
  gap: 2px;
  min-width: 0;
  overflow-wrap: anywhere;
}

.partage__jauge-bloc {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
}

.partage__jauge {
  flex: 1 1 140px;
  height: 6px;
  border: 0;
  border-radius: 999px;
  background: var(--surface-2);
  appearance: none;
  overflow: hidden;
}

.partage__jauge::-webkit-progress-bar {
  background: var(--surface-2);
}

.partage__jauge::-webkit-progress-value {
  background: var(--accent);
  border-radius: 999px;
}

.partage__jauge::-moz-progress-bar {
  background: var(--accent);
  border-radius: 999px;
}

.partage__champs {
  display: grid;
  gap: 16px;
}

@media (min-width: 760px) {
  .partage__champs {
    grid-template-columns: 1fr 1fr;
    align-items: start;
  }
}

.partage__envoyer {
  align-self: flex-start;
  gap: 8px;
}

@media (max-width: 640px) {
  .partage__envoyer {
    align-self: stretch;
    justify-content: center;
    min-height: 48px;
  }
}

.partage__ligne {
  flex-wrap: wrap;
}

.partage__ligne .document-ligne__actions {
  flex-wrap: wrap;
}

@media (max-width: 640px) {
  .partage__ligne .document-ligne__actions {
    flex-basis: 100%;
  }
}

/* Téléphone : titres de carte plus près de leur contenu ; les deux boutons
   modèle tiennent sur une ligne. */
@media (max-width: 767px) {
  .activite-form .page-entete .actions {
    flex: 1 1 100%;
    flex-wrap: nowrap;
    gap: 8px;
  }

  .activite-form .page-entete .actions > :is(button, a) {
    flex: 1 1 0;
    min-width: 0;
    min-height: 40px;
    padding: 6px 10px;
    font-size: 13.5px;
    line-height: 1.2;
    white-space: normal;
    text-align: center;
  }

  .card > .card-head + * {
    margin-top: -6px;
  }
}

/* Cotisations : sur petit écran, une ligne = nom + montant, boutons dessous. */


@media (max-width: 639px) {
  

  .cotisation-ligne--liste .cotisation-ligne__actions {
    grid-column: 1 / -1;
    justify-content: start;
  }

  

  .cotisation-ligne .input {
    font-size: 16px;
  }
}

@media (max-width: 767.98px) {
  .messagerie__entete > .row {
    flex: 1 1 100%;
    flex-wrap: nowrap;
    gap: 4px;
  }

  .messagerie__entete > .row > :is(a, button) {
    min-width: 0;
    padding-inline: 12px;
  }

  .messagerie__entete > .row > .bouton-parametres {
    margin-left: auto;
  }
}

/* Chats : les canaux sont décalés sous le titre de leur section (Club,
   Groupes, Privés), ordinateur et téléphone. */
.chan-list .chan,
.chan-list .chan-passes {
  padding-left: 24px;
}

/* Haut des écrans sur téléphone (charte, 11/11/2026) : barre fine sur toute la
   largeur, fond de surface et filet en bas, comme la barre d'onglets. Elle
   défile avec la page : plusieurs écrans ont leur propre en-tête collant. */
@media (max-width: 767.98px) {
  [data-apparence="carnet"] .site-shell__main {
    padding-left: 0.85rem;
  }

  .site-topbar {
    margin: -0.85rem -0.85rem 0;
    padding: calc(0.5rem + env(safe-area-inset-top, 0px)) 0.85rem 0.5rem;
    border: 0;
    border-bottom: 1px solid var(--line);
    border-radius: 0;
    background: var(--surface);
  }

  .site-topbar__accueil {
    width: 2rem;
    height: 2rem;
  }

  .site-shell__container {
    padding-top: 0.85rem;
  }
}

/* Sondages : sans lien retour, les actions restent à droite. */
.sondages-barre__actions {
  margin-left: auto;
}

/* Calendrier sur téléphone : mois, « Filtres » et « + » sur une ligne. Le
   mois garde toujours sa taille ; « Filtres » se réduit à son icône quand la
   place manque (avec le « + » ou sur un écran étroit). */
@media (max-width: 767.98px) {
  .calendrier .page-entete {
    container-type: inline-size;
    gap: 8px;
  }

  /* Moins d'air entre le mois et « Semaine du … ». */
  

  .calendrier .day-head {
    padding-top: 0;
  }

  .calendrier .calendrier__mois {
    flex: none;
    min-width: 0;
    font-size: 18px;
    white-space: nowrap;
  }

  .calendrier .page-entete > .row {
    flex-wrap: nowrap;
    gap: 4px;
  }

  .calendrier .page-entete > .row > .button-small {
    min-width: 30px;
    padding-inline: 0;
    justify-content: center;
  }

  /* Écran tactile : les flèches de mois gardent 44 px de large (charte, section 8). */
  @media (pointer: coarse) {
    .calendrier .page-entete > .row > .button-small {
      min-width: 44px;
    }
  }

  

  .calendrier__bouton-filtres .icone {
    width: 1.1rem;
    height: 1.1rem;
  }

  

  
}

@container (max-width: 340px) {
  .calendrier .calendrier__mois {
    font-size: 15px;
  }

  

  .calendrier__bouton-filtres {
    justify-content: center;
    width: 44px;
    min-height: 44px;
    padding: 0;
  }
}

/* Écran de 320 px, avec le « + » : le mois se fait encore un peu plus petit. */
@container (max-width: 300px) {
  .calendrier .calendrier__mois {
    font-size: 14px;
  }
}

/* Bouton « Envoyer un message » d'un membre (B20, MVP1) : icône seule dans la
   liste, poussée à droite du nom ; avec libellé sur la fiche. */
.bouton-message {
  display: inline-flex;
  margin: 0 0 0 auto;
}



.bouton-message__bouton {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  min-width: 40px;
  min-height: 40px;
}

.bouton-message__bouton .icone {
  width: 1.15rem;
  height: 1.15rem;
}



/* Titre long (ex. nom d'une checklist) : il se tronque au lieu de pousser
   l'icône du club et les actions hors de la barre du haut. */
.site-topbar__title-group {
  min-width: 0;
}

.site-topbar__title {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.site-topbar__accueil {
  flex: 0 0 auto;
}

/* Joindre un membre depuis sa fiche : Message, Appeler, E-mail sur une ligne
   (0 à 3 boutons), libellés courts pour tenir sur un téléphone. */
/* Ce qui manque (« Cotisation à payer », « Visite médicale… ») : à la ligne
   plutôt que hors de l'écran. */
.fiche-membre__statuts {
  flex-wrap: wrap;
  gap: 6px;
}









/* Création d'une activité, première étape : une carte par type. Deux colonnes
   sur téléphone, quatre sur ordinateur ; cartes d'au moins 56 px (charte :
   44 px au toucher). Survol réservé à la souris, retour au toucher par :active. */






.types-choix__carte {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  justify-content: center;
  gap: 6px;
  min-height: 88px;
  padding: 12px 16px;
  border: 1px solid var(--line);
  border-radius: var(--r-card);
  background: var(--surface);
  color: var(--ink);
  font-weight: 600;
  line-height: 1.25;
  text-decoration: none;
  overflow-wrap: break-word;
  hyphens: auto;
  touch-action: manipulation;
  transition: transform 150ms var(--ease-out), border-color 150ms var(--ease-out);
}

.types-choix__carte .icone {
  width: 26px;
  height: 26px;
  flex: none;
  color: var(--accent);
}

.types-choix__carte:active,
.modeles-choix__ligne:active {
  transform: scale(0.97);
}



@media (hover: hover) and (pointer: fine) {
  .types-choix__carte:hover,
  .modeles-choix__ligne:hover {
    border-color: var(--accent);
  }
}

/* Deuxième étape : les modèles du type, une ligne chacun, puis « sans modèle ». */
.modeles-choix {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.modeles-choix__ligne {
  display: flex;
  flex-direction: column;
  justify-content: center;
  min-height: 56px;
  padding: 12px 16px;
  border: 1px solid var(--line);
  border-radius: var(--r-card);
  background: var(--surface);
  color: var(--ink);
  text-decoration: none;
  touch-action: manipulation;
  transition: transform 150ms var(--ease-out), border-color 150ms var(--ease-out);
}

.modeles-choix__ligne--libre {
  border-style: dashed;
}

/* En Zélande : « Zélande » puis « Belgique » au-dessus de leurs sites. */
.modeles-choix__groupe {
  margin: 8px 0 0;
}

.modeles-choix__ligne:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
}

.modeles-choix__nom {
  font-weight: 600;
  line-height: 1.25;
  overflow-wrap: break-word;
}

@media (min-width: 768px) {
  .modeles-choix {
    max-width: 640px;
  }
}


@media (prefers-reduced-motion: reduce) {
  .types-choix__carte,
  .modeles-choix__ligne {
    transition: none;
  }
}

/* « Enregistrer comme modèle » : en fin de formulaire, facultatif. */
.form-modele-fin {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 6px;
}

/* Création en étapes (pas_a_pas.js) : une section à la fois, puis le récapitulatif. */


.pas-progression {
  display: flex;
  flex-direction: column;
  gap: 8px;
}



.pas-progression__barres i {
  flex: 1;
  height: 4px;
  border-radius: 2px;
  background: var(--line);
  transition: background-color 160ms var(--ease-out);
}



.pas-progression__etiquette {
  margin: 0;
  color: var(--muted);
  font-size: 0.875rem;
  font-weight: 600;
}

.pas-entre {
  animation: pas-entre 160ms var(--ease-out);
}

@keyframes pas-entre {
  from {
    opacity: 0;
    transform: translateY(6px);
  }
  to {
    opacity: 1;
    transform: none;
  }
}

.pas-recap__liste {
  display: flex;
  flex-direction: column;
  margin: 0;
}

.pas-recap__brouillon {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 8px;
  margin-top: var(--gap);
}

.pas-recap__ligne {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  min-height: 52px;
  border-top: 1px solid var(--line);
}



.pas-recap__ligne dt {
  color: var(--muted);
  font-size: 0.8125rem;
}

.pas-recap__ligne dd {
  margin: 0;
  font-weight: 600;
  overflow-wrap: anywhere;
}

.pas-recap__modifier {
  min-width: 44px;
  min-height: 44px;
  padding: 0 4px;
  border: 0;
  background: none;
  color: var(--accent-text, var(--accent));
  font: inherit;
  font-weight: 700;
  text-decoration: underline;
  text-underline-offset: 3px;
  cursor: pointer;
  touch-action: manipulation;
}

@media (prefers-reduced-motion: reduce) {
  .pas-entre,
  .pas-progression__barres i {
    animation: none;
    transition: none;
  }
}

/* Le titre d'étape reçoit le focus par script (lecteurs d'écran) : pas de cadre autour. */




/* Programme d'une journée d'un jour : quantités avec − et +. */
.programme-quantite {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 10px 0;
  border-bottom: 1px solid var(--line);
}



.programme-quantite__pas input {
  width: 64px;
  text-align: center;
}

.programme-quantite__pas .button-secondary {
  min-width: 44px;
  min-height: 44px;
}

/* « + » bloqué au maximum, « − » à zéro. */


/* Choix d'une journée d'un jour : un élément par ligne, dans l'ordre de l'heure. */
.journee-choix {
  display: flex;
  flex-direction: column;
  margin: 0;
  padding: 0;
  list-style: none;
}

.journee-choix__ligne {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 10px 0;
  border-bottom: 1px solid var(--line);
}

.journee-choix__label {
  display: flex;
  flex: 1;
  align-items: center;
  gap: 12px;
  min-height: 44px;
  cursor: pointer;
}

.journee-choix__heure {
  min-width: 52px;
  font-weight: 700;
  font-variant-numeric: tabular-nums;
}

.journee-choix__texte {
  display: flex;
  flex: 1;
  flex-direction: column;
  min-width: 0;
}

/* Titre à gauche, puis l'heure, puis la case à cocher tout à droite. */
.journee-choix__heure {
  text-align: right;
}

/* Ligne « Autre demande » : texte, prix, case ; sur téléphone le texte passe
   au-dessus et le prix reste aligné à droite. La mention suit sur sa ligne. */
.journee-choix__ligne--demande {
  flex-wrap: wrap;
}





/* Onglet Demandes de la synthèse : Valider et Corriger côte à côte ; Corriger
   ouvre sur la ligne un champ prix. */
.demande-actions {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-start;
  gap: 8px;
}







.demande-corriger__form {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
}

.demande-corriger__form .input {
  width: 6.5rem;
  font-size: 16px;
  text-align: right;
}

/* 16 px : en dessous, iOS zoome la page au focus. */




.demande-libre__prix .input {
  width: 6.5rem;
  text-align: right;
}

.demande-libre__mention {
  flex: 1 1 100%;
  margin: 0;
}

/* Programme d'une journée : les boutons passent à la ligne sur téléphone. */
.programme-ajouts,
.programme-journee .row-between {
  flex-wrap: wrap;
  gap: 8px;
}

/* Récapitulatif d'une journée : un libellé et sa valeur par ligne. */
.journee-recap {
  display: flex;
  flex-direction: column;
  margin: 0;
}

.journee-recap > div {
  display: flex;
  flex-direction: column;
  gap: 2px;
  padding: 10px 0;
  border-bottom: 1px solid var(--line);
}

.journee-recap > div:last-child {
  border-bottom: 0;
}

.journee-recap dt {
  color: var(--muted);
  font-size: 13px;
}

.journee-recap dd {
  margin: 0;
  font-weight: 700;
}

/* Prix d'une journée : un élément par bloc, prix puis lieu de paiement. */
.prix-ligne {
  display: grid;
  gap: 8px 12px;
  padding: 12px 0;
  border-bottom: 1px solid var(--line);
}

.prix-ligne__titre {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: 4px 12px;
}

.prix-ligne__champ {
  display: flex;
  align-items: center;
  gap: 8px;
}

.prix-ligne__champ .input {
  width: 120px;
  text-align: right;
}

.prix-ligne__mode {
  display: flex;
  flex-wrap: wrap;
  gap: 4px 16px;
  min-width: 0;
  margin: 0;
  padding: 0;
  border: 0;
}

.prix-ligne__mode label {
  display: flex;
  align-items: center;
  gap: 8px;
  min-height: 44px;
}

.prix-ligne--erreur .input {
  border-color: var(--danger);
}

.journee-choix__prix {
  margin-left: 6px;
  color: var(--muted);
  font-weight: 600;
}

.journee-total {
  margin: 0;
  font-size: 16px;
}

/* Cibles tactiles d'au moins 44 px sur les écrans de la journée et sa barre d'étapes. */
.programme-journee .button,
.programme-journee .button-secondary,
.programme-journee .button-ghost,
.prix-journee .button,
.prix-journee .button-secondary,
.prix-journee .button-ghost,
.parcours-journee .button,
.parcours-journee .button-secondary,
.parcours-journee .button-ghost,
.barre-action .button,
.barre-action .button-secondary {
  min-height: 44px;
}

/* Écran tactile (charte, section 8) : cibles d'au moins 44 px et champs à 16 px (iOS zoome
   en dessous). Les petits contrôles gardent leur apparence : leur zone de toucher grandit. */
@media (pointer: coarse) {
  .button,
  .button-secondary,
  .button-danger,
  .button-ghost,
  .button-small {
    min-height: 44px;
  }

  .button-small {
    min-width: 44px;
  }

  .reponse__btn {
    width: 44px;
    height: 44px;
  }

  .th-sort {
    min-height: 44px;
  }

  .th-filter {
    position: relative;
  }

  .th-filter::after {
    content: "";
    position: absolute;
    top: 50%;
    left: 50%;
    width: 44px;
    height: 44px;
    transform: translate(-50%, -50%);
  }

  input:not([type="checkbox"]):not([type="radio"]):not([type="range"]):not([type="file"]):not([type="hidden"]),
  select,
  textarea {
    font-size: 16px;
  }
}

.prix-ligne:last-child {
  border-bottom: 0;
}

/* Récapitulatif d'une journée : le détail du programme sous « Programme ». */
.journee-recap__elements {
  display: grid;
  gap: 6px;
  margin: 8px 0 0;
  padding: 0;
  list-style: none;
  font-weight: 400;
}

.journee-recap__elements li {
  display: flex;
  align-items: baseline;
  gap: 8px;
}

/* Prix : les boutons du bas passent à la ligne au lieu de déborder. */
.prix-journee .row-between,
.prix-journee .row-between .row {
  flex-wrap: wrap;
}

/* Programme et Prix : l'encadré « Brouillon » prend la largeur des cartes. */
.programme-journee .secondaire__titre,
.prix-journee .secondaire__titre {
  max-width: none;
}

/* Le bouton principal d'une carte est à droite, comme partout. */


/* Choix d'une journée : l'heure et la case à cocher sont alignées à droite, la case sous le bouton d'inscription. */


/* Page Confidentialité (core/confidentialite.html). */
.confidentialite__liste { margin: 0; padding-left: 1.2rem; display: grid; gap: 0.5rem; }
.confidentialite__table td { vertical-align: top; }
.confidentialite__table td:first-child { width: 42%; }
.confidentialite__acces { margin: 0; padding: 0; list-style: none; display: grid; gap: 4px; }

/* Bandeau « vos réglages sont dans le profil » (comptes/astuces.py) :
   affiché à la première ouverture d'une page qui a des réglages. */
.astuce { display: flex; align-items: center; gap: 12px; margin: 0 0 16px; padding: 10px 6px 10px 14px; border: 1px solid var(--line); border-left: 3px solid var(--accent); border-radius: var(--r-ctl); background: var(--surface); color: var(--ink); transition: opacity 180ms var(--ease-out), transform 180ms var(--ease-out); }
.astuce__ico { display: inline-grid; place-items: center; flex: none; color: var(--accent-text, var(--accent)); }
.astuce__ico svg { width: 20px; height: 20px; }
.astuce__texte { flex: 1; min-width: 0; margin: 0; font-size: 14px; line-height: 1.4; color: var(--ink-2); }
.astuce__ouvrir { flex: none; white-space: nowrap; }
.astuce__fermer { flex-basis: 36px; width: 36px; height: 36px; color: var(--ink-3); }
.astuce__fermer .icone { width: 18px; height: 18px; }
.astuce--sortie { opacity: 0; transform: translateY(-4px); pointer-events: none; }
@media (max-width: 767.98px) {
  .astuce { flex-wrap: wrap; row-gap: 8px; padding-right: 4px; }
  .astuce__texte { flex-basis: calc(100% - 84px); }
  .astuce__ouvrir { order: 3; margin-left: 32px; }
  .astuce__fermer { width: 44px; height: 44px; flex-basis: 44px; }
}
@media (prefers-reduced-motion: reduce) { .astuce { transition: opacity 180ms linear; } .astuce--sortie { transform: none; } }

/* Calendrier, mode foncé (Abysse) : cartes plus claires que la case du jour. */
[data-apparence="abysse"] .mois__evt { background: color-mix(in srgb, var(--line) 75%, var(--surface)); box-shadow: inset 0 0 0 1px color-mix(in srgb, var(--ink-3) 28%, var(--line)); }

/* Astuce (réglages) : cibles de 44 px sur écran tactile. */
@media (pointer: coarse) {
  .astuce__ouvrir {
    min-height: 44px;
  }

  .astuce__fermer {
    flex-basis: 44px;
    width: 44px;
    height: 44px;
  }
}

/* Programme d'un week-end : le titre d'un jour est collé à ses quantités. */
.programme-jour {
  margin: 8px 0 -8px;
}

/* Programme : pas de flèches natives dans les champs de quantité (les boutons − et +
   suffisent), et la case « hébergement » du week-end. */



.programme-loger input {
  flex: none;
  width: 24px;
  height: 24px;
}

/* Programme : sur téléphone, le titre, le jour et l'état sur une ligne, tous
   les boutons sur la ligne du dessous ; sur ordinateur, tout sur une ligne, les
   boutons dans les mêmes colonnes quel que soit l'élément. */






.programme-journee .sejour-programme__actions { grid-column: 1 / -1; display: flex; gap: 8px; }

@media (min-width: 640px) {
  
  
  .programme-journee .sejour-programme__actions { grid-column: auto; justify-content: flex-end; }
  
}
/* Case « hébergement » : le libellé à gauche, la case à droite, comme les quantités. */

.programme-loger input { order: 2; }

/* Choix d'une journée ou d'un week-end : cases à cocher larges (doigt) à droite. */


/* Hébergement d'un week-end : choix types / gîte, deux champs côte à côte. */
.logements-weekend__style { display: flex; flex-direction: column; gap: 4px; }

.logements-weekend__choix input { width: 24px; height: 24px; flex: none; }


.logements-weekend__actions { flex-wrap: wrap; gap: 8px; }

/* « Tout cocher » à droite, au-dessus des cases. */


/* Logement du membre (week-end) : un type par ligne, libellé, prix à droite. */

.logements-membre__texte { display: flex; flex: 1; flex-direction: column; min-width: 0; }
.logements-membre__prix { font-variant-numeric: tabular-nums; white-space: nowrap; }

/* Les choix (cases et boutons radio) sont toujours à droite de leur libellé. */

.logements-weekend__choix input { order: 99; width: 28px; height: 28px; margin-left: auto; }

.logements-membre__prix { margin-right: 12px; }

/* Prix : « À l'avance / Sur place », bouton radio à droite de chaque libellé. */
/* Deux choix côte à côte : chaque bouton radio juste devant son texte, sinon on
   ne sait pas à quel texte il appartient. */
.prix-ligne__mode { gap: 4px 24px; }
.prix-ligne__mode label { flex: 0 1 auto; }
.prix-ligne__mode label input { width: 24px; height: 24px; flex: none; margin: 0; }
.prix-ligne__champ .prix-ligne__unite { width: auto; text-align: left; }
/* Partout : le nom et le prix sur une ligne (gain de hauteur sur téléphone), le reste dessous. */
.prix-ligne { grid-template-columns: minmax(0, 1fr) auto; align-items: center; }
/* :where() garde cette règle faible, pour que le grand écran puisse remettre le mode sur la ligne. */
.prix-ligne > :where(:not(.prix-ligne__titre):not(.prix-ligne__champ)) { grid-column: 1 / -1; }
.prix-ligne__titre .input { width: 100%; }
@media (max-width: 639px) {
  .prix-ligne__champ .input { width: 96px; }
}
/* Grand écran : nom, prix puis « À l'avance / Sur place » sur une seule ligne. */
@media (min-width: 760px) {
  .prix-ligne { grid-template-columns: minmax(0, 1fr) auto auto; column-gap: 24px; }
  .prix-ligne > .prix-ligne__mode { grid-column: auto; flex-wrap: nowrap; }
  .prix-ligne__mode label { white-space: nowrap; }
}

/* Options du stage : téléphone, le nom et « Retirer » puis prix et unité dessous ;
   grand écran, nom, prix, unité et « Retirer » sur une seule ligne. */
.prix-ligne--retirable .prix-ligne__retirer { grid-column: auto; order: 1; justify-self: end; }
.prix-ligne--retirable .prix-ligne__champ { grid-column: 1; order: 2; }
/* La règle téléphone « .input à 96px » coupait « pour le séjour » : la liste occupe
   le reste, jusqu'au bord droit du nom. */
.prix-ligne--retirable .prix-ligne__champ .prix-ligne__unite { width: auto; flex: 1; min-width: 0; }
@media (min-width: 760px) {
  .prix-ligne--retirable .prix-ligne__champ { grid-column: auto; order: 0; }
}

/* Choix du séjour (Week-end, Stage ou croisière) : une phrase sous le nom. */
.modeles-choix__detail { display: block; margin-top: 2px; font-weight: 400; font-size: 13px; color: var(--ink-2); }

/* Stage ou croisière (organisateur) : interrupteur dont le titre suit l'état,
   parties séparées par un filet, ligne forte (acompte). */
.stage-interrupteur { padding: 6px 0; border-bottom: 0; }
.stage-interrupteur__texte { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.stage-interrupteur__texte small { font-size: 13px; color: var(--ink-2); }
.stage-section { padding-top: var(--space-3); border-top: 1px solid var(--line); }
/* Type de logement (week-end, stage) : compact. Téléphone : le nom sur toute la
   largeur, puis prix, minimum et places côte à côte ; le résumé et « Retirer » en
   dessous. Grand écran : une seule ligne, « Retirer » au bout. Champs alignés par
   le bas si un libellé passe sur deux lignes. */
.type-logement { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px 10px; align-items: end; }
.type-logement__nom, .type-logement__resume { grid-column: 1 / -1; }
.type-logement__resume { grid-column: 1 / 3; grid-row: 3; margin: 0; align-self: center; }
.type-logement__retirer { grid-column: 3; grid-row: 3; justify-self: end; }
.type-logement + .type-logement { padding-top: 10px; border-top: 1px solid var(--line); }
@media (min-width: 768px) {
  .type-logement { grid-template-columns: minmax(0, 1fr) 8rem 6rem 6rem auto; }
  .type-logement__nom { grid-column: auto; }
  .type-logement__retirer { grid-column: auto; grid-row: auto; height: 42px; }
  .type-logement__resume { grid-column: 1 / -1; grid-row: auto; }
}
/* Hébergement d'un stage : les cas possibles, un par ligne, nom en tête. */
.logements-cas { display: grid; gap: 8px; margin: 0; padding: 0; list-style: none; }
.logements-cas li { display: flex; flex-direction: column; gap: 2px; padding: 10px 12px; border: 1px solid var(--line); border-radius: var(--r-ctl); }
.logements-cas span { font-size: 13px; color: var(--ink-2); }
/* Import / export Excel des logements : en-tête du week-end (date + boutons sur
   une ligne) et liste des colonnes attendues dans la fenêtre d'import. */
.logements-weekend__entete { align-items: center; margin-bottom: 0; }
/* Stage : les boutons suivent les exemples, à droite du dernier sur grand écran
   et alignés sur le bord droit de la carte dessous ; dessous à droite sur
   téléphone. Le titre prend toute la largeur, ses paragraphes restent à 64ch. */


.logements-cas-ligne { display: flex; flex-direction: column; gap: 10px; }

@media (min-width: 768px) {
  .logements-cas-ligne { flex-direction: row; align-items: center; }
  
  
}
.logements-excel__colonnes { display: grid; gap: 6px; margin: 0; padding: 0; list-style: none; }
.logements-excel__colonnes li { display: flex; flex-wrap: wrap; column-gap: 8px; padding: 8px 12px; border: 1px solid var(--line); border-radius: var(--r-ctl); }
.logements-excel__colonnes span { font-size: 13px; }
/* Palier, forfait : sur grand écran, « Retirer » au bout de la ligne, de la hauteur
   des champs (42 px). La colonne du bouton est réservée sur chaque ligne (même le
   premier palier, sans bouton) pour que les champs aient tous la même largeur.
   Sur téléphone, le bouton reste dessous, faute de largeur. */
@media (min-width: 768px) {
  
  
  .stage-ligne__retirer .button-small { height: 42px; }
}
/* Paliers : même à l'étroit, « Retirer » au bout de la ligne ; le seuil (2 chiffres
   au plus) prend juste sa place, le prix le reste. Champs alignés par le bas si un
   libellé passe sur deux lignes. */





.journee-recap__fort { border-top: 1px solid var(--line); padding-top: 8px; }
.stage-conseil { color: var(--accent); }

/* Portefeuille et recharge : solde en tête, puces de montant à 44 px au moins. */
.portefeuille__ligne { display: flex; align-items: center; justify-content: space-between; gap: 16px; }
.portefeuille__recharger { min-height: 44px; flex: 0 0 auto; }
.recharge-montants { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 10px; margin-bottom: 20px; }
.recharge-montants__puce { width: 100%; min-height: 52px; font-size: 18px; }



/* Gonflage : page membre (téléphone d'abord, cibles de 44 px au moins). */
.gonflage { display: grid; gap: 20px; }
.gonflage-entete { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 12px; }

.gonflage-prix { margin: 8px 0 0; }
.gonflage-seuil, .gonflage-historique { margin-top: 12px; }


.gonflage-historique__liste { list-style: none; margin: 0; padding: 0; display: grid; }
.gonflage-historique__liste li { display: flex; justify-content: space-between; gap: 12px; padding: 10px 0; border-top: 1px solid var(--line); font-size: 14px; }
.gonflage-credit { color: var(--ok); }
.gonflage-annuler { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 12px 16px; border: 1px solid var(--line); border-radius: var(--r-card); background: var(--accent-soft); }

.gonflage-annuler__texte { font-weight: 600; }
.gonflage-bouteille { display: grid; gap: 12px; padding: 16px 0; border-top: 1px solid var(--line); }

.gonflage-bouteille__lien { display: grid; gap: 6px; justify-items: start; color: inherit; text-decoration: none; touch-action: manipulation; }
.gonflage-bouteille__titre { font-family: var(--font-display); font-weight: var(--display-weight); font-size: 17px; }
.gonflage-bouteille__description { color: var(--ink-2); font-size: 14px; }

.gonflage-actions { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; margin-top: 12px; }



.gonflage-recap__liste { display: grid; gap: 8px; margin: 0; }
.gonflage-recap__liste > div { display: flex; justify-content: space-between; gap: 12px; padding: 8px 0; border-top: 1px solid var(--line); }
.gonflage-recap__liste dt { color: var(--ink-2); font-size: 14px; }
.gonflage-recap__liste dd { margin: 0; font-weight: 600; text-align: right; }
.gonflage-refus { padding: 12px 14px; border-radius: var(--r-ctl); background: var(--danger-soft); color: var(--danger); font-weight: 600; }



.gonflage-formulaire fieldset { margin: 0; padding: 0; border: 0; min-width: 0; }






.gonflage-segment__choix input { position: absolute; opacity: 0; inset: 0; width: 100%; height: 100%; margin: 0; cursor: pointer; }
.gonflage-segment__choix span { flex: 1; display: flex; align-items: center; justify-content: center; min-height: 48px; padding: 0 6px; border: 1px solid var(--line); border-radius: var(--r-ctl); background: var(--surface); font-weight: 600; font-size: 14px; text-align: center; touch-action: manipulation; transition: transform 140ms var(--ease-out), background 120ms ease; }





/* Gonflage : partie équipe (recherche, gonflages du jour, carnet du compresseur). */
.gonflage-recherche { display: grid; gap: 10px; margin-bottom: 12px; }
.gonflage-recherche__libelle { font-size: 13px; font-weight: 600; }
.gonflage-recherche input, .gonflage-recherche__bouton { min-height: 48px; font-size: 16px; width: 100%; }
.gonflage-piscine { margin-top: 12px; }

.gonflage-jour { align-items: center; flex-wrap: wrap; }
.gonflage-jour__texte { display: grid; gap: 2px; flex: 1 1 200px; min-width: 0; }



.gonflage-remarque { margin-top: 20px; }

.gonflage-remarques { list-style: none; margin: 0; padding: 0; max-height: 40vh; overflow-y: auto; overscroll-behavior: contain; display: grid; }
.gonflage-remarques__ligne { display: flex; justify-content: space-between; align-items: flex-start; gap: 12px; padding: 12px 0; border-top: 1px solid var(--line); }



/* Gonflage : réglages. */

.gonflage-interrupteur { display: flex; align-items: center; gap: 12px; min-height: 44px; font-weight: 600; touch-action: manipulation; }

.gonflage-ajout { display: grid; gap: 10px; margin-top: 12px; }

.gonflage-prix-liste { list-style: none; margin: 0; padding: 0; display: grid; }
.gonflage-prix-liste__ligne { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 12px 0; border-top: 1px solid var(--line); }

.gonflage-prix-liste__champ { display: flex; align-items: center; gap: 6px; flex: 0 0 auto; }


/* Gonflage : sur grand écran, formulaires et champs à leur taille utile ; cadre de l'équipe et planning. */

.gonflage-sous-cadre { display: grid; gap: 12px; padding: 16px; border: 1px solid var(--line); border-radius: var(--r-ctl); background: var(--surface-2); }


.gonflage-planning th, .gonflage-planning td { text-align: center; white-space: nowrap; }

.gonflage-planning__case { display: inline-flex; align-items: center; justify-content: center; gap: 6px; min-height: 44px; min-width: 120px; padding: 0 10px; border: 1px solid var(--line); border-radius: var(--r-ctl); background: var(--surface); color: var(--ink); font: inherit; font-weight: 600; cursor: pointer; touch-action: manipulation; transition: transform 140ms var(--ease-out); }
.gonflage-planning__case:active { transform: scale(0.97); }


/* Drive du club (app `drive`). Prototype : docs/ui/prototype-stockage-oa.html. */
.drive-entete { display: flex; flex-wrap: wrap; align-items: flex-end; justify-content: space-between; gap: 16px; }
.drive-entete__actions { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; }
.drive-quota { display: flex; flex-direction: column; gap: 6px; min-width: 240px; }

.drive-quota__barre { width: 100%; height: 8px; border: 1px solid var(--line); border-radius: 999px; background: var(--surface-2); appearance: none; overflow: hidden; }


.drive-quota__barre::-moz-progress-bar { background: var(--accent); border-radius: 999px; }





.drive-explorateur { position: relative; padding: 0; gap: 0; overflow: hidden; }
.drive-barre { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 12px 16px; border-bottom: 1px solid var(--line); }
.drive-fil { display: flex; flex-wrap: wrap; align-items: center; gap: 4px; min-width: 0; font-weight: 600; }
.drive-fil a { text-decoration: none; padding: 4px 6px; border-radius: 6px; color: var(--ink-2); }

.drive-fil__sep { color: var(--ink-3); }


.drive-tableau { width: 100%; border-collapse: collapse; }
.drive-tableau th { padding: 10px 16px; border-bottom: 1px solid var(--line); color: var(--ink-3); font-size: 12px; font-weight: 700; letter-spacing: 0.06em; text-align: left; text-transform: uppercase; }
.drive-tableau td { padding: 10px 16px; border-bottom: 1px solid var(--line); vertical-align: middle; }


.drive-ligne.cible-depot { background: var(--accent-soft); box-shadow: inset 3px 0 0 var(--accent); }
.drive-ligne.glisse { opacity: 0.45; }


@keyframes drive-surligne { from { background: var(--accent-soft); } to { background: transparent; } }



.drive-nom__texte { display: block; text-decoration: none; overflow: hidden; color: var(--ink); font-weight: 600; text-overflow: ellipsis; white-space: nowrap; }
.drive-nom__meta { display: none; color: var(--ink-2); font-size: 13px; }
.drive-nom__icone { display: grid; place-items: center; flex: none; width: 36px; height: 36px; border-radius: var(--r-ctl); background: var(--surface-2); color: var(--ink-2); }
.drive-nom__icone--dossier { background: var(--accent-soft); color: var(--accent-text); }
.drive-nom__ext { font-size: 10px; font-weight: 700; letter-spacing: 0.02em; text-transform: uppercase; }
/* Couleur par type, en plus de l'extension écrite (jamais la couleur seule). */
.drive-nom__icone[data-type="tableur"] { background: var(--type-tableur); color: var(--type-tableur-ink); }
.drive-nom__icone[data-type="pdf"] { background: var(--type-pdf); color: var(--type-pdf-ink); }
.drive-nom__icone[data-type="texte"] { background: var(--type-texte); color: var(--type-texte-ink); }
.drive-acces { display: flex; flex-wrap: wrap; gap: 4px; margin-top: 4px; }


.drive-col-num { color: var(--ink-2); font-variant-numeric: tabular-nums; white-space: nowrap; }
.drive-col-actions { width: 1%; text-align: right; white-space: nowrap; }
.drive-col-actions > * { margin-left: 4px; vertical-align: middle; }

.drive-bouton-ligne { position: relative; display: inline-grid; place-items: center; width: 32px; height: 32px; padding: 0; border: 1px solid transparent; border-radius: var(--r-ctl); background: transparent; color: var(--ink-2); cursor: pointer; touch-action: manipulation; transition: transform 140ms var(--ease-out), background-color 120ms ease; }


.drive-bouton-ligne:active { transform: scale(0.97); }



.drive-vide { padding: 48px 16px; color: var(--ink-2); text-align: center; }


.drive-astuce { display: flex; align-items: center; gap: 10px; margin: 0; padding: 12px 16px; border-top: 1px solid var(--line); background: var(--surface-2); color: var(--ink-2); font-size: 13px; }


@media (prefers-reduced-motion: reduce) {
  
  .drive-bouton-ligne:active { transform: none; }
}

/* Drive : zone de dépôt, panneau des envois, menu d'actions, fenêtres. */
.drive-voile { position: absolute; inset: 0; z-index: 5; display: grid; place-items: center; border: 2px dashed var(--accent); border-radius: var(--r-card); background: color-mix(in srgb, var(--surface) 86%, transparent); opacity: 0; pointer-events: none; transition: opacity 150ms var(--ease-out); }
.drive-voile[data-visible] { opacity: 1; }
.drive-voile__texte { display: flex; flex-direction: column; align-items: center; gap: 8px; color: var(--accent-text); font-weight: 700; transform: translateY(4px); transition: transform 200ms var(--ease-out); }






.drive-envois[data-visible] { opacity: 1; pointer-events: auto; transform: none; }
.drive-envois__tete { display: flex; align-items: center; justify-content: space-between; padding: 12px 16px; border-bottom: 1px solid var(--line); font-weight: 700; }
.drive-envois__liste { overflow: auto; overscroll-behavior: contain; padding: 6px 0; }
.drive-envoi { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 4px 10px; align-items: center; padding: 8px 16px; font-size: 13px; }
.drive-envoi__nom { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.drive-envoi__barre { grid-column: 1 / -1; width: 100%; height: 4px; border: 0; border-radius: 999px; background: var(--surface-2); appearance: none; overflow: hidden; }


.drive-envoi__barre::-moz-progress-bar { background: var(--accent); border-radius: 999px; }


.drive-menu { position: absolute; z-index: 45; min-width: 200px; padding: 6px; border: 1px solid var(--line); border-radius: var(--r-ctl); background: var(--surface); box-shadow: var(--shadow-pop); transform-origin: top right; animation: drive-menu 150ms var(--ease-out); }

.drive-menu[data-haut] { transform-origin: bottom right; }
@keyframes drive-menu { from { opacity: 0; transform: scale(0.96); } }









.drive-liste-courte { max-height: 180px; margin: 0; padding-left: 18px; overflow: auto; }

/* Drive : déplacer (arbre), historique, ligne cliquable. */
.drive-ligne { cursor: pointer; }

.drive-arbre { max-height: 320px; margin: 0; padding: 4px; border: 1px solid var(--line); border-radius: var(--r-ctl); list-style: none; overflow: auto; overscroll-behavior: contain; }





.drive-arbre small { margin-left: auto; color: var(--ink-3); font-size: 12px; }





.drive-versions { margin: 0; padding: 0; border: 1px solid var(--line); border-radius: var(--r-ctl); list-style: none; }


.drive-versions__info { flex: 1; min-width: 0; }
.drive-versions__date { font-weight: 600; }


@media (max-width: 820px) {
  
  /* Téléphone : le chemin tient sur une ligne (défilement latéral), les droits passent dessous. */
  
  .drive-fil { flex-wrap: nowrap; max-width: 100%; overflow-x: auto; white-space: nowrap; scrollbar-width: none; }
  
  .drive-fil > * { flex: none; }
}

/* Drive : accès par rôle et par personne, réglages. */



.drive-liste-acces { margin: 0; padding: 0; border: 1px solid var(--line); border-radius: var(--r-ctl); list-style: none; }



.drive-liste-acces__nom { flex: 1; min-width: 140px; font-weight: 600; }
.drive-liste-acces__nom small { display: block; color: var(--ink-2); font-size: 12.5px; font-weight: 400; }
.drive-choix { display: inline-flex; border: 1px solid var(--line); border-radius: var(--r-ctl); overflow: hidden; }






.drive-suggestions { max-height: 220px; margin: 4px 0 0; padding: 4px; border: 1px solid var(--line); border-radius: var(--r-ctl); background: var(--surface); list-style: none; overflow: auto; overscroll-behavior: contain; }




.drive-suggestions__aucun { padding: 8px 10px; color: var(--ink-2); font-size: 13px; }


@media (max-width: 820px) {
  /* Téléphone : nom et croix sur la première ligne, choix de l'accès dessous. */
  
  
  
}

/* Drive : corbeille. */
.drive-corbeille { max-height: 50dvh; margin: 0; padding: 0; border: 1px solid var(--line); border-radius: var(--r-ctl); list-style: none; overflow: auto; overscroll-behavior: contain; }




.drive-corbeille__nom { overflow-wrap: anywhere; font-weight: 600; }
.drive-vide-court { margin: 0; color: var(--ink-2); text-align: center; }


/* Drive : couleur des icônes de fichier (tableur, PDF, texte), par style. Hors
   de la liste des jetons que le club peut personnaliser (clubs/apparence.py). */
:root,
[data-apparence="abysse"] {
  --type-tableur: rgba(74, 222, 128, 0.16);
  --type-tableur-ink: #6ee7a0;
  --type-pdf: rgba(248, 113, 113, 0.16);
  --type-pdf-ink: #fca5a5;
  --type-texte: rgba(96, 165, 250, 0.18);
  --type-texte-ink: #93c5fd;
}
[data-apparence="lagon"],
[data-apparence="carnet"] {
  --type-tableur: #e3f4e8;
  --type-tableur-ink: #1d6b3a;
  --type-pdf: #fde6e4;
  --type-pdf-ink: #b42318;
  --type-texte: #e3edfb;
  --type-texte-ink: #1f4f9c;
}

/* ---- Relectures et signatures (charte : bloc `.sig-*`) ---- */
@font-face { font-family: "Caveat"; font-style: normal; font-weight: 400; font-display: swap; src: url("polices/caveat-latin-400.6f3652657f92.woff2") format("woff2"); }

:root { --sig-trace: var(--accent-text); }

.sig-document { margin: 2px 0 0; font-family: var(--font-display); font-size: 19px; font-weight: var(--display-weight); overflow-wrap: anywhere; }




.sig-etiquette { font-size: 13px; font-weight: 600; color: var(--ink); }





.sig-puces { display: flex; flex-wrap: wrap; gap: 8px; }
.sig-puce { display: inline-flex; align-items: center; gap: 6px; min-height: 40px; padding: 6px 14px; border: 1px solid var(--line); border-radius: var(--r-pill); background: var(--surface); color: var(--ink); font: inherit; font-size: 14px; user-select: none; -webkit-user-select: none; touch-action: manipulation; transition: transform 140ms var(--ease-out), background-color 120ms ease; }
.sig-puce:active { transform: scale(0.97); }
.sig-puce[aria-pressed="true"] { background: var(--accent-soft); border-color: var(--accent); color: var(--accent-text); font-weight: 600; }
.sig-puce:disabled { opacity: 0.45; pointer-events: none; }

.sig-compte--alerte { color: var(--danger); font-weight: 600; }

.sig-participant { display: flex; align-items: center; gap: 10px; padding: 8px 0; border-top: 1px solid var(--line); }

.sig-participant__nom { flex: 1; min-width: 0; overflow-wrap: anywhere; }
.sig-qualite { width: 150px; flex: none; height: 38px; font-size: 16px; }
.sig-retirer { display: grid; place-items: center; flex: none; width: 36px; height: 36px; padding: 0; border: 0; border-radius: var(--r-ctl); background: transparent; color: var(--ink-2); cursor: pointer; user-select: none; -webkit-user-select: none; touch-action: manipulation; position: relative; transition: transform 140ms var(--ease-out); }

.sig-retirer:active { transform: scale(0.94); }

/* Aperçu de la dernière page et cadre de signatures (glissé au doigt ou à la souris) */
.sig-feuille { position: relative; width: 100%; max-width: 440px; margin: 0 auto; aspect-ratio: var(--page-ratio, 210 / 297); background: var(--surface); border: 1px solid var(--line); border-radius: 4px; box-shadow: var(--shadow); overflow: hidden; user-select: none; -webkit-user-select: none; }
.sig-feuille__image { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: fill; background: #fff; opacity: 0; transition: opacity 200ms ease; pointer-events: none; }
.sig-feuille--prete .sig-feuille__image { opacity: 1; }
.sig-feuille--ajout .sig-feuille__image { opacity: 0; }
.sig-bloc { position: absolute; left: 7%; right: 7%; top: var(--bloc-haut, 30%); height: var(--bloc-hauteur, 20%); display: flex; padding: 1.4%; border: 1.5px dashed var(--accent); border-radius: 4px; background: var(--accent-soft); cursor: grab; touch-action: none; }
.sig-bloc--page { cursor: default; touch-action: auto; }
.sig-bloc--glisse { cursor: grabbing; }
.sig-bloc__etiquette { position: absolute; top: -18px; left: 0; padding: 0 4px; border-radius: 3px; background: var(--surface); color: var(--accent-text); font-size: 10px; font-weight: 700; }

.sig-case { display: flex; flex-direction: column; justify-content: flex-end; min-width: 0; color: var(--ink); font-size: 7px; line-height: 1.25; }
.sig-case > * { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.sig-case__signature { font-family: "Caveat", cursive; font-size: 15px; line-height: 1; color: var(--sig-trace); }
.sig-case__filet { border-top: 0.6px solid var(--ink-3); margin: 2px 0; }

/* Dépôt du PDF définitif */
.sig-depot { display: flex; align-items: center; justify-content: center; min-height: 96px; padding: 16px; border: 1.5px dashed var(--line); border-radius: var(--r-card); background: var(--surface-2); color: var(--ink-2); text-align: center; cursor: pointer; transition: background-color 120ms ease, border-color 120ms ease; }

.sig-depot__lien { color: var(--accent-text); font-weight: 600; }

.sig-depot--survol { border-color: var(--accent); background: var(--accent-soft); }
.sig-depot--choisi { border-style: solid; border-color: var(--accent); color: var(--ink); font-weight: 600; }

@media (prefers-reduced-motion: reduce) {
  .sig-puce:active, .sig-retirer:active { transform: none; }
}










/* Liste : « À relire », « À signer », « Mes demandes » */





a.chip { text-decoration: none; }

/* Réponse */


.sig-vignettes img { flex: none; width: 110px; height: auto; border: 1px solid var(--line); border-radius: 4px; background: #fff; }



.sig-apercu-case { max-width: 300px; padding: 14px 16px; border: 1px solid var(--line); border-radius: var(--r-ctl); background: var(--surface-2); color: var(--ink); }
.sig-apercu-case small { display: block; font-size: 12px; }
.sig-apercu-case__signature { display: flex; align-items: flex-end; height: 44px; font-family: "Caveat", cursive; font-size: 32px; line-height: 1; color: var(--sig-trace); }
.sig-apercu-case__signature img { height: 44px; max-width: 100%; }
.sig-trace { position: relative; height: 150px; margin-top: 12px; border: 1px dashed var(--line); border-radius: var(--r-ctl); background: var(--surface-2); }
.sig-trace canvas { display: block; width: 100%; height: 100%; touch-action: none; }
.sig-trace__indice { position: absolute; inset: auto 0 10px; text-align: center; font-size: 13px; color: var(--ink-2); pointer-events: none; }
.sig-trace__outils { display: flex; justify-content: flex-end; margin-top: 6px; }
#sig-form-signer .sig-puces { margin-top: 16px; }







/* Suivi et vérification */











/* Composant de signature partagé (core/_signature.html) */
.signature .sig-apercu-case--pleine { max-width: none; margin-top: 12px; }
.signature .sig-trace__outils { margin-top: 8px; }
.signature .sig-puces + .sig-zone, .signature .sig-puces + .sig-apercu-case { margin-top: 12px; }
.signature .sig-trace__indice { position: absolute; inset: 0; display: grid; place-items: center; color: var(--ink-3); font-size: 14px; pointer-events: none; }
.signature .sig-trace__indice[hidden] { display: none; }
.sig-apercu-case__signature img { max-height: 54px; }

/* Baptêmes */
/* ---------- Formulaire public ---------- */













.field .input[readonly] { background: var(--surface-2); color: var(--ink-2); }

.bap-verrou svg { width: 13px; height: 13px; }












/* Bloc parent : apparaît sans saut (opacité + petite translation). */

.bap-parent.is-cache { opacity: 0; transform: translateY(8px); }
@media (prefers-reduced-motion: reduce) {  .bap-parent.is-cache { transform: none; } }





.bap-envoi .button { width: 100%; height: 48px; font-size: 15.5px; }






.bap-etat__icone svg { width: 30px; height: 30px; }
.bap-etat h1 { font-family: var(--font-display); font-size: 24px; margin: 4px 0 0; }



/* ---------- Page de gestion ---------- */


.gst-tete h1 { font-family: var(--font-display); font-size: 24px; margin: 0; flex: 1 1 auto; }








.seance { min-width: 30px; height: 26px; padding: 0 7px; border-radius: var(--r-pill); font-size: 12px; font-weight: 700; display: inline-grid; place-items: center; border: 1px dashed var(--line); color: var(--ink-3); background: transparent; }









/* Colonne d'actions : une pile de boutons de même largeur, pas un escalier. */

/* Séance en attente de signature : le texte et ses deux boutons forment un bloc. */






.lien-pdf svg, .gst-ico { width: 16px; height: 16px; }







/* Téléphone : le tableau devient des cartes. */
.confirm-dialog { transition: opacity 200ms var(--ease-out), transform 200ms var(--ease-out); }
.confirm-dialog[open] { opacity: 1; transform: none; }
@starting-style { .confirm-dialog[open] { opacity: 0; transform: scale(.96); } }
.confirm-dialog .field { margin-top: 4px; }






/* ---------- Signature du moniteur ---------- */
.mon { max-width: 560px; margin: 0 auto; padding: 22px 16px 60px; display: grid; gap: 14px; }
.mon h1 { font-family: var(--font-display); font-size: 24px; margin: 0; }
.mon dl { margin: 0; display: grid; grid-template-columns: auto 1fr; gap: 6px 14px; font-size: 15px; }
.mon dt { color: var(--ink-3); }
.mon dd { margin: 0; font-weight: 600; }
.mon .button { height: 46px; }






/* Renseignements de séjour (écran de l'organisateur, prototype-renseignements) */



































/* Fenêtre d'ajout : feuille du bas sur téléphone, fenêtre centrée au-delà. */









/* Sans JavaScript : le formulaire d'ajout reste affiché sous la liste. */





/* Renseignements de séjour : formulaire du participant */


























/* Champ fichier : présent mais invisible, le <label> qui l'entoure est la cible. */

























/* Renseignements de séjour : suivi (organisateur) */

























