/* Feuille de style de maliturgie : sobre, lisible, imprimable. */
:root {
  --fond: #f6f3ec;
  --fond-carte: #fffdf8;
  --encre: #241f1a;
  --encre-douce: #6b6055;
  --trait: #e0d8c9;
  --accent: #6b3fa0;
  --accent-clair: #f0e9f8;
  --or: #b08422;
  --vert: #2f7d55;
  --vert-clair: #e5f3ea;
  --rouge: #a8322d;
  --rouge-clair: #fbeae9;
  --rayon: 10px;
  --ombre: 0 1px 2px rgba(36, 31, 26, .06), 0 8px 24px rgba(36, 31, 26, .05);
}

* { box-sizing: border-box; }

body {
  margin: 0;
  background: var(--fond);
  color: var(--encre);
  font: 16px/1.55 -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
}

h1, h2, h3 { font-family: Georgia, "Iowan Old Style", "Times New Roman", serif; font-weight: 600; letter-spacing: -.01em; }
h1 { font-size: 1.7rem; margin: 0 0 .2rem; }
h2 { font-size: 1.2rem; margin: 0 0 .8rem; }
h3 { font-size: 1rem; margin: 0 0 .4rem; }
a { color: var(--accent); }

/* En-tete ------------------------------------------------------------ */
.entete {
  background: var(--fond-carte);
  border-bottom: 1px solid var(--trait);
  position: sticky; top: 0; z-index: 20;
}
.entete-inner {
  max-width: 1100px; margin: 0 auto; padding: .6rem 1rem;
  display: flex; align-items: center; gap: 1rem; flex-wrap: wrap;
}
.marque {
  font-family: Georgia, serif; font-size: 1.15rem; font-weight: 600;
  color: var(--encre); text-decoration: none; display: flex; align-items: center; gap: .45rem;
}
.marque span { color: var(--or); }
.nav { display: flex; gap: .2rem; margin-left: auto; align-items: center; flex-wrap: wrap; }
.nav a {
  padding: .35rem .7rem; border-radius: 99px; text-decoration: none;
  color: var(--encre-douce); font-size: .92rem;
}
.nav a:hover { background: var(--accent-clair); color: var(--accent); }
.nav a.actif { background: var(--accent); color: #fff; }
.nav .ico { display: none; }
/* Menu du compte : profil et clocher affiché. */
.compte { position: relative; }
.compte summary {
  list-style: none; cursor: pointer; display: flex; align-items: center; gap: .5rem;
  padding: .2rem .45rem .2rem .2rem; border-radius: 99px; border: 1px solid var(--trait); background: #fff;
}
.compte summary::-webkit-details-marker { display: none; }
.compte summary:hover, .compte[open] summary { border-color: var(--accent); }
.compte summary:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
.compte .qui { display: flex; flex-direction: column; line-height: 1.15; min-width: 0; }
.compte .qui .nom { font-size: .82rem; color: var(--encre-douce); white-space: nowrap; }
.compte .qui .clocher { font-size: .88rem; font-weight: 600; color: var(--accent); white-space: nowrap; }
.compte .chevron { width: 16px; height: 16px; fill: none; stroke: var(--encre-douce); stroke-width: 2; transition: transform .15s; }
.compte[open] .chevron { transform: rotate(180deg); }
.menu-compte {
  position: absolute; right: 0; top: calc(100% + .4rem); z-index: 40; width: 16rem; max-width: calc(100vw - 1.5rem);
  background: var(--fond-carte); border: 1px solid var(--trait); border-radius: var(--rayon);
  box-shadow: 0 12px 32px rgba(36, 31, 26, .14); padding: .35rem;
}
.menu-compte form { margin: 0; }
.menu-entete { margin: 0; padding: .5rem .6rem .6rem; border-bottom: 1px solid var(--trait); font-size: .9rem; overflow-wrap: anywhere; }
.menu-entete span { color: var(--encre-douce); font-size: .78rem; }
.menu-titre { margin: .5rem .6rem .2rem; font-size: .7rem; text-transform: uppercase; letter-spacing: .06em; color: var(--encre-douce); font-weight: 600; }
.menu-choix {
  display: flex; align-items: flex-start; gap: .4rem; width: 100%; text-align: left; cursor: pointer;
  background: none; border: 0; border-radius: 7px; padding: .5rem .6rem; font: inherit; font-size: .92rem; color: var(--encre);
}
.menu-choix:hover, .menu-choix:focus-visible { background: var(--accent-clair); color: var(--accent); outline: none; }
.menu-choix.actif { font-weight: 600; color: var(--accent); }
.menu-choix small { display: block; font-size: .76rem; font-weight: 400; color: var(--encre-douce); }
.menu-choix .coche { width: 1rem; flex: none; color: var(--accent); }
.menu-choix.quitter { margin-top: .3rem; border-top: 1px solid var(--trait); border-radius: 0 0 7px 7px; color: var(--encre-douce); }

/* Puces de rattachement d'un membre aux clochers (administration). */
.puces-clochers { display: flex; flex-wrap: wrap; gap: .3rem; }
.puce-clocher {
  padding: .15rem .55rem; border-radius: 99px; border: 1px dashed var(--trait); background: #fff;
  font: inherit; font-size: .78rem; color: var(--encre-douce); cursor: pointer;
}
.puce-clocher:hover { border-color: var(--accent); color: var(--accent); }
.puce-clocher.oui { border-style: solid; border-color: var(--accent); background: var(--accent-clair); color: var(--accent); font-weight: 600; }

/* Mise en page -------------------------------------------------------- */
.page { max-width: 1100px; margin: 0 auto; padding: 1.4rem 1rem 4rem; }
.page-etroite { max-width: 460px; margin: 3rem auto; padding: 0 1rem 4rem; }
.entete-page { display: flex; align-items: flex-start; gap: 1rem; flex-wrap: wrap; margin-bottom: 1.2rem; }
.entete-page .actions { margin-left: auto; display: flex; gap: .5rem; flex-wrap: wrap; }
.sous-titre { color: var(--encre-douce); margin: 0; }
/* Majuscule sur le seul premier mot d'une date en francais. */
.date-fr::first-letter { text-transform: uppercase; }
.colonnes { display: grid; grid-template-columns: minmax(0, 1fr) 320px; gap: 1.2rem; align-items: start; }
@media (max-width: 900px) { .colonnes { grid-template-columns: minmax(0, 1fr); } }

.carte {
  background: var(--fond-carte); border: 1px solid var(--trait);
  border-radius: var(--rayon); padding: 1.1rem; box-shadow: var(--ombre); margin-bottom: 1.2rem;
}
.carte > h2:first-child { display: flex; align-items: center; gap: .5rem; flex-wrap: wrap; }

/* Calendrier ---------------------------------------------------------- */
.cal-entete { display: flex; align-items: center; gap: .6rem; margin-bottom: .9rem; flex-wrap: wrap; }
.cal-mois { font-family: Georgia, serif; font-size: 1.35rem; text-transform: capitalize; margin: 0; }
.cal-grille { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); gap: 1px; background: var(--trait); border: 1px solid var(--trait); border-radius: var(--rayon); overflow: hidden; }
.cal-jour-nom { background: var(--fond-carte); text-align: center; font-size: .75rem; text-transform: uppercase; letter-spacing: .06em; color: var(--encre-douce); padding: .5rem 0; }
.cal-case { background: var(--fond-carte); min-height: 104px; padding: .35rem .4rem; }
.cal-case.hors-mois { background: #f2eee5; color: #b3aa9c; }
.cal-case.aujourdhui .cal-num { background: var(--accent); color: #fff; }
.cal-num { display: inline-flex; align-items: center; justify-content: center; width: 1.55rem; height: 1.55rem; border-radius: 99px; font-size: .8rem; font-variant-numeric: tabular-nums; }
.cal-messe {
  display: block; text-decoration: none; color: var(--encre);
  border-left: 3px solid var(--rouge); background: var(--rouge-clair);
  border-radius: 5px; padding: .22rem .4rem; margin-top: .25rem; font-size: .78rem; line-height: 1.25;
}
.cal-messe.ok { border-left-color: var(--vert); background: var(--vert-clair); }
.cal-messe:hover { filter: brightness(.97); }
.cal-messe .h { font-variant-numeric: tabular-nums; font-weight: 600; }
.cal-messe .co { display: block; color: var(--encre-douce); font-size: .72rem; }

/* Listes, tableaux ---------------------------------------------------- */
table { width: 100%; border-collapse: collapse; }
th, td { text-align: left; padding: .55rem .5rem; border-bottom: 1px solid var(--trait); vertical-align: top; }
th { font-size: .76rem; text-transform: uppercase; letter-spacing: .05em; color: var(--encre-douce); font-weight: 600; }
tr:last-child td { border-bottom: 0; }

.moment { display: grid; grid-template-columns: 1.7rem 1fr auto; gap: .6rem; align-items: start; padding: .55rem .2rem; border-bottom: 1px solid var(--trait); }
.moment:last-of-type { border-bottom: 0; }
.moment .rang { color: var(--encre-douce); font-size: .8rem; font-variant-numeric: tabular-nums; padding-top: .18rem; }
.moment .libelle { font-weight: 600; font-size: .95rem; }
.moment .choix { color: var(--encre-douce); font-size: .9rem; }
.moment .choix.vide { color: var(--rouge); font-style: italic; }
.moment .outils { display: flex; gap: .25rem; align-items: center; }

.liste-nue { list-style: none; margin: 0; padding: 0; }
.liste-nue li { padding: .4rem 0; border-bottom: 1px solid var(--trait); display: flex; gap: .5rem; align-items: center; }
.liste-nue li > span { min-width: 0; overflow-wrap: anywhere; }
.liste-nue li:last-child { border-bottom: 0; }

.pastille { width: 2rem; height: 2rem; border-radius: 99px; background: var(--accent-clair); color: var(--accent); display: inline-flex; align-items: center; justify-content: center; font-size: .78rem; font-weight: 700; flex: none; }

/* Etiquettes ---------------------------------------------------------- */
.etiq { display: inline-block; padding: .12rem .5rem; border-radius: 99px; font-size: .72rem; font-weight: 600; letter-spacing: .02em; }
.etiq-vert { background: var(--vert-clair); color: var(--vert); }
.etiq-rouge { background: var(--rouge-clair); color: var(--rouge); }
.etiq-or { background: #fbf2dc; color: var(--or); }
.etiq-gris { background: #efeae0; color: var(--encre-douce); }
.etiq-violet { background: var(--accent-clair); color: var(--accent); }

/* Tags et filtre du répertoire -------------------------------------- */
.barre-recherche { display: flex; gap: .5rem; align-items: center; }
.barre-recherche input { flex: 1; }
.barre-recherche button { flex: none; white-space: nowrap; }
.barre-recherche button[hidden] { display: none; }
.filtre-tags { display: flex; flex-wrap: wrap; gap: .35rem; align-items: center; margin-top: .7rem; }
.puce-tag {
  position: relative; display: inline-flex; align-items: center; gap: .3rem; margin: 0;
  padding: .2rem .6rem; border-radius: 99px; border: 1px solid var(--trait); background: #fff;
  font-size: .8rem; font-weight: 500; color: var(--encre); cursor: pointer; user-select: none;
}
.puce-tag span { color: var(--encre-douce); font-size: .72rem; font-variant-numeric: tabular-nums; }
.puce-tag input { position: absolute; opacity: 0; pointer-events: none; }
.puce-tag:hover { border-color: var(--accent); color: var(--accent); }
.puce-tag:has(input:focus-visible) { outline: 2px solid var(--accent); outline-offset: 1px; }
.puce-tag:has(input:checked), .puce-tag.active { background: var(--accent); border-color: var(--accent); color: #fff; }
.puce-tag:has(input:checked) span { color: rgba(255, 255, 255, .8); }
.puce-tag.active { cursor: default; }
.puce-tag.active a { color: inherit; text-decoration: none; }
.puce-tag.active form { display: contents; }
.puce-tag.active button { background: none; border: 0; color: inherit; font-size: 1rem; line-height: 1; padding: 0 0 0 .1rem; cursor: pointer; opacity: .75; }
.puce-tag.active button:hover { opacity: 1; }
.tags-chant { display: flex; flex-wrap: wrap; gap: .35rem; }
.compte-chants { font-size: .85rem; margin: .8rem 0 .2rem; }
a.lien-tag { text-decoration: none; margin-left: .2rem; }
a.lien-tag:hover { background: var(--accent-clair); color: var(--accent); }
td.fichiers { white-space: nowrap; }
td.auteur { font-size: .8rem; color: var(--encre-douce); }
td.auteur span {
  display: block; max-width: 14rem; overflow: hidden; white-space: nowrap; text-overflow: ellipsis;
}
.lien-fichier {
  display: inline-block; padding: .12rem .5rem; margin-right: .25rem; border-radius: 6px;
  background: var(--accent-clair); color: var(--accent); font-size: .74rem; font-weight: 700;
  letter-spacing: .03em; text-decoration: none;
}
.lien-fichier:hover { background: var(--accent); color: #fff; }

/* 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: .4rem; }
.apercu-pdf[open] summary::before { content: "▾"; }
.apercu-pdf iframe {
  display: block; width: 100%; height: 75vh; min-height: 420px; margin-top: .8rem;
  border: 1px solid var(--trait); border-radius: 8px; background: #fff;
}

/* Psaume ------------------------------------------------------------ */
.jour-liturgique { font-size: .85rem; margin-bottom: .8rem; }
.psaume + .psaume { margin-top: .9rem; }
details.psaume summary { cursor: pointer; font-weight: 600; font-size: .92rem; }
.psaume-ref { font-weight: 600; font-size: .92rem; margin: 0 0 .4rem; }
h2 .psaume-ref { font-size: inherit; }
.psaume-refrain { color: var(--accent); font-weight: 600; margin: .4rem 0 .7rem; 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: Georgia, "Iowan Old Style", serif; line-height: 1.6; margin: 0 0 .6rem; }
.psaume-rappel { font-size: .8rem; }
.changer-psaume { margin-top: .7rem; }
.changer-psaume summary { cursor: pointer; font-size: .85rem; }
.changer-psaume form { margin-top: .6rem; }
input[type=date] { padding: .45rem .6rem; border: 1px solid var(--trait); border-radius: 8px; background: #fff; font: inherit; font-size: .95rem; width: 100%; }

/* Formulaires --------------------------------------------------------- */
label { display: block; font-size: .8rem; font-weight: 600; color: var(--encre-douce); margin-bottom: .22rem; }
input[type=text], input[type=email], input[type=password], input[type=search], input[type=url],
input[type=datetime-local], select, textarea {
  width: 100%; padding: .5rem .6rem; border: 1px solid var(--trait); border-radius: 8px;
  background: #fff; color: var(--encre); font: inherit; font-size: .95rem;
}
input:focus, select:focus, textarea:focus { outline: 2px solid var(--accent); outline-offset: -1px; border-color: var(--accent); }
textarea { resize: vertical; min-height: 5rem; }
.champ { margin-bottom: .8rem; }
.champs-ligne { display: flex; gap: .6rem; flex-wrap: wrap; }
.champs-ligne > * { flex: 1 1 160px; }
fieldset.champ { border: 0; padding: 0; margin-inline: 0; }
fieldset.champ legend { padding: 0; margin-bottom: .3rem; }
fieldset.champ label { display: flex; align-items: center; gap: .4rem; font-weight: 400; }
.ligne-clocher { align-items: flex-end; border-bottom: 1px solid var(--trait); padding-top: .6rem; }
.ligne-clocher > .champ:last-child { flex: 0 0 auto; }
.ligne-clocher:last-child { border-bottom: 0; }
.aide { font-size: .78rem; color: var(--encre-douce); margin: .25rem 0 0; }

.bouton {
  display: inline-flex; align-items: center; gap: .35rem; justify-content: center;
  padding: .45rem .9rem; border-radius: 8px; border: 1px solid transparent;
  background: var(--accent); color: #fff; font: inherit; font-size: .9rem; font-weight: 600;
  cursor: pointer; text-decoration: none; touch-action: manipulation;
}
.bouton:hover { filter: brightness(1.08); }
.bouton.secondaire { background: #fff; color: var(--encre); border-color: var(--trait); }
.bouton.secondaire:hover { background: var(--accent-clair); border-color: var(--accent); color: var(--accent); }
.bouton.danger { background: #fff; color: var(--rouge); border-color: #e7c9c7; }
.bouton.mini { padding: .2rem .5rem; font-size: .78rem; font-weight: 500; }
.bouton.pleine { width: 100%; }
.bouton[disabled] { opacity: .5; cursor: not-allowed; }

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

/* Messages ------------------------------------------------------------ */
.message { padding: .6rem .8rem; border-radius: 8px; font-size: .9rem; margin-bottom: .9rem; }
.message.erreur { background: var(--rouge-clair); color: var(--rouge); }
.message.info { background: var(--accent-clair); color: var(--accent); }
.message.succes { background: var(--vert-clair); color: var(--vert); }
.vide { color: var(--encre-douce); font-style: italic; font-size: .9rem; }

/* Selecteur de chant -------------------------------------------------- */
.voile { position: fixed; inset: 0; background: rgba(36, 31, 26, .42); display: flex; align-items: flex-start; justify-content: center; padding: 3rem 1rem; z-index: 50; overflow: auto; }
.panneau { background: var(--fond-carte); border-radius: 12px; width: 100%; max-width: 620px; box-shadow: 0 24px 60px rgba(0,0,0,.25); }
.panneau-entete { padding: .9rem 1.1rem; border-bottom: 1px solid var(--trait); display: flex; align-items: center; gap: .6rem; }
.panneau-corps { padding: 1rem 1.1rem; max-height: 60vh; overflow: auto; }
.panneau-pied { padding: .8rem 1.1rem; border-top: 1px solid var(--trait); background: #faf7f0; border-radius: 0 0 12px 12px; }
.choix-chant { display: flex; gap: .6rem; align-items: center; width: 100%; text-align: left; padding: .5rem .6rem; border: 1px solid transparent; border-radius: 8px; background: none; font: inherit; cursor: pointer; }
.choix-chant:hover { background: var(--accent-clair); }
.choix-chant.retenu { border-color: var(--accent); background: var(--accent-clair); }
.choix-chant .t { font-weight: 600; font-size: .92rem; }
.choix-chant .m { color: var(--encre-douce); font-size: .8rem; }

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

/* Mobile ------------------------------------------------------------- */
input, select, textarea { max-width: 100%; min-width: 0; }

/* Cibles tactiles confortables sur écran tactile, quelle que soit la largeur. */
@media (pointer: coarse) {
  .bouton { min-height: 44px; }
  .bouton.mini { min-height: 36px; min-width: 36px; padding: .3rem .6rem; font-size: .85rem; }
  .puce-tag { padding: .4rem .75rem; }
}

@media (max-width: 720px) {
  /* Pas de zoom automatique d'iOS au focus : 16px minimum dans les champs. */
  input[type=text], input[type=email], input[type=password], input[type=search], input[type=url],
  input[type=datetime-local], input[type=date], select, textarea { font-size: 16px; }

  h1 { font-size: 1.4rem; line-height: 1.25; }
  .page { padding: 1rem .75rem 2rem; }
  .page-etroite { margin: 1.5rem auto; }
  .carte { padding: .9rem; margin-bottom: .9rem; }
  .entete-page { margin-bottom: 1rem; gap: .7rem; }
  .entete-page .actions { margin-left: 0; width: 100%; }
  .entete-page .actions > * { flex: 1 1 auto; }
  .entete-page .actions form .bouton { width: 100%; }

  /* En-tête réduit à une ligne ; la navigation passe en barre d'onglets en bas. */
  .entete-inner { padding: .5rem .75rem; flex-wrap: nowrap; }
  .compte { margin-left: auto; }
  .menu-choix { padding: .7rem .6rem; }
  .nav {
    position: fixed; left: 0; right: 0; bottom: 0; z-index: 30; margin: 0;
    display: grid; grid-auto-flow: column; grid-auto-columns: 1fr; gap: 0;
    background: var(--fond-carte); border-top: 1px solid var(--trait);
    box-shadow: 0 -4px 16px rgba(36, 31, 26, .06);
    padding-bottom: env(safe-area-inset-bottom);
  }
  .nav a {
    position: relative; display: flex; flex-direction: column; align-items: center; gap: .15rem;
    padding: .5rem .2rem .45rem; border-radius: 0; font-size: .7rem; font-weight: 600;
  }
  .nav a:hover { background: none; }
  .nav a.actif { background: none; color: var(--accent); }
  .nav .ico {
    display: block; width: 24px; height: 24px; fill: none; stroke: currentColor;
    stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round;
  }
  .nav .etiq { position: absolute; top: .2rem; left: calc(50% + .45rem); padding: .05rem .35rem; font-size: .62rem; }
  body.avec-nav { padding-bottom: calc(64px + env(safe-area-inset-bottom)); }

  /* Calendrier : cases compactes, seule l'heure reste ; le détail est dans la liste à venir. */
  .cal-entete { gap: .4rem; }
  .cal-mois { font-size: 1.1rem; flex: 1; text-align: center; white-space: nowrap; }
  .cal-entete .indicateur { display: none; }
  .cal-jour-nom { font-size: .64rem; letter-spacing: 0; padding: .35rem 0; }
  .cal-case { min-height: 58px; padding: .2rem; }
  .cal-num { width: 1.4rem; height: 1.4rem; font-size: .74rem; }
  .cal-messe {
    margin-top: .15rem; padding: .15rem .1rem; border-left-width: 2px;
    font-size: .64rem; text-align: center; letter-spacing: -.01em;
  }
  .cal-messe .t, .cal-messe .co { display: none; }

  /* Tableaux empilés : une ligne devient une petite fiche. */
  .tableau-empile thead { display: none; }
  .tableau-empile, .tableau-empile tbody { display: block; }
  .tableau-empile tr {
    display: flex; flex-wrap: wrap; align-items: center; gap: .3rem .5rem;
    padding: .7rem 0; border-bottom: 1px solid var(--trait);
  }
  .tableau-empile tr:last-child { border-bottom: 0; }
  .tableau-empile td { display: block; padding: 0; border: 0; }
  .tableau-empile td.large { flex-basis: 100%; }
  .tableau-empile td.auteur { flex: 1 1 0; min-width: 0; }
  .tableau-empile td.auteur span { max-width: none; white-space: normal; }
  #liste-chants .tableau-empile tr { display: grid; grid-template-columns: minmax(0, 1fr) auto; }
  #liste-chants td.large { grid-column: 1; }
  #liste-chants td.auteur { grid-column: 1; }
  #liste-chants td.auteur:empty { display: none; }
  #liste-chants td.fichiers { grid-column: 2; grid-row: 1 / span 2; align-self: start; }
  #liste-chants td.fichiers .lien-fichier { margin: 0 0 0 .25rem; padding: .3rem .55rem; }

  /* Répertoire : les tags défilent horizontalement au lieu d'occuper l'écran. */
  .barre-recherche { flex-wrap: wrap; }
  .barre-recherche input { flex: 1 1 12rem; }
  .filtre-tags {
    display: grid; grid-template-rows: repeat(3, auto); grid-auto-flow: column; grid-auto-columns: max-content;
    overflow-x: auto; overscroll-behavior-x: contain; margin: .7rem -.9rem 0; padding: 0 .9rem .4rem;
  }

  /* Déroulement : les outils passent sous le libellé. */
  .moment { grid-template-columns: 1.4rem minmax(0, 1fr); row-gap: .4rem; }
  .moment .outils { grid-column: 2; flex-wrap: wrap; }

  /* Célébration : la coordination remonte en tête, avant le déroulement. */
  .colonnes-messe { display: flex; flex-direction: column; align-items: stretch; gap: 0; }
  .colonnes-messe > div { display: contents; }
  .colonnes-messe #coordination { order: -1; }

  /* Les navigateurs mobiles n'affichent pas les PDF en iframe : on garde la liste des fichiers. */
  .apercu-pdf { display: none; }

  /* Sélecteur de chant : feuille qui monte du bas de l'écran. */
  .voile { padding: 0; align-items: flex-end; overflow: hidden; }
  .panneau { display: flex; flex-direction: column; max-height: 92dvh; border-radius: 16px 16px 0 0; }
  .panneau-entete, .panneau-corps, .panneau-pied { padding-left: .9rem; padding-right: .9rem; }
  .panneau-corps { flex: 1 1 auto; min-height: 0; max-height: none; overscroll-behavior: contain; }
  .panneau-pied { border-radius: 0; padding-bottom: calc(.8rem + env(safe-area-inset-bottom)); }
}

@media (max-width: 420px) {
  .compte .qui .nom { display: none; }
}

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