: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;
}

html.adoration-embed,
html.adoration-embed body {
  width: 100%;
  min-width: 0;
  min-height: 100%;
  overflow: hidden;
}

html.adoration-embed body {
  background-attachment: scroll;
}

html.adoration-embed .share-inline-btn,
html.adoration-embed .hero-sub-wrap,
html.adoration-embed .hero-approfondir-btn,
html.adoration-embed .home-france-logo,
html.adoration-embed .results-carte-trigger,
html.adoration-embed .desktop-legal-footer,
html.adoration-embed .carte-adoration-sheet {
  display: none !important;
}

html.adoration-embed .view-home {
  min-height: 100dvh;
}

html.adoration-embed .app-shell {
  width: 100%;
  min-height: 100dvh;
  padding: clamp(10px, 3.2vmin, 22px) clamp(10px, 3.2vmin, 18px)
    calc(clamp(132px, 42vmin, 190px) + env(safe-area-inset-bottom));
}

html.adoration-embed .hero-header {
  padding-top: 0;
}

html.adoration-embed .hero-title {
  max-width: 100%;
  white-space: nowrap;
  font-size: min(
    clamp(2rem, 12vmin, 3.6rem),
    calc((100vw - 2 * clamp(10px, 3.2vmin, 18px) - 4px) / 9.3)
  );
}

html.adoration-embed .search-card {
  right: clamp(10px, 3.2vmin, 18px);
  bottom: 0;
  left: clamp(10px, 3.2vmin, 18px);
  width: auto;
  padding: clamp(12px, 3.4vmin, 18px) clamp(12px, 3.4vmin, 18px)
    max(8px, calc(10px + env(safe-area-inset-bottom)));
}

html.adoration-embed .search-card__bottom-dock {
  justify-content: center;
}

html.adoration-embed .search-card__install-dock {
  justify-content: center;
}

html.adoration-embed .install-trigger-label {
  font-size: 0.68rem;
}

html.adoration-embed .result-window {
  background:
    linear-gradient(rgba(45, 33, 24, 0.42), rgba(45, 33, 24, 0.58)),
    url("../icons/TSS.jpg") center / cover,
    linear-gradient(160deg, #fbf6ef 0%, #efe1cf 100%);
}

html.adoration-embed .result-window__layout {
  padding: max(8px, env(safe-area-inset-top)) max(10px, env(safe-area-inset-right))
    max(24px, calc(18px + env(safe-area-inset-bottom))) max(10px, env(safe-area-inset-left));
}

html.adoration-embed .results-corner-dock {
  display: none !important;
}

/* 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 .hero-approfondir-btn,
.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 carte accueil : sous « Chercher », aligné à droite du panneau recherche (jamais en fixed). */
.search-card__bottom-dock {
  display: flex;
  align-items: flex-end;
  justify-content: flex-start;
  gap: 10px;
  width: 100%;
  margin-top: 10px;
}

.search-card .home-france-logo {
  position: static;
  flex: 0 0 auto;
  margin: 0 0 0 auto;
  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 {
  position: fixed;
  top: 10px;
  right: 10px;
  z-index: 10002;
  flex-shrink: 0;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 24px;
  min-height: 24px;
  margin-top: 0;
  padding: 0;
  border: none;
  border-radius: 0;
  background: transparent;
  cursor: pointer;
  -webkit-tap-highlight-color: transparent;
}

.share-inline-btn__glyph {
  display: block;
  width: 22px;
  height: 22px;
  line-height: 0;
  filter: drop-shadow(2px 3px 4px rgba(0, 0, 0, 0.55));
}

.share-inline-btn__glyph img {
  display: block;
  width: 22px;
  height: 22px;
}

.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);
  display: grid;
  grid-template-columns: minmax(0, 1fr);
}

