/* Feuille de style de maliturgie : violet et zinc sur fond clair, pensée d'abord pour le téléphone.
   Largeurs : en dessous de 960 px, une colonne et la barre d'onglets en bas ; à partir de 960 px,
   la barre latérale ; à partir de 1180 px, les pages se partagent en deux colonnes. */

@font-face { font-family: "Geist"; src: url("polices/geist.woff2") format("woff2"); font-weight: 100 900; font-display: swap; }
@font-face { font-family: "Geist Mono"; src: url("polices/geist-mono.woff2") format("woff2"); font-weight: 100 900; font-display: swap; }
@font-face { font-family: "Newsreader"; src: url("polices/newsreader.woff2") format("woff2"); font-weight: 200 800; font-display: swap; }

:root {
  --fond: #fbfaff;
  --carte: #fff;
  --encre: #18181b;
  --encre-2: #27272a;
  --encre-moyenne: #3f3f46;
  --encre-grise: #52525b;
  --encre-douce: #71717a;
  --encre-pale: #a1a1aa;
  --trait: #ebe7f5;
  --trait-doux: #f1eef8;
  --trait-champ: #e4e4e7;
  --trait-entete: #ece8f6;
  --survol: #faf8ff;

  --violet: #7c3aed;
  --violet-fonce: #6d28d9;
  --violet-nuit: #5b21b6;
  --violet-clair: #f5f3ff;
  --violet-bord: #ddd6fe;
  --violet-voile: #ede9fe;
  --violet-pale: #c4b5fd;
  --violet-focus: #a78bfa;
  --nuit: #1c1631;

  --vert: #047857;
  --vert-clair: #ecfdf5;
  --vert-bord: #a7f3d0;
  --vert-vif: #10b981;
  --rouge: #be123c;
  --rouge-vif: #e11d48;
  --rouge-fonce: #9f1239;
  --rouge-clair: #fff1f2;
  --rouge-bord: #fecdd3;
  --or: #b45309;
  --or-clair: #fffbeb;
  --or-bord: #fde68a;
  --or-pastille: #fef3c7;

  --degrade: linear-gradient(90deg, #9333ea, #6d28d9 60%, #4f46e5);
  --ombre-carte: 0 1px 2px rgba(24, 24, 27, .04), 0 12px 32px -18px rgba(91, 33, 182, .22);
  --ombre-menu: 0 20px 44px -16px rgba(76, 29, 149, .3);
  --ombre-bouton: inset 0 1px 0 rgba(255, 255, 255, .2), 0 8px 18px -8px rgba(109, 40, 217, .6);
  --rayon: 14px;

  --sans: "Geist", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  --serif: "Newsreader", Georgia, "Iowan Old Style", serif;
  --mono: "Geist Mono", ui-monospace, "SFMono-Regular", Menlo, monospace;
}

* { box-sizing: border-box; }

body {
  margin: 0; min-height: 100vh;
  color: var(--encre); font: 15px/1.5 var(--sans);
  -webkit-font-smoothing: antialiased;
  background:
    radial-gradient(55% 40% at 0% 0%, #f3e8ff 0%, rgba(243, 232, 255, 0) 70%),
    radial-gradient(45% 35% at 100% 0%, #fce7f3 0%, rgba(252, 231, 243, 0) 70%),
    radial-gradient(60% 45% at 85% 100%, #e0e7ff 0%, rgba(224, 231, 255, 0) 70%),
    radial-gradient(40% 35% at 10% 90%, #f5f3ff 0%, rgba(245, 243, 255, 0) 70%),
    var(--fond);
  background-attachment: fixed;
}

h1, h2, h3 { font-family: var(--serif); letter-spacing: -.01em; margin: 0; }
h1 { font-weight: 400; font-size: clamp(26px, 3.4vw, 34px); letter-spacing: -.015em; line-height: 1.1; text-wrap: pretty; }
h2 { font-weight: 500; font-size: 21px; line-height: 1.2; margin-bottom: 12px; }
h3 { font-weight: 500; font-size: 18px; margin-bottom: 6px; }
a { color: var(--violet-fonce); text-decoration: none; }
a:hover { color: var(--violet-nuit); text-decoration: underline; }
::placeholder { color: var(--encre-pale); }
.ico { width: 16px; height: 16px; flex: none; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }

/* En-tête ------------------------------------------------------------ */
.entete {
  position: sticky; top: 0; z-index: 40;
  background: rgba(255, 255, 255, .74); -webkit-backdrop-filter: blur(14px); backdrop-filter: blur(14px);
  border-bottom: 1px solid var(--trait-entete);
}
.entete-inner { display: flex; align-items: center; gap: 12px; padding: 10px 16px; max-width: 1320px; margin: 0 auto; }
.marque { display: flex; align-items: center; gap: 10px; color: var(--encre); }
.marque:hover { color: var(--encre); text-decoration: none; }
.marque img { width: 34px; height: 34px; border-radius: 10px; box-shadow: 0 4px 12px -4px rgba(107, 63, 160, .6); }
.marque span { font-family: var(--serif); font-size: 21px; letter-spacing: -.01em; }
.paroisse-courante {
  margin-right: auto; min-width: 0; padding-left: 12px; border-left: 1px solid var(--trait-entete);
  font-size: 14px; color: var(--encre-moyenne); white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}

/* Menu du compte. */
.compte { position: relative; }
.compte summary {
  list-style: none; cursor: pointer; display: flex; align-items: center; gap: 8px;
  padding: 3px 10px 3px 3px; border: 1px solid #e4e1ef; border-radius: 999px; background: #fff;
}
.compte summary::-webkit-details-marker { display: none; }
.compte summary:hover, .compte[open] summary { border-color: var(--violet-bord); }
.compte summary:focus-visible { outline: 2px solid var(--violet-focus); outline-offset: 2px; }
.avatar {
  width: 30px; height: 30px; border-radius: 999px; flex: none;
  background: linear-gradient(135deg, #a855f7, #6366f1); color: #fff;
  display: inline-flex; align-items: center; justify-content: center; font-size: 12px; font-weight: 600;
}
.compte .nom { display: none; font-size: 13.5px; color: var(--encre-moyenne); white-space: nowrap; }
.chevron { width: 15px; height: 15px; flex: none; fill: none; stroke: var(--encre-douce); stroke-width: 2; transition: transform .15s; }
details[open] > summary .chevron { transform: rotate(180deg); }
.menu-compte, .menu-deroulant, .menu-outils-panneau {
  position: absolute; z-index: 50; background: #fff; border: 1px solid var(--trait);
  border-radius: var(--rayon); box-shadow: var(--ombre-menu); padding: 6px;
}
.menu-compte { right: 0; top: calc(100% + 8px); width: 264px; max-width: calc(100vw - 24px); }
.menu-compte form, .menu-deroulant form { margin: 0; }
.menu-entete { margin: 0; padding: 10px 10px 12px; border-bottom: 1px solid var(--trait-doux); overflow-wrap: anywhere; }
.menu-entete strong { display: block; font-weight: 500; }
.menu-entete span { font-size: 12.5px; color: var(--encre-douce); }
.menu-titre { margin: 0; padding: 6px 10px; font-family: var(--mono); font-size: 10.5px; letter-spacing: .08em; text-transform: uppercase; color: var(--encre-pale); }
.menu-version { margin: 0; padding: 6px 10px 2px; font-family: var(--mono); font-size: 10px; letter-spacing: .04em; text-transform: uppercase; color: var(--encre-pale); text-align: right; }
.menu-choix {
  display: flex; align-items: center; gap: 10px; width: 100%; text-align: left; cursor: pointer;
  background: none; border: 0; border-radius: 8px; padding: 10px; font: inherit; font-size: 14px; color: var(--encre);
}
.menu-choix:hover, .menu-choix:focus-visible { background: var(--violet-clair); color: var(--violet-fonce); outline: none; text-decoration: none; }
.menu-choix.actif { background: var(--survol); }
.menu-choix small { display: block; font-size: 12px; color: var(--encre-douce); }
.menu-choix .qui { flex: 1; min-width: 0; }
.menu-choix .coche { flex: none; color: var(--violet); }
.menu-choix .coche:empty { display: none; }
.menu-choix.quitter { border-top: 1px solid var(--trait-doux); border-radius: 0; color: var(--encre-douce); }
.menu-choix.ajout { border-top: 1px solid var(--trait-doux); margin-top: 4px; border-radius: 0; color: var(--violet-fonce); gap: 8px; }
.menu-choix .ico { margin-top: 0; }

/* Coquille : barre latérale et contenu ------------------------------- */
.coquille {
  display: grid; grid-template-columns: minmax(0, 1fr); gap: 16px; align-items: start;
  max-width: 1320px; width: 100%; margin: 0 auto; padding: 14px 14px 24px;
}
.laterale { display: flex; flex-direction: column; gap: 8px; min-width: 0; }
body:not(.accueil) .laterale { display: contents; }
body:not(.accueil) .bloc-clocher, body:not(.accueil) .raccourcis { display: none; }

.etiquette-champ { display: none; font-size: 13px; font-weight: 500; color: var(--encre-moyenne); }
.bloc-clocher { display: flex; flex-direction: column; gap: 6px; }
.selecteur-clocher { position: relative; }
.selecteur-clocher summary {
  list-style: none; cursor: pointer; display: flex; align-items: center; gap: 10px;
  height: 46px; padding: 0 10px 0 6px; border: 1px solid #e4e1ef; border-radius: 11px; background: #fff;
  box-shadow: 0 1px 2px rgba(24, 24, 27, .04);
}
.selecteur-clocher summary::-webkit-details-marker { display: none; }
.selecteur-clocher summary:focus-visible { outline: 2px solid var(--violet-focus); outline-offset: 2px; }
.selecteur-clocher .qui { flex: 1; min-width: 0; display: flex; flex-direction: column; line-height: 1.2; }
.selecteur-clocher summary .nom { font-size: 14.5px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.selecteur-clocher summary .lieu { font-size: 11.5px; color: var(--encre-douce); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.selecteur-clocher summary .chevron { stroke: var(--encre-pale); width: 16px; height: 16px; }
.menu-deroulant { left: 0; right: 0; top: calc(100% + 6px); z-index: 45; }
.carre-initiales {
  width: 32px; height: 32px; border-radius: 8px; flex: none;
  background: var(--violet-clair); border: 1px solid var(--violet-voile); color: var(--violet);
  display: inline-flex; align-items: center; justify-content: center; font-size: 12px; font-weight: 600;
}
.carre-initiales.petit { width: 28px; height: 28px; border-radius: 7px; font-size: 11px; }

.raccourcis { display: grid; grid-template-columns: minmax(0, 1fr); gap: 8px; }
.raccourcis.deux { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); }
.raccourcis .bouton { height: 40px; }
.raccourcis .large { display: none; }
.compteur {
  min-width: 22px; height: 22px; padding: 0 6px; border-radius: 999px; background: var(--rouge-vif); color: #fff;
  font-size: 12px; display: inline-flex; align-items: center; justify-content: center;
}

/* Navigation : barre d'onglets sombre en bas du téléphone. */
.nav {
  position: fixed; left: 0; right: 0; bottom: 0; z-index: 35;
  display: grid; grid-auto-flow: column; grid-auto-columns: 1fr; gap: 2px;
  background: var(--nuit); padding: 6px 6px calc(6px + env(safe-area-inset-bottom));
}
.nav a {
  position: relative; display: flex; flex-direction: column; align-items: center; gap: 3px;
  min-height: 52px; padding: 7px 2px 6px; border-radius: 10px;
  color: var(--violet-pale); font-size: 11px; font-weight: 500; text-align: center;
}
.nav a:hover { text-decoration: none; color: #fff; }
.nav a.actif { background: var(--violet); color: #fff; }
.nav .ico-boite { display: contents; }
.nav .ico { width: 22px; height: 22px; stroke-width: 1.8; }
.nav .seulement-large, .nav-separateur { display: none; }
.compteur-or {
  position: absolute; top: 4px; left: calc(50% + 6px); min-width: 16px; height: 16px; padding: 0 4px;
  border-radius: 99px; background: #fbbf24; color: var(--nuit); font-size: 10px; font-weight: 600;
  display: inline-flex; align-items: center; justify-content: center;
}
body.avec-nav { padding-bottom: calc(66px + env(safe-area-inset-bottom)); }

/* Pages ---------------------------------------------------------------- */
.page { min-width: 0; display: flex; flex-direction: column; gap: 16px; }
body:not(.avec-nav) .page { max-width: 1100px; margin: 0 auto; padding: 24px 16px 48px; }
.page-etroite { width: 100%; max-width: 420px; margin: 0 auto; padding: 48px 16px 40px; display: flex; flex-direction: column; gap: 16px; }
.entete-page { display: flex; align-items: flex-end; gap: 12px; flex-wrap: wrap; }
.entete-page > div:first-child { flex: 1; min-width: 220px; }
.entete-page .actions { display: flex; gap: 8px; flex-wrap: wrap; }
.entete-page .actions form { margin: 0; }
.sous-titre { color: var(--encre-douce); margin: 6px 0 0; font-size: 14px; max-width: 640px; text-wrap: pretty; }
/* Les phrases d'explication sous le titre des pages ne s'affichent que sur grand écran. */
@media (max-width: 959px) { .sous-titre-page { display: none; } }
.date-fr::first-letter { text-transform: uppercase; }
.retour { align-self: flex-start; display: inline-flex; align-items: center; gap: 4px; font-size: 14px; }
.retour .ico { width: 16px; height: 16px; }

.colonnes { display: grid; grid-template-columns: minmax(0, 1fr); gap: 16px; align-items: start; }
.colonnes > div:not(.carte) { display: flex; flex-direction: column; gap: 16px; min-width: 0; }

.carte {
  background: var(--carte); border: 1px solid var(--trait); border-radius: var(--rayon);
  padding: 16px; box-shadow: var(--ombre-carte); min-width: 0;
}
.carte > h2:first-child { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.carte > :last-child { margin-bottom: 0; }
.carte-titre { display: flex; align-items: center; gap: 8px; padding: 16px 16px 12px; }
.carte-titre h2 { flex: 1; margin: 0; font-size: 20px; }
.lien-bouton { border: 0; background: none; padding: 0; font: inherit; font-size: 13px; color: var(--violet-fonce); cursor: pointer; }
.lien-bouton:hover { text-decoration: underline; }
summary.lien-bouton { list-style: none; }
summary.lien-bouton::-webkit-details-marker { display: none; }

/* Onglets (célébration sur téléphone, réglages) : boutons radio cachés et libellés. */
.onglets {
  display: flex; background: #fff; border: 1px solid var(--trait); border-radius: 12px; padding: 0 6px;
  overflow-x: auto; box-shadow: 0 1px 2px rgba(24, 24, 27, .04);
}
.onglets label {
  flex: 1 0 auto; display: flex; align-items: center; justify-content: center; height: 46px; padding: 0 14px; margin: 0;
  border-bottom: 2px solid transparent; color: var(--encre-douce); font-size: 14.5px; font-weight: 400; cursor: pointer; white-space: nowrap;
}
.onglet-radio { position: absolute; opacity: 0; pointer-events: none; }

/* Calendrier ---------------------------------------------------------- */
.vue-cal { display: none; }
.bascule {
  display: inline-flex; padding: 3px; border: 1px solid #e4e1ef; border-radius: 999px; background: #fff;
  box-shadow: 0 1px 2px rgba(24, 24, 27, .04);
}
.bascule label {
  display: inline-flex; align-items: center; gap: 6px; height: 34px; padding: 0 14px; margin: 0; border-radius: 999px;
  color: var(--encre-grise); font-size: 13.5px; font-weight: 500; cursor: pointer;
}
.bascule .ico { width: 15px; height: 15px; }
.page:has(#vue-mois:checked) .bascule label[for=vue-mois],
.page:has(#vue-liste:checked) .bascule label[for=vue-liste] { background: var(--violet); color: #fff; }
.page:has(#vue-mois:checked) #liste-messes,
.page:has(#vue-liste:checked) #calendrier { display: none; }

.carte-mois { padding: 12px; }
.cal-entete { display: flex; align-items: center; gap: 8px; margin-bottom: 12px; }
.cal-mois { flex: 1; text-align: center; font-size: 22px; margin: 0; }
.cal-mois::first-letter { text-transform: uppercase; }
.cal-jours { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); margin-bottom: 6px; }
.cal-jours span { text-align: center; font-family: var(--mono); font-size: 10.5px; letter-spacing: .06em; color: var(--encre-pale); padding: 4px 0; }
.cal-grille {
  display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); gap: 1px;
  background: var(--trait-entete); border: 1px solid var(--trait-entete); border-radius: 12px; overflow: hidden;
}
.cal-case {
  position: relative; background: #fff; min-height: 54px; padding: 6px 2px; min-width: 0; cursor: pointer;
  display: flex; flex-direction: column; align-items: center; gap: 4px;
}
.cal-case.hors-mois { background: #faf9fc; }
.cal-case.hors-mois .cal-num { color: #c4c4cc; }
.cal-case.choisi { background: var(--violet-clair); box-shadow: inset 0 0 0 2px var(--violet-focus); }
.cal-num {
  width: 26px; height: 26px; border-radius: 999px; display: inline-flex; align-items: center; justify-content: center;
  font-size: 12.5px; font-variant-numeric: tabular-nums; color: var(--encre-2);
}
.cal-case.aujourdhui .cal-num { background: var(--violet); color: #fff; font-weight: 600; }
.cal-points { display: flex; gap: 3px; justify-content: center; flex-wrap: wrap; }
.cal-points i { width: 6px; height: 6px; border-radius: 99px; background: #f43f5e; }
.cal-points i.ok { background: var(--vert-vif); }
.cal-messe { display: none; }
.cal-ajout {
  position: absolute; top: 6px; right: 6px; width: 22px; height: 22px; border-radius: 99px;
  display: none; align-items: center; justify-content: center; font-weight: 600; color: var(--violet);
  opacity: 0; transition: opacity .12s;
}
.cal-ajout:hover { text-decoration: none; }
.cal-case:hover .cal-ajout, .cal-ajout:focus-visible { opacity: 1; background: var(--violet-clair); }

.carte-liste { padding: 0; overflow: hidden; }
.filtre-liste { padding: 0 16px 12px; }
.ligne-messe {
  display: flex; gap: 12px; align-items: center; padding: 12px 16px; border-top: 1px solid var(--trait-doux); color: var(--encre);
}
.ligne-messe:hover { background: var(--survol); color: var(--encre); text-decoration: none; }
.date-bloc {
  width: 48px; flex: none; text-align: center; border: 1px solid var(--trait); border-radius: 10px; padding: 5px 0; background: #fff;
  display: flex; flex-direction: column;
}
.date-bloc .j { font-family: var(--mono); font-size: 9.5px; letter-spacing: .06em; color: var(--violet); }
.date-bloc .n { font-size: 18px; font-weight: 600; line-height: 1.15; }
.date-bloc .m { font-family: var(--mono); font-size: 9px; letter-spacing: .06em; color: var(--encre-pale); }
.ligne-messe .corps { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.ligne-messe .titre { font-weight: 500; font-size: 14.5px; line-height: 1.3; }
.ligne-messe .meta { display: flex; align-items: center; gap: 6px; flex-wrap: wrap; font-size: 13px; color: var(--encre-douce); margin-top: 3px; }
.ligne-messe .fait, .cal-messe .fait { color: #059669; font-weight: 600; }
.liste-vide { margin: 0; padding: 12px 16px 18px; border-top: 1px solid var(--trait-doux); color: var(--encre-douce); font-size: 14px; }

/* Badges et étiquettes -------------------------------------------------- */
.badge, .etiq {
  display: inline-block; font-family: var(--mono); font-size: 10.5px; font-weight: 400; letter-spacing: .06em; text-transform: uppercase;
  padding: 2px 6px; border-radius: 5px; border: 1px solid var(--trait-champ); background: #fafafa; color: var(--encre-grise);
  line-height: 1.5; vertical-align: middle;
}
a.etiq:hover { text-decoration: none; border-color: var(--violet-bord); color: var(--violet-fonce); }
.badge-vert, .etiq-vert { border-color: var(--vert-bord); background: var(--vert-clair); color: var(--vert); }
.badge-rouge, .etiq-rouge { border-color: var(--rouge-bord); background: var(--rouge-clair); color: var(--rouge); }
.etiq-or { border-color: var(--or-bord); background: var(--or-clair); color: var(--or); }
.etiq-gris { border-color: var(--trait-champ); background: #fafafa; color: var(--encre-grise); }
.etiq-violet { border-color: var(--violet-bord); background: var(--violet-clair); color: var(--violet-fonce); }
.puces-etat { display: flex; gap: 6px; flex-wrap: wrap; }
.puces-etat .etiq { padding: 4px 8px; }

.pastille {
  width: 34px; height: 34px; border-radius: 999px; flex: none; background: var(--violet-clair); color: var(--violet);
  display: inline-flex; align-items: center; justify-content: center; font-size: 12px; font-weight: 600;
}
.pastille.verte { background: var(--vert-clair); border: 1px solid var(--vert-bord); color: var(--vert); }
.pastille.or { background: var(--or-pastille); color: var(--or); }

/* Célébration --------------------------------------------------------- */
.carte-messe { display: flex; gap: 16px; flex-wrap: wrap; align-items: flex-start; }
.carte-messe > div:first-child { flex: 1; min-width: 240px; }
.carte-messe .date-ligne { font-family: var(--mono); font-size: 11.5px; letter-spacing: .06em; text-transform: uppercase; color: var(--violet); }
.carte-messe h1 { line-height: 1.12; margin: 6px 0 12px; }
.carte-messe .actions { display: flex; gap: 8px; flex-wrap: wrap; }
.carte-messe .actions .bouton { height: 38px; padding: 0 14px; font-size: 14px; }
.carte-messe .actions form { margin: 0; }

.bandeau-co {
  display: flex; align-items: center; gap: 10px; border-radius: var(--rayon); padding: 10px 12px;
  background: var(--vert-clair); border: 1px solid var(--vert-bord);
}
.bandeau-co .pastille { background: #fff; color: var(--vert); }
.bandeau-co .qui { flex: 1; min-width: 0; }
.bandeau-co .qui small { display: block; font-size: 12px; color: var(--vert); }
.bandeau-co .qui strong { font-weight: 500; }
.bandeau-co.libre { flex-direction: column; align-items: stretch; background: var(--rouge-clair); border-color: var(--rouge-bord); padding: 14px; color: var(--rouge-fonce); font-size: 14.5px; }
.coordination-libre { padding: 10px 12px; border-radius: 10px; background: var(--rouge-clair); border: 1px solid var(--rouge-bord); color: var(--rouge-fonce); font-size: 14px; margin: 0 0 10px; }
.qui-co { display: flex; align-items: center; gap: 10px; }
.qui-co strong { display: block; font-weight: 500; }
.qui-co small { font-size: 12.5px; color: var(--encre-douce); }

/* Sur téléphone, la célébration se lit par onglets ; la coordination reste en tête. */
.messe-onglets { display: contents; }
.page-messe #coordination { display: none; }
.page-messe:has(#onglet-deroulement:checked) label[for=onglet-deroulement],
.page-messe:has(#onglet-equipe:checked) label[for=onglet-equipe],
.page-messe:has(#onglet-infos:checked) label[for=onglet-infos] { border-bottom-color: var(--violet); color: var(--encre); font-weight: 500; }
.page-messe:has(#onglet-deroulement:not(:checked)) .panneau-deroulement,
.page-messe:has(#onglet-equipe:not(:checked)) #equipe,
.page-messe:has(#onglet-infos:not(:checked)) #infos { display: none; }

/* Déroulement. */
.carte-structure { padding: 0; }
.carte-entete { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; padding: 16px 16px 12px; }
.carte-entete h2 { flex: 1; min-width: 160px; margin: 0; }
.carte-entete .etiq { font-size: 10.5px; letter-spacing: .04em; padding: 3px 7px; border-radius: 6px; background: #fff; }
.carte-entete .etiq-or { background: var(--or-clair); }
.carte-structure > .message, .carte-structure > .vide { margin: 0 16px 12px; }
.moment {
  display: grid; grid-template-columns: 44px minmax(0, 1fr) auto; gap: 10px; align-items: center;
  padding: 11px 16px 11px 10px; border-top: 1px solid var(--trait-doux);
}
.moment .rang { display: flex; align-items: center; gap: 5px; color: var(--encre-pale); font-size: 13px; font-variant-numeric: tabular-nums; }
.moment .libelle { font-weight: 500; font-size: 14.5px; }
.moment .choix { font-size: 13.5px; color: var(--encre-grise); display: flex; gap: 6px; align-items: center; flex-wrap: wrap; }
.moment .choix.vide { color: var(--rouge-vif); font-style: italic; }
.moment .choix.sans { color: var(--encre-pale); font-style: italic; }
.moment .choix.psaume-rappel { font-size: 12.5px; color: var(--violet); }
.moment .choix .etiq { font-size: 10px; padding: 1px 6px; }
.moment .outils { display: flex; gap: 4px; align-items: center; }
.poignee {
  display: flex; align-items: center; gap: 5px; border: 0; background: none; font: inherit; color: var(--encre-pale);
  cursor: grab; touch-action: none; padding: 4px 2px; border-radius: 6px;
}
.poignee svg { width: 7px; height: 12px; fill: currentColor; opacity: .6; flex: none; }
.poignee:hover, .poignee:focus-visible { color: var(--violet); }
.poignee:hover svg, .poignee:focus-visible svg { opacity: 1; }
.moment.glisse { background: var(--violet-clair); box-shadow: 0 6px 18px rgba(76, 29, 149, .18); position: relative; z-index: 1; }
.moment.glisse .poignee, .moments.en-glisse, .moments.en-glisse * { cursor: grabbing; user-select: none; }
.pied-structure { padding: 14px 16px 16px; border-top: 1px solid var(--trait-doux); }
.pied-structure .aide { margin-top: 8px; }
.bandeau-complete {
  display: flex; align-items: center; gap: 10px; flex-wrap: wrap; justify-content: space-between;
  padding: 10px 12px; border-radius: 10px; background: var(--vert-clair); border: 1px solid var(--vert-bord); color: var(--vert); font-size: 14px;
}
.bandeau-complete strong { font-weight: 600; }
.bandeau-complete .bouton { background: #fff; border: 1px solid var(--vert-bord); color: var(--vert); box-shadow: none; }

/* Listes simples (équipe, coordination). */
.liste-nue { list-style: none; margin: 0; padding: 0; }
.liste-nue li { display: flex; gap: 10px; align-items: center; padding: 9px 0; border-bottom: 1px solid var(--trait-doux); }
.liste-nue li > span { min-width: 0; overflow-wrap: anywhere; }
.liste-nue li strong { font-weight: 500; }
.liste-nue li:last-child { border-bottom: 0; }
.liste-nue .courriel { display: block; font-size: 12.5px; color: var(--encre-douce); }
.pile { display: flex; flex-direction: column; gap: 10px; margin-top: 14px; }
.pile .champ { margin: 0; }

/* Psaume : carte sombre. */
.carte-nuit {
  background: var(--nuit); border-color: var(--nuit); color: #e9e5f5; padding: 18px;
  box-shadow: 0 16px 36px -18px rgba(28, 22, 49, .7);
}
.carte-nuit h2 { font-family: var(--mono); font-size: 10.5px; font-weight: 400; letter-spacing: .08em; text-transform: uppercase; color: var(--violet-focus); margin-bottom: 10px; }
.carte-nuit .sous-titre, .carte-nuit .aide, .carte-nuit .vide { color: #a39cbd; }
.carte-nuit a { color: var(--violet-pale); }
.carte-nuit .psaume-ref, .carte-nuit details.psaume summary { font-family: var(--mono); font-size: 14px; font-weight: 400; color: #fff; }
.carte-nuit .psaume-ref::before, .carte-nuit details.psaume summary::before { content: "$ "; color: #34d399; }
.carte-nuit details.psaume summary { list-style: none; }
.carte-nuit details.psaume summary::-webkit-details-marker { display: none; }
.carte-nuit .psaume-refrain { font-family: var(--serif); font-size: 20px; line-height: 1.35; font-weight: 400; color: var(--violet-pale); margin: 10px 0 14px; }
.carte-nuit .psaume-refrain span { color: #f0abfc; }
.carte-nuit .psaume-refrain small { color: #a39cbd; font-family: var(--sans); font-size: 12px; }
.carte-nuit .psaume-texte { color: #d9d3ea; }
.carte-nuit .bouton.secondaire, .carte-nuit .bouton.pilule {
  background: rgba(255, 255, 255, .04); border-color: rgba(196, 181, 253, .3); color: #e9e5f5;
}
.carte-nuit .bouton.secondaire:hover, .carte-nuit .psaume-boutons [aria-expanded="true"] { background: rgba(196, 181, 253, .14); border-color: var(--violet-pale); color: #fff; }
.carte-nuit label { color: #c9c2dc; }
.carte-nuit .choix-chant { color: #e9e5f5; }
.carte-nuit .choix-chant:hover { background: rgba(255, 255, 255, .06); }
.carte-nuit .choix-chant .m { color: #a39cbd; }
.carte-nuit .message.erreur { background: rgba(225, 29, 72, .15); border-color: rgba(254, 205, 211, .3); color: #fecdd3; }
.jour-liturgique { font-size: 13px; margin: 0 0 10px; }
.psaume + .psaume { margin-top: 14px; }
details.psaume summary { cursor: pointer; font-weight: 500; }
.psaume-ref { margin: 0 0 6px; font-weight: 500; }
h2 .psaume-ref { font-size: inherit; }
.psaume-refrain { color: var(--violet-fonce); font-weight: 500; margin: 6px 0 10px; white-space: pre-wrap; }
.psaume-refrain span { color: var(--rouge); }
.psaume-refrain small { color: var(--encre-douce); font-weight: 400; }
.psaume-texte { white-space: pre-wrap; font-family: var(--serif); font-size: 16px; line-height: 1.6; margin: 0 0 10px; }
.psaume-rappel { font-size: 12.5px; }
.psaume-menu { margin: 0 0 12px; }
.psaume-boutons { display: flex; flex-wrap: wrap; gap: 6px; }
.psaume-boutons [aria-expanded="true"] { border-color: var(--violet-bord); color: var(--violet-fonce); background: var(--violet-clair); }
.psaume-panneau { margin-top: 10px; }
.psaume-panneau input[type=search] { width: 100%; }
#resultats-psaumes { max-height: 22rem; overflow-y: auto; margin-top: 6px; }
.psaume-refrain-court { display: block; }

/* Répertoire ----------------------------------------------------------- */
/* clip plutôt que hidden : la carte ne devient pas un conteneur de défilement, la recherche peut coller. */
.carte-repertoire { padding: 0; overflow: clip; }
.carte-repertoire form { padding: 16px 16px 12px; display: flex; flex-direction: column; gap: 12px; margin: 0; }
/* Sur téléphone, la recherche reste collée sous l'en-tête pendant que la page défile. */
.page-liste .carte-repertoire form { position: sticky; top: 58px; z-index: 5; background: var(--carte); }
.carte-repertoire form .aide { margin: 0; }
.barre-recherche { display: flex; gap: 8px; align-items: center; }
.barre-recherche .recherche { flex: 1; }
.barre-recherche button { flex: none; white-space: nowrap; }
.barre-recherche button[hidden] { display: none; }
.bouton-filtres { position: relative; width: 44px; padding: 0; }
.bouton-filtres .compteur { position: absolute; top: -6px; right: -6px; min-width: 18px; height: 18px; padding: 0 5px; font-size: 11px; background: var(--violet); }
.bouton-filtres .compteur[hidden] { display: none; }
/* Sur téléphone, la réinitialisation se fait par le « × » du champ et « Tout décocher ». */
#reinitialiser-filtres { display: none; }
.modale-filtres .modale-corps { display: flex; flex-direction: column; gap: 12px; }
.modale-filtres .filtre-tags { flex-wrap: wrap; overflow: visible; margin: 0; padding: 0; }
.modale-filtres .puce-tag[hidden] { display: none; }
.modale-filtres .aide { margin: 0; }
/* Membres : la recherche et les filtres restent collés sous l'en-tête, sur téléphone comme sur grand écran. */
.carte-filtre-membres { position: sticky; top: 58px; z-index: 5; }
.filtres-membres .champ { margin: 0; }
.membre-filtre[hidden], .demandes[hidden], .aucun-membre[hidden] { display: none; }
.recherche { position: relative; display: block; }
.recherche .ico { position: absolute; left: 12px; top: 50%; transform: translateY(-50%); color: var(--encre-pale); pointer-events: none; }
.recherche input[type=search] { padding-left: 36px; }
.filtre-tags {
  display: flex; gap: 6px; flex-wrap: nowrap; overflow-x: auto; overscroll-behavior-x: contain;
  margin: 0 -4px; padding: 0 4px 2px; scrollbar-width: thin;
}
.puce-tag {
  position: relative; flex: none; display: inline-flex; align-items: center; gap: 6px; margin: 0;
  height: 32px; padding: 0 11px; border-radius: 999px; border: 1px solid var(--trait-champ); background: #fff;
  font-size: 13px; font-weight: 500; color: var(--encre-moyenne); cursor: pointer; user-select: none; white-space: nowrap;
}
.puce-tag span { font-family: var(--mono); font-size: 11px; opacity: .7; font-variant-numeric: tabular-nums; }
.puce-tag input { position: absolute; opacity: 0; pointer-events: none; }
.puce-tag:hover { border-color: var(--violet-bord); color: var(--violet-fonce); }
.puce-tag:has(input:focus-visible) { outline: 2px solid var(--violet-focus); outline-offset: 1px; }
.puce-tag:has(input:checked), .puce-tag.active { background: var(--violet); border-color: var(--violet); color: #fff; }
.puce-tag.active { cursor: default; height: 28px; font-size: 12.5px; }
.puce-tag.active a { color: inherit; }
.puce-tag.active form { display: contents; }
.puce-tag.active button { background: none; border: 0; color: inherit; font-size: 16px; line-height: 1; padding: 0 0 0 2px; cursor: pointer; opacity: .75; }
.puce-tag.active button:hover { opacity: 1; }
.tags-moment { display: flex; flex-wrap: wrap; gap: 4px; align-items: center; margin-top: 5px; }
.ajout-tag input { width: 7rem; height: 28px; padding: 0 10px; font-size: 12.5px; border-radius: 99px; border: 1px dashed #d4d4d8; background: transparent; }
.ajout-tag input:focus { border-style: solid; border-color: var(--violet-focus); background: #fff; }
.tags-chant { display: flex; flex-wrap: wrap; gap: 6px; }
.compte-chants {
  margin: 0; padding: 8px 16px; border-top: 1px solid var(--trait-doux); background: var(--survol);
  font-family: var(--mono); font-size: 11px; letter-spacing: .06em; text-transform: uppercase; color: var(--encre-douce);
}
.ligne-chant { display: flex; gap: 12px; align-items: flex-start; padding: 12px 16px; border-top: 1px solid var(--trait-doux); }
.ligne-chant .corps { flex: 1; min-width: 0; }
.ligne-chant .titre { font-weight: 500; font-size: 14.5px; color: var(--encre); }
.ligne-chant .auteur { font-size: 12.5px; color: var(--encre-douce); }
.ligne-chant .tags { display: flex; gap: 4px; flex-wrap: wrap; margin-top: 5px; }
.ligne-chant .fichiers { display: flex; gap: 4px; flex: none; }
a.lien-tag {
  font-family: var(--mono); font-size: 10.5px; text-transform: none; letter-spacing: 0;
  padding: 1px 6px; border-radius: 5px; border: 1px solid var(--trait); background: #fff; color: var(--encre-douce);
}
.lien-fichier {
  display: inline-block; font-family: var(--mono); font-size: 11px; font-weight: 500; padding: 5px 8px; border-radius: 7px;
  background: var(--violet-clair); border: 1px solid var(--violet-bord); color: var(--violet-fonce);
}
.lien-fichier:hover { background: var(--violet); border-color: var(--violet); color: #fff; text-decoration: none; }
.carte-modeles th:first-child, .carte-modeles td:first-child { padding-left: 16px; }
.carte-modeles th:last-child, .carte-modeles td:last-child { padding-right: 16px; text-align: right; }
.carte-modeles td.nb { font-family: var(--mono); font-size: 13px; color: var(--encre-douce); }
.carte-modeles .description { display: block; font-size: 13px; color: var(--encre-douce); }
.carte-modeles tr[hidden] { display: none; }
.carte-repertoire > .vide { margin: 0; padding: 24px 16px; text-align: center; border-top: 1px solid var(--trait-doux); }

/* Aperçu de partition. */
.apercu-pdf summary { cursor: pointer; list-style: none; }
.apercu-pdf summary::-webkit-details-marker { display: none; }
.apercu-pdf summary h2 { display: inline; margin: 0; }
.apercu-pdf summary::before { content: "▸"; color: var(--encre-douce); margin-right: 6px; }
.apercu-pdf[open] summary::before { content: "▾"; }
.apercu-pdf iframe {
  display: block; width: 100%; height: 75vh; min-height: 420px; margin-top: 12px;
  border: 1px solid var(--trait); border-radius: 10px; background: #fff;
}

/* Membres ---------------------------------------------------------- */
.demandes { background: var(--or-clair); border: 1px solid var(--or-bord); border-radius: var(--rayon); overflow: hidden; }
.demandes-titre { margin: 0; padding: 10px 14px; font-family: var(--mono); font-size: 11px; letter-spacing: .06em; text-transform: uppercase; color: var(--or); }
.demande { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; padding: 12px 14px; border-top: 1px solid var(--or-bord); background: #fff; }
.demande .qui { flex: 1; min-width: 160px; }
.demande .qui strong { display: block; font-weight: 500; }
.demande .qui small { font-size: 12.5px; color: var(--encre-douce); }
.demande .outils { display: flex; gap: 6px; }
.grille-membres { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 360px), 1fr)); gap: 12px; }
.fiche-membre {
  background: #fff; border: 1px solid var(--trait); border-radius: var(--rayon); padding: 14px;
  box-shadow: 0 1px 2px rgba(24, 24, 27, .04), 0 12px 32px -20px rgba(91, 33, 182, .22);
  display: flex; flex-direction: column; gap: 12px; min-width: 0;
}
.fiche-membre .haut { display: flex; gap: 10px; align-items: flex-start; }
.fiche-membre .haut .pastille { width: 38px; height: 38px; border: 1px solid var(--violet-voile); font-size: 12.5px; }
.fiche-membre .qui { flex: 1; min-width: 0; }
.fiche-membre .qui strong { display: block; font-weight: 500; line-height: 1.3; }
.fiche-membre .qui small { display: block; font-size: 12.5px; color: var(--encre-douce); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.fiche-membre .etiq { flex: none; font-size: 10px; letter-spacing: .05em; padding: 3px 7px; border-radius: 6px; }
.fiche-membre .reglages-membre { display: grid; grid-template-columns: 68px minmax(0, 1fr); gap: 8px 10px; align-items: center; }
.fiche-membre .reglages-membre > span { font-size: 12px; color: var(--encre-douce); }
.fiche-membre select { height: 36px; font-size: 14px; max-width: 220px; border-radius: 8px; }
.fiche-membre .outils { display: flex; gap: 6px; justify-content: flex-end; flex-wrap: wrap; border-top: 1px solid var(--trait-doux); padding-top: 10px; }
.puces-clochers { display: flex; flex-wrap: wrap; gap: 4px; }
.puce-clocher {
  height: 28px; padding: 0 10px; border-radius: 999px; border: 1px dashed #d4d4d8; background: #fff;
  font: inherit; font-size: 12.5px; color: var(--encre-douce); cursor: pointer;
}
.puce-clocher:hover { border-color: var(--violet-pale); color: var(--violet-fonce); }
.puce-clocher.oui { border-style: solid; border-color: var(--violet-pale); background: var(--violet-clair); color: var(--violet-fonce); font-weight: 500; }

/* Cases à cocher en puces (inscription, invitation). */
.puces-choix { display: flex; gap: 6px; flex-wrap: wrap; }
.puces-choix label {
  position: relative; display: inline-flex; align-items: center; gap: 4px; height: 34px; padding: 0 12px; margin: 0;
  border-radius: 999px; border: 1px solid var(--trait-champ); background: #fff; color: var(--encre-moyenne);
  font-size: 13.5px; font-weight: 400; cursor: pointer;
}
.puces-choix input { position: absolute; opacity: 0; pointer-events: none; }
.puces-choix label:has(input:checked) { background: var(--violet-clair); border-color: var(--violet-pale); color: var(--violet-fonce); }
.puces-choix label:has(input:checked)::before { content: "✓"; }
.puces-choix label:has(input:focus-visible) { outline: 2px solid var(--violet-focus); outline-offset: 1px; }

/* Réglages ------------------------------------------------------------- */
.page-reglages:has(#onglet-clochers:checked) label[for=onglet-clochers],
.page-reglages:has(#onglet-labels:checked) label[for=onglet-labels],
.page-reglages:has(#onglet-envoi:checked) label[for=onglet-envoi] { border-bottom-color: var(--violet); color: var(--encre); font-weight: 500; }
.page-reglages:has(#onglet-clochers:not(:checked)) #clochers,
.page-reglages:has(#onglet-labels:not(:checked)) #labels,
.page-reglages:has(#onglet-envoi:not(:checked)) #envoi { display: none; }
.page-reglages .carte, .page-reglages .onglets, .page-reglages #clochers { max-width: 720px; }
.grille-clochers { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 280px), 1fr)); gap: 12px; }
.fiche-clocher { display: flex; flex-direction: column; gap: 10px; margin: 0; }
.fiche-clocher .haut { display: flex; align-items: center; gap: 10px; }
.fiche-clocher h3 { flex: 1; margin: 0; font-size: 20px; }
.fiche-clocher .champ { margin: 0; }
.fiche-clocher .bouton { align-self: flex-end; }
.ligne-label { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; padding: 10px 16px; border-top: 1px solid var(--trait-doux); margin: 0; }
.ligne-label input[type=text] { flex: 1; min-width: 8rem; height: 38px; }
.ligne-label.nouveau { background: var(--survol); }
.carte-labels { padding: 0; overflow: hidden; }
.carte-labels > .explications { padding: 16px; display: flex; flex-direction: column; gap: 6px; }
.carte-labels > .explications p { margin: 0; font-size: 13.5px; }
.carte-labels > .message { margin: 0 16px 12px; }
.interrupteur { display: inline-flex; align-items: center; gap: 8px; margin: 0; font-size: 13px; font-weight: 400; color: var(--encre-grise); cursor: pointer; }
.interrupteur input { position: absolute; opacity: 0; pointer-events: none; }
.interrupteur .piste { width: 36px; height: 22px; border-radius: 999px; background: #d4d4d8; position: relative; transition: background .15s; flex: none; }
.interrupteur .piste::after {
  content: ""; position: absolute; top: 3px; left: 3px; width: 16px; height: 16px; border-radius: 999px; background: #fff;
  box-shadow: 0 1px 2px rgba(0, 0, 0, .2); transition: left .15s;
}
.interrupteur:has(input:checked) .piste { background: var(--violet); }
.interrupteur:has(input:checked) .piste::after { left: 17px; }
.interrupteur:has(input:focus-visible) .piste { outline: 2px solid var(--violet-focus); outline-offset: 2px; }
.encart-violet { background: var(--violet-clair); border: 1px solid var(--violet-voile); border-radius: 12px; padding: 12px 14px; font-size: 13.5px; color: var(--encre-moyenne); }
.encart-violet summary { cursor: pointer; font-size: 14px; font-weight: 500; color: var(--violet-nuit); }
.encart-violet[open] summary { margin-bottom: 10px; }
.encart-violet p, .encart-violet ol { margin: 0 0 8px; }
.encart-violet ol { padding-left: 20px; }
.code { font-family: var(--mono); font-size: 12.5px; padding: 2px 6px; border-radius: 5px; background: var(--vert-clair); border: 1px solid var(--vert-bord); color: var(--vert); }

/* Tableaux (envois, modèles). */
table { width: 100%; border-collapse: collapse; }
th, td { text-align: left; padding: 10px 8px; border-bottom: 1px solid var(--trait-doux); vertical-align: top; }
th { font-family: var(--mono); font-size: 10.5px; letter-spacing: .06em; text-transform: uppercase; color: var(--encre-pale); font-weight: 400; }
tr:last-child td { border-bottom: 0; }
td.fichiers { white-space: nowrap; }
td.auteur { font-size: 12.5px; color: var(--encre-douce); }

/* Formulaires --------------------------------------------------------- */
label { display: block; font-size: 13px; font-weight: 500; color: var(--encre-moyenne); margin-bottom: 6px; }
input[type=text], input[type=email], input[type=password], input[type=search], input[type=url], input[type=date],
input[type=datetime-local], input[type=number], select, textarea {
  width: 100%; height: 44px; padding: 0 12px; border: 1px solid var(--trait-champ); border-radius: 10px;
  background: #fff; color: var(--encre); font: inherit; font-size: 16px; outline: none;
}
select { padding: 0 10px; }
textarea { height: auto; min-height: 84px; padding: 10px 12px; resize: vertical; }
input:disabled { background: var(--survol); color: var(--encre-moyenne); }
input:focus, select:focus, textarea:focus { border-color: var(--violet-focus); box-shadow: 0 0 0 3px var(--violet-voile); }
input[type=file] { font: inherit; font-size: 14px; max-width: 100%; }
input[type=checkbox], input[type=radio] { accent-color: var(--violet); }
.champ { margin-bottom: 14px; }
.champs-ligne { display: flex; gap: 10px; flex-wrap: wrap; }
.champs-ligne > * { flex: 1 1 180px; }
fieldset.champ { border: 0; padding: 0; margin-inline: 0; }
fieldset.champ legend { padding: 0; margin-bottom: 8px; font-size: 13px; font-weight: 500; color: var(--encre-moyenne); }
fieldset.champ > label { display: flex; align-items: center; gap: 8px; font-weight: 400; font-size: 14px; color: var(--encre); }
.case { display: flex; align-items: flex-start; gap: 10px; font-weight: 400; font-size: 14px; color: var(--encre); }
.case input { margin-top: 3px; }
.case small { display: block; font-size: 12.5px; color: var(--encre-douce); margin-top: 2px; }
.ligne-clocher { align-items: flex-end; border-bottom: 1px solid var(--trait-doux); padding-top: 10px; }
.ligne-clocher > .champ:last-child { flex: 0 0 auto; }
.ligne-clocher:last-child { border-bottom: 0; }
.aide { font-size: 12.5px; color: var(--encre-douce); margin: 6px 0 0; }

/* Boutons ------------------------------------------------------------- */
.bouton {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  height: 44px; padding: 0 16px; border-radius: 10px; border: 0;
  background: var(--degrade); color: #fff; box-shadow: var(--ombre-bouton);
  font: inherit; font-size: 14.5px; font-weight: 500; white-space: nowrap;
  cursor: pointer; text-decoration: none; touch-action: manipulation;
}
.bouton:hover { color: #fff; text-decoration: none; filter: brightness(1.06); }
.bouton[hidden] { display: none; }
.bouton.secondaire { background: #fff; color: var(--encre-2); border: 1px solid var(--trait-champ); box-shadow: none; }
.bouton.secondaire:hover { filter: none; background: var(--survol); border-color: var(--violet-bord); color: var(--violet-fonce); }
.bouton.pilule { background: var(--violet-clair); color: var(--violet-fonce); border: 1px solid var(--violet-bord); border-radius: 999px; box-shadow: none; }
.bouton.pilule:hover { filter: none; background: var(--violet-voile); color: var(--violet-fonce); }
.bouton.danger { background: #fff; color: var(--rouge-vif); border: 1px solid var(--rouge-bord); box-shadow: none; }
.bouton.danger:hover { filter: none; background: var(--rouge-clair); color: var(--rouge-vif); }
.bouton.alerte { background: var(--rouge-clair); color: var(--rouge-vif); border: 1px solid var(--rouge-bord); box-shadow: none; }
.bouton.alerte:hover { filter: none; background: #ffe4e6; color: var(--rouge-vif); }
.bouton.plein-violet { background: var(--violet); box-shadow: none; }
.bouton.mini { height: 32px; padding: 0 12px; font-size: 13px; border-radius: 8px; gap: 6px; }
.bouton.mini.pilule { border-radius: 999px; }
.bouton.rond { width: 32px; padding: 0; border-radius: 999px; font-size: 16px; line-height: 1; color: var(--encre-pale); }
.bouton.rond:hover { color: var(--rouge-vif); border-color: var(--rouge-bord); background: #fff; }
.bouton.pleine { width: 100%; }
.bouton[disabled] { opacity: .5; cursor: not-allowed; }
.bouton .ico { width: 15px; height: 15px; }
.bouton-carre {
  width: 36px; height: 36px; flex: none; border: 1px solid var(--trait-champ); border-radius: 9px; background: #fff;
  display: inline-flex; align-items: center; justify-content: center; color: var(--encre-grise); cursor: pointer;
}
.bouton-carre:hover { border-color: var(--violet-bord); color: var(--violet-fonce); }
.cal-entete .bouton.pilule { height: 36px; }

form.enligne { display: flex; gap: 8px; align-items: flex-end; flex-wrap: wrap; }
form.enligne > * { margin-bottom: 0; }

/* Messages ------------------------------------------------------------ */
.message { padding: 10px 12px; border-radius: 10px; font-size: 14px; margin: 0 0 12px; border: 1px solid transparent; }
.message.erreur { background: var(--rouge-clair); border-color: var(--rouge-bord); color: var(--rouge-fonce); }
.message.info { background: var(--violet-clair); border-color: var(--violet-voile); color: var(--violet-nuit); }
.message.succes { background: var(--vert-clair); border-color: var(--vert-bord); color: var(--vert); }
.page > .message { margin: 0; }
.vide { color: var(--encre-douce); font-style: italic; font-size: 14px; margin: 0; }
.vide .bouton { display: flex; margin-top: 10px; font-style: normal; }

/* Menu « ⋮ » d'une carte. */
.menu-outils { position: relative; flex: none; margin-left: auto; }
.menu-outils summary {
  list-style: none; cursor: pointer; display: grid; place-items: center; width: 34px; height: 34px;
  border-radius: 9px; border: 1px solid var(--trait); background: #fff; color: var(--encre-douce);
}
.menu-outils summary::-webkit-details-marker { display: none; }
.menu-outils summary:hover, .menu-outils[open] summary { border-color: var(--violet-bord); color: var(--violet-fonce); }
.menu-outils summary:focus-visible { outline: 2px solid var(--violet-focus); outline-offset: 2px; }
.menu-outils summary svg { width: 17px; height: 17px; fill: currentColor; }
.menu-outils-panneau { right: 0; top: calc(100% + 6px); z-index: 30; width: 240px; max-width: calc(100vw - 32px); }
.menu-outils-panneau .menu-choix { padding: 9px 10px; }
.menu-choix .ico { width: 17px; height: 17px; }

/* Fenêtres modales (<dialog>) : feuille qui monte du bas sur téléphone, fenêtre centrée ailleurs. */
.modale {
  border: 0; padding: 0; width: 100%; max-width: 560px; max-height: 90dvh; margin: auto auto 0;
  border-radius: 20px 20px 0 0; background: #fff; color: var(--encre); box-shadow: 0 30px 70px -20px rgba(28, 22, 49, .5);
}
.modale[open] { display: flex; flex-direction: column; }
.modale::backdrop { background: rgba(28, 22, 49, .45); -webkit-backdrop-filter: blur(2px); backdrop-filter: blur(2px); }
.modale form { margin: 0; display: flex; flex-direction: column; min-height: 0; flex: 1; }
.modale-entete { display: flex; align-items: center; gap: 10px; padding: 14px 16px; border-bottom: 1px solid var(--trait-doux); }
.modale-entete h3 { flex: 1; margin: 0; font-size: 21px; font-weight: 400; line-height: 1.2; }
.modale-entete .bouton, .panneau-entete .bouton {
  width: 36px; height: 36px; padding: 0; border-radius: 999px; font-size: 0; background: #fff; color: var(--encre-grise);
  border: 1px solid var(--trait-champ); box-shadow: none; flex: none;
}
.modale-entete .bouton::before, .panneau-entete .bouton::before { content: "×"; font-size: 20px; line-height: 1; }
.modale-corps { padding: 16px; overflow: auto; flex: 1; min-height: 0; overscroll-behavior: contain; }
.modale-corps > .sous-titre:first-child { margin: 0 0 14px; }
.modale-large { max-width: 620px; }
.modale-pied {
  display: flex; justify-content: flex-end; gap: 8px; padding: 12px 16px calc(12px + env(safe-area-inset-bottom));
  border-top: 1px solid var(--trait-doux); background: var(--survol);
}

/* Sélecteur de chant : même feuille, construite par le serveur. */
/* --visible-haut / --visible-hauteur suivent la zone laissée libre par le clavier (voir layout.html). */
.voile {
  position: fixed; left: 0; right: 0; z-index: 80; top: var(--visible-haut, 0); height: var(--visible-hauteur, 100dvh);
  background: rgba(28, 22, 49, .45); -webkit-backdrop-filter: blur(2px); backdrop-filter: blur(2px);
  display: flex; align-items: flex-end; justify-content: center; overflow: hidden;
}
.panneau {
  width: 100%; max-width: 560px; display: flex; flex-direction: column; max-height: calc(var(--visible-hauteur, 100dvh) * .9);
  background: #fff; border-radius: 20px 20px 0 0; box-shadow: 0 30px 70px -20px rgba(28, 22, 49, .5); overflow: hidden;
}
.panneau-entete { display: flex; align-items: center; gap: 10px; padding: 14px 16px; border-bottom: 1px solid var(--trait-doux); }
.panneau-entete h2, .panneau-entete h3 { flex: 1; margin: 0; font-size: 21px; font-weight: 400; }
.panneau-corps { flex: 1 1 auto; min-height: 0; overflow: auto; padding: 12px 16px; overscroll-behavior: contain; }
.panneau-pied { padding: 12px 16px calc(12px + env(safe-area-inset-bottom)); border-top: 1px solid var(--trait-doux); background: var(--survol); }
.exception summary { cursor: pointer; font-size: 13px; color: var(--encre-grise); list-style: none; }
.exception summary::-webkit-details-marker { display: none; }
.exception summary::before { content: "▸"; margin-right: 6px; }
.exception[open] summary::before { content: "▾"; }
.exception[open] summary { margin-bottom: 8px; }
.choix-chant {
  display: flex; gap: 10px; align-items: center; width: 100%; min-height: 52px; text-align: left; padding: 8px 10px;
  border: 1px solid transparent; border-radius: 10px; background: none; font: inherit; color: var(--encre); cursor: pointer;
}
.choix-chant:hover { background: var(--survol); }
.choix-chant.retenu { border-color: var(--violet-pale); background: var(--violet-clair); }
.choix-chant .t { font-weight: 500; font-size: 14.5px; }
.choix-chant .m { font-family: var(--mono); font-size: 10.5px; color: var(--encre-pale); letter-spacing: .02em; }
.groupe-chants { margin: 10px 0 4px; padding: 0 8px; font-family: var(--mono); font-size: 10.5px; font-weight: 400; letter-spacing: .08em; text-transform: uppercase; color: var(--encre-pale); }
.groupe-chants:first-child { margin-top: 0; }

.htmx-request .indicateur { visibility: visible; }
.indicateur { visibility: hidden; font-size: 12.5px; color: var(--encre-douce); }

/* Connexion ------------------------------------------------------------ */
.accueil-marque { display: flex; flex-direction: column; align-items: center; text-align: center; gap: 10px; margin-bottom: 6px; }
.accueil-marque img { width: 56px; height: 56px; border-radius: 16px; box-shadow: 0 12px 28px -10px rgba(107, 63, 160, .7); }
.accueil-marque h1 { font-size: 36px; letter-spacing: -.02em; line-height: 1; }
.accueil-marque p { margin: 0; color: var(--encre-douce); }
.page-etroite > .carte { border-radius: 16px; padding: 20px; box-shadow: 0 1px 2px rgba(24, 24, 27, .04), 0 18px 40px -20px rgba(91, 33, 182, .3); }
.page-etroite > .sous-titre { text-align: center; margin: 0 auto; }
.lien-encart {
  display: flex; align-items: center; gap: 12px; padding: 14px 16px; border: 1px solid var(--violet-bord); border-radius: var(--rayon);
  background: var(--violet-clair); color: var(--violet-nuit);
}
.lien-encart:hover { background: var(--violet-voile); text-decoration: none; color: var(--violet-nuit); }
.lien-encart .carre-initiales { width: 34px; height: 34px; background: #fff; border-color: var(--violet-bord); }
.lien-encart span.texte { flex: 1; }
.lien-encart strong { display: block; font-weight: 500; color: #4c1d95; }
.lien-encart small { display: block; font-size: 13px; color: var(--violet-fonce); }
.etiquette-lien { display: flex; justify-content: space-between; gap: 8px; }
.etiquette-lien a { font-weight: 400; }

/* Recherche de paroisse ------------------------------------------------ */
.page-recherche { max-width: 520px; padding-top: 24px; }
.page-recherche h1 { font-size: 33px; line-height: 1.06; letter-spacing: -.02em; margin: 8px 0 0; }
.page-recherche > .sous-titre { text-align: left; margin: 0; }
.marque-recherche { display: inline-flex; align-items: center; gap: 10px; color: var(--encre); font-family: var(--serif); font-size: 19px; }
.marque-recherche:hover { text-decoration: none; }
.marque-recherche img { width: 30px; height: 30px; border-radius: 9px; box-shadow: 0 4px 12px -4px rgba(107, 63, 160, .6); }
.recherche-paroisse { display: flex; flex-direction: column; gap: 12px; }
.recherche-champ { position: relative; margin: 0; }
.recherche-champ .ico { position: absolute; left: 13px; top: 50%; margin-top: -8px; width: 16px; height: 16px; fill: none; stroke: var(--encre-pale); stroke-width: 2; stroke-linecap: round; }
/* Recherche affinée : « Nom » et « Lieu », côte à côte sur grand écran. */
.recherche-champ.affinee { display: flex; gap: 8px; }
.champ-affine { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 4px; font-size: 12.5px; font-weight: 500; color: var(--encre-douce); }
.recherche-champ.affinee input { padding-left: 12px; }
@media (max-width: 480px) { .recherche-champ.affinee { flex-direction: column; } }
.lien-affiner, .lien-simple { align-self: flex-start; font-size: 13.5px; color: var(--violet-fonce); }
.aide-recherche .lien-affiner { font-size: inherit; }
/* Hors de l'écran mais lisible par un lecteur d'écran : le bouton qui envoie la recherche affinée sans JavaScript. */
.hors-ecran { position: absolute; width: 1px; height: 1px; padding: 0; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0; }
.recherche-champ input {
  width: 100%; height: 48px; padding: 0 12px 0 38px; border: 1px solid #e4e1ef; border-radius: 12px; font: inherit; font-size: 16px; background: #fff;
  box-shadow: 0 1px 2px rgba(24, 24, 27, .04), 0 12px 32px -18px rgba(91, 33, 182, .22);
}
.exemples-recherche { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; margin: 0; font-size: 13px; color: var(--encre-douce); }
.pilule-exemple {
  display: inline-flex; align-items: center; height: 30px; padding: 0 12px; border: 1px solid var(--violet-bord); border-radius: 999px;
  background: var(--violet-clair); color: var(--violet-fonce); font-size: 13px; font-weight: 500; flex: none;
}
.pilule-exemple:hover { background: var(--violet-voile); text-decoration: none; }
.aide-recherche { margin: 0; font-size: 13.5px; color: var(--encre-douce); }
.aucun-resultat {
  display: flex; flex-direction: column; gap: 6px; padding: 22px 16px; text-align: center; font-size: 14px; color: var(--encre-grise);
  border: 1px dashed #e4e1ef; border-radius: 14px; background: rgba(255, 255, 255, .7);
}
.aucun-resultat strong { color: var(--encre); font-weight: 500; }
.liste-resultats { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; }
.resultat-paroisse { display: flex; align-items: center; gap: 10px; padding: 12px 2px; border-bottom: 1px solid var(--trait-entete); }
.resultat-paroisse .texte { flex: 1; min-width: 0; display: flex; flex-direction: column; line-height: 1.3; }
.resultat-paroisse strong { font-family: var(--serif); font-size: 19px; font-weight: 400; line-height: 1.2; }
.resultat-paroisse small { font-size: 12.5px; color: var(--encre-douce); }
.resultat-paroisse small.paroisse { color: var(--violet-fonce); }

/* Paroisses d'une personne connectée : la modale « Paroisses » et la page /paroisses. */
.modale-paroisses[open] { height: min(90dvh, 760px); }
.modale-paroisses form { display: block; flex: none; flex-direction: row; min-height: 0; }
.titre-modale { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.titre-modale h3 { margin: 0; font-size: 21px; font-weight: 400; line-height: 1.2; }
.titre-modale small { font-size: 12.5px; color: var(--encre-douce); }
.recherche-champ.avec-affiner { display: flex; align-items: center; gap: 12px; }
.recherche-champ.avec-affiner input { flex: 1; }
.recherche-champ.avec-affiner .lien-affiner { align-self: center; white-space: nowrap; }
.modale-paroisses .recherche-champ input { height: 44px; box-shadow: none; }
.groupe-resultats {
  margin: 8px 0 0; padding: 0 6px; font-family: var(--mono); font-size: 10.5px; letter-spacing: .08em; text-transform: uppercase; color: var(--encre-pale);
}
.liste-paroisses { display: flex; flex-direction: column; gap: 2px; }
.ligne-paroisse {
  display: flex; align-items: center; gap: 10px; min-height: 56px; padding: 8px 10px; border: 1px solid transparent; border-radius: 10px; color: var(--encre);
}
a.ligne-paroisse:hover { background: var(--survol); text-decoration: none; }
.ligne-paroisse.actuelle { background: var(--violet-clair); border-color: var(--violet-pale); }
.ligne-paroisse .texte, .ligne-lien .texte { flex: 1; min-width: 0; display: flex; flex-direction: column; line-height: 1.3; }
.ligne-paroisse strong { font-size: 14.5px; font-weight: 500; }
.ligne-paroisse small { font-size: 12.5px; color: var(--encre-douce); }
.ligne-paroisse small.attente { color: var(--or); }
.ligne-paroisse .coche { color: var(--violet); }
.carre-initiales.attente { background: var(--or-clair); border-color: var(--or-bord); color: var(--or); }
.chev { width: 16px; height: 16px; flex: none; fill: none; stroke: var(--encre-pale); stroke-width: 2; }
.pilule-neutre {
  height: 32px; padding: 0 12px; border: 1px solid var(--trait-champ); border-radius: 999px; background: #fff; color: var(--encre);
  font: inherit; font-size: 13px; cursor: pointer; flex: none;
}
.pilule-neutre:hover { border-color: var(--violet-bord); color: var(--violet-fonce); }
.resultat-membre { flex-wrap: wrap; }
.resultat-membre form { display: flex; flex: none; margin: 0; }
.resultat-membre .pilule-exemple { font: inherit; font-size: 13px; font-weight: 500; cursor: pointer; }
.ligne-lien { flex: 1; min-width: 0; display: flex; align-items: center; gap: 10px; color: inherit; }
.ligne-lien:hover { text-decoration: none; }
.etat-demande {
  display: inline-flex; align-items: center; height: 26px; padding: 0 10px; border-radius: 999px; flex: none; white-space: nowrap;
  background: #f4f4f5; color: var(--encre-douce); font-size: 12px;
}
.etat-demande.attente { background: var(--or-pastille); color: var(--or); font-weight: 500; }
.suite-demande { flex-basis: 100%; display: flex; flex-wrap: wrap; align-items: center; gap: 4px 8px; font-size: 12.5px; color: var(--encre-douce); }
.suite-demande .lien-bouton { font-size: 12.5px; }
.suite-demande .envoyee { color: var(--vert); }
.resultat-membre form.choix-eglises { flex-direction: column; align-items: flex-start; gap: 10px; padding-top: 4px; }
.page-paroisses .carte.liste-paroisses { padding: 4px; }
.page-paroisses .deconnexion { align-self: center; text-align: center; }

/* Cibles tactiles confortables. */
input, select, textarea { max-width: 100%; min-width: 0; }
@media (pointer: coarse) {
  .bouton.mini { min-height: 36px; }
}

/* À partir de 960 px : barre latérale ------------------------------------ */
@media (min-width: 960px) {
  .compte .nom { display: inline; }
  .coquille { grid-template-columns: 264px minmax(0, 1fr); gap: 28px; padding: 24px; }
  .laterale, body:not(.accueil) .laterale { display: flex; flex-direction: column; gap: 14px; position: sticky; top: 78px; }
  body:not(.accueil) .bloc-clocher { display: flex; }
  body:not(.accueil) .raccourcis { display: grid; }
  .etiquette-champ { display: block; }
  .raccourcis, .raccourcis.deux { grid-template-columns: minmax(0, 1fr); }
  .raccourcis .bouton { height: 44px; }
  .raccourcis .large { display: inline; }
  .raccourcis .court { display: none; }

  .nav {
    position: static; display: flex; flex-direction: column; gap: 2px; margin-top: 6px; padding: 0; background: none;
  }
  .nav a {
    flex-direction: row; gap: 10px; min-height: 0; height: 40px; padding: 0 8px; border-radius: 9px;
    color: var(--encre-moyenne); font-size: 14.5px; font-weight: 400; text-align: left;
  }
  .nav a:hover { background: var(--violet-clair); color: var(--encre-moyenne); }
  .nav a.actif { background: var(--violet-voile); color: var(--violet-nuit); }
  .nav .ico-boite {
    display: inline-flex; width: 28px; height: 28px; border-radius: 8px; background: #fff; border: 1px solid var(--violet-voile);
    align-items: center; justify-content: center; color: var(--violet); flex: none;
  }
  .nav .ico { width: 15px; height: 15px; stroke-width: 1.9; }
  .nav .libelle-nav { flex: 1; }
  .nav .seulement-large { display: flex; }
  .nav-separateur { display: block; height: 1px; background: var(--trait-entete); margin: 8px 4px; }
  .compteur-or {
    position: static; min-width: 20px; height: 20px; padding: 0 6px; background: var(--or-pastille); color: var(--or); font-size: 11.5px;
  }
  body.avec-nav { padding-bottom: 0; }

  .carte { padding: 20px; }
  .carte-liste, .carte-structure, .carte-repertoire, .carte-labels { padding: 0; }
  .carte-mois { padding: 16px; }
  .carte-repertoire form { padding: 20px 20px 12px; }
  .filtre-tags { flex-wrap: wrap; }
  .cal-case { min-height: 112px; padding: 6px; align-items: flex-start; }
  .cal-points { display: none; }
  .cal-ajout { display: inline-flex; }
  .cal-messe {
    display: block; width: 100%; min-width: 0; text-align: left; border: 1px solid var(--rouge-bord); background: var(--rouge-clair);
    border-radius: 7px; padding: 4px 6px; font-size: 11.5px; line-height: 1.3; color: var(--encre-2);
  }
  .cal-messe:hover { text-decoration: none; color: var(--encre-2); filter: brightness(.98); }
  .cal-messe.ok { border-color: var(--vert-bord); background: var(--vert-clair); }
  .cal-messe .h { font-family: var(--mono); font-weight: 500; color: var(--rouge); }
  .cal-messe.ok .h { color: var(--vert); }
  .cal-messe .t, .cal-messe .co { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
  .cal-messe .co { color: var(--encre-douce); font-size: 10.5px; }

  .modale { margin: auto; border-radius: 18px; max-height: 82vh; }
  .voile { align-items: center; padding: 24px; }
  .panneau { border-radius: 18px; max-height: 82vh; }
}
@media (hover: none) { .cal-ajout { display: none !important; } }

/* Calendrier et répertoire sur grand écran : la page tient dans la hauteur de la fenêtre
   (en-tête et marges ôtés) ; les semaines se partagent la hauteur et les listes défilent dans leur carte. */
@media (min-width: 960px) {
  .page-cal, .page-liste { height: calc(100dvh - 59px - 48px); }
  .page-cal { min-height: 600px; }
  .page-liste { min-height: 480px; }
  .page-liste .carte-repertoire { flex: 1; min-height: 0; display: flex; flex-direction: column; }
  .page-liste .defile { flex: 1; min-height: 0; overflow-y: auto; scrollbar-width: thin; }
  .page-liste .compte-chants { position: sticky; top: 0; z-index: 1; }
  .page-liste .carte-repertoire form { position: static; }
  .barre-collante { position: static; margin: 0; padding: 0; background: none; -webkit-backdrop-filter: none; backdrop-filter: none; }
  /* Les ombres des fiches ne sont pas rognées par la zone qui défile. */
  .page-liste > .defile { margin: -4px -4px 0; padding: 4px 4px 16px; }
  .page-modele .carte-deroulement { flex: 1; min-height: 0; display: flex; flex-direction: column; }
  .page-modele .carte-modele, .page-modele .retour { flex: none; }
  .modale-tags { height: min(680px, 82vh); }

  /* Les tags restent sous la recherche : la feuille devient un simple bloc. */
  .bouton-filtres { display: none; }
  #reinitialiser-filtres { display: inline-flex; }
  #reinitialiser-filtres[hidden] { display: none; }
  .modale-filtres:not([open]) {
    display: block; position: static; width: auto; max-width: none; max-height: none; margin: 0;
    border-radius: 0; background: none; box-shadow: none; overflow: visible;
  }
  .modale-filtres .modale-entete, .modale-filtres .modale-pied, .modale-filtres .recherche-tags { display: none; }
  .modale-filtres .modale-corps { padding: 0; overflow: visible; gap: 8px; }
  .modale-filtres .filtre-tags { max-height: 108px; overflow-y: auto; scrollbar-width: thin; }
  .modale-filtres .filtres-membres { display: grid; grid-template-columns: repeat(auto-fit, minmax(170px, 1fr)); gap: 12px; }
  .page-cal .colonnes-cal { flex: 1; min-height: 0; grid-template-rows: minmax(0, 1fr); align-items: stretch; }
  .page-cal #calendrier, .page-cal #liste-messes { display: flex; flex-direction: column; min-height: 0; }
  .page-cal .cal-grille { flex: 1; min-height: 0; grid-auto-rows: minmax(0, 1fr); }
  .page-cal .cal-case { min-height: 0; overflow-y: auto; scrollbar-width: thin; }
  .page-cal .liste-defil { flex: 1; min-height: 0; overflow-y: auto; scrollbar-width: thin; }
}

/* Modèles ------------------------------------------------------------- */
/* Recherche collée sous l'en-tête pendant que la page défile (sur téléphone). */
.barre-collante {
  position: sticky; top: 58px; z-index: 5; margin: -8px -14px; padding: 8px 14px;
  background: rgba(251, 250, 255, .88); -webkit-backdrop-filter: blur(10px); backdrop-filter: blur(10px);
}
.barre-collante .recherche { max-width: 480px; }
.grille-modeles { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 300px), 1fr)); gap: 12px; }
.fiche-modele {
  background: #fff; border: 1px solid var(--trait); border-radius: var(--rayon); padding: 16px; color: var(--encre);
  box-shadow: 0 1px 2px rgba(24, 24, 27, .04), 0 12px 32px -18px rgba(91, 33, 182, .22);
  display: flex; flex-direction: column; gap: 12px; min-width: 0;
}
.fiche-modele:hover {
  text-decoration: none; color: var(--encre); border-color: var(--violet-pale);
  box-shadow: 0 1px 2px rgba(24, 24, 27, .04), 0 18px 36px -18px rgba(91, 33, 182, .35);
}
.fiche-modele[hidden], #aucun-modele[hidden] { display: none; }
.fiche-modele .haut { display: flex; gap: 10px; align-items: flex-start; }
.fiche-modele .qui { flex: 1; min-width: 0; }
.fiche-modele .nom { display: block; font-family: var(--serif); font-size: 21px; line-height: 1.2; }
.fiche-modele .desc { display: block; font-size: 13px; color: var(--encre-douce); margin-top: 2px; }
.fiche-modele .etiq, .carte-modele .etiq { flex: none; letter-spacing: .05em; padding: 3px 7px; border-radius: 6px; }
.apercu-moments { display: flex; flex-wrap: wrap; gap: 4px; }
.puce-moment { font-size: 12px; padding: 3px 8px; border-radius: 999px; background: #fafafa; border: 1px solid #f0f0f2; color: var(--encre-douce); }
.puce-moment.tague { background: var(--violet-clair); border-color: var(--violet-voile); color: var(--violet-nuit); }
.puce-moment.plus { background: none; border-color: transparent; color: var(--encre-pale); }
.fiche-modele .pied {
  display: flex; align-items: center; gap: 6px; padding-top: 10px; border-top: 1px solid var(--trait-doux);
  font-size: 12.5px; color: var(--encre-douce);
}
.fiche-modele .pied .ico { width: 14px; height: 14px; color: var(--violet-focus); }
.fiche-modele .nb-tagues { flex: 1; }
.fiche-modele .ouvrir { color: var(--violet-fonce); font-weight: 500; }

/* Un modèle : en-tête affiché ou en édition, déroulement dont la liste défile au-dessus de l'ajout. */
.vue-modele { display: flex; gap: 14px; flex-wrap: wrap; align-items: flex-start; }
.vue-modele .qui { flex: 1; min-width: 220px; }
.vue-modele .desc { margin: 6px 0 10px; color: var(--encre-douce); font-size: 14px; }
.vue-modele .etiquettes { display: flex; gap: 6px; flex-wrap: wrap; }
.vue-modele .actions { display: flex; gap: 8px; }
.vue-modele .actions form { margin: 0; }
.rond-pilule { height: 38px; border-radius: 999px; }
.edition-modele { display: none; margin: 0; }
.edition-modele .boutons { display: flex; gap: 8px; }
.carte-modele.en-edition .vue-modele { display: none; }
.carte-modele.en-edition .edition-modele { display: block; }
.carte-deroulement { overflow: clip; }
.entete-deroulement { padding: 16px 16px 12px; display: flex; flex-direction: column; gap: 6px; }
.entete-deroulement h2 { margin: 0; }
.entete-deroulement .aide { margin: 0; font-size: 13px; text-wrap: pretty; }
.carte-deroulement > .message { margin: 0 16px 12px; }
.carte-deroulement .defile > .vide { margin: 0; padding: 16px; border-top: 1px solid var(--trait-doux); }
.moment-modele { align-items: start; padding: 12px 12px 12px 10px; }
.moment-modele .poignee { padding-top: 2px; }
.corps-moment { display: flex; flex-direction: column; gap: 7px; min-width: 0; }
.moment-modele .libelle .etiq { font-size: 10px; letter-spacing: .04em; padding: 1px 6px; }
.moment-modele .tags-moment { gap: 5px; margin: 0; }
.puce-tag-moment {
  display: inline-flex; align-items: center; gap: 2px; height: 28px; padding: 0 4px 0 10px; margin: 0; border-radius: 999px;
  background: var(--violet-clair); border: 1px solid var(--violet-bord); color: var(--violet-nuit); font-size: 12.5px; font-weight: 500;
}
.puce-tag-moment button {
  width: 22px; height: 22px; padding: 0; border: 0; border-radius: 999px; background: none;
  color: var(--violet); font: inherit; font-size: 15px; line-height: 1; cursor: pointer;
}
.puce-tag-moment button:hover { background: var(--violet-voile); }
.ajout-tag-moment {
  display: inline-flex; align-items: center; gap: 4px; height: 28px; padding: 0 10px; border-radius: 999px;
  border: 1px dashed var(--violet-pale); background: #fff; color: var(--violet-fonce); font: inherit; font-size: 12.5px; cursor: pointer;
}
.ajout-tag-moment:hover { background: var(--survol); border-style: solid; }
.ajout-tag-moment .ico { width: 12px; height: 12px; stroke-width: 2.4; }
.nb-correspondances { font-size: 12px; color: var(--encre-pale); }
.supprimer-moment {
  align-self: center; width: 32px; height: 32px; border: 1px solid transparent; border-radius: 8px; background: none;
  color: var(--encre-pale); cursor: pointer; display: inline-flex; align-items: center; justify-content: center;
}
.supprimer-moment:hover { color: var(--rouge-vif); border-color: var(--rouge-bord); background: var(--rouge-clair); }
.supprimer-moment .ico { width: 16px; height: 16px; }
.ajout-moment {
  margin: 0; padding: 12px 16px 16px; border-top: 1px solid var(--trait-doux); background: var(--survol);
  display: flex; flex-direction: column; gap: 10px;
}
.ajout-moment > label { margin: 0; font-size: 13px; font-weight: 500; color: var(--encre-moyenne); }
.ligne-ajout { display: flex; gap: 8px; flex-wrap: wrap; }
.ligne-ajout input[type=text] { flex: 1 1 200px; min-width: 0; height: 42px; }
.ligne-ajout .bouton { height: 42px; }
.segments { display: inline-flex; padding: 3px; border: 1px solid #e4e1ef; border-radius: 10px; background: #fff; }
.segments label {
  position: relative; display: inline-flex; align-items: center; height: 34px; padding: 0 12px; margin: 0; border-radius: 7px;
  font-size: 13px; font-weight: 500; color: var(--encre-douce); cursor: pointer; white-space: nowrap;
}
.segments input { position: absolute; opacity: 0; pointer-events: none; }
.segments label:has(input:checked) { background: var(--violet-clair); color: var(--violet-fonce); }
.segments label:has(input:focus-visible) { outline: 2px solid var(--violet-focus); outline-offset: 1px; }

/* Feuille des tags d'un moment. */
.modale-tags { height: 90dvh; }
.modale-tags h3 small, .modale-modeles h3 small, .feuille-rejoindre h3 small { display: block; font-family: var(--sans); font-size: 13px; color: var(--encre-douce); margin-top: 2px; }
.modale .recherche-feuille { flex: none; padding: 12px 16px 0; }
.modale-tags .feuille-tags-contenu form { display: contents; }
/* « Partir d'un modèle » : recherche au-dessus d'une liste qui défile seule. */
.modale-modeles[open] { height: min(80dvh, 640px); }
.modale-modeles .modale-corps { padding: 10px 12px; }
.liste-modeles { display: flex; flex-direction: column; gap: 2px; }
.ligne-modele {
  display: flex; align-items: center; gap: 12px; min-height: 52px; padding: 8px 10px; border: 1px solid transparent; border-radius: 10px; cursor: pointer;
}
.ligne-modele[hidden] { display: none; }
.ligne-modele:hover { background: var(--survol); }
.ligne-modele:has(input:checked) { background: var(--violet-clair); border-color: var(--violet-pale); }
.ligne-modele input { flex: none; margin: 0; accent-color: var(--violet); }
.ligne-modele .texte { flex: 1; min-width: 0; display: flex; flex-direction: column; line-height: 1.3; }
.ligne-modele strong { font-size: 14.5px; font-weight: 500; overflow-wrap: anywhere; }
.ligne-modele small { font-size: 12.5px; color: var(--encre-douce); }
.modale-modeles .aucun-modele { margin: 8px 10px; }
.modale-tags .feuille-tags-contenu form[hidden] { display: none; }
.feuille-tags-contenu { flex: 1; min-height: 0; display: flex; flex-direction: column; }
.tags-portes {
  display: flex; flex-wrap: wrap; gap: 6px; align-items: center; min-height: 30px;
  padding: 10px 16px 12px; border-bottom: 1px solid var(--trait-doux);
}
.tags-portes .aide { margin: 0; font-size: 13px; color: var(--encre-pale); }
.tag-porte {
  display: inline-flex; align-items: center; gap: 6px; height: 30px; padding: 0 10px 0 12px; border-radius: 999px; border: 0;
  background: var(--violet); color: #fff; font: inherit; font-size: 13px; font-weight: 500; cursor: pointer;
}
.tag-porte span { opacity: .75; font-size: 15px; line-height: 1; }
.liste-tags {
  flex: 1; min-height: 0; overflow: auto; overscroll-behavior: contain; padding: 10px 16px 14px;
  display: flex; flex-direction: column; gap: 14px;
}
.creer-tag {
  display: flex; align-items: center; gap: 10px; width: 100%; min-height: 48px; padding: 8px 12px; flex: none;
  border: 1px dashed var(--violet-pale); border-radius: 10px; background: var(--survol); color: var(--violet-fonce);
  font: inherit; font-size: 14px; text-align: left; cursor: pointer;
}
.creer-tag .ico { width: 15px; height: 15px; }
.creer-tag strong { font-weight: 600; }
.creer-tag[hidden], .section-tags[hidden], .aucun-tag[hidden] { display: none; }
.section-tags { display: flex; flex-direction: column; gap: 8px; }
.titre-section { margin: 0; font-family: var(--mono); font-size: 10.5px; letter-spacing: .08em; text-transform: uppercase; color: var(--encre-pale); }
.section-tags .puces { display: flex; flex-wrap: wrap; gap: 6px; }
.choix-tag {
  display: inline-flex; align-items: center; gap: 6px; height: 34px; padding: 0 12px; border-radius: 999px;
  border: 1px solid var(--trait-champ); background: #fff; color: var(--encre-moyenne);
  font: inherit; font-size: 13.5px; font-weight: 500; cursor: pointer;
}
.choix-tag:hover { border-color: var(--violet-pale); }
.choix-tag span { font-family: var(--mono); font-size: 11px; opacity: .6; }
.choix-tag.porte { background: var(--violet-clair); border-color: var(--violet-focus); color: var(--violet-nuit); }
.aucun-tag { margin: 0; font-size: 13.5px; }
.pied-tags {
  padding: 12px 16px calc(12px + env(safe-area-inset-bottom)); border-top: 1px solid var(--trait-doux); background: var(--survol);
  display: flex; flex-direction: column; gap: 10px;
}
.pied-tags .apercu { margin: 0; display: flex; gap: 8px; align-items: baseline; font-size: 13px; color: var(--encre-grise); }
.pied-tags .apercu .titre-section { flex: none; color: var(--violet); }
.titres-apercu { margin: 0; font-size: 12.5px; color: var(--encre-douce); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.pied-tags .bouton { height: 44px; }

/* Sélecteur : psaumes des autres années repliés. */
.autres-psaumes > summary { cursor: pointer; list-style-position: inside; }

/* Calendrier sous 960 px : la bascule ne montre qu'une vue à la fois, qui prend toute la hauteur
   entre l'en-tête et la barre du bas ; les cases montrent les célébrations comme sur grand écran. */
@media (max-width: 959px) {
  body:has(.page-cal) .coquille {
    display: flex; flex-direction: column; align-items: stretch; padding-bottom: 14px;
    height: calc(100dvh - 59px - 66px - env(safe-area-inset-bottom));
  }
  /* Le titre passe au-dessus du clocher et des raccourcis : la page se fond dans la colonne. */
  .page-cal { display: contents; }
  .page-cal .entete-page { order: -1; flex-wrap: nowrap; align-items: center; }
  .page-cal .entete-page > div:first-child { min-width: 0; }
  .page-cal .colonnes-cal { flex: 1; min-height: 260px; grid-template-rows: minmax(0, 1fr); align-items: stretch; }
  body:has(.page-cal) .raccourcis.deux { grid-template-columns: auto minmax(0, 1fr); }
  body:has(.page-cal) .raccourcis .alerte { height: 36px; align-self: center; padding: 0 12px; font-size: 13px; }
  .page-cal #calendrier, .page-cal #liste-messes { display: flex; flex-direction: column; min-height: 0; }
  .page:has(#vue-mois:checked) #liste-messes, .page:has(#vue-liste:checked) #calendrier { display: none; }
  .page-cal .cal-grille { flex: 1; min-height: 0; grid-auto-rows: minmax(0, 1fr); }
  .page-cal .cal-case { min-height: 0; padding: 3px 2px; gap: 2px; overflow-y: auto; scrollbar-width: none; }
  .page-cal .liste-defil { flex: 1; min-height: 0; overflow-y: auto; scrollbar-width: thin; }
  .cal-mois { font-size: 19px; white-space: nowrap; }
  .cal-points { display: none; }
  .cal-messe {
    display: block; flex: none; width: 100%; min-width: 0; text-align: center; border: 1px solid var(--rouge-bord); background: var(--rouge-clair);
    border-radius: 5px; padding: 1px 2px; font-size: 10px; line-height: 1.3; color: var(--encre-2);
  }
  .cal-messe:hover { text-decoration: none; color: var(--encre-2); }
  .cal-messe.ok { border-color: var(--vert-bord); background: var(--vert-clair); }
  .cal-messe .h { font-family: var(--mono); font-weight: 500; color: var(--rouge); letter-spacing: -.02em; }
  .cal-messe.ok .h { color: var(--vert); }
  .cal-messe .fait { display: none; }
  .cal-messe .t, .cal-messe .co { display: none; }
}
/* Téléphone : bascule en icônes seules pour tenir à côté du titre. */
@media (max-width: 599px) {
  .page-cal h1 { font-size: 23px; }
  .page-cal .bascule label { padding: 0 11px; }
  .page-cal .libelle-vue { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }
}
/* Tablette : assez de place pour le titre et le coordinateur. */
@media (min-width: 600px) and (max-width: 959px) {
  .page-cal .cal-case { padding: 5px; align-items: flex-start; }
  .cal-messe { text-align: left; padding: 3px 5px; font-size: 11px; }
  .cal-messe .fait { display: inline; }
  .cal-messe .t, .cal-messe .co { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
  .cal-messe .co { color: var(--encre-douce); font-size: 10px; }
}

/* À partir de 1180 px : deux colonnes. */
@media (min-width: 1180px) {
  .colonnes-cal { grid-template-columns: minmax(0, 1fr) 320px; }
  .colonnes-messe { grid-template-columns: minmax(0, 1fr) 340px; }
  /* Célébration : tout est visible, la coordination a sa carte. En dessous, les onglets restent :
     sur une seule colonne, l'équipe et les infos tomberaient sous le déroulement. */
  .page-messe .onglets, .page-messe .bandeau-co { display: none; }
  .page-messe #coordination { display: block; }
  .page-messe .panneau-deroulement { display: flex !important; }
  .page-messe #equipe, .page-messe #infos { display: block !important; }
  .colonnes-repertoire { grid-template-columns: minmax(0, 1fr) 320px; }
  .entete-page .bascule { display: none; }
  .page:has(#vue-mois:checked) #liste-messes, .page:has(#vue-liste:checked) #calendrier { display: flex; }
}

/* Impression ---------------------------------------------------------- */
@media print {
  .entete, .laterale, .nav, .actions, .noprint { display: none !important; }
  body { background: #fff; padding: 0; }
  .coquille { display: block; padding: 0; }
  .carte { box-shadow: none; border: 0; padding: 0; }
}

/* Console du super-administrateur. */
.page-console { width: 100%; max-width: 960px; margin: 0 auto; padding: 48px 16px 40px; display: flex; flex-direction: column; gap: 16px; }
.page-console .defilement { overflow-x: auto; }
.page-console .code-paroisse { font-family: var(--mono); }
.page-console .suppression summary { list-style: none; cursor: pointer; display: inline-flex; }
.page-console .suppression summary::-webkit-details-marker { display: none; }
.page-console .suppression form { margin-top: 10px; min-width: 240px; display: flex; flex-direction: column; gap: 8px; }
.page-console .prise-de-main { display: flex; flex-direction: column; gap: 8px; }
.page-console .prise-de-main form { display: flex; flex-wrap: wrap; align-items: end; gap: 8px; }
.page-console .prise-de-main input { flex: 1 1 240px; }
.page-console .prise-de-main label { flex-basis: 100%; }

/* Bandeau d'une prise de main, au-dessus de toutes les pages. */
.bandeau-prise-de-main {
  display: flex; flex-wrap: wrap; align-items: center; justify-content: center; gap: 8px 16px;
  padding: 8px 16px; background: var(--or-pastille); border-bottom: 1px solid var(--or-bord);
  color: var(--or); font-size: 14px;
}
.bandeau-prise-de-main form { margin: 0; }
.carte-suppression { border-color: var(--rouge-bord); }
.console-membres { list-style: none; margin: 8px 0 0; padding: 0; display: grid; gap: 6px; min-width: 260px; }
.console-membres li { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.console-membres form { margin: 0; }
.membres-console summary { cursor: pointer; }
.recherche-console { display: grid; gap: 6px; margin: 0 0 12px; }
