:root {
  color-scheme: light;
  --bg: #fbf6ef;
  --card: #fffdf9;
  --ink: #2d2118;
  --muted: #6d5f52;
  --accent: #6f4b2a;
  --accent-strong: #513319;
  --line: #e8dccd;
  --soft: #f3e8d8;
  --danger: #8d2d20;
  /* Fond type calendrier : bordeaux #800000 */
  --office-rouge: #800000;
  --office-rouge-pressed: #5a0000;
  /* Bouton vignette carte (dock résultats) : disque bleu */
  --results-carte-trigger-disc: #4f7dbd;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  min-height: 100vh;
  font-family: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  color: var(--ink);
  background:
    linear-gradient(rgba(45, 33, 24, 0.42), rgba(45, 33, 24, 0.58)),
    url("../icons/TSS.jpg") center / cover fixed,
    linear-gradient(160deg, #fbf6ef 0%, #efe1cf 100%);
}

button,
input {
  font: inherit;
}

.view-home {
  min-height: 100vh;
  cursor: pointer;
}

.view-home .search-card,
.view-home .search-card * {
  cursor: auto;
}

.view-home .search-card button,
.view-home .search-card [type="submit"] {
  cursor: pointer;
}

.view-home .search-card input {
  cursor: text;
}

.view-home .home-france-logo,
.view-home .home-france-logo * {
  cursor: pointer;
}

.view-home .result-window {
  cursor: auto;
}

.view-home .result-window .about-back,
.view-home .result-window button {
  cursor: pointer;
}

/* Affichage des lieux : masquer titre, partage et recherche ; fond photo inchangé (body) */
.view-home--results .hero-header,
.view-home--results .hero-sub-wrap,
.view-home--results .search-card {
  display: none !important;
}

.view-home--results .home-france-logo {
  display: none !important;
}

.view-home--results .app-shell {
  padding-bottom: max(24px, env(safe-area-inset-bottom));
}

.app-shell {
  width: min(980px, calc(100% - 28px));
  min-height: 100vh;
  margin: 0 auto;
  padding: max(0px, env(safe-area-inset-top)) max(14px, env(safe-area-inset-right)) max(72px, calc(28px + env(safe-area-inset-bottom)))
    max(14px, env(safe-area-inset-left));
}

/** Logo rond carte (diocèses) : bas droite de l’accueil, même taille que sur la page résultats. */
.home-france-logo {
  position: fixed;
  z-index: 22;
  right: max(12px, env(safe-area-inset-right));
  bottom: max(8px, env(safe-area-inset-bottom));
  pointer-events: auto;
}

.hero-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 10px;
  max-width: 980px;
  margin: 0 auto 0;
  padding: 10px 2px 0;
  color: white;
  text-shadow: 0 3px 18px rgba(0, 0, 0, 0.55);
}

/* Titre principal : hors manuscrit Office — gras, phrase en casse normale (Où … Dieu) */
.hero-title {
  flex: 1;
  min-width: 0;
  margin: 0;
  padding: 0;
  font-family: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  font-size: clamp(2.2rem, 8vw, 4.4rem);
  font-style: normal;
  font-weight: 800;
  line-height: 1.1;
  text-transform: none;
}

.share-inline-btn {
  flex-shrink: 0;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 44px;
  min-height: 44px;
  margin-top: 4px;
  padding: 8px;
  border: none;
  border-radius: 0;
  background: transparent;
  color: white;
  cursor: pointer;
  -webkit-tap-highlight-color: transparent;
}

.share-inline-btn svg {
  display: block;
  filter: drop-shadow(0 2px 5px rgba(0, 0, 0, 0.65));
}

.share-inline-btn:active {
  opacity: 0.85;
  transform: scale(0.96);
}

.hero-sub-wrap {
  max-width: 980px;
  margin: -0.45em auto 18px;
  padding: 0 2px 0 calc(2px + 4ch);
}

/* Sous-titre : italique, même colonne que le titre + léger décalage type tabulation */
.hero-text {
  margin: 0;
  color: white;
  font-family: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  font-size: calc(18px - 3pt);
  font-style: italic;
  font-weight: 400;
  line-height: 1.3;
  text-align: left;
  text-shadow: 0 3px 18px rgba(0, 0, 0, 0.55);
}

/* Même corps que .hero-text, italique comme le sous-titre, aligné à droite ; remonté d’env. deux interlignes */
.hero-text-meta {
  margin-top: calc(50px - 2 * 1.3em);
  font-style: italic;
  text-align: right;
}

.eyebrow {
  margin: 0 0 8px;
  color: var(--accent);
  font-size: 0.78rem;
  font-weight: 800;
  letter-spacing: 0.09em;
  text-transform: uppercase;
}

h1,
h2,
h3 {
  margin: 0;
  line-height: 1.1;
}

