:root {
  --chrome-paper: #f4f0e7;
  --chrome-sage: #9fb7a9;
  --chrome-gold-light: #f0d49b;
  --chrome-max: 1240px;
}

/* Header public partagé — même direction visuelle que l'accueil. */
.site-header.topbar {
  position: fixed;
  inset: 0 0 auto;
  z-index: 80;
  display: grid;
  align-items: center;
  min-height: 82px;
  grid-template-columns: auto 1fr auto;
  gap: 30px;
  padding: 12px max(24px, calc((100vw - var(--chrome-max)) / 2));
  border-bottom: 1px solid rgba(255,255,255,.07);
  background: rgba(6,15,12,.82);
  box-shadow: none;
  backdrop-filter: blur(22px) saturate(125%);
  animation: none;
  font-size: 18px;
}
.site-header.topbar::after { display: none; }
.site-header .nav-toggle { display: none; }
.site-header .brand-text { display: flex; flex-direction: column; }
.site-header .brand-text { min-width: 240px; grid-column: 1; grid-row: 1; gap: 0; padding-left: 58px; }
.site-header .brand-title {
  color: var(--chrome-paper);
  background: none;
  font-family: Georgia, "Times New Roman", serif;
  font-size: 1.25rem;
  font-weight: 500;
  letter-spacing: -.02em;
}
.site-header .brand-sub {
  color: var(--chrome-sage);
  font-size: .66rem;
  font-weight: 700;
  letter-spacing: .16em;
  text-transform: uppercase;
}
.site-header .brand-logo { display: flex; align-items: center; grid-column: 1; grid-row: 1; justify-self: start; }
.site-header .logo {
  display: block;
  width: 44px;
  height: 44px;
  border: 1px solid rgba(215,173,98,.38);
  border-radius: 50%;
  object-fit: cover;
  box-shadow: 0 8px 26px rgba(0,0,0,.35);
}
.site-header .nav { display: flex; grid-column: 2 / 4; grid-row: 1; justify-content: flex-end; gap: 5px; overflow: visible; }
.site-header .nav .nav-ico {
  width: auto;
  height: 42px;
  min-width: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0 15px;
  flex-direction: row;
  gap: 7px;
  border: 1px solid transparent;
  border-radius: 999px;
  color: #c8d2cd;
  background: transparent;
  box-shadow: none;
}
.site-header .nav .nav-ico::after { display: none; }
.site-header .nav .nav-ico svg {
  width: 16px;
  height: 16px;
  padding: 0;
  border-radius: 0;
  background: none;
  box-shadow: none;
  opacity: .72;
}
.site-header .nav-label { color: inherit; font-size: .7rem; letter-spacing: .04em; }
.site-header .nav-ico svg,
.site-footer .bottom-ico svg,
#fabTestimonials.t-fab svg { display: block; fill: currentColor; }
.site-header .nav-label,
.site-footer .bottom-text { font-weight: 800; }
.site-header .nav .nav-ico:hover,
.site-header .nav .nav-ico[aria-current="page"] {
  color: var(--chrome-paper);
  border-color: rgba(215,173,98,.25);
  background: rgba(215,173,98,.09);
  box-shadow: none;
  transform: none;
}