/* 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);
}

.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;
  margin: 0;
  padding: 4px 16px 12px 4px;
  border: none;
  border-radius: 0;
  background: transparent;
  color: white;
  cursor: pointer;
  user-select: none;
  touch-action: manipulation;
  -webkit-tap-highlight-color: transparent;
}

.about-back__fleche {
  color: white;
  font-size: 64px;
  font-family: "Brush Script MT", "Lucida Handwriting", cursive;
  line-height: 1;
  filter: drop-shadow(0 2px 4px rgba(0, 0, 0, 0.55));
  pointer-events: none;
}

.about-back:active .about-back__fleche {
  opacity: 0.72;
}

/* 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-card__title {
  margin: 0 0 14px;
  color: #fffef8;
  font-size: clamp(1rem, 3.4vw, 1.12rem);
  font-weight: 800;
  line-height: 1.35;
  text-align: center;
  text-shadow: 0 1px 4px rgba(0, 0, 0, 0.35);
}

.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 {
  display: inline-flex;
  flex-direction: column;
  align-items: center;
  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__glyph {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 76px;
  line-height: 0;
}

.about-symbol-flat-label {
  display: block;
  margin-top: 2px;
  font-size: 0.58rem;
  font-family: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  font-weight: 400;
  color: #ffffff;
  letter-spacing: 0.01em;
  line-height: 1.2;
  text-align: center;
  white-space: nowrap;
  text-shadow: 0 1px 4px rgba(0, 0, 0, 0.55);
  pointer-events: none;
}

#about-symbol-host.about-symbol-app,
#about-symbol-bible.about-symbol-app {
  border-radius: 0;
  box-shadow: none;
}

/* 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 {
  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-book-photo {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center 40%;
}

.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;
}

/* Dock déplacé ici à l’ouverture : même place qu’en haut de la vue « À propos » */
.about-symbol-sheet__layout:has(.about-symbol-dock) {
  flex: 1 1 auto;
  min-height: 100%;
  justify-content: flex-start;
  padding-top: max(4px, env(safe-area-inset-top));
}

.about-symbol-sheet__layout:has(.about-symbol-dock) .about-symbol-dock {
  position: sticky;
  top: max(4px, env(safe-area-inset-top));
  z-index: 10;
  flex-shrink: 0;
}

.about-symbol-sheet__layout:has(.about-symbol-dock) .about-card-frame {
  margin-top: auto;
}

.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: 1 1 auto;
  min-width: 0;
  max-width: none;
  margin-top: 0;
  margin-bottom: 0;
}

.search-card__install-trigger {
  display: inline-flex;
  flex-direction: column;
  align-items: center;
  justify-content: flex-end;
  padding: 0;
  margin: 0;
  min-width: 44px;
  min-height: 44px;
  border: none;
  background: transparent;
  cursor: pointer;
  -webkit-tap-highlight-color: transparent;
  touch-action: manipulation;
  filter: drop-shadow(0 2px 8px rgba(0, 0, 0, 0.4));
}

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

.install-trigger-app-wrap {
  display: inline-flex;
  flex-direction: column;
  align-items: center;
  justify-content: flex-start;
  gap: 0;
  margin: 0;
  padding: 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-label {
  margin: 4px 0 0;
  color: #fff;
  font-size: 0.62rem;
  font-weight: 400;
  line-height: 1.25;
  text-align: center;
  text-shadow: 0 1px 6px rgba(0, 0, 0, 0.55);
  white-space: nowrap;
}

/* 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;
  }
}

/* APK Capacitor : display-mode reste « browser », masquage via classe JS */
html.installed-app .search-card__install-dock {
  display: none !important;
}

.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__steps {
  line-height: 1.55;
}

.install-pwa-sheet__step-final-line {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.35em;
  width: 100%;
  margin-top: 0.1em;
}

.install-pwa-sheet__panel-box {
  margin: 0;
  padding: 14px 14px 12px;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: var(--card);
  box-shadow: 0 1px 4px rgba(45, 33, 24, 0.06);
}

.install-pwa-sheet__panel-box[hidden] {
  display: none !important;
}

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

.install-pwa-sheet__p--desktop-only {
  margin: 0;
  text-align: center;
  color: var(--ink);
}

.install-pwa-sheet__p--after-steps {
  margin-top: 14px;
}

.install-pwa-sheet__p--note-block {
  margin-top: 2em;
}

.install-pwa-sheet__menu-glyphs--bold {
  font-weight: 800;
}

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

.install-pwa-sheet__open-browser-row {
  display: inline;
}

.install-pwa-sheet__open-browser-link {
  font-weight: 600;
  color: var(--results-carte-trigger-disc);
  text-decoration: underline;
  text-underline-offset: 2px;
}

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

.install-pwa-sheet__open-browser-sep {
  font-weight: 400;
  color: var(--ink);
}

.install-pwa-sheet__step-sub {
  display: inline;
  font-size: 0.88rem;
  color: var(--muted);
}

.install-pwa-sheet__share-inline-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  margin: 0 0.15em;
  padding: 4px;
  min-width: 28px;
  min-height: 28px;
  vertical-align: middle;
  border: none;
  border-radius: 8px;
  background: transparent;
  color: var(--accent-strong);
  cursor: pointer;
  -webkit-tap-highlight-color: transparent;
  touch-action: manipulation;
}