.view-about {
  position: fixed;
  inset: 0;
  z-index: 25;
  overflow: auto;
  margin: 0;
  padding: 0;
  background:
    linear-gradient(rgba(45, 33, 24, 0.42), rgba(45, 33, 24, 0.58)),
    url("../icons/TSS.jpg") center / cover fixed,
    linear-gradient(160deg, #fbf6ef 0%, #efe1cf 100%);
}

.about-back {
  position: fixed;
  top: max(8px, env(safe-area-inset-top));
  left: max(8px, env(safe-area-inset-left));
  z-index: 26;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 44px;
  min-height: 44px;
  padding: 8px;
  border: none;
  border-radius: 12px;
  background: rgba(0, 0, 0, 0.22);
  color: white;
  font-weight: 800;
  font-size: 0.95rem;
  cursor: pointer;
  text-shadow: 0 1px 3px rgba(0, 0, 0, 0.5);
  -webkit-tap-highlight-color: transparent;
}

.about-back svg {
  display: block;
}

.about-back:active {
  background: rgba(0, 0, 0, 0.35);
}

/* Bloc texte + flèche « retour » : la flèche est dans le flux (au-dessus du coin gauche du cadre) puis sticky en haut du scroll */
.about-card-frame {
  width: 100%;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 8px;
  box-sizing: border-box;
}

/*
 * Ancrage initial au-dessus du cadre (align-self via .about-card-frame) ; au défilement, colle sous le haut du scrollport parent.
 */
.about-back.about-back--anchored {
  position: sticky;
  top: max(8px, env(safe-area-inset-top));
  left: auto;
  right: auto;
  bottom: auto;
  flex-shrink: 0;
  z-index: 35;
}

.adoration-share-sheet .about-back.about-back--anchored {
  z-index: 100055;
}

/* Feuille installer : panneau scrollable pour que le même sticky soit cohérent ; flèche reste lisible sous le cadre puis en haut */
.install-pwa-sheet .install-pwa-sheet__panel {
  display: flex;
  flex-direction: column;
  align-items: stretch;
  max-height: min(92dvh, calc(100dvh - 24px));
  overflow-x: hidden;
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
  overscroll-behavior: contain;
}

.about-back.about-back--above-sheet {
  position: sticky;
  top: max(8px, env(safe-area-inset-top));
  left: auto;
  right: auto;
  bottom: auto;
  align-self: flex-start;
  flex-shrink: 0;
  margin-bottom: 8px;
  z-index: 100055;
}

.about-layout {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  padding: max(52px, env(safe-area-inset-top)) max(14px, env(safe-area-inset-right))
    max(10px, env(safe-area-inset-bottom)) max(14px, env(safe-area-inset-left));
  box-sizing: border-box;
}

/* Symboles hostie / clés / livre : collés en haut ; encadré texte reste en bas */
#view-about .about-layout {
  justify-content: flex-start;
  padding-top: max(4px, env(safe-area-inset-top));
}

#view-about .about-stack {
  margin-top: auto;
}

#view-about .about-symbol-dock {
  margin-top: 0;
  margin-bottom: 0;
}

.about-card {
  max-width: 680px;
  width: 100%;
  margin: 0 auto;
  padding: 18px 16px;
  border-radius: 14px;
  border: 1px solid rgba(255, 255, 255, 0.55);
  /* Fond bordeaux à 70 % d’opacité (texte « Offrons-nous… » dans index.html, #view-about) */
  background: rgba(128, 0, 0, 0.7);
}

.about-text {
  margin: 0;
  color: #fffef8;
  font-size: 0.98rem;
  line-height: 1.55;
  text-align: justify;
  text-justify: inter-word;
  hyphens: auto;
  text-shadow: 0 1px 4px rgba(0, 0, 0, 0.35);
}

.about-card .about-text__lead {
  color: #ffe600;
  font-weight: 400;
}

.about-stack {
  width: 100%;
  max-width: 680px;
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  align-items: stretch;
  gap: 12px;
  flex-shrink: 0;
}

.about-symbol-dock {
  display: flex;
  flex-direction: row;
  flex-wrap: wrap;
  justify-content: center;
  align-items: center;
  gap: 42px;
  flex-shrink: 0;
  width: 100%;
  max-width: 680px;
  margin: 0 auto;
}

.about-symbol-app {
  margin: 0;
  padding: 0;
  border: none;
  background: transparent;
  cursor: pointer;
  border-radius: 50%;
  line-height: 0;
  box-shadow: 0 5px 16px rgba(0, 0, 0, 0.3);
  -webkit-tap-highlight-color: transparent;
}

.about-symbol-app:active {
  transform: scale(0.93);
}

.about-symbol-app__circle {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 58px;
  height: 58px;
  border-radius: 50%;
  background: linear-gradient(160deg, #fffdfa 0%, #eae2d6 96%);
  border: 1px solid rgba(255, 255, 255, 0.65);
  box-sizing: border-box;
}

.about-symbol-app__circle svg {
  display: block;
  width: 40px;
  height: 40px;
}

.about-symbol-icon-img {
  display: block;
  width: 44px;
  height: 44px;
  object-fit: contain;
}

#about-symbol-host.about-symbol-app {
  box-shadow: none;
}

/* Photo Bible dans le même cercle blanc que l’hostie (clip 64px, bordure dégradée .about-symbol-app__circle--host) */
#about-symbol-bible.about-symbol-app {
  box-shadow: none;
}

.about-symbol-book-photo {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center 40%;
}

/* Emblème du Saint-Siège (PNG) : pas de cercle blanc ; fond noir du fichier → fusion avec le décor */
#about-symbol-keys.about-symbol-app {
  border-radius: 0;
  box-shadow: none;
}

.about-symbol-app__wrap--emblem {
  display: flex;
  align-items: center;
  justify-content: center;
  width: auto;
  height: auto;
  min-width: 58px;
  min-height: 58px;
  margin: 0;
  padding: 0;
  background: transparent;
  border: none;
  border-radius: 0;
  box-sizing: border-box;
}

.about-symbol-emblem-img {
  display: block;
  width: auto;
  height: 76px;
  max-width: min(220px, 28vw);
  object-fit: contain;
  pointer-events: none;
  mix-blend-mode: lighten;
}

.about-symbol-app__circle--host {
  padding: 0;
  overflow: visible;
  width: 66px;
  height: 66px;
  align-items: center;
  justify-content: center;
}

.about-symbol-host-stack {
  position: relative;
  display: inline-block;
  width: 64px;
  height: 64px;
}

.about-symbol-host-clip {
  display: block;
  width: 64px;
  height: 64px;
  border-radius: 50%;
  overflow: hidden;
  box-shadow: none;
}

.about-symbol-host-photo {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: 50% 28%;
  /* Cercle / clip inchangés : léger surplus de zoom pour tendre masque circulaire, translation −45 % (ajust −25 %+20 %). */
  transform: translateY(-45%) scale(calc(1.14 * 1.2 * 1.05));
  transform-origin: center center;
}