/* Footer flottant partagé — même composant que sur l'accueil. */
.site-footer.footer {
  position: fixed;
  z-index: 90;
  width: min(680px, calc(100% - 32px));
  left: 50%;
  right: auto;
  bottom: 12px;
  transform: translateX(-50%);
  padding: 8px;
  border: 1px solid rgba(215,173,98,.16);
  border-radius: 20px;
  background: rgba(7,18,14,.9);
  box-shadow: 0 20px 60px rgba(0,0,0,.5);
  backdrop-filter: blur(22px) saturate(125%);
  font-size: 18px;
}
.site-footer.footer::before { display: none; }
.site-footer .bottom-nav { display: flex; justify-content: space-between; max-width: none; margin: 0 auto; gap: 5px; }
.site-footer .bottom-link,
.site-footer .bottom-link--primary,
.site-footer .bottom-link--accent {
  min-height: 54px;
  display: inline-flex;
  flex: 1 1 0;
  min-width: 0;
  align-items: center;
  justify-content: center;
  flex-direction: column;
  gap: 6px;
  padding: 7px 10px;
  border: 1px solid transparent;
  border-radius: 14px;
  color: #8fa198;
  background: transparent;
  box-shadow: none;
}
.site-footer .bottom-link:hover,
.site-footer .bottom-link--primary:hover,
.site-footer .bottom-link--accent:hover {
  color: var(--chrome-paper);
  border-color: rgba(215,173,98,.18);
  background: rgba(215,173,98,.07);
  box-shadow: none;
  transform: none;
}
.site-footer .bottom-link--primary { color: var(--chrome-gold-light); background: rgba(215,173,98,.08); }
.site-footer .bottom-ico svg { width: 17px; height: 17px; }
.site-footer .bottom-text,
.site-footer .bottom-text--compact { font-size: .59rem; letter-spacing: .025em; }
#fabTestimonials.t-fab {
  position: fixed;
  z-index: 95;
  display: inline-flex;
  align-items: center;
  gap: 10px;
  right: 18px;
  left: auto;
  bottom: 24px;
  padding: 11px 14px;
  border-color: rgba(215,173,98,.25);
  color: var(--chrome-gold-light);
  background: rgba(7,18,14,.9);
  box-shadow: 0 16px 40px rgba(0,0,0,.35);
  font-size: 18px;
}
#fabTestimonials.t-fab svg { width: 18px; }
#fabTestimonials.t-fab span { font-size: .66rem; }

@media (max-width: 1050px) {
  .site-header .nav .nav-ico { padding: 0 10px; }
  .site-header .nav-label { display: none; }
}

@media (max-width: 820px) {
  body.bg { padding-top: 68px; }
  .site-header.topbar { min-height: 68px; grid-template-columns: 46px 1fr auto; gap: 10px; padding: 10px 14px; }
  .site-header .nav-toggle {
    display: grid;
    place-items: center;
    width: 42px;
    height: 42px;
    border: 1px solid rgba(215,173,98,.18);
    border-radius: 12px;
    color: var(--chrome-paper);
    background: rgba(255,255,255,.035);
    box-shadow: none;
  }
  .site-header .nav-toggle svg { width: 20px; fill: var(--chrome-paper); }
  .site-header .brand-logo { grid-column: 3; }
  .site-header .brand-text { grid-column: 2; padding: 0; min-width: 0; }
  .site-header .brand-title { font-size: 1.05rem; }
  .site-header .brand-sub { font-size: .54rem; }
  .site-header .logo { width: 40px; height: 40px; }
  .site-header .nav {
    position: fixed;
    left: 12px;
    right: 12px;
    top: 76px;
    display: none;
    grid-template-columns: repeat(2, minmax(0,1fr));
    gap: 6px;
    width: auto;
    padding: 10px;
    border: 1px solid rgba(215,173,98,.17);
    border-radius: 18px;
    background: rgba(7,18,14,.97);
    box-shadow: 0 24px 60px rgba(0,0,0,.5);
  }
  .site-header .nav.nav--open { display: grid; }
  .site-header .nav.is-open { display: grid; }
  .site-header .nav .nav-ico { width: 100%; height: 48px; justify-content: flex-start; padding: 0 14px; }
  .site-header .nav-label { display: inline; }
  #fabTestimonials.t-fab { display: none; }
}

@media (max-width: 580px) {
  .site-footer.footer { bottom: 8px; width: calc(100% - 16px); }
  .site-footer .bottom-nav { display: grid; grid-template-columns: repeat(6, minmax(0,1fr)); width: 100%; }
  .site-footer .bottom-link { min-width: 0; padding: 5px 2px; }
  .site-footer .bottom-text,
  .site-footer .bottom-text--compact { font-size: .52rem; }
}

/* ================================================================
   Navigation & dock — finition premium 2026
   ================================================================ */