.install-pwa-sheet__share-inline-btn:active {
  opacity: 0.82;
  background: rgba(111, 75, 42, 0.08);
}

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

.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;
}

.result-window__head .result-feedback--in-frame {
  position: static;
  top: auto;
  left: auto;
  right: auto;
  margin: 0;
  margin-left: auto;
  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;
}

/** Bouton « contact pour ajouter ou modifier un lieu » — résultats et carte : même rendu. */
.result-feedback.result-feedback--in-frame,
.result-feedback.carte-adoration-sheet__evolution-link {
  padding: 10px 14px;
  border-radius: 14px;
  font-size: clamp(0.72rem, 2.5vw, 0.94rem);
  font-weight: 400;
  color: white;
  background: var(--results-carte-trigger-disc);
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.32);
  text-shadow: none;
}

.result-feedback.hero-approfondir-btn {
  padding: 4px 8px;
  border-radius: 10px;
  font-size: clamp(calc(0.72rem - 1pt), calc(2.5vw - 1pt), calc(0.94rem - 1pt));
  font-weight: 400;
  color: white;
  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:active {
  opacity: 0.85;
}

/** Accueil : « Approfondir » — mobile fixe à l’écran ; desktop dans le flux sous le sous-titre. */
.view-home:not(.view-home--results) .result-feedback.hero-approfondir-btn {
  border: none;
  font-style: normal;
  text-decoration: none;
  cursor: pointer;
  -webkit-tap-highlight-color: transparent;
  white-space: nowrap;
}

@media (max-width: 720px) {
  .view-home:not(.view-home--results) .result-feedback.hero-approfondir-btn {
    position: fixed;
    top: calc(
      max(0px, env(safe-area-inset-top)) + 10px + clamp(2.2rem, 8vw, 4.4rem) * 1.1 - 0.45em +
        calc(18px - 3pt) * 1.3 + 0.35em + calc(18px - 3pt) * 1.3
    );
    right: max(1px, env(safe-area-inset-right));
    left: auto;
    z-index: 23;
    margin: 0;
  }
}

@media (min-width: 721px) {
  .view-home:not(.view-home--results) .result-feedback.hero-approfondir-btn {
    position: relative;
    top: auto;
    left: auto;
    z-index: auto;
    display: block;
    width: fit-content;
    max-width: min(980px, calc(100% - 28px));
    margin: calc(0.35em + 1.3 * calc(18px - 3pt) - 0.45em) auto 18px;
    margin-right: calc(50% - 50vw + var(--home-actions-right, max(14px, env(safe-area-inset-right))));
    margin-left: auto;
  }
}

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

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

.results-nota {
  margin: 0;
}

.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;
}

.place-directions-btn {
  display: inline-flex;
  align-items: center;
  margin-top: 10px;
  padding: 8px 14px;
  border: 1px solid rgba(128, 0, 0, 0.35);
  border-radius: 12px;
  font: 700 0.88rem/1.2 system-ui, sans-serif;
  color: var(--office-rouge);
  background: rgba(243, 232, 216, 0.65);
  cursor: pointer;
  -webkit-tap-highlight-color: transparent;
}