.about-symbol-host-qmark {
  position: absolute;
  left: 50%;
  top: 50%;
  /* Remonté de 5px ; redressement 15° antihoraire (rotation 0°). */
  transform: translate(-50%, calc(-50% + 2.1em - 3em + 2em - 5px));
  transform-origin: center center;
  font-size: calc(2.35rem * 0.75 - 3px - 5pt);
  font-weight: 800;
  font-style: italic;
  color: #0a0a0a;
  line-height: 1;
  font-family: Georgia, "Times New Roman", Times, serif;
  pointer-events: none;
  text-shadow: none;
  z-index: 2;
  letter-spacing: -0.03em;
}

/* Feuille symboles : fond photo identique au premier écran ; un seul cadre type .about-card */
.about-symbol-sheet.adoration-share-sheet {
  padding: 0;
  overflow: hidden;
}

.about-symbol-sheet .adoration-share-sheet__backdrop.about-symbol-sheet__pwa-bg {
  z-index: 0;
  background:
    linear-gradient(rgba(45, 33, 24, 0.42), rgba(45, 33, 24, 0.58)),
    url("../icons/TSS.jpg") center / cover fixed,
    linear-gradient(160deg, #fbf6ef 0%, #efe1cf 100%);
}

.about-symbol-sheet.adoration-share-sheet .adoration-share-sheet__panel.about-symbol-sheet__panel {
  pointer-events: none;
  position: relative;
  z-index: 1;
  width: 100%;
  max-width: none;
  max-height: none;
  min-height: 100dvh;
  height: 100dvh;
  align-self: stretch;
  flex: 1 1 auto;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  overflow-x: hidden;
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
  overscroll-behavior: contain;
  overflow-anchor: none;
  margin: 0;
  padding: 0;
  background: transparent;
  border-radius: 0;
  box-shadow: none;
}

.about-symbol-sheet.adoration-share-sheet .adoration-share-sheet__panel.about-symbol-sheet__panel > * {
  pointer-events: auto;
}

.about-symbol-sheet__layout {
  min-height: 0;
  width: 100%;
  max-width: none;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  align-items: stretch;
  padding: max(52px, env(safe-area-inset-top)) max(14px, env(safe-area-inset-right))
    max(20px, env(safe-area-inset-bottom)) max(14px, env(safe-area-inset-left));
  box-sizing: border-box;
}

.about-symbol-sheet__layout .about-card-frame {
  width: 100%;
  max-width: 680px;
  margin: 0 auto;
}

.about-symbol-sheet__layout .about-card {
  max-width: 680px;
  width: 100%;
  margin: 0 auto;
}

.about-symbol-sheet__layout .about-text {
  display: flex;
  flex-direction: column;
  gap: 12px;
  max-height: min(72vh, 640px);
  overflow-y: auto;
  overflow-x: hidden;
  -webkit-overflow-scrolling: touch;
  overflow-anchor: none;
}

.about-symbol-sheet__layout .about-text p {
  margin: 0;
}

.about-symbol-sheet__heading {
  font-size: clamp(1.03rem, 3.5vw, 1.14rem);
  font-weight: 800;
  line-height: 1.35;
}

.about-symbol-sheet__heading a {
  color: inherit;
  text-decoration: underline;
  text-underline-offset: 2px;
}

.about-symbol-sheet__audio-link {
  margin: 0 0 1em;
  font-weight: 400;
  line-height: 1.45;
}

.about-symbol-sheet__audio-link a {
  color: inherit;
  font-weight: 400;
  text-decoration: underline;
  text-underline-offset: 2px;
}

.about-symbol-sheet__audio-icon {
  display: inline-block;
  vertical-align: -0.15em;
  width: 1.1em;
  height: 1.1em;
  margin-left: 0.35em;
  fill: currentColor;
}

.about-symbol-sheet__layout .about-text abbr {
  text-underline-offset: 2px;
}

.about-symbol-sheet__sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  clip-path: inset(50%);
  white-space: nowrap;
  border: 0;
}

.about-symbol-sheet__quote {
  margin: 0;
  padding: 0;
  border: none;
}

.about-symbol-sheet__quote p:not(.about-symbol-sheet__quote-source) {
  margin: 0 0 8px;
}

.about-symbol-sheet__layout .about-text .about-symbol-sheet__quote footer,
.about-symbol-sheet__layout .about-text p.about-symbol-sheet__quote-source {
  display: block;
  margin-top: 12px;
  margin-bottom: 0;
  font-style: italic;
  font-size: 0.92em;
  text-align: right;
  color: #ffe600;
}

.search-card {
  position: fixed;
  right: max(14px, env(safe-area-inset-right));
  bottom: 0;
  left: max(14px, env(safe-area-inset-left));
  z-index: 10;
  width: min(680px, calc(100% - 28px));
  margin: 0 auto;
  /* Bas : proche du bord de l’écran / fond ; marge intérieure = encoche + petit filet */
  padding: 20px 20px max(8px, calc(10px + env(safe-area-inset-bottom))) 20px;
  display: flex;
  flex-direction: column;
}

.search-card .city-form {
  margin-bottom: 0;
}

.search-card__install-dock {
  display: flex;
  align-items: flex-end;
  justify-content: flex-start;
  flex-wrap: wrap;
  gap: 8px 12px;
  width: 100%;
  max-width: calc(100% - 58px);
  /* Même pas que entre champ « Saisir une ville » et « Chercher » (.input-row gap) */
  margin-top: 10px;
  margin-bottom: 0;
}

.search-card__install-zone {
  flex-shrink: 0;
  margin: 0;
  align-self: flex-end;
}

.search-card__install-help {
  flex: 0 1 auto;
  margin: 0 0 6px;
  padding: 2px 0;
  border: none;
  background: transparent;
  color: #fff;
  font-size: 0.62rem;
  font-weight: 400;
  line-height: 1.25;
  text-align: left;
  text-shadow: 0 1px 6px rgba(0, 0, 0, 0.55);
  cursor: pointer;
  -webkit-tap-highlight-color: transparent;
}