.site-header.topbar {
  grid-template-columns: minmax(260px, auto) minmax(0, 1fr) 46px;
  isolation: isolate;
}
.site-header.topbar::before {
  content: "";
  position: absolute;
  inset: auto 0 0;
  height: 1px;
  background: linear-gradient(90deg, transparent, rgba(240,212,155,.38), transparent);
  pointer-events: none;
}
.site-header .nav-toggle {
  position: relative;
  display: grid;
  place-items: center;
  grid-column: 3;
  grid-row: 1;
  width: 42px;
  height: 42px;
  padding: 0;
  border: 1px solid rgba(215,173,98,.2);
  border-radius: 14px;
  color: var(--chrome-paper);
  background: linear-gradient(145deg, rgba(255,255,255,.055), rgba(215,173,98,.035));
  box-shadow: inset 0 1px rgba(255,255,255,.05), 0 10px 30px rgba(0,0,0,.16);
  cursor: pointer;
  transition: border-color .2s ease, background .2s ease, transform .2s ease;
}
.site-header .nav-toggle:hover {
  border-color: rgba(240,212,155,.48);
  background: rgba(215,173,98,.09);
  transform: translateY(-1px);
}
.site-header .nav-toggle svg { width: 19px; height: 19px; fill: currentColor; transition: transform .25s ease; }
.site-header .nav-toggle[aria-expanded="false"] svg { transform: rotate(90deg) scale(.88); }
.site-header .nav { grid-column: 2; padding-right: 12px; }
.site-header .nav .nav-ico {
  position: relative;
  isolation: isolate;
  transition: color .2s ease, border-color .2s ease, background .2s ease, transform .2s ease;
}
.site-header .nav .nav-ico::before {
  content: "";
  position: absolute;
  inset: 5px;
  z-index: -1;
  border-radius: inherit;
  opacity: 0;
  background: radial-gradient(circle at 50% 0, rgba(240,212,155,.15), transparent 72%);
  transition: opacity .2s ease;
}
.site-header .nav .nav-ico:hover::before,
.site-header .nav .nav-ico[aria-current="page"]::before { opacity: 1; }
.site-header .nav.nav--collapsed { gap: 3px; }
.site-header .nav.nav--collapsed .nav-ico { width: 40px; height: 40px; padding: 0; }