.place-directions-btn:active {
  opacity: 0.85;
}

.place-directions-sheet__destination {
  margin: 0 0 12px;
  color: var(--muted);
  font-size: 0.88rem;
  line-height: 1.4;
}

.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(280px + 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,
.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;
}

.share-sheet__loading {
  margin: 0;
  padding: 12px 14px;
  font-size: 0.9rem;
  color: var(--muted);
  text-align: center;
}

.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;
}

.pwa-home-banner {
  position: fixed;
  left: 50%;
  bottom: max(20px, env(safe-area-inset-bottom));
  z-index: 100001;
  display: flex;
  align-items: flex-start;
  gap: 10px;
  width: min(92vw, 360px);
  padding: 14px 14px 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;
}

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

.pwa-home-banner__text {
  flex: 1;
  margin: 0;
  font-size: 0.92rem;
  line-height: 1.45;
  text-align: center;
}

.pwa-home-banner__dismiss {
  flex: 0 0 auto;
  margin: 0;
  padding: 0;
  border: 0;
  background: transparent;
  color: var(--muted);
  font: 700 1.35rem/1 system-ui, sans-serif;
  cursor: pointer;
  -webkit-tap-highlight-color: transparent;
}

.pwa-home-banner__dismiss:active {
  color: var(--text);
}

/*
 * 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.
 * Desktop : « Approfondir » et vignette carte sur la même verticale, 15 px à droite des boutons recherche.
 */
@media (min-width: 721px) {
  .view-home:not(.view-home--results) {
    --home-search-panel-width: min(680px, calc(100vw - 28px));
    --home-actions-right: calc((100vw - var(--home-search-panel-width)) / 2 + 5px);
  }

  .view-home:not(.view-home--results) .result-feedback.hero-approfondir-btn {
    margin-right: calc(50% - 50vw + var(--home-actions-right));
  }

  .view-home:not(.view-home--results) .share-inline-btn {
    right: var(--home-actions-right);
  }

  .carte-adoration-sheet.adoration-share-sheet .carte-adoration-sheet__map-wrap {
    min-height: 160px;
  }
}

/* Mentions légales : sous la recherche, centré (mobile très petit). */
.desktop-legal-footer {
  position: relative;
  z-index: 1;
  width: 100%;
  margin-top: 8px;
  font-size: 0.52rem;
  line-height: 1.4;
  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: inherit;
  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: 6px;
  padding: 10px 12px;
  border-radius: 12px;
  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;
  font-size: 0.95em;
  max-height: min(45vh, 280px);
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
}

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

.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__policy-link {
  margin-top: 8px !important;
  text-align: center;
}

.legal-text-frame {
  position: relative;
  padding-bottom: 52px;
}

.legal-back-fleche {
  position: absolute;
  left: 0;
  bottom: 0;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 2px 12px 4px 2px;
  text-decoration: none;
  cursor: pointer;
  -webkit-tap-highlight-color: transparent;
  touch-action: manipulation;
}

.legal-back-fleche-inner {
  color: #1a1a1a;
  font-size: 48px;
  font-family: "Brush Script MT", "Lucida Handwriting", cursive;
  line-height: 1;
  filter: drop-shadow(0 1px 2px rgba(255, 255, 255, 0.65));
}

.legal-back-fleche:active .legal-back-fleche-inner {
  opacity: 0.72;
}

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

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

.desktop-legal-footer__panel .legal-back-fleche,
.desktop-legal-footer__panel .legal-back-fleche:hover {
  text-decoration: none;
  font-weight: normal;
  color: inherit;
}

@media (min-width: 1024px) {
  .desktop-legal-footer {
    font-size: 0.72rem;
    line-height: 1.45;
    margin-top: 10px;
  }

  .desktop-legal-footer__panel {
    margin-top: 8px;
    padding: 14px 16px;
    border-radius: 14px;
    max-height: min(50vh, 360px);
    overflow-y: auto;
  }

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