.search-card__install-help:active {
  opacity: 0.82;
}

.search-card__install-trigger {
  display: inline-flex;
  padding: 0;
  margin: 0;
  border: none;
  background: transparent;
  cursor: pointer;
  -webkit-tap-highlight-color: transparent;
  filter: drop-shadow(0 2px 8px rgba(0, 0, 0, 0.4));
  line-height: 0;
}

.search-card__install-trigger:active {
  transform: scale(0.95);
}

/* Icône puis chevron rouge (symbole téléchargement), sans espace entre les deux ni sous la flèche */
.install-trigger-app-wrap {
  display: inline-flex;
  flex-direction: column;
  align-items: center;
  justify-content: flex-start;
  gap: 0;
  margin: 0;
  padding: 0;
  line-height: 0;
}

.install-trigger-app-img {
  display: block;
  width: 48px;
  height: 48px;
  border-radius: 12px;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.38);
  margin: 0;
  padding: 0;
}

.install-trigger-red-v {
  display: flex;
  flex-direction: column;
  align-items: center;
  margin: -3px 0 0;
  padding: 0;
  width: 27px;
  height: auto;
  line-height: 0;
  color: #d40000;
}

.install-trigger-red-v svg {
  display: block;
  width: 100%;
  height: auto;
  margin: 0;
  padding: 0;
}

.install-trigger-download-bar {
  display: block;
  width: 100%;
  height: 3px;
  margin: 1.5px 0 0;
  padding: 0;
  background: currentColor;
  flex-shrink: 0;
}

/* Vignette carte : disque bleu, France centrée ; textes blancs sur arcs (voir SVG dans index) */
.results-carte-trigger {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  margin: 0;
  padding: 6px;
  width: 66px;
  height: 66px;
  border: none;
  border-radius: 50%;
  background: var(--results-carte-trigger-disc);
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.32);
  cursor: pointer;
  -webkit-tap-highlight-color: transparent;
  line-height: 0;
  box-sizing: border-box;
}

.results-carte-trigger:active {
  opacity: 0.92;
  transform: scale(0.97);
}

.results-carte-trigger__img {
  display: block;
  position: relative;
  z-index: 0;
  width: 62px;
  height: auto;
  max-height: 62px;
  object-fit: contain;
  object-position: center;
}

.results-carte-trigger__svg {
  position: absolute;
  left: 0;
  top: 0;
  width: 100%;
  height: 100%;
  z-index: 1;
  pointer-events: none;
  overflow: visible;
}

.results-carte-trigger__curved {
  font-family: system-ui, "Segoe UI", sans-serif;
  font-weight: 800;
}

@media (display-mode: standalone) {
  .search-card__install-dock {
    display: none;
  }
}

.view-home .search-card__install-trigger {
  cursor: pointer;
}

.install-pwa-sheet__panel {
  max-width: 420px;
  text-align: left;
}

.install-pwa-sheet__body {
  margin: 0;
  padding: 0 0 6px;
}

.install-pwa-sheet__p {
  margin: 0 0 12px;
  font-size: 0.92rem;
  line-height: 1.5;
  color: var(--ink);
}

.install-pwa-sheet__p:last-child {
  margin-bottom: 0;
}

.install-pwa-sheet__p--note {
  padding-top: 4px;
  color: var(--muted);
  font-size: 0.88rem;
}

.install-pwa-sheet__inline-install.search-card__install-trigger {
  display: inline-flex;
  vertical-align: middle;
  margin: 0 0.15em;
  line-height: 0;
  filter: drop-shadow(0 1px 4px rgba(0, 0, 0, 0.35));
}

.install-pwa-sheet__inline-install.search-card__install-trigger:active {
  transform: scale(0.95);
}

.install-trigger-app-wrap--sheet {
  gap: 0;
}

.install-trigger-app-img--sheet {
  width: 32px;
  height: 32px;
  border-radius: 8px;
}

.install-trigger-red-v--sheet {
  width: 18px;
  color: #d40000;
}

.install-pwa-sheet__menu-glyphs {
  display: inline-flex;
  align-items: center;
  gap: 0.35em;
  margin-left: 0.2em;
  vertical-align: middle;
  color: var(--accent-strong);
  line-height: 0;
}

.install-pwa-sheet__menu-glyph {
  display: block;
  flex-shrink: 0;
}

.install-pwa-sheet__menu-or {
  font-size: 0.82em;
  font-weight: 600;
  color: var(--muted);
  line-height: 1;
}

.install-pwa-sheet__share-glyph {
  display: inline-block;
  vertical-align: -0.28em;
  margin: 0 0.12em;
  color: var(--accent-strong);
}

.install-pwa-sheet__office-link {
  display: inline-flex;
  align-items: center;
  gap: 0.35em;
  margin: 0 0.1em;
  padding: 0.1em 0.35em 0.1em 0.15em;
  border-radius: 8px;
  color: var(--accent-strong);
  font-weight: 400;
  text-decoration: none;
  vertical-align: middle;
  line-height: 1.2;
}

.install-pwa-sheet__office-link strong {
  font-weight: 700;
}

.install-pwa-sheet__office-link:active {
  opacity: 0.85;
}

.install-pwa-sheet__office-link-icon {
  display: block;
  width: 28px;
  height: 28px;
  border-radius: 7px;
  box-shadow: 0 1px 4px rgba(0, 0, 0, 0.15);
}

/* Boutons : rouge titres Office (#BB0000), plein */
.primary-button,
.input-row button {
  cursor: pointer;
  font-weight: 800;
  color: white;
  text-shadow: 0 1px 3px rgba(0, 0, 0, 0.35);
  background: var(--office-rouge);
  border: none;
  border-radius: 12px;
}

.primary-button {
  width: 100%;
  padding: 15px 18px;
}

.primary-button:active,
.input-row button:active {
  background: var(--office-rouge-pressed);
  transform: translateY(1px);
}