.site-footer.footer {
  width: min(760px, calc(100% - 36px));
  bottom: 16px;
  padding: 7px;
  border-color: rgba(240,212,155,.22);
  border-radius: 23px;
  background:
    linear-gradient(180deg, rgba(13,31,23,.94), rgba(5,16,12,.965)),
    rgba(7,18,14,.94);
  box-shadow: 0 24px 80px rgba(0,0,0,.55), inset 0 1px rgba(255,255,255,.045), 0 0 0 1px rgba(0,0,0,.2);
}
.site-footer.footer::after {
  content: "";
  position: absolute;
  top: -1px;
  left: 12%;
  right: 12%;
  height: 1px;
  background: linear-gradient(90deg, transparent, rgba(240,212,155,.7), transparent);
}
.site-footer .bottom-nav { align-items: center; gap: 4px; }
.site-footer .bottom-link,
.site-footer .bottom-link--primary,
.site-footer .bottom-link--accent {
  position: relative;
  min-height: 58px;
  gap: 4px;
  overflow: visible;
  border-radius: 17px;
  transition: color .2s ease, border-color .2s ease, background .2s ease, transform .2s ease;
}
.site-footer .bottom-link:not(:last-child)::after {
  content: "";
  position: absolute;
  top: 17px;
  right: -3px;
  width: 1px;
  height: 24px;
  background: linear-gradient(transparent, rgba(255,255,255,.08), transparent);
}
.site-footer .bottom-link:hover { transform: translateY(-2px); }
.site-footer .bottom-link[aria-current="page"],
.site-footer .bottom-link--primary {
  color: var(--chrome-gold-light);
  border-color: rgba(240,212,155,.16);
  background: linear-gradient(145deg, rgba(240,212,155,.13), rgba(215,173,98,.045));
  box-shadow: inset 0 1px rgba(255,255,255,.04);
}
.site-footer .bottom-link--donate {
  color: #142019;
  border-color: rgba(240,212,155,.9);
  background: linear-gradient(135deg, #f1d79f, #d8ad61);
  box-shadow: 0 10px 28px rgba(215,173,98,.18), inset 0 1px rgba(255,255,255,.42);
}
.site-footer .bottom-link--donate:hover { color: #0c1812; background: linear-gradient(135deg, #f6e1b3, #dfb86f); }
.site-footer .bottom-ico {
  display: grid;
  place-items: center;
  width: 25px;
  height: 25px;
  border-radius: 9px;
  background: rgba(255,255,255,.035);
}
.site-footer .bottom-link--donate .bottom-ico { background: rgba(9,22,15,.1); }
.site-footer .bottom-ico svg { width: 16px; height: 16px; }
.site-footer .bottom-text,
.site-footer .bottom-text--compact { font-size: .57rem; font-weight: 850; letter-spacing: .045em; }
#fabTestimonials.t-fab {
  min-height: 48px;
  padding-inline: 16px;
  border-radius: 16px;
  background: linear-gradient(145deg, rgba(14,34,25,.96), rgba(5,17,12,.96));
}

@media (max-width: 1120px) {
  .site-header.topbar { grid-template-columns: minmax(240px, auto) minmax(0, 1fr) 44px; }
  .site-header .nav .nav-ico { padding-inline: 10px; }
  .site-header .nav-label { display: none; }
}

@media (max-width: 820px) {
  .site-header.topbar {
    grid-template-columns: 46px minmax(0,1fr) auto;
    background: rgba(5,15,11,.985);
    backdrop-filter: none;
  }
  .site-header .nav-toggle { grid-column: 1; width: 42px; height: 42px; }
  .site-header .nav-toggle[aria-expanded="false"] svg { transform: none; }
  .site-header .nav-toggle[aria-expanded="true"] svg { transform: rotate(90deg); }
  .site-header .nav {
    top: 78px;
    grid-column: auto;
    grid-row: auto;
    grid-template-columns: repeat(2, minmax(0,1fr));
    gap: 9px;
    padding: 58px 12px 12px;
    overflow: hidden;
    border-color: rgba(240,212,155,.22);
    border-radius: 24px;
    background:
      radial-gradient(circle at 90% 0, rgba(215,173,98,.13), transparent 18rem),
      rgba(5,17,12,.985);
    box-shadow: 0 28px 90px rgba(0,0,0,.68), inset 0 1px rgba(255,255,255,.04);
  }
  .site-header .nav::before {
    content: "EXPLORER LA MARCHE AVEC DIEU";
    position: absolute;
    top: 20px;
    left: 22px;
    color: var(--chrome-gold-light);
    font-size: .58rem;
    font-weight: 900;
    letter-spacing: .16em;
  }
  .site-header .nav .nav-ico {
    min-height: 84px;
    height: auto;
    display: grid;
    grid-template-columns: 36px minmax(0,1fr);
    grid-template-rows: auto auto;
    column-gap: 10px;
    align-content: center;
    justify-content: stretch;
    padding: 13px;
    border-color: rgba(255,255,255,.065);
    border-radius: 17px;
    color: #d9e1dc;
    background: rgba(255,255,255,.026);
    text-align: left;
  }
  .site-header .nav .nav-ico:hover,
  .site-header .nav .nav-ico[aria-current="page"] {
    border-color: rgba(240,212,155,.3);
    background: linear-gradient(145deg, rgba(240,212,155,.11), rgba(255,255,255,.025));
  }
  .site-header .nav .nav-ico svg {
    grid-row: 1 / 3;
    width: 34px;
    height: 34px;
    padding: 9px;
    border: 1px solid rgba(240,212,155,.14);
    border-radius: 12px;
    color: var(--chrome-gold-light);
    background: rgba(215,173,98,.055);
    opacity: 1;
  }
  .site-header .nav-label { display: block; align-self: end; font-size: .72rem; }
  .site-header .nav .nav-ico::after {
    display: block;
    position: static;
    inset: auto;
    grid-column: 2;
    grid-row: 2;
    align-self: start;
    overflow: hidden;
    opacity: 1;
    color: #83968c;
    background: none;
    transform: none;
    font-size: .51rem;
    font-weight: 600;
    line-height: 1.25;
    text-overflow: ellipsis;
    white-space: nowrap;
  }
  .site-header .nav .nav-ico[href$="index.php"]::after { content: "Votre espace principal"; }
  .site-header .nav .nav-ico[href*="category.php"]::after { content: "Tous les thèmes"; }
  .site-header .nav .nav-ico[href*="evangelisation"]::after { content: "Partager la Bonne Nouvelle"; }
  .site-header .nav .nav-ico[href*="enseignement"]::after { content: "Grandir dans la Parole"; }
  .site-header .nav .nav-ico[href*="annonces.php"]::after { content: "Actualités de la communauté"; }
  .site-header .nav .nav-ico[href*="/annonces/public"]::after { content: "Services et opportunités"; }
  .site-footer.footer { bottom: max(8px, env(safe-area-inset-bottom)); width: calc(100% - 16px); padding: 6px; border-radius: 20px; }
  .site-footer .bottom-nav { display: grid; grid-template-columns: repeat(6,minmax(0,1fr)); }
  .site-footer .bottom-link,
  .site-footer .bottom-link--primary,
  .site-footer .bottom-link--accent { min-height: 62px; padding: 6px 2px; border-radius: 15px; }
  .site-footer .bottom-link:not(:last-child)::after { display: none; }
  .site-footer .bottom-link--donate { transform: none; }
  .site-footer .bottom-ico { width: 28px; height: 28px; }
  .site-footer .bottom-text,
  .site-footer .bottom-text--compact { font-size: .5rem; }
}

@media (max-width: 440px) {
  .site-header .brand-title { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
  .site-header .nav { grid-template-columns: minmax(0,1fr); max-height: calc(100vh - 92px); overflow-y: auto; }
  .site-header .nav .nav-ico { min-height: 72px; }
}

@media (prefers-reduced-motion: reduce) {
  .site-header .nav-toggle,
  .site-header .nav .nav-ico,
  .site-footer .bottom-link { transition: none; }
}

/* Desktop: actions indépendantes, sans barre de fond. Mobile inchangé. */
@media (min-width: 821px) {
  .site-footer.footer {
    width: calc(100% - 36px);
    max-width: none;
    bottom: 18px;
    padding: 0;
    border: 0;
    border-radius: 0;
    background: transparent;
    box-shadow: none;
    backdrop-filter: none;
    pointer-events: none;
  }
  .site-footer.footer::after { display: none; }
  .site-footer .bottom-nav {
    width: 100%;
    max-width: none;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: clamp(14px, 2vw, 32px);
  }
  .site-footer .bottom-link,
  .site-footer .bottom-link--primary,
  .site-footer .bottom-link--accent {
    min-width: 128px;
    min-height: 50px;
    flex: 0 0 auto;
    flex-direction: row;
    gap: 9px;
    padding: 8px 16px;
    overflow: hidden;
    border: 1px solid rgba(240,212,155,.16);
    border-radius: 16px;
    color: #a9b8b0;
    background: linear-gradient(145deg, rgba(12,31,22,.94), rgba(5,17,12,.96));
    box-shadow: 0 14px 38px rgba(0,0,0,.34), inset 0 1px rgba(255,255,255,.045);
    backdrop-filter: blur(18px) saturate(120%);
    pointer-events: auto;
  }
  .site-footer .bottom-link::before {
    content: "";
    position: absolute;
    inset: 0;
    border-radius: inherit;
    opacity: 0;
    background: radial-gradient(circle at 50% 0, rgba(240,212,155,.16), transparent 70%);
    transition: opacity .2s ease;
  }
  .site-footer .bottom-link:hover::before,
  .site-footer .bottom-link[aria-current="page"]::before { opacity: 1; }
  .site-footer .bottom-link:not(:last-child)::after { display: none; }
  .site-footer .bottom-link:hover {
    color: var(--chrome-paper);
    border-color: rgba(240,212,155,.34);
    transform: translateY(-3px);
    box-shadow: 0 18px 44px rgba(0,0,0,.42), inset 0 1px rgba(255,255,255,.06);
  }
  .site-footer .bottom-link[aria-current="page"],
  .site-footer .bottom-link--primary {
    color: var(--chrome-gold-light);
    border-color: rgba(240,212,155,.3);
    background: linear-gradient(145deg, rgba(42,50,29,.96), rgba(8,25,16,.97));
  }
  .site-footer .bottom-link--donate {
    min-width: 138px;
    color: #102018;
    border-color: #efd49a;
    background: linear-gradient(135deg, #f3daa4, #d6a95b);
    box-shadow: 0 15px 38px rgba(215,173,98,.24), inset 0 1px rgba(255,255,255,.46);
  }
  .site-footer .bottom-ico {
    position: relative;
    z-index: 1;
    width: 30px;
    height: 30px;
    flex: 0 0 30px;
    border: 1px solid rgba(255,255,255,.045);
    border-radius: 10px;
    background: rgba(255,255,255,.04);
  }
  .site-footer .bottom-link--donate .bottom-ico { border-color: rgba(10,25,17,.08); background: rgba(10,25,17,.1); }
  .site-footer .bottom-ico svg { width: 15px; height: 15px; }
  .site-footer .bottom-text,
  .site-footer .bottom-text--compact {
    position: relative;
    z-index: 1;
    font-size: .61rem;
    letter-spacing: .055em;
  }
  #fabTestimonials.t-fab { display: none; }
}

/* Desktop: rail circulaire centré à l'extrême droite. */
@media (min-width: 821px) {
  .site-footer.footer {
    top: 50%;
    right: 18px;
    bottom: auto;
    left: auto;
    width: 58px;
    transform: translateY(-50%);
  }
  .site-footer .bottom-nav {
    width: 58px;
    display: flex;
    flex-direction: column;
    justify-content: center;
    gap: 11px;
  }
  .site-footer .bottom-link,
  .site-footer .bottom-link--primary,
  .site-footer .bottom-link--accent,
  .site-footer .bottom-link--donate {
    width: 54px;
    min-width: 54px;
    height: 54px;
    min-height: 54px;
    flex: 0 0 54px;
    padding: 0;
    overflow: visible;
    border-radius: 50%;
  }
  .site-footer .bottom-link:hover { transform: translateX(-4px) scale(1.04); }
  .site-footer .bottom-ico,
  .site-footer .bottom-link--donate .bottom-ico {
    width: 100%;
    height: 100%;
    flex: 0 0 100%;
    border: 0;
    border-radius: 50%;
    background: transparent;
  }
  .site-footer .bottom-ico svg { width: 19px; height: 19px; }
  .site-footer .bottom-text,
  .site-footer .bottom-text--compact {
    position: absolute;
    top: 50%;
    right: 66px;
    z-index: 4;
    min-width: max-content;
    padding: 8px 11px;
    opacity: 0;
    visibility: hidden;
    border: 1px solid rgba(240,212,155,.18);
    border-radius: 10px;
    color: var(--chrome-paper);
    background: rgba(5,17,12,.97);
    box-shadow: 0 12px 32px rgba(0,0,0,.4);
    transform: translate(8px,-50%);
    transition: opacity .18s ease, visibility .18s ease, transform .18s ease;
    pointer-events: none;
  }
  .site-footer .bottom-link:hover .bottom-text,
  .site-footer .bottom-link:focus-visible .bottom-text {
    opacity: 1;
    visibility: visible;
    transform: translate(0,-50%);
  }
}

@media (min-width: 821px) and (max-height: 690px) {
  .site-footer .bottom-nav { gap: 7px; }
  .site-footer .bottom-link,
  .site-footer .bottom-link--primary,
  .site-footer .bottom-link--accent,
  .site-footer .bottom-link--donate {
    width: 46px;
    min-width: 46px;
    height: 46px;
    min-height: 46px;
    flex-basis: 46px;
  }
  .site-footer .bottom-ico svg { width: 17px; height: 17px; }
}

@media (max-width: 360px) {
  .site-footer.footer { width: calc(100% - 10px); padding-inline: 3px; }
  .site-footer .bottom-nav { gap: 1px; }
  .site-footer .bottom-link,
  .site-footer .bottom-link--primary,
  .site-footer .bottom-link--accent { padding-inline: 0; }
  .site-footer .bottom-text,
  .site-footer .bottom-text--compact { font-size: .45rem; letter-spacing: 0; }
}
