/* ===== Optimisations lisibilité ===== */
body {
  line-height: 1.7;         /* Plus d'air entre les lignes */
  font-size: 1.05rem;       /* Texte légèrement agrandi */
}

/* ===== Correction image de fond sur smartphone ===== */
@media only screen and (max-width: 768px) {
  body {
    background-attachment: scroll !important;   /* évite les bugs de fixed */
    background-size: cover !important;          /* couvre toute la largeur */
    background-position: center top !important; /* image centrée proprement */
  }
}

/* ===== Recherche : loupe dans le menu ===== */
.m-search-button {
  align-items: center;
  background: transparent;
  border: 0;
  color: var(--titles-color);
  cursor: pointer;
  display: flex;
  height: 40px;
  justify-content: center;
  margin-left: 12px;
  padding: 8px;
  width: 40px;
}

.m-search-button:hover,
.m-search-button:focus {
  color: var(--primary-subtle-color);
  outline: 0;
}

.m-search-button .icon-search {
  font-size: 1.15rem;
}

.m-search-button__label {
  display: none;
}

/* ===== Recherche Pagefind pour le site statique ===== */
.pagefind-search-modal[hidden] {
  display: none;
}

.pagefind-search-modal {
  inset: 0;
  position: fixed;
  z-index: 1000;
}

.pagefind-search-modal__backdrop {
  background: var(--transparent-background-color);
  inset: 0;
  position: absolute;
}

.pagefind-search-modal__dialog {
  background: var(--background-color);
  border: 1px solid var(--primary-border-color);
  border-radius: 12px;
  box-shadow: 0 15px 50px rgba(0,0,0,.2);
  left: 50%;
  max-height: calc(100vh - 40px);
  max-width: 760px;
  overflow-y: auto;
  padding: 55px 24px 30px;
  position: absolute;
  top: 20px;
  transform: translateX(-50%);
  width: calc(100% - 30px);
}

.pagefind-search-modal__close {
  background: transparent;
  border: 0;
  color: var(--primary-foreground-color);
  cursor: pointer;
  font-size: 1.2rem;
  padding: 10px;
  position: absolute;
  right: 10px;
  top: 10px;
}

.pagefind-search-modal__input-wrap {
  align-items: center;
  border-bottom: 2px solid var(--primary-border-color);
  display: flex;
  gap: 12px;
}

.pagefind-search-modal__input-wrap .icon-search {
  color: #9b9b9b;
}

#pagefind-search-input {
  background: transparent;
  border: 0;
  color: var(--primary-foreground-color);
  font-size: 1.25rem;
  outline: 0;
  padding: 12px 0;
  width: 100%;
}

.pagefind-search-modal__summary {
  color: var(--titles-color);
  font-size: .9rem;
  margin: 18px 0 8px;
}

.pagefind-result {
  border-bottom: 1px solid var(--primary-border-color);
  padding: 14px 0;
}

.pagefind-result h3 {
  color: var(--titles-color);
  font-size: 1.15rem;
  margin: 0 0 6px;
}

.pagefind-result p {
  color: var(--primary-foreground-color);
  font-size: .95rem;
  line-height: 1.5;
  margin: 0;
}

@media only screen and (min-width: 48rem) {
  .pagefind-search-modal__dialog {
    padding: 65px 40px 40px;
    top: 40px;
  }
}