.city-form {
  /* Même espacement vertical que entre le champ et « Chercher » (.input-row gap: 10px) */
  margin-top: 10px;
}

.input-row {
  display: flex;
  gap: 10px;
}

.input-row input {
  min-width: 0;
  flex: 1;
  border: 1px solid var(--line);
  border-radius: 14px;
  padding: 13px 14px;
  background: white;
  color: var(--ink);
}

.input-row input::placeholder {
  font-style: italic;
  color: var(--muted);
}

.input-row button {
  padding: 0 16px;
}

.hint {
  margin: 14px 0 0;
  color: var(--muted);
  font-size: 0.92rem;
  line-height: 1.45;
}

.result-window {
  position: fixed;
  inset: 0;
  z-index: 30;
  overflow: auto;
  padding: 0;
  background: transparent;
}

.result-window__layout {
  width: 100%;
  min-height: 100%;
  padding: max(8px, env(safe-area-inset-top)) max(16px, env(safe-area-inset-right))
    max(120px, calc(28px + env(safe-area-inset-bottom))) max(16px, env(safe-area-inset-left));
  box-sizing: border-box;
}

.result-window__frame {
  width: 100%;
  max-width: min(980px, 100%);
  margin: 0 auto;
}

.result-window__head {
  display: flex;
  align-items: center;
  justify-content: flex-start;
  gap: 12px;
  width: 100%;
  margin-bottom: 10px;
  box-sizing: border-box;
}

.result-window__head .about-back.about-back--anchored {
  position: sticky;
  top: max(8px, env(safe-area-inset-top));
  flex-shrink: 0;
  margin-right: auto;
}

.result-feedback--in-frame {
  position: static;
  top: auto;
  left: auto;
  z-index: auto;
  align-self: flex-start;
  margin: 0 0 10px;
  padding: 8px 12px;
  border-radius: 12px;
  font-size: 0.95rem;
  background: var(--results-carte-trigger-disc);
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.32);
  text-shadow: none;
}

.result-window__head .result-feedback--in-frame {
  position: static;
  top: auto;
  left: auto;
  right: auto;
  margin: 0;
  margin-left: auto;
  padding: 8px 12px;
  text-align: right;
  flex-shrink: 1;
  max-width: calc(100% - 56px);
}

.about-card .result-feedback--in-frame {
  display: block;
  margin-bottom: 14px;
  color: #fffef8;
}

/* Triangle puis carte : colonne fixe en bas, bord droit aligné sur la colonne des résultats (980px max). */
.results-corner-dock {
  position: fixed;
  bottom: max(8px, env(safe-area-inset-bottom));
  left: max(16px, env(safe-area-inset-left));
  right: max(16px, env(safe-area-inset-right));
  z-index: 32;
  pointer-events: none;
}

.results-corner-dock__align {
  width: 100%;
  max-width: min(980px, 100%);
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 8px;
  pointer-events: none;
}

.results-corner-dock__align > * {
  pointer-events: auto;
}

.result-window[hidden] .results-corner-dock {
  display: none;
}

/* Panneau type signalisation : triangle seul (pas de cadre blanc), soleil ☀ comme sur les textes Office */
.results-info-fab {
  position: relative;
  bottom: auto;
  right: auto;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 50px;
  height: 50px;
  margin: 0;
  padding: 0;
  border: none;
  border-radius: 0;
  background: transparent;
  box-shadow: none;
  cursor: pointer;
  -webkit-tap-highlight-color: transparent;
  filter: drop-shadow(0 2px 5px rgba(0, 0, 0, 0.4));
}

.results-info-fab:active {
  transform: scale(0.94);
  opacity: 0.9;
}

.results-info-fab__sign {
  display: block;
  width: 46px;
  height: auto;
  overflow: visible;
}

.results-info-fab__triangle {
  stroke: var(--office-rouge);
}

.results-info-fab__sun {
  paint-order: stroke fill;
  stroke: rgba(45, 33, 24, 0.4);
  stroke-width: 1.1px;
}

.carte-adoration-sheet.adoration-share-sheet {
  flex-direction: column;
  align-items: stretch;
  justify-content: flex-start;
  padding: 0;
  overflow: hidden;
}

/* Fond identique au body : fixe ; hors du scroll / zoom carte (backdrop ne scale pas avec l’SVG) */
.carte-adoration-sheet .adoration-share-sheet__backdrop.carte-adoration-sheet__pwa-bg {
  z-index: 0;
  background:
    linear-gradient(rgba(45, 33, 24, 0.42), rgba(45, 33, 24, 0.58)),
    url("../icons/TSS.jpg") center / cover fixed,
    linear-gradient(160deg, #fbf6ef 0%, #efe1cf 100%);
}

/** Toujours au-dessus de la carte et de la légende (#carte-adoration-sheet a z-index 100001 dans .adoration-share-sheet). */
.carte-adoration-sheet__close-fixed {
  position: fixed;
  top: max(8px, env(safe-area-inset-top));
  right: max(10px, env(safe-area-inset-right));
  z-index: 100052;
  margin: 0;
  padding: 10px 14px;
  border: 0;
  border-radius: 14px;
  background: var(--results-carte-trigger-disc);
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.32);
  cursor: pointer;
  -webkit-tap-highlight-color: transparent;
  font: inherit;
  font-weight: 800;
  font-size: 0.95rem;
  color: #fff;
  text-shadow: none;
}

.carte-adoration-sheet__close-fixed:active {
  opacity: 0.85;
}

.carte-adoration-sheet__evolution-link {
  z-index: 100052;
  background: var(--results-carte-trigger-disc);
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.32);
  text-shadow: none;
}

/** Bloc carte + légende + texte : à l’ouverture, carte + légende remplissent l’écran ; seul le haut du cadre texte dépasse. */
.carte-adoration-sheet__dock-bottom {
  --carte-legend-stack: 6.25rem;
  --carte-manifesto-peek: 7rem;
  --carte-layout-lift: 2.5rem;
  width: 100%;
  flex: 1 1 auto;
  min-height: 0;
  display: flex;
  flex-direction: column;
  align-items: stretch;
  padding-left: max(6px, env(safe-area-inset-left));
  padding-right: max(6px, env(safe-area-inset-right));
  padding-top: max(44px, env(safe-area-inset-top));
  padding-bottom: max(8px, env(safe-area-inset-bottom));
  box-sizing: border-box;
}

.carte-adoration-sheet__after-map {
  flex-shrink: 0;
  width: 100%;
  padding-top: 0;
}

/** Titre au-dessus de la bande : même largeur (−15 %) que la carte */
.carte-adoration-sheet__legend-title {
  flex-shrink: 0;
  box-sizing: border-box;
  width: 85%;
  max-width: 85%;
  margin: 0 auto 4px;
  padding: 0;
  text-align: center;
  font-size: clamp(0.72rem, 2.5vw, 0.94rem);
  font-weight: 800;
  letter-spacing: 0.05em;
  line-height: 1.25;
  color: rgba(255, 255, 255, 0.98);
  text-shadow: none;
  text-transform: uppercase;
}

/** Bande couleurs : alignée horizontalement sur la carte (.carte-adoration-sheet__map-stage à 85 %). */
.carte-adoration-sheet__legend-strip {
  flex-shrink: 0;
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  grid-template-rows: auto;
  box-sizing: border-box;
  width: 85%;
  max-width: 85%;
  margin: 0 auto;
  box-sizing: border-box;
  border: 1px solid rgba(0, 0, 0, 0.28);
  border-radius: 6px;
  overflow: hidden;
  min-height: 46px;
}

.carte-adoration-sheet__legend-strip > .carte-adoration-sheet__legend-cell--perpetual {
  grid-column: 1;
  grid-row: 1;
}

.carte-adoration-sheet__legend-strip > .carte-adoration-sheet__legend-cell--six {
  grid-column: 2;
  grid-row: 1;
}

.carte-adoration-sheet__legend-strip > .carte-adoration-sheet__legend-cell--few {
  grid-column: 3;
  grid-row: 1;
}

.carte-adoration-sheet__legend-contact-cell {
  grid-column: 4;
  grid-row: 1;
  display: flex;
  align-items: center;
  justify-content: center;
}

.carte-adoration-sheet__legend-cell--none {
  background: #ffffff;
  color: #000000;
}

.carte-adoration-sheet__legend-contact {
  margin: 0;
  padding: 0;
  border: none;
  background: transparent;
  font-family: inherit;
  font-style: normal;
  font-size: clamp(0.53rem, 1.95vw, 0.74rem);
  font-weight: 700;
  color: #000000;
  text-decoration: underline;
  text-underline-offset: 2px;
  cursor: pointer;
  line-height: 1.15;
}

.carte-adoration-sheet__legend-contact:hover,
.carte-adoration-sheet__legend-contact:active {
  color: #1a1a1a;
}

.carte-adoration-sheet__legend-cell {
  flex: 1 1 0;
  min-width: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0;
  padding: 8px 4px;
  font-size: clamp(0.65rem, 2.8vw, 0.88rem);
  font-weight: 700;
  color: #000;
  text-align: center;
  line-height: 1.15;
  box-sizing: border-box;
  border-left: 1px solid rgba(0, 0, 0, 0.22);
}

.carte-adoration-sheet__legend-cell:first-child {
  border-left: none;
}

.carte-adoration-sheet__legend-cell--perpetual {
  /* Même fond que les encadrés .about-card ; libellé comme les noms des papes (.about-symbol-sheet__quote-source) */
  background: rgba(128, 0, 0, 0.7);
  color: #ffe600;
}

.carte-adoration-sheet__legend-cell--six {
  /* Ancienne couleur « perpétuelle » sur la carte */
  background: #f59e0b;
}

.carte-adoration-sheet__legend-cell--few {
  /* Ancienne couleur « 6 jours » */
  background: #fde047;
}

.carte-adoration-sheet__manifesto {
  width: 100%;
  max-width: 680px;
  margin: 8px auto max(24px, env(safe-area-inset-bottom));
}

.carte-adoration-sheet__manifesto-title {
  margin: 0 0 14px;
  color: #fffef8;
  font-size: clamp(1rem, 3.4vw, 1.12rem);
  font-weight: 800;
  line-height: 1.35;
  text-align: left;
  text-shadow: 0 1px 4px rgba(0, 0, 0, 0.35);
}

.carte-adoration-sheet__manifesto-text p {
  margin: 0 0 12px;
}

.carte-adoration-sheet__manifesto-text > p:last-child {
  margin-bottom: 0;
}

.carte-adoration-sheet__manifesto-quote {
  margin: 0;
  padding: 0;
}

.carte-adoration-sheet__manifesto-quote p:not(.carte-adoration-sheet__manifesto-quote-source) {
  margin: 0 0 8px;
  color: #fffef8;
}

.carte-adoration-sheet__manifesto-quote-source {
  display: block;
  margin: 0;
  font-style: italic;
  font-size: 0.92em;
  text-align: right;
  color: #ffe600;
}

/* Infos lieux : même environnement que la vue « fond » (#view-about), au-dessus de la liste des résultats */
#view-results-notice.results-notice {
  z-index: 35;
}

.result-close {
  position: fixed;
  top: max(10px, env(safe-area-inset-top));
  right: max(10px, env(safe-area-inset-right));
  z-index: 31;
  padding: 10px 14px;
  border: 0;
  border-radius: 14px;
  cursor: pointer;
  font-weight: 800;
  color: white;
  background: transparent;
  -webkit-tap-highlight-color: transparent;
  text-shadow: 0 1px 4px rgba(0, 0, 0, 0.85);
}

.result-feedback {
  position: fixed;
  top: max(10px, env(safe-area-inset-top));
  left: max(10px, env(safe-area-inset-left));
  z-index: 31;
  padding: 10px 14px;
  border-radius: 14px;
  font-weight: 800;
  color: white;
  background: transparent;
  text-decoration: none;
  cursor: pointer;
  -webkit-tap-highlight-color: transparent;
  text-shadow: 0 1px 4px rgba(0, 0, 0, 0.85);
}

.result-feedback.result-feedback--in-frame,
.result-feedback.carte-adoration-sheet__evolution-link {
  background: var(--results-carte-trigger-disc);
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.32);
  text-shadow: none;
}

.result-feedback:active {
  opacity: 0.85;
}

.result-close:active {
  opacity: 0.85;
}

.results {
  display: grid;
  gap: 16px;
  width: min(980px, 100%);
  margin: 0 auto;
}

.status {
  margin-top: 12px;
  border: 1px dashed rgba(111, 75, 42, 0.35);
  border-radius: 16px;
  padding: 12px;
  color: var(--muted);
  background: rgba(243, 232, 216, 0.45);
  line-height: 1.45;
  font-size: 0.92rem;
}

.status.error {
  color: #fff;
  border-color: rgba(255, 255, 255, 0.35);
  background: rgba(0, 0, 0, 0.22);
  text-shadow: 0 1px 4px rgba(0, 0, 0, 0.45);
}

.diocese-section {
  border: 1px solid rgba(255, 255, 255, 0.35);
  border-radius: 18px;
  overflow: hidden;
  background: white;
  box-shadow: 0 6px 28px rgba(0, 0, 0, 0.22);
}

.diocese-title {
  padding: 14px 16px;
  background: var(--office-rouge);
  color: white;
}

.diocese-title h3 {
  margin: 0;
  font-size: clamp(1.05rem, 3.8vw, 1.35rem);
  font-weight: 800;
  color: white;
  line-height: 1.25;
}

.diocese-title p {
  display: none;
}

.place-list {
  display: grid;
  gap: 0;
  margin: 0;
  padding: 0;
  list-style: none;
}

.place-card {
  padding: 16px;
  border-top: 1px solid var(--line);
}

.place-heading {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: 8px;
}

.place-heading strong {
  font-size: 1.05rem;
}

.distance {
  color: var(--accent);
  font-weight: 900;
}

.place-meta,
.place-description {
  margin-top: 8px;
  color: var(--muted);
  line-height: 1.45;
}

.place-description a {
  color: var(--accent-strong);
  font-weight: 700;
}

.empty-section {
  padding: 16px;
  color: var(--muted);
  border-top: 1px solid var(--line);
}

@media (max-width: 620px) {
  .app-shell {
    width: min(100% - 18px, 980px);
    padding-top: max(0px, env(safe-area-inset-top));
    padding-bottom: calc(260px + env(safe-area-inset-bottom));
  }

  .search-card {
    padding: 16px 16px max(6px, calc(10px + env(safe-area-inset-bottom))) 16px;
  }

  .input-row {
    flex-direction: column;
  }

  .input-row button {
    padding: 13px 16px;
  }
}

.adoration-share-sheet {
  position: fixed;
  inset: 0;
  z-index: 100001;
  display: none;
  align-items: flex-end;
  justify-content: center;
  padding: 12px;
  padding-bottom: max(12px, env(safe-area-inset-bottom));
  box-sizing: border-box;
}

.adoration-share-sheet.is-open {
  display: flex;
}

.adoration-share-sheet__backdrop {
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, 0.45);
}

.adoration-share-sheet__panel {
  position: relative;
  width: 100%;
  max-width: 400px;
  border-radius: 16px;
  padding: 16px 14px 12px;
  background: var(--card);
  box-shadow: 0 -4px 24px rgba(0, 0, 0, 0.22);
}

.adoration-share-sheet__title {
  margin: 0 0 12px;
  font-size: 1rem;
  font-weight: 800;
  color: var(--ink);
  text-align: center;
}

.adoration-share-sheet__grid {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.adoration-share-sheet__grid button {
  display: block;
  width: 100%;
  padding: 12px 14px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: var(--soft);
  color: var(--ink);
  font-size: 0.95rem;
  font-weight: 700;
  text-align: center;
  cursor: pointer;
  font: inherit;
  box-sizing: border-box;
}

.adoration-share-sheet__cancel {
  margin-top: 8px;
  width: 100%;
  padding: 10px;
  border: none;
  border-radius: 12px;
  background: transparent;
  color: var(--muted);
  font-size: 0.9rem;
  cursor: pointer;
  font: inherit;
}

.install-pwa-sheet .adoration-share-sheet__cancel {
  font-weight: 700;
}

.install-pwa-close-hint {
  position: fixed;
  left: 50%;
  bottom: max(20px, env(safe-area-inset-bottom));
  z-index: 100002;
  width: min(92vw, 360px);
  padding: 14px 18px;
  border-radius: 16px;
  background: var(--card);
  color: var(--text);
  box-shadow: 0 8px 28px rgba(0, 0, 0, 0.22);
  transform: translate(-50%, 12px);
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.25s ease, transform 0.25s ease;
  box-sizing: border-box;
}

.install-pwa-close-hint.is-visible {
  opacity: 1;
  transform: translate(-50%, 0);
  pointer-events: auto;
}

.install-pwa-close-hint__text {
  margin: 0;
  font-size: 0.92rem;
  line-height: 1.45;
  text-align: center;
}

/*
 * Carte d’adoration : ce bloc est APRÈS .adoration-share-sheet__panel pour écraser
 * max-width 400px + fond --card sinon la carte reste en « petite feuille blanche ».
 */
.carte-adoration-sheet.adoration-share-sheet .adoration-share-sheet__panel.carte-adoration-sheet__panel {
  pointer-events: none;
  position: relative;
  z-index: 1;
  width: 100%;
  max-width: none;
  min-height: 100dvh;
  height: 100dvh;
  max-height: 100dvh;
  align-self: stretch;
  flex: 1 1 auto;
  display: flex;
  flex-direction: column;
  justify-content: flex-start;
  overflow-x: hidden;
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
  overscroll-behavior: contain;
  box-sizing: border-box;
  margin: 0;
  padding: 0;
  background: transparent;
  border-radius: 0;
  box-shadow: none;
}

.carte-adoration-sheet.adoration-share-sheet .adoration-share-sheet__panel.carte-adoration-sheet__panel > * {
  pointer-events: auto;
}

.carte-adoration-sheet.adoration-share-sheet .carte-adoration-sheet__map-wrap {
  flex: 0 0 auto;
  display: flex;
  flex-direction: column;
  height: calc(
    100dvh - var(--carte-legend-stack) - var(--carte-manifesto-peek) - var(--carte-layout-lift) -
      max(44px, env(safe-area-inset-top)) - max(8px, env(safe-area-inset-bottom)) - 8px
  );
  min-height: 120px;
  max-height: none;
  width: 100%;
  overflow: hidden;
  margin: 0;
  padding: 0;
  border: none;
  background: transparent;
  pointer-events: auto;
}

.carte-adoration-sheet__map-stage {
  position: relative;
  flex: 1 1 auto;
  min-height: 0;
  /* Pleine largeur : évite la sensation de « fenêtre » resserrée sur les côtés. */
  width: 100%;
  max-width: 100%;
  margin: 0;
  display: flex;
  flex-direction: column;
  box-sizing: border-box;
  pointer-events: auto;
}

/* Indication zoom : bas droite de la zone carte. */
.carte-adoration-sheet__pinch-hint {
  position: absolute;
  z-index: 3;
  right: max(10px, env(safe-area-inset-right, 0px));
  bottom: max(10px, env(safe-area-inset-bottom, 0px));
  top: auto;
  margin: 0;
  padding: 0;
  pointer-events: none;
  line-height: 0;
  color: rgba(255, 255, 255, 0.9);
  filter: drop-shadow(0 1px 4px rgba(0, 0, 0, 0.55));
}

.carte-adoration-sheet__pinch-hint-icon {
  display: block;
  width: clamp(32px, 8.8vw, 42px);
  height: auto;
}

/* Souris + molette : l’indication pincement est moins utile. */
@media (hover: hover) and (pointer: fine) {
  .carte-adoration-sheet__pinch-hint {
    opacity: 0.55;
  }
}

.carte-adoration-sheet.adoration-share-sheet .carte-adoration-sheet__map-viewport {
  flex: 1 1 auto;
  min-height: 0;
  max-height: none;
  width: 100%;
  max-width: 100%;
  overflow: hidden;
  overscroll-behavior: none;
  touch-action: none;
  margin: 0;
  padding: 0;
  background: transparent;
  border: none;
  outline: none;
  box-shadow: none;
  cursor: grab;
}

.carte-adoration-sheet__map-surface {
  position: relative;
  transform-origin: 0 0;
  will-change: transform;
}

/* Dimensions et zoom en JS sur #carte-adoration-map-surface + image (translate + px). */
.carte-adoration-sheet.adoration-share-sheet .carte-adoration-sheet__map {
  display: block;
  margin: 0;
  padding: 0;
  border: none;
  vertical-align: top;
  user-select: none;
  -webkit-user-drag: none;
  pointer-events: none;
}

.carte-adoration-sheet.adoration-share-sheet
  .carte-adoration-sheet__map-viewport.carte-adoration-sheet__map-viewport--dragging {
  cursor: grabbing;
}

/*
 * Vue large : même logique — carte calée pour ne laisser dépasser que le haut du cadre texte.
 */
@media (min-width: 721px) {
  .carte-adoration-sheet.adoration-share-sheet .carte-adoration-sheet__map-wrap {
    min-height: 160px;
  }
}

/* Mentions légales : dernière ligne, centrées en bas (desktop). */
.desktop-legal-footer {
  display: none;
}

@media (min-width: 1024px) {
  .desktop-legal-footer {
    display: block;
    position: fixed;
    z-index: 28;
    left: 50%;
    right: auto;
    bottom: max(4px, env(safe-area-inset-bottom));
    transform: translateX(-50%);
    width: min(520px, calc(100vw - 24px));
    max-width: min(520px, calc(100vw - 24px));
    font-size: 0.82rem;
    line-height: 1.45;
    color: rgba(255, 255, 255, 0.95);
    text-shadow: 0 1px 8px rgba(0, 0, 0, 0.85);
    pointer-events: auto;
    text-align: center;
  }

  .view-home--results .desktop-legal-footer {
    display: none !important;
  }

  .desktop-legal-footer__trigger {
    cursor: pointer;
    list-style: none;
    font-weight: 700;
    font-size: 0.82rem;
    letter-spacing: 0.02em;
    user-select: none;
    text-align: center;
  }

  .desktop-legal-footer__trigger::-webkit-details-marker {
    display: none;
  }

  .desktop-legal-footer__panel {
    margin-top: 8px;
    padding: 14px 16px;
    border-radius: 14px;
    background: rgba(252, 253, 249, 0.97);
    color: var(--ink);
    text-shadow: none;
    border: 1px solid rgba(0, 0, 0, 0.12);
    box-shadow: 0 10px 32px rgba(0, 0, 0, 0.35);
    text-align: left;
  }

  .desktop-legal-footer__panel p {
    margin: 0 0 10px;
  }

  .desktop-legal-footer__panel p:last-child {
    margin-bottom: 0;
  }

  .desktop-legal-footer__author {
    font-size: 0.9em;
    margin-top: 4px !important;
  }

  .desktop-legal-footer__panel a {
    color: var(--accent-strong);
    font-weight: 700;
    text-decoration: underline;
    text-underline-offset: 2px;
  }

  .desktop-legal-footer__panel a:hover {
    color: var(--accent);
  }
}
