.mairie-page {
  position: relative;
  background: url('images/index-fond-1920-1920.webp') center top / cover fixed no-repeat;
}

.mairie-page .book-page {
  position: relative;
  z-index: 1;
}

#accueil-evenements.mairie-page .book-page {
  display: grid;
  gap: 14px;
  min-height: auto;
  padding-top: 18px;
  padding-bottom: 28px;
  align-items: stretch;
  justify-content: center;
  justify-items: center;
  perspective: none;
}





.mairie-page .page-sheet {
  width: min(1080px, 100%);
  background: rgba(244, 242, 236, 0.16);
  border: 1px solid rgba(255, 255, 255, 0.18);
  box-shadow: 0 10px 24px rgba(0, 0, 0, 0.2);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
}

.mairie-page .mairie-panel {
  margin: 0 0 16px;
  padding: 14px;
  border: 1px solid rgba(255, 255, 255, 0.24);
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.1);
  box-shadow: 0 10px 24px rgba(0, 0, 0, 0.2);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
}

.mairie-page .page-frame {
  display: grid;
  gap: 16px;
  padding: 18px 18px 16px;
}

.mairie-page .mairie-panel:last-of-type {
  margin-bottom: 0;
}

.mairie-page .mairie-banner {
  margin: 0;
  padding: 0;
  border: 0;
  background: transparent;
  box-shadow: none;
  backdrop-filter: none;
  -webkit-backdrop-filter: none;
}

.mairie-page .mairie-panel-info {
  background: rgba(255, 255, 255, 0.11);
}

.mairie-page .mairie-top-ribbon {
  position: relative;
  z-index: 1;
  width: 100%;
  margin: 0;
  padding: 14px 24px;
  border-top: 1px solid rgba(255, 255, 255, 0.22);
  border-bottom: 1px solid rgba(255, 255, 255, 0.28);
  background: rgba(18, 22, 28, 0.48);
  color: #ffffff;
  text-align: center;
  font-weight: 700;
  letter-spacing: 0.03em;
}

/* RESET */
* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

:root {
  --p: 0;
}

body {
  font-family: Arial;
  margin: 0;
  padding: 0;
}

/* MENU */
.menu-btn {
  position: fixed;
  top: 20px;
  right: 20px;
  z-index: 100;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 62px;
  height: 62px;
  border-radius: 50%;
  border: 1px solid rgba(255, 255, 255, 0.3);
  background: rgba(20, 24, 32, 0.65);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  color: #ffffff;
  font-size: 30px;
  line-height: 1;
  text-shadow: 0 1px 4px rgba(0, 0, 0, 0.55);
  cursor: pointer;
  padding: 0;
}

.menu-btn:hover {
  background: rgba(20, 24, 32, 0.82);
}

#menu {
  position: fixed;
  top: 94px;
  right: 20px;
  background: rgba(20, 24, 32, 0.55);
  backdrop-filter: blur(18px);
  -webkit-backdrop-filter: blur(18px);
  padding: 14px;
  display: none;
  flex-direction: column;
  gap: 6px;
  min-width: 180px;
  border-radius: 10px;
  border: 1px solid rgba(255, 255, 255, 0.18);
  z-index: 100;
}

#menu.open {
  display: flex;
}
#menu a {
  color: rgba(255, 255, 255, 0.9);
  text-decoration: none;
  font-size: 1rem;
  line-height: 1.35;
  padding: 6px 4px;
  border-radius: 8px;
}

#menu a:hover {
  background: rgba(255, 255, 255, 0.1);
}

@media (max-width: 768px) {
  .menu-btn {
    top: 14px;
    right: 14px;
    width: 46px;
    height: 46px;
    font-size: 24px;
  }

  #menu {
    top: 70px;
    right: 14px;
    left: 14px;
    min-width: auto;
    width: auto;
  }
}

/* HERO ACCUEIL */
.hero {
  position: relative;
  min-height: 100vh;
  height: 100svh;
  overflow: hidden;
}

.hero::after {
  content: "";
  position: absolute;
  width: 100%;
  height: 100%;
  background: rgba(0,0,0,0.3);
  z-index: 1;
  pointer-events: none;
}

/* SLIDES */
.slides img {
  position: absolute;
  width: 100%;
  height: 100%;
  object-fit: cover;
  opacity: 0;
  animation: slideShow 24s linear infinite;
}

.slides.static img {
  opacity: 1;
  animation: none;
}

.slides .hero-mobile {
  display: none;
}

.slides img:nth-child(1) { animation-delay: 0s; }

@keyframes zoomScale {
  0% {
    transform: scale(1);
  }
  100% {
    transform: scale(1.10);
  }
}
.slides img:nth-child(2) { animation-delay: 6s; }
.slides img:nth-child(3) { animation-delay: 12s; }
.slides img:nth-child(4) { animation-delay: 18s; }

@keyframes slideShow {
  0%   { opacity: 0; transform: scale(1); }
  5%   { opacity: 1; transform: scale(1.05); }
  25%  { opacity: 1; transform: scale(1.1); }
  30%  { opacity: 0; transform: scale(1.1); }
  100% { opacity: 0; transform: scale(1); }
}

/* TEXTE ACCUEIL */
.overlay {
  position: absolute;
  inset: 0;
  width: 100%;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 10px;
  padding: 24px;
  color: white;
  text-align: center;
  z-index: 2;
}

.hero-cta {
  position: absolute;
  left: 50%;
  bottom: calc(60px + env(safe-area-inset-bottom));
  transform: translateX(-50%);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 58px;
  width: auto;
  min-width: 0;
  max-width: 220px;
  padding: 16px 24px;
  border-radius: 999px;
  border: 1px solid rgba(255, 255, 255, 0.38);
  background: rgba(255, 255, 255, 0.18);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  color: white;
  text-decoration: none;
  font-family: inherit;
  font-weight: 500;
  font-size: 1rem;
  letter-spacing: 0.01em;
  box-shadow: 0 10px 26px rgba(0, 0, 0, 0.20), 0 0 0 6px rgba(255, 255, 255, 0.08);
}

.hero-cta:hover {
  background: rgba(255, 255, 255, 0.24);
}

.hero-cover {
  position: relative;
  height: 100vh;
  height: 100svh;
}

.index-cover {
  background: #e8dcc6;
}

.next-page-preview {
  position: absolute;
  inset: 0;
  z-index: 0;
  overflow: hidden;
  background: #e8dcc6;
  opacity: clamp(0, calc((var(--p) - 0.05) * 1.25), 1);
  transition: opacity 120ms linear;
}

.next-page-preview::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(90deg, rgba(244, 235, 219, 0.56) 0%, rgba(244, 235, 219, 0.22) 48%, rgba(244, 235, 219, 0.02) 100%);
  opacity: calc(1 - (var(--p) * 0.65));
  pointer-events: none;
}

.next-page-frame {
  width: 100%;
  height: 100%;
  border: 0;
  display: block;
  pointer-events: none;
  transform: scale(calc(1.055 - (var(--p) * 0.055)));
  filter: saturate(calc(0.72 + (var(--p) * 0.34))) contrast(calc(0.88 + (var(--p) * 0.2)));
  transition: transform 120ms linear, filter 120ms linear;
}

.hero-cover:not(.is-preview-ready) .next-page-frame {
  visibility: visible;
}

.hero-cover .slides.static {
  position: absolute;
  inset: 0;
  z-index: 0;
}

.cover-rotator {
  position: absolute;
  inset: 0;
  z-index: 2;
  transform-origin: left center;
  transform-style: preserve-3d;
  backface-visibility: hidden;
  will-change: transform, opacity;
  transform: perspective(1200px) rotateY(calc(var(--p) * -15deg)) translateX(calc(var(--p) * -17%));
  opacity: clamp(0, calc(1 - (var(--p) * 1.35)), 1);
}

.cover-rotator::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(to right, rgba(0, 0, 0, 0.18), transparent 42%);
  opacity: var(--p);
  pointer-events: none;
}

.cover-rotator::before {
  content: "";
  position: absolute;
  top: 0;
  right: 0;
  width: clamp(12px, 2.2vw, 24px);
  height: 100%;
  background: linear-gradient(90deg, rgba(18, 12, 4, 0.35) 0%, rgba(18, 12, 4, 0.12) 55%, rgba(18, 12, 4, 0) 100%);
  opacity: calc(var(--p) * 0.95);
  pointer-events: none;
}

.overlay-cover {
  justify-content: flex-end;
  align-items: flex-end;
  padding: 20px;
  padding-right: max(20px, env(safe-area-inset-right));
  padding-bottom: max(20px, env(safe-area-inset-bottom));
  z-index: 3;
  pointer-events: none;
}

.overlay-cover .hero-cta {
  pointer-events: auto;
}

.book-next {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: clamp(58px, 8vw, 84px);
  height: clamp(58px, 8vw, 84px);
  border-radius: 999px;
  border: 1px solid rgba(255, 255, 255, 0.45);
  background: rgba(0, 0, 0, 0.34);
  color: #ffffff;
  text-decoration: none;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.3);
  backdrop-filter: blur(5px);
  -webkit-backdrop-filter: blur(5px);
  transition: transform 0.25s ease, background 0.25s ease;
}

.book-next span {
  font-size: clamp(2.2rem, 5.4vw, 3.4rem);
  line-height: 1;
  transform: translateX(1px);
}

.book-next:hover,
.book-next:focus-visible {
  transform: translateX(4px);
  background: rgba(0, 0, 0, 0.52);
  outline: none;
}

.book-page-body {
  min-height: 100vh;
  min-height: 100svh;
  margin: 0;
  background: radial-gradient(circle at 12% 18%, #f5efe2 0%, #ece3d1 38%, #dbcdb2 100%);
  color: #2a2114;
}

.mairie-page {
  position: relative;
  background: url('images/index-fond-1920-1920.webp') center top / cover fixed no-repeat;
}

.mairie-page .book-page {
  position: relative;
  z-index: 1;
}

#accueil-evenements.mairie-page .book-page {
  padding: 18px 0 28px;
}

.mairie-page .page-sheet {
  background: rgba(244, 242, 236, 0.16);
  border: 1px solid rgba(255, 255, 255, 0.18);
  box-shadow: 0 10px 24px rgba(0, 0, 0, 0.2);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
}

.mairie-page .mairie-panel {
  margin: 0 0 16px;
  padding: 14px;
  border: 1px solid rgba(255, 255, 255, 0.24);
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.1);
  box-shadow: 0 10px 24px rgba(0, 0, 0, 0.2);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
}

.mairie-page .page-frame {
  display: grid;
  gap: 16px;
}

.mairie-page .mairie-panel:last-of-type {
  margin-bottom: 0;
}

.mairie-page .mairie-banner {
  margin: 0;
  padding: 0;
  border: 0;
  background: transparent;
  box-shadow: none;
  backdrop-filter: none;
  -webkit-backdrop-filter: none;
}

.mairie-page .mairie-panel-links {
  padding: 12px;
}

.mairie-page .mairie-panel-info {
  background: rgba(255, 255, 255, 0.11);
}

.mairie-page .mairie-panel-links {
  background: rgba(255, 255, 255, 0.14);
}

.mairie-page .mairie-panel-events {
  background: rgba(255, 255, 255, 0.1);
}

.mairie-page .mairie-panel-links .page-links {
  margin: 0;
}

.mairie-page .mairie-panel-events .page-header {
  margin-bottom: 14px;
}

.mairie-page .mairie-panel-events .page-title {
  margin: 0;
  font-size: clamp(1.12rem, 1.9vw, 1.45rem);
  letter-spacing: 0.03em;
}

.mairie-page .mairie-panel-events .events-past-block {
  margin-top: 16px;
}

.mairie-page .mairie-panel-events .page-subheader {
  margin-bottom: 10px;
}

.mairie-page .mairie-panel-events .page-title-sub {
  font-size: clamp(1rem, 1.6vw, 1.2rem);
  opacity: 0.92;
}

.mairie-page .mairie-panel-events .book-events-list {
  gap: 12px;
}

.mairie-page .book-event-card {
  background: rgba(255, 255, 255, 0.12);
  border: 1px solid rgba(255, 255, 255, 0.2);
  box-shadow: 0 10px 24px rgba(0, 0, 0, 0.2);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
}

.mairie-page .mairie-top-ribbon {
  position: relative;
  z-index: 1;
  width: 100%;
  margin: 0;
  padding: 14px 24px;
  border-top: 1px solid rgba(255, 255, 255, 0.22);
  border-bottom: 1px solid rgba(255, 255, 255, 0.28);
  background: rgba(18, 22, 28, 0.48);
  color: #ffffff;
  text-align: center;
  font-weight: 700;
  letter-spacing: 0.03em;
  text-shadow: 0 2px 12px rgba(0, 0, 0, 0.36);
  box-shadow: 0 10px 24px rgba(0, 0, 0, 0.24), inset 0 1px 0 rgba(255, 255, 255, 0.16);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
}

.mairie-page .page-links a,
.mairie-page .page-links-btn {
  border: 1px solid rgba(255, 255, 255, 0.38);
  background: rgba(255, 255, 255, 0.18);
  box-shadow: 0 10px 26px rgba(0, 0, 0, 0.2), 0 0 0 6px rgba(255, 255, 255, 0.08);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  color: #ffffff;
}

.mairie-page .page-links a:hover,
.mairie-page .page-links a:focus-visible {
  background: rgba(255, 255, 255, 0.24);
}

.mairie-page .book-event-content {
  color: #ffffff;
  text-shadow: 0 2px 18px rgba(0, 0, 0, 0.28);
}

.mairie-page .book-event-date {
  color: rgba(255, 255, 255, 0.9);
}

.mairie-page .mairie-banner p,
.mairie-page .page-title {
  color: #ffffff;
  text-shadow: 0 2px 16px rgba(0, 0, 0, 0.26);
}

.mairie-page .card-link {
  border: 1px solid rgba(255, 255, 255, 0.38);
  background: rgba(255, 255, 255, 0.18);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
}

.mairie-page .card-link:hover,
.mairie-page .card-link:focus-visible {
  background: rgba(255, 255, 255, 0.24);
}

.book-page {
  min-height: 100vh;
  min-height: 100svh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 34px;
  perspective: 1900px;
}

.page-sheet {
  width: min(1080px, 100%);
  background: linear-gradient(180deg, #fffef9 0%, #f8f1e6 100%);
  border: 1px solid rgba(112, 88, 47, 0.2);
  border-radius: 18px;
  box-shadow: 0 24px 58px rgba(63, 44, 16, 0.23);
  overflow: hidden;
  transform-origin: left center;
}

.page-opening .page-sheet {
  animation: pageOpen 860ms cubic-bezier(0.19, 0.76, 0.2, 1) both;
}

@keyframes pageOpen {
  0% {
    opacity: 0.55;
    transform: translateX(34px) scale(0.992);
    filter: brightness(0.9) blur(1px);
  }
  100% {
    opacity: 1;
    transform: translateX(0) scale(1);
    filter: brightness(1) blur(0);
  }
}

.page-frame {
  padding: 34px 30px 28px;
}

.mairie-banner {
  margin: 0 0 18px;
  padding: 12px 14px;
  border-radius: 12px;
  border: 1px solid rgba(112, 88, 47, 0.24);
  background: rgba(245, 236, 220, 0.62);
  box-shadow: 0 8px 18px rgba(63, 44, 16, 0.08);
}

.mairie-banner p {
  margin: 0;
  color: #2a2114;
  line-height: 1.45;
  font-size: 0.95rem;
  text-align: center;
}

.mairie-banner p + p {
  margin-top: 6px;
}

.mairie-banner-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 14px;
  align-items: center;
}

.mairie-banner-text p {
  text-align: center;
}

.mairie-armoriaux {
  display: flex;
  flex-direction: row;
  align-items: center;
  gap: 8px;
  padding: 4px 8px;
}

.mairie-armoriaux img {
  width: 54px;
  height: auto;
  display: block;
  filter: drop-shadow(0 1px 3px rgba(0, 0, 0, 0.25));
}

.meteo-widget {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  min-width: 90px;
  min-height: 80px;
  padding: 0 8px;
  text-align: center;
}

.meteo-icon {
  display: block;
  width: 60px;
  height: 60px;
  margin: 0 auto -4px;
  flex-shrink: 0;
}

.meteo-icon[src=""] {
  visibility: hidden;
}

.meteo-body {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 2px;
}

.meteo-temp {
  font-size: 1.8rem;
  font-weight: 700;
  line-height: 1;
  color: #2a2114;
}

.meteo-desc {
  font-size: 0.78rem;
  color: #5a4a2a;
  text-transform: capitalize;
  line-height: 1.2;
}

.mairie-page .meteo-temp {
  color: #ffffff;
}

.mairie-page .meteo-desc {
  color: rgba(255, 255, 255, 0.85);
}

.page-links {
  margin: 0 0 16px;
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
}

.page-links a {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 52px;
  padding: 12px 18px;
  border-radius: 999px;
  border: 2px solid rgba(78, 58, 24, 0.52);
  background: rgba(110, 82, 36, 0.34);
  color: #2a2114;
  text-decoration: none;
  font-size: 1.08rem;
  font-weight: 600;
  box-shadow: 0 8px 18px rgba(63, 44, 16, 0.12);
}

.page-links a:hover,
.page-links a:focus-visible,
.page-links-btn:hover,
.page-links-btn:focus-visible {
  background: rgba(110, 82, 36, 0.46);
  transform: translateY(-1px);
  outline: none;
}

.page-links-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 52px;
  padding: 12px 18px;
  border-radius: 999px;
  border: 2px solid rgba(78, 58, 24, 0.52);
  background: rgba(110, 82, 36, 0.34);
  color: #2a2114;
  text-decoration: none;
  font-size: 1.08rem;
  font-weight: 600;
  box-shadow: 0 8px 18px rgba(63, 44, 16, 0.12);
}

.decouvrir-page .book-page,
.article-page .book-page {
  display: grid;
  gap: 14px;
  min-height: auto;
  align-items: start;
  justify-items: center;
  padding: 18px 34px 34px;
}

.decouvrir-card {
  display: flex;
  flex-direction: row-reverse;
  gap: 24px;
  align-items: flex-start;
  padding: 0;
}

.decouvrir-card-img {
  height: 200px;
  width: auto;
  border-radius: 12px;
  object-fit: cover;
  flex-shrink: 0;
}

.decouvrir-card-body {
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 12px;
  align-items: flex-start;
}

@media (max-width: 600px) {
  .decouvrir-card {
    flex-direction: column;
  }
  .decouvrir-card-img {
    width: 100%;
  }
}

.article-panel p {
  margin: 0 0 10px;
  line-height: 1.7;
  color: rgba(255,255,255,.92);
}

.article-panel a {
  color: rgba(255, 255, 255, 0.85);
  text-decoration: underline;
  text-underline-offset: 3px;
}

.article-split-video {
  height: 200px;
  width: auto;
  border-radius: 12px;
  object-fit: cover;
  flex-shrink: 0;
}

.article-video-caption {
  font-size: 0.8rem;
  opacity: 0.65;
  font-style: italic;
  margin: -6px 0 10px;
}

.article-gallery-intro {
  color: rgba(255,255,255,.92);
  opacity: 0.75;
  font-size: 0.9rem;
  margin: -6px 0 16px;
}

.article-gallery {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
  gap: 16px;
}

.article-gallery-card {
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin: 0;
}

.article-gallery-card > a {
  position: relative;
  display: block;
  border-radius: 10px;
  overflow: hidden;
  cursor: pointer;
}

.article-gallery-card img {
  width: 100%;
  aspect-ratio: 4/3;
  object-fit: cover;
  display: block;
  transition: transform 0.3s ease;
}

.article-gallery-card:hover img {
  transform: scale(1.04);
}

.article-gallery-btn {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(0, 0, 0, 0.35);
  color: #fff;
  font-size: 0.85rem;
  letter-spacing: 0.05em;
  opacity: 0;
  transition: opacity 0.2s;
}

.article-gallery-card:hover .article-gallery-btn {
  opacity: 1;
}

.article-gallery-title {
  font-weight: 600;
  font-size: 0.9rem;
  margin: 0;
  color: rgba(255, 255, 255, 0.9);
}

.article-gallery-meta {
  color: rgba(255,255,255,.92);
  font-size: 0.78rem;
  opacity: 0.6;
  margin: 0;
}

@media (max-width: 600px) {
  .article-split-video {
    width: 100%;
    height: auto;
    aspect-ratio: 16/9;
  }
  .article-gallery {
    grid-template-columns: repeat(2, 1fr);
  }
}

.panel-video {
  background: none !important;
  box-shadow: none !important;
  backdrop-filter: none !important;
  -webkit-backdrop-filter: none !important;
  border: none !important;
}

.village-video-titre {
  color: rgba(255,255,255,.92);
  font-size: clamp(1rem, 2vw, 1.15rem);
  font-weight: 700;
  letter-spacing: .03em;
  margin: 0 0 .6rem;
  padding-bottom: .6rem;
  border-bottom: 1px solid rgba(255,255,255,.18);
  text-shadow: 0 2px 8px rgba(0, 0, 0, 0.3);
}

.village-video {
  display: block;
  width: 100%;
  border-radius: 16px;
  max-height: 480px;
  object-fit: cover;
}

.carte-village-card {
  position: relative;
  min-height: 160px;
  padding: 0;
  overflow: hidden;
  background: none;
  border: none;
  box-shadow: none;
  backdrop-filter: none;
  -webkit-backdrop-filter: none;
}

#carteVillage {
  position: absolute;
  inset: 0;
  border-radius: 16px;
}

.chiffres-titre {
  font-size: 0.78rem !important;
  font-weight: 700 !important;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: rgba(255, 255, 255, 0.7) !important;
  margin-bottom: 6px !important;
}

.page-info-card {
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding: 16px 18px;
  border-radius: 16px;
  border: 1px solid rgba(255, 255, 255, 0.38);
  background: rgba(255, 255, 255, 0.18);
  box-shadow: 0 10px 26px rgba(0, 0, 0, 0.2), 0 0 0 6px rgba(255, 255, 255, 0.08);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
}

.page-info-card p {
  margin: 0;
  color: #ffffff;
  font-size: 0.9rem;
  line-height: 1.5;
  text-shadow: 0 1px 4px rgba(0, 0, 0, 0.4);
  text-align: center;
}

.page-info-card p + p {
  margin-top: 5px;
}

.mairie-date {
  font-size: 1.05rem;
  font-weight: 700;
  color: rgba(255, 255, 255, 0.95) !important;
  letter-spacing: 0.02em;
  padding-bottom: 8px;
  margin-top: -4px !important;
  margin-bottom: 3px !important;
  border-bottom: 1px solid rgba(255, 255, 255, 0.3);
  text-transform: capitalize;
}

.meteo-card {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  gap: 0;
}

.meteo-today {
  display: flex;
  flex-direction: column;
  align-items: center;
  padding-bottom: 10px;
  width: 100%;
}


.meteo-forecast {
  display: flex;
  gap: 4px;
  padding-top: 10px;
  border-top: 1px solid rgba(255, 255, 255, 0.3);
  width: 100%;
  justify-content: space-around;
}

.meteo-day {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  flex: 1;
}

.meteo-day-name {
  font-size: 0.72rem;
  color: rgba(255, 255, 255, 0.8);
  text-transform: capitalize;
  letter-spacing: 0.03em;
}

.meteo-day-icon {
  width: 40px;
  height: 40px;
  margin: -4px 0;
}

.meteo-day-temp {
  font-size: 0.95rem;
  font-weight: 700;
  color: #ffffff;
}

.page-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 18px;
}

.page-title {
  margin: 0;
  font-size: clamp(1.5rem, 3.2vw, 2.25rem);
  letter-spacing: 0.04em;
}

.page-count {
  margin: 0;
  color: rgba(76, 57, 24, 0.76);
  font-size: 0.95rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.book-events-list {
  display: grid;
  gap: 14px;
}

.book-event-card {
  display: grid;
  grid-template-columns: 210px 1fr auto;
  gap: 16px;
  align-items: center;
  padding: 14px;
  border-radius: 14px;
  border: 1px solid rgba(112, 88, 47, 0.24);
  background: rgba(255, 252, 245, 0.9);
}

.book-event-card img {
  width: 100%;
  height: 130px;
  object-fit: cover;
  border-radius: 11px;
}

.book-event-content {
  color: #2a2114;
}

.book-event-date {
  margin: 0 0 6px;
  color: rgba(72, 54, 22, 0.78);
  font-size: 0.82rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.book-event-content h2 {
  margin: 0 0 6px;
  font-size: clamp(1.08rem, 2vw, 1.35rem);
}

.book-event-content p {
  margin: 0;
  line-height: 1.5;
}

.card-link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 30px;
  height: 30px;
  border-radius: 50%;
  border: 1px solid rgba(78, 58, 24, 0.38);
  background: rgba(110, 82, 36, 0.12);
  color: #2a2114;
  text-decoration: none;
  font-size: 1.1rem;
  line-height: 1;
  transition: background 0.2s ease, transform 0.2s ease;
}

.card-link span {
  transform: translateX(1px);
}

.card-link:hover,
.card-link:focus-visible {
  background: rgba(110, 82, 36, 0.24);
  transform: translateX(3px);
  outline: none;
}

.page-nav {
  margin-top: 18px;
  display: flex;
  justify-content: flex-end;
}

.book-next.book-next-page {
  border-color: rgba(78, 58, 24, 0.45);
  background: rgba(110, 82, 36, 0.2);
  color: #2a2114;
}

.book-next.book-next-page:hover,
.book-next.book-next-page:focus-visible {
  background: rgba(110, 82, 36, 0.3);
}

.home-sections {
  background: url('images/index-fond-1920-1920.webp') center top / cover fixed no-repeat;
}

.home-next {
  padding: 56px 0;
}

.home-next-inner {
  width: 100%;
  padding: 52px 24px;
  background: rgba(244, 242, 236, 0.16);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-top: 1px solid rgba(255, 255, 255, 0.18);
  border-bottom: 1px solid rgba(255, 255, 255, 0.18);
}

.events-intro {
  max-width: 980px;
  margin: 0 auto 18px;
  padding: 0 20px;
}

.events-intro p {
  margin: 0;
  color: rgba(255, 255, 255, 0.96);
  font-size: clamp(1.05rem, 1.8vw, 1.35rem);
  font-style: italic;
  letter-spacing: 0.02em;
  text-shadow: 0 2px 16px rgba(0, 0, 0, 0.28);
}

.events-wrap {
  max-width: 980px;
  margin: 0 auto;
  padding: 0 20px;
}

.events-heading {
  margin: 0 0 18px;
  color: white;
  font-size: clamp(1.2rem, 2vw, 1.7rem);
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.event-card {
  display: flex;
  align-items: center;
  gap: 18px;
  padding: 14px;
  border-radius: 16px;
  border: 1px solid rgba(255, 255, 255, 0.2);
  background: rgba(255, 255, 255, 0.12);
  box-shadow: 0 10px 24px rgba(0, 0, 0, 0.2);
}

.event-card + .event-card {
  margin-top: 12px;
}

.event-thumb {
  width: 170px;
  height: 110px;
  object-fit: cover;
  flex: 0 0 170px;
  border-radius: 12px;
}

.event-content {
  min-width: 0;
  color: white;
  text-shadow: 0 2px 18px rgba(0, 0, 0, 0.28);
}

.event-date {
  margin: 0 0 6px;
  font-size: 0.82rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  opacity: 0.9;
}

.event-content h3 {
  margin: 0 0 6px;
  font-size: clamp(1.05rem, 1.8vw, 1.35rem);
  line-height: 1.25;
}

.event-content p {
  margin: 0;
  line-height: 1.45;
}

/* HERO PAGE (Découvrir) */
.hero-page {
  position: relative;
  height: 35vh;
  min-height: 200px;
  background: url('images/belfort_intro_1.jpg') center/cover no-repeat;
  overflow: hidden;
}

.hero-page::after {
  content: "";
  position: absolute;
  bottom: 0;
  width: 100%;
  height: 60%;
  background: linear-gradient(transparent, rgba(0,0,0,0.7));
  z-index: 1;
}

/* TEXTE PAGE */
.overlay-page {
  position: absolute;
  bottom: 20px;
  left: 20px;
  color: white;
  z-index: 2;
}

.article-hero-rubrique {
  font-size: 0.75rem;
  font-weight: 600;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  opacity: 0.75;
  margin: 0 0 6px;
}

/* BLOCS CONTENU (Découvrir : texte + image côte à côte) */
.bloc {
  display: flex;
  align-items: center;
  max-width: 1200px;
  margin: 60px auto;
  padding: 0 20px;
}

.texte {
  width: 50%;
  padding-right: 20px;
}

.image {
  width: 50%;
}

.image img {
  width: 100%;
  height: auto;
  border-radius: 8px;
}

.image-caption,
.video-caption {
  margin-top: 10px;
  color: #7f7f7f;
  font-size: 0.97rem;
  line-height: 1.5;
  font-family: inherit;
}

@media (max-width: 768px) {
  .bloc {
    flex-direction: column;
    align-items: stretch;
    margin: 32px auto;
    padding: 0 14px;
    gap: 16px;
  }

  .texte,
  .image {
    width: 100%;
    max-width: 100%;
    padding: 0;
  }

  .texte {
    line-height: 1.75;
  }

  .texte h1,
  .overlay h1 {
    font-size: clamp(1.6rem, 6vw, 2rem);
    line-height: 1.2;
  }

  .texte h2,
  .overlay-page h1 {
    font-size: clamp(1.3rem, 5vw, 1.6rem);
    line-height: 1.25;
  }

  .texte h3 {
    font-size: clamp(1.1rem, 4.4vw, 1.3rem);
    line-height: 1.3;
  }

  .texte p,
  .texte li {
    font-size: 1.04rem;
    line-height: 1.75;
  }

  .article .bloc.split {
    display: block;
    margin: 28px auto;
    padding: 0 14px 28px;
    gap: 0;
  }

  .article .bloc.split .video-top,
  .article .bloc.split .texte,
  .article .bloc.split .image {
    max-width: 100%;
    width: 100%;
    margin-bottom: 14px;
  }

  .split-heading {
    margin: 0 auto 16px;
    padding: 0 14px;
  }

  .overlay {
    padding: 0 14px;
  }

  .hero-cta {
    text-align: center;
  }

  .overlay-cover {
    padding: 14px;
    padding-right: max(14px, env(safe-area-inset-right));
    padding-bottom: max(14px, env(safe-area-inset-bottom));
  }

  .book-next {
    width: 64px;
    height: 64px;
  }

  .book-next span {
    font-size: 2.6rem;
  }

  .book-page {
    padding: 12px;
  }

  #accueil-evenements.mairie-page .book-page {
    gap: 10px;
    padding-top: 10px;
    padding-bottom: 16px;
  }

  #accueil-evenements.mairie-page .mairie-slice .page-frame {
    padding: 14px 12px;
  }

  .mairie-page {
    background-attachment: scroll;
  }

  .page-frame {
    padding: 18px 14px;
  }

  .mairie-banner {
    padding: 10px 11px;
    margin-bottom: 14px;
  }

  .mairie-page .mairie-panel {
    padding: 11px;
    margin-bottom: 12px;
  }

  .mairie-page .page-frame {
    gap: 12px;
  }

  .mairie-page .mairie-top-ribbon {
    padding: 12px 14px;
    font-size: 0.94rem;
  }

  .mairie-banner p {
    font-size: 0.9rem;
  }

  .mairie-banner-layout {
    grid-template-columns: 1fr;
    gap: 10px;
  }

  .mairie-banner-text p {
    text-align: center;
  }

  .meteo-widget {
    justify-content: center;
  }

  .page-links {
    margin-bottom: 14px;
    grid-template-columns: 1fr;
    gap: 10px;
  }

  .page-links a {
    font-size: 1rem;
    min-height: 44px;
    padding: 9px 14px;
  }

  .book-event-card {
    grid-template-columns: 1fr;
    gap: 10px;
  }

  .book-event-card img {
    height: 170px;
  }

  .home-next {
    padding: 36px 0;
  }

  .home-next-inner {
    padding: 32px 0;
  }

  .events-intro {
    margin-bottom: 14px;
    padding: 0 14px;
  }

  .events-wrap {
    padding: 0 14px;
  }

  .event-card {
    align-items: flex-start;
    gap: 12px;
    padding: 12px;
  }

  .event-thumb {
    width: 116px;
    height: 84px;
    flex-basis: 116px;
  }

  .event-content h3 {
    font-size: 1.05rem;
  }

  .event-content p {
    font-size: 0.98rem;
  }

  .home-sections {
    background-attachment: scroll;
  }

  .overlay p,
  .overlay-page p {
    font-size: 1rem;
    line-height: 1.45;
  }

  .slides .hero-desktop {
    display: none;
  }

  .slides .hero-mobile {
    display: block;
  }
}

@media (prefers-reduced-motion: reduce) {
  .cover-rotator,
  .cover-rotator::after,
  .cover-rotator::before,
  .page-opening .page-sheet {
    animation: none;
    transition: none;
  }
}

section.bloc > h2 {
  margin-top: 48px;
  margin-bottom: 16px;
}

/* BOUTON */
.btn {
  display: inline-block;
  margin-top: 15px;
  padding: 10px 20px;
  background: #2c3e50;
  color: white;
  text-decoration: none;
  border-radius: 5px;
}

/* VIDEO EN HAUT (page article) */
.video-top {
  max-width: 1200px;
  margin: 40px auto;
}

.video-top-frame {
  position: relative;
}

.video-top video {
  width: 100%;
  height: auto;
  display: block;
}

.video-inline-medium {
  max-width: 860px;
}

.video-overlay-btn {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  padding: 14px 24px;
  border: 0;
  border-radius: 999px;
  background: rgba(18, 26, 39, 0.78);
  color: #fff;
  font-size: 1rem;
  font-weight: 600;
  letter-spacing: 0.02em;
  cursor: pointer;
  box-shadow: 0 16px 36px rgba(0, 0, 0, 0.28);
  transition: opacity 0.2s ease, transform 0.2s ease, background 0.2s ease;
}

.video-overlay-btn:hover,
.video-overlay-btn:focus-visible {
  background: rgba(18, 26, 39, 0.92);
  transform: translate(-50%, -50%) scale(1.03);
}

.video-overlay-btn.is-hidden {
  opacity: 0;
  pointer-events: none;
}

@media (max-width: 768px) {
  .video-overlay-btn {
    width: calc(100% - 40px);
    max-width: 280px;
    padding: 12px 18px;
    font-size: 0.96rem;
  }
}

.video-top.video-small {
  width: 100%;
  margin: 0;
}

/* GALERIE */
.galerie-page {
  align-items: flex-start;
  padding-top: 50px;
  padding-bottom: 60px;
}

.galerie-page > .page-sheet {
  margin-left: auto;
  margin-right: auto;
}

.galerie-page > .page-sheet.gallery-sheet-first {
  margin-top: 28px;
}

.gallery-subtitle {
  margin: -10px 0 0;
  font-size: 0.95rem;
  font-style: italic;
  color: rgba(42, 33, 20, 0.6);
  text-align: center;
}

.gallery-section {
  margin-top: 2rem;
  padding: 1.15rem 1.1rem 1.25rem;
  border: 1px solid rgba(112, 88, 47, 0.2);
  border-radius: 14px;
  background: rgba(255, 252, 245, 0.64);
}


.gallery-sheet .page-frame {
  padding-top: 20px;
}

.gallery-separation-slot {
  height: clamp(20px, 3.5vw, 42px);
}

.gallery-insert {
  margin-top: 2.4rem;
  margin-bottom: 2.2rem;
}

.gallery-events-wrap {
  max-width: none;
  margin: 0;
  padding: 0;
}

.gallery-insert .event-card {
  border: 1px solid rgba(112, 88, 47, 0.25);
  background: rgba(255, 255, 255, 0.42);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  box-shadow: 0 8px 20px rgba(63, 44, 16, 0.12);
}

.gallery-insert .event-content {
  color: #2a2114;
  text-shadow: none;
}

.gallery-insert .event-date {
  color: rgba(76, 57, 24, 0.82);
  opacity: 1;
}

.gallery-insert .event-open-btn {
  border: 1px solid rgba(78, 58, 24, 0.3);
  background: rgba(110, 82, 36, 0.08);
  color: rgba(76, 57, 24, 0.9);
}

.gallery-insert .event-open-btn:hover {
  background: rgba(110, 82, 36, 0.16);
}

.gallery-section-title {
  margin: 0 0 1rem;
  font-size: clamp(0.85rem, 2vw, 1rem);
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: rgba(42, 33, 20, 0.65);
  border-bottom: 1px solid rgba(112, 88, 47, 0.22);
  padding-bottom: 0.45rem;
}

.gallery-section-intro {
  margin: 0 0 1.1rem;
  color: rgba(42, 33, 20, 0.76);
  font-size: 0.96rem;
  line-height: 1.45;
}

.gallery-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
  gap: 1.25rem;
}

.gallery-card {
  margin: 0;
  display: flex;
  flex-direction: column;
  border-radius: 12px;
  border: 1px solid rgba(112, 88, 47, 0.22);
  background: rgba(255, 252, 245, 0.9);
  overflow: hidden;
  box-shadow: 0 4px 14px rgba(63, 44, 16, 0.12);
  transition: box-shadow 0.2s ease, transform 0.2s ease;
}

.gallery-card:hover {
  box-shadow: 0 8px 24px rgba(63, 44, 16, 0.2);
  transform: translateY(-2px);
}

.gallery-card img {
  width: 100%;
  aspect-ratio: 4 / 3;
  object-fit: cover;
  cursor: zoom-in;
  display: block;
  transition: opacity 0.25s ease;
}

.gallery-card img:hover {
  opacity: 0.9;
}

.gallery-card-info {
  padding: 0.75rem 1rem 1rem;
  display: flex;
  flex-direction: column;
  gap: 0.15rem;
  flex: 1;
}

.gallery-card-title {
  margin: 0;
  font-size: 0.95rem;
  font-weight: 700;
  color: #2a2114;
}

.gallery-card-date {
  margin: 0;
  font-size: 0.8rem;
  color: rgba(72, 54, 22, 0.78);
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.gallery-card-ref {
  margin: 0.2rem 0 0;
  font-size: 0.72rem;
  color: rgba(42, 33, 20, 0.52);
  font-style: italic;
  line-height: 1.4;
}

.train-gallery-section {
  max-width: 1200px;
  margin: 18px auto 48px;
}

.gallery-toggle-btn {
  display: none; /* remplacé par .gallery-versions */
}

.gallery-versions {
  margin-top: 0.65rem;
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.gallery-ver-btn {
  display: inline-flex;
  align-items: center;
  font-size: 0.74rem;
  padding: 4px 11px;
  border-radius: 999px;
  border: 1px solid rgba(112, 88, 47, 0.36);
  background: rgba(245, 236, 218, 0.5);
  color: #4e3a18;
  cursor: pointer;
  font-family: inherit;
  transition: background 0.15s ease;
}

/* EDITEUR EVENEMENTS (sans base de donnees) */
.event-editor-page {
  padding-top: 30px;
}

.event-editor-sheet {
  width: min(1100px, 100%);
}

.event-editor-frame {
  display: grid;
  gap: 14px;
}

.event-editor-page-title {
  color: #4e3a18;
  letter-spacing: 0.07em;
  text-transform: uppercase;
  font-size: clamp(1.35rem, 2.4vw, 1.95rem);
}

.event-editor-note {
  margin: 0;
  color: rgba(42, 33, 20, 0.82);
  line-height: 1.5;
}

.event-editor-steps {
  margin: 0;
  padding-left: 20px;
  color: rgba(42, 33, 20, 0.9);
  line-height: 1.5;
}

.event-editor-form {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
}

.event-editor-form label {
  display: grid;
  gap: 6px;
  color: #4a4a4a;
  font-size: 0.94rem;
  font-weight: 500;
}

.field-index {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 1.8rem;
  height: 1.8rem;
  padding: 0 0.45rem;
  margin-right: 0.4rem;
  border-radius: 999px;
  border: 1px solid rgba(78, 58, 24, 0.34);
  background: rgba(110, 82, 36, 0.16);
  color: #4a3412;
  font-size: 0.86rem;
  font-weight: 700;
  line-height: 1;
}

.event-editor-form input,
.event-editor-form select,
.event-editor-form textarea {
  width: 100%;
  font-family: inherit;
  font-size: 1rem;
  font-weight: 400;
  padding: 10px 11px;
  border: 1px solid rgba(112, 88, 47, 0.3);
  border-radius: 10px;
  background: rgba(255, 252, 245, 0.92);
  color: #2a2114;
}

.event-editor-form textarea {
  resize: vertical;
}

.event-editor-form input[readonly] {
  background: rgba(232, 232, 232, 0.78);
  color: rgba(42, 33, 20, 0.8);
  border-color: rgba(112, 88, 47, 0.2);
}

.event-editor-form input:disabled,
.event-editor-form textarea:disabled,
.event-editor-form select:disabled,
.event-editor-locked {
  background: rgba(228, 228, 228, 0.68);
  color: rgba(42, 33, 20, 0.62);
  border-color: rgba(112, 88, 47, 0.16);
  cursor: not-allowed;
}

.event-editor-field-help {
  display: block;
  font-size: 0.88rem;
  color: rgba(42, 33, 20, 0.72);
}

.event-image-tools {
  border: 1px dashed rgba(112, 88, 47, 0.3);
  border-radius: 10px;
  background: rgba(255, 252, 245, 0.7);
  padding: 10px;
  display: grid;
  gap: 8px;
}

.event-image-tools button {
  justify-self: start;
  border: 1px solid rgba(78, 58, 24, 0.38);
  background: rgba(110, 82, 36, 0.14);
  color: #2a2114;
  border-radius: 999px;
  padding: 7px 12px;
  font: inherit;
  cursor: pointer;
}

.event-image-tools button:hover {
  background: rgba(110, 82, 36, 0.24);
}

.event-image-preview {
  width: min(240px, 100%);
  border-radius: 8px;
  border: 1px solid rgba(112, 88, 47, 0.2);
}

.event-editor-col-2 {
  grid-column: 1 / -1;
}

#articleFields {
  display: grid;
  gap: 12px;
}

#articleFields[hidden] {
  display: none;
}

.event-editor-separator {
  grid-column: 1 / -1;
  border: none;
  border-top: 2px solid rgba(112, 88, 47, 0.35);
  margin: 0.4rem 0 0.2rem;
}

.event-editor-date-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1rem;
}

.event-editor-section-intro {
  margin: 0.2rem 0 0.1rem;
  font-style: italic;
  color: rgba(112, 88, 47, 0.85);
  font-size: 0.92rem;
}

.event-editor-accordion {
  border: 1px solid rgba(112, 88, 47, 0.22);
  border-radius: 10px;
  background: rgba(255, 252, 245, 0.75);
  padding: 0;
  overflow: hidden;
}

.event-editor-accordion > summary {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 12px 14px;
  cursor: pointer;
  font-weight: 700;
  color: #2a2114;
  background: rgba(110, 82, 36, 0.12);
  border-bottom: 1px solid rgba(112, 88, 47, 0.2);
}

.event-editor-accordion > summary::-webkit-details-marker {
  display: none;
}

.event-editor-accordion > summary::after {
  content: "+";
  font-size: 1.2rem;
  line-height: 1;
  color: rgba(78, 58, 24, 0.9);
}

.event-editor-accordion[open] > summary::after {
  content: "-";
}

.event-editor-accordion-content {
  padding: 12px;
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
}

.event-editor-accordion-content .event-editor-col-2,
.event-editor-accordion-content .event-editor-preview-block,
.event-editor-accordion-content .event-editor-advanced {
  grid-column: 1 / -1;
}

.event-editor-check {
  align-items: center;
  grid-auto-flow: column;
  justify-content: start;
  gap: 8px;
}

.event-editor-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.event-editor-actions button {
  border: 1px solid rgba(78, 58, 24, 0.38);
  background: rgba(110, 82, 36, 0.14);
  color: #2a2114;
  border-radius: 999px;
  padding: 8px 14px;
  font: inherit;
  cursor: pointer;
}

.event-editor-actions button:hover {
  background: rgba(110, 82, 36, 0.24);
}

#saveEventAll {
  background: rgba(110, 82, 36, 0.22);
  border-color: rgba(78, 58, 24, 0.52);
  font-weight: 700;
  min-width: 170px;
}

#saveEventAll:disabled {
  opacity: 0.7;
  cursor: wait;
}

.event-editor-list-block {
  border: 1px solid rgba(112, 88, 47, 0.24);
  border-radius: 10px;
  background: rgba(255, 252, 245, 0.86);
  padding: 10px;
}

.event-editor-empty {
  margin: 0;
  color: rgba(42, 33, 20, 0.72);
}

.event-human-list {
  margin: 8px 0 0;
  padding: 0;
  list-style: none;
  display: grid;
  gap: 8px;
}

.event-human-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  border: 1px solid rgba(112, 88, 47, 0.22);
  border-radius: 10px;
  background: rgba(255, 255, 255, 0.78);
  padding: 8px 10px;
}

.event-human-text {
  display: grid;
  gap: 2px;
}

.event-human-text strong {
  color: #2a2114;
}

.event-human-text span {
  color: rgba(42, 33, 20, 0.76);
  font-size: 0.92rem;
}

.event-human-remove {
  border: 1px solid rgba(143, 46, 46, 0.32);
  background: rgba(179, 58, 58, 0.08);
  color: #7b1f1f;
  border-radius: 999px;
  padding: 6px 10px;
  font: inherit;
  cursor: pointer;
}

.event-human-remove:hover {
  background: rgba(179, 58, 58, 0.15);
}

.event-editor-advanced {
  border: 1px solid rgba(112, 88, 47, 0.22);
  border-radius: 10px;
  background: rgba(255, 252, 245, 0.8);
  padding: 8px 10px;
}

.event-editor-advanced > summary {
  cursor: pointer;
  font-weight: 700;
  color: #2a2114;
}

.event-editor-actions-advanced {
  margin-top: 10px;
}

.event-editor-preview,
.event-editor-json-block textarea {
  width: 100%;
  margin: 0;
  padding: 12px;
  border: 1px solid rgba(112, 88, 47, 0.28);
  border-radius: 10px;
  background: rgba(255, 252, 245, 0.95);
  color: #2a2114;
  font-family: Consolas, "Courier New", monospace;
  font-size: 0.88rem;
  line-height: 1.45;
}

.event-editor-accordion[hidden] {
  display: none;
}

.event-editor-help p {
  margin: 0;
  color: rgba(42, 33, 20, 0.78);
}

.event-editor-help p + p {
  margin-top: 6px;
}

@media (max-width: 768px) {
  .event-editor-form {
    grid-template-columns: 1fr;
  }

  .event-editor-accordion-content {
    grid-template-columns: 1fr;
  }

  .event-editor-col-2 {
    grid-column: auto;
  }

  .event-human-item {
    flex-direction: column;
    align-items: flex-start;
  }
}

.gallery-ver-btn:hover {
  background: rgba(200, 170, 118, 0.38);
}

.gallery-ver-btn.active {
  background: rgba(110, 82, 36, 0.25);
  border-color: rgba(112, 88, 47, 0.6);
  font-weight: 700;
}

/* VISIONNEUSE (Lightbox) */
.lightbox {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(18, 12, 4, 0.93);
  z-index: 200;
  align-items: center;
  justify-content: center;
  flex-direction: column;
  gap: 1rem;
  padding: 1.5rem;
  cursor: zoom-out;
}

.lightbox.open {
  display: flex;
}

.lightbox-img {
  max-width: 92vw;
  max-height: 78vh;
  object-fit: contain;
  border-radius: 6px;
  box-shadow: 0 0 60px rgba(0, 0, 0, 0.6);
  cursor: default;
}

.lightbox-caption {
  color: rgba(255, 244, 220, 0.85);
  font-size: 0.88rem;
  text-align: center;
  max-width: 640px;
  margin: 0;
  line-height: 1.5;
}

.lightbox-close {
  position: absolute;
  top: 1rem;
  right: 1.25rem;
  background: rgba(255, 255, 255, 0.12);
  border: 1px solid rgba(255, 255, 255, 0.18);
  color: white;
  font-size: 1rem;
  line-height: 1;
  cursor: pointer;
  padding: 8px 13px;
  border-radius: 8px;
  transition: background 0.15s ease;
}

.lightbox-close:hover {
  background: rgba(255, 255, 255, 0.22);
}

@media (max-width: 768px) {
  .gallery-grid {
    grid-template-columns: 1fr;
  }

  .gallery-insert {
    margin-top: 1.8rem;
    margin-bottom: 1.8rem;
  }

  .gallery-section {
    padding: 0.95rem 0.9rem 1rem;
  }

  .galerie-page > .page-sheet.gallery-sheet-first {
    margin-top: 18px;
  }

  .gallery-separation-slot {
    height: 22px;
  }

  .galerie-page {
    padding-top: 20px;
    padding-bottom: 30px;
  }
}

.video-top.video-small video {
  border-radius: 8px;
}

.article .bloc {
  display: block;
  width: 100%;
  margin: 0 auto 40px;
}

.article .bloc.split {
  display: flex;
  flex-wrap: wrap;
  gap: 32px;
  justify-content: space-between;
  max-width: 1200px;
  margin: 40px auto 40px;
  width: 100%;
  border-bottom: 1px solid rgba(0,0,0,0.15);
  padding-bottom: 40px;
}

.article .bloc.split:last-of-type {
  border-bottom: none;
}

.article .bloc.split .video-top {
  flex: 1 1 55%;
  max-width: 55%;
  margin: 0;
}

.article .bloc.split .texte,
.article .bloc.split .image {
  flex: 1 1 40%;
  max-width: 40%;
  padding: 0;
}

.article .bloc:not(.split) .texte {
  width: 100%;
  padding: 0;
  margin: 0;
  line-height: 1.7;
}

/* Bloc intro des pages historiques */
.article .bloc.split.histoire-intro {
  align-items: center;
  gap: 36px;
  border-bottom: none;
  padding-bottom: 16px;
  margin-bottom: 0;
}

.article .bloc.split.histoire-intro .image {
  flex: 0 0 48%;
  max-width: 48%;
}

.article .bloc.split.histoire-intro .image img {
  width: 100%;
  height: 320px;
  object-fit: cover;
  border-radius: 12px;
}

.article .bloc.split.histoire-intro .texte {
  flex: 1 1 0;
  max-width: none;
}

.article .bloc.split.histoire-intro .texte h1 {
  margin: 0 0 4px;
  font-size: clamp(1.5rem, 2.5vw, 2.1rem);
  line-height: 1.15;
}

.article .bloc.split.histoire-intro .texte h2 {
  margin: 0 0 12px;
  font-size: clamp(1.05rem, 1.8vw, 1.35rem);
  line-height: 1.3;
}

.article .bloc.split.histoire-intro .texte p {
  margin: 0;
  font-size: 1rem;
  line-height: 1.65;
  color: #4a3c2d;
}

@media (max-width: 768px) {
  .article .bloc.split.histoire-intro {
    flex-direction: column;
    gap: 0;
    padding: 0 0 16px;
    margin: 0 0 16px;
  }

  .article .bloc.split.histoire-intro .image,
  .article .bloc.split.histoire-intro .texte {
    flex: none;
    max-width: 100%;
    width: 100%;
  }

  .article .bloc.split.histoire-intro .image img {
    height: 220px;
    border-radius: 0;
    border-bottom-left-radius: 0;
    border-bottom-right-radius: 0;
  }

  .article .bloc.split.histoire-intro .texte {
    padding: 16px 14px 0;
  }
}

/* --- RESTAURATION ETAT ACCUEIL + HISTOIRE --- */
html.index-root {
  scrollbar-width: none;
  -ms-overflow-style: none;
}

html.index-root::-webkit-scrollbar {
  width: 0;
  height: 0;
}

.index-cover {
  overflow-y: auto;
  overflow-x: hidden;
}

.index-menu-btn {
  position: fixed;
  top: 20px;
  right: 20px;
  z-index: 100;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 62px;
  height: 62px;
  border-radius: 50%;
  border: 1px solid rgba(255, 255, 255, 0.28);
  background: rgba(255, 255, 255, 0.07);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  color: rgba(255, 255, 255, 0.88);
  cursor: pointer;
  padding: 0;
  transition: opacity 0.35s ease, transform 0.35s ease, background 0.2s ease;
  opacity: 0;
  pointer-events: none;
  transform: translateY(-8px);
}

.index-menu-btn.visible {
  opacity: 1;
  pointer-events: auto;
  transform: translateY(0);
}

.index-menu-btn:hover {
  background: rgba(255, 255, 255, 0.13);
}

.index-menu-btn svg {
  width: 22px;
  height: 22px;
  stroke: currentColor;
  stroke-width: 3.4;
  stroke-linecap: round;
  fill: none;
}

.index-menu {
  position: fixed;
  top: 74px;
  right: 20px;
  z-index: 100;
  display: flex;
  flex-direction: column;
  gap: 6px;
  min-width: 180px;
  padding: 14px;
  border-radius: 10px;
  border: 1px solid rgba(255, 255, 255, 0.18);
  background: rgba(20, 24, 32, 0.55);
  backdrop-filter: blur(18px);
  -webkit-backdrop-filter: blur(18px);
  opacity: 0;
  pointer-events: none;
  transform: translateY(-8px) scale(0.97);
  transform-origin: top right;
  transition: opacity 0.25s ease, transform 0.25s ease;
}

.index-menu.open {
  opacity: 1;
  pointer-events: auto;
  transform: translateY(0) scale(1);
}

.index-menu a {
  color: rgba(255, 255, 255, 0.9);
  text-decoration: none;
  font-size: 1rem;
  line-height: 1.35;
  padding: 6px 4px;
  border-radius: 8px;
  transition: background 0.15s ease;
}

.index-menu a:hover {
  background: rgba(255, 255, 255, 0.1);
}

.hero-cta {
  width: 84px;
  height: 84px;
  min-width: 84px;
  min-height: 84px;
  padding: 0;
  border-radius: 50%;
  border: 1px solid rgba(255, 255, 255, 0.35);
  background: rgba(255, 255, 255, 0.06);
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
  box-shadow: none;
  max-width: none;
  color: rgba(255, 255, 255, 0.9);
}

.hero-cta-icon {
  width: 34px;
  height: 34px;
  stroke: currentColor;
  stroke-width: 3.4;
  stroke-linecap: round;
  stroke-linejoin: round;
  fill: none;
}

.home-sections {
  background: url('images/index-fond-1920-1920.webp') center top / cover fixed no-repeat;
}

.home-next {
  padding: 56px 0;
}

.home-next-inner {
  width: 100%;
  padding: 52px 24px;
  background: rgba(244, 242, 236, 0.16);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-top: 1px solid rgba(255, 255, 255, 0.18);
  border-bottom: 1px solid rgba(255, 255, 255, 0.18);
}

.index-nav-band {
  display: flex;
  gap: 14px;
  justify-content: center;
  width: calc(100% - 40px);
  max-width: 940px;
  margin: 0 auto 22px;
  padding: 14px 20px;
  box-sizing: border-box;
  border-radius: 14px;
  border: 1px solid rgba(255, 255, 255, 0.18);
  background: rgba(244, 242, 236, 0.10);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
}

.index-nav-card {
  display: flex;
  flex-direction: column;
  align-items: center;
  flex: 1 1 0;
  min-width: 0;
  gap: 6px;
  padding: 12px 22px;
  border-radius: 12px;
  border: 1px solid rgba(255, 255, 255, 0.22);
  background: rgba(255, 255, 255, 0.10);
  color: rgba(255, 255, 255, 0.92);
  text-decoration: none;
  font-size: 0.9rem;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  transition: background 0.2s ease, transform 0.15s ease;
}

.index-nav-card:hover {
  background: rgba(255, 255, 255, 0.2);
  transform: translateY(-2px);
}

.index-nav-icon {
  font-size: 1.4rem;
  line-height: 1;
}

.index-nav-label {
  font-size: 0.8rem;
  letter-spacing: 0.08em;
}

.events-wrap {
  max-width: 980px;
  margin: 0 auto;
  padding: 0 20px;
}

.events-heading {
  margin: 0 0 18px;
  color: white;
  font-size: clamp(1.2rem, 2vw, 1.7rem);
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.event-card {
  display: grid;
  grid-template-columns: 170px minmax(0, 1fr) auto;
  align-items: center;
  gap: 18px;
  padding: 14px;
  border-radius: 16px;
  border: 1px solid rgba(255, 255, 255, 0.2);
  background: rgba(255, 255, 255, 0.12);
  box-shadow: 0 10px 24px rgba(0, 0, 0, 0.2);
}

.event-card + .event-card {
  margin-top: 12px;
}

.event-thumb {
  width: 170px;
  height: 110px;
  object-fit: cover;
  border-radius: 12px;
}

.event-content {
  min-width: 0;
  color: white;
  text-shadow: 0 2px 18px rgba(0, 0, 0, 0.28);
}

.event-date {
  margin: 0 0 6px;
  font-size: 0.82rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  opacity: 0.9;
}

.event-content h3 {
  margin: 0 0 6px;
  font-size: clamp(1.05rem, 1.8vw, 1.35rem);
  line-height: 1.25;
}

.event-content p {
  margin: 0;
  line-height: 1.45;
}

.event-action {
  display: flex;
  align-items: center;
  justify-content: center;
}

.event-open-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 38px;
  height: 38px;
  padding: 0;
  border-radius: 10px;
  border: 1px solid rgba(255, 255, 255, 0.3);
  background: rgba(255, 255, 255, 0.08);
  color: rgba(255, 255, 255, 0.95);
  text-decoration: none;
  transition: background 0.2s ease, transform 0.15s ease;
}

.event-open-icon {
  width: 16px;
  height: 16px;
  display: block;
  transform: rotate(-90deg);
  fill: none;
  stroke: currentColor;
  stroke-width: 3.4;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.event-open-btn:hover {
  background: rgba(255, 255, 255, 0.18);
  transform: translateY(-1px);
}

.event-media-link {
  display: block;
}

.event-image-modal {
  position: fixed;
  inset: 0;
  z-index: 210;
  display: none;
  align-items: center;
  justify-content: center;
  padding: 12px;
  background: rgba(16, 10, 3, 0.72);
}

.event-image-modal.open {
  display: flex;
}

.event-image-card {
  width: min(1280px, 98vw);
  max-height: calc(100vh - 24px);
  padding: 12px;
  box-sizing: border-box;
  position: relative;
  overflow: hidden;
  border-radius: 16px;
  border: 1px solid rgba(255, 255, 255, 0.24);
  background: rgba(245, 241, 233, 0.12);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  box-shadow: 0 18px 36px rgba(0, 0, 0, 0.35);
}

.event-image-close {
  position: absolute;
  top: 21px;
  right: 30px;
  left: auto;
  transform: none;
  z-index: 2;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 44px;
  height: 44px;
  margin: 0;
  padding: 0;
  border: 1px solid rgba(255, 255, 255, 0.28);
  border-radius: 50%;
  background: rgba(32, 25, 13, 0.42);
  backdrop-filter: blur(4px);
  -webkit-backdrop-filter: blur(4px);
  color: rgba(255, 255, 255, 0.95);
  font-size: 2rem;
  line-height: 1;
  cursor: pointer;
}

.event-image-full {
  display: block;
  width: 100%;
  max-height: calc(100vh - 52px);
  object-fit: contain;
  border-radius: 10px;
}

.event-image-caption {
  position: absolute;
  bottom: 18px;
  left: 50%;
  transform: translateX(-50%);
  max-width: min(90%, 860px);
  padding: 8px 12px;
  border-radius: 999px;
  background: rgba(16, 12, 6, 0.42);
  border: 1px solid rgba(255, 255, 255, 0.28);
  backdrop-filter: blur(12px) saturate(1.2);
  -webkit-backdrop-filter: blur(12px) saturate(1.2);
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.28), inset 0 1px 0 rgba(255, 255, 255, 0.14);
  color: rgba(255, 255, 255, 0.9);
  font-size: 0.82rem;
  font-style: italic;
  letter-spacing: 0.02em;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  text-align: center;
  pointer-events: auto;
}

.event-image-caption[hidden] {
  display: none;
}

.event-image-caption-text {
  min-width: 180px;
  padding: 6px 10px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.event-image-version-btn {
  min-width: 104px;
  padding: 7px 14px;
  border: 1px solid rgba(255, 255, 255, 0.24);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.08);
  color: rgba(255, 248, 238, 0.96);
  font: inherit;
  font-style: normal;
  letter-spacing: 0.03em;
  cursor: pointer;
  transition: background 0.18s ease, border-color 0.18s ease, transform 0.18s ease;
}

.event-image-version-btn:hover {
  background: rgba(255, 255, 255, 0.16);
  border-color: rgba(255, 255, 255, 0.36);
  transform: translateY(-1px);
}

.event-image-version-btn[hidden] {
  display: none;
}

.hero-page.hero-histoire {
  background:
    linear-gradient(90deg, rgba(255, 255, 255, 0.00) 0%, rgba(255, 255, 255, 0.00) 62%, rgba(244, 186, 86, 0.05) 82%, rgba(90, 180, 166, 0.08) 100%),
    linear-gradient(to top, rgba(12, 10, 8, 0.14), rgba(12, 10, 8, 0.02)),
    url('images/belfort-rue-de-l-eglise-reconst-color.webp') center/cover no-repeat;
}

.hero-page.hero-histoire.hero-histoire-main {
  background:
    linear-gradient(90deg, rgba(255, 255, 255, 0.00) 0%, rgba(255, 255, 255, 0.00) 62%, rgba(244, 186, 86, 0.05) 82%, rgba(90, 180, 166, 0.08) 100%),
    linear-gradient(to top, rgba(12, 10, 8, 0.14), rgba(12, 10, 8, 0.02)),
    url('images/montage-pont-moyen-age.webp') center/cover no-repeat;
}

.hero-page.hero-archives {
  background:
    linear-gradient(90deg, rgba(255, 255, 255, 0.00) 0%, rgba(255, 255, 255, 0.00) 62%, rgba(244, 186, 86, 0.05) 82%, rgba(90, 180, 166, 0.08) 100%),
    linear-gradient(to top, rgba(12, 10, 8, 0.28), rgba(12, 10, 8, 0.08)),
    url('images/belfort-rue-de-l-eglise-reconst-color.webp') center/cover no-repeat;
}

.hero-page.hero-village {
  background:
    linear-gradient(90deg, rgba(255, 255, 255, 0.00) 0%, rgba(255, 255, 255, 0.00) 62%, rgba(244, 186, 86, 0.05) 82%, rgba(90, 180, 166, 0.08) 100%),
    linear-gradient(to top, rgba(12, 10, 8, 0.26), rgba(12, 10, 8, 0.06)),
    url('images/belfort-drone-vue-generale-sud-pano.webp') center/cover no-repeat;
}

.hero-page.hero-article {
  background:
    linear-gradient(90deg, rgba(255, 255, 255, 0.00) 0%, rgba(255, 255, 255, 0.00) 62%, rgba(244, 186, 86, 0.05) 82%, rgba(90, 180, 166, 0.08) 100%),
    linear-gradient(to top, rgba(12, 10, 8, 0.26), rgba(12, 10, 8, 0.06)),
    var(--hero-img) center/cover no-repeat;
}

.hero-page.hero-decouvrir {
  background:
    linear-gradient(90deg, rgba(255, 255, 255, 0.00) 0%, rgba(255, 255, 255, 0.00) 62%, rgba(244, 186, 86, 0.05) 82%, rgba(90, 180, 166, 0.08) 100%),
    linear-gradient(to top, rgba(12, 10, 8, 0.26), rgba(12, 10, 8, 0.06)),
    url('images/defile-de-joucou-drone.webp') center/cover no-repeat;
}

.village-page-bg {
  background:
    linear-gradient(180deg, rgba(20, 16, 12, 0.28), rgba(20, 16, 12, 0.14)),
    url('images/belfort-drone-vue-generale-sud-pano.webp') center top / cover fixed no-repeat;
}

.village-page-bg .book-page {
  align-items: flex-start;
  padding-top: 42px;
  padding-bottom: 56px;
}

.village-page-bg .page-sheet {
  width: min(1120px, 100%);
}

.village-page-bg .page-frame {
  display: grid;
  gap: 16px;
  padding-top: 24px;
}

.village-page-bg .mairie-panel {
  margin: 0;
}

.village-page-bg .bloc {
  max-width: none;
  margin: 0;
  padding: 0;
  gap: 22px;
  align-items: flex-start;
}

.village-page-bg .texte,
.village-page-bg .texte h2,
.village-page-bg .texte p {
  color: #ffffff;
  text-shadow: 0 2px 14px rgba(0, 0, 0, 0.28);
}

.village-page-bg .texte {
  width: 56%;
}

.village-page-bg .image {
  width: 44%;
}

.village-page-bg .image img {
  border-radius: 12px;
  box-shadow: 0 14px 28px rgba(0, 0, 0, 0.28);
}

.village-page-bg .btn {
  border: 1px solid rgba(255, 255, 255, 0.36);
  background: rgba(255, 255, 255, 0.18);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  color: #ffffff;
  box-shadow: 0 10px 24px rgba(0, 0, 0, 0.2);
}

.village-page-bg .btn:hover,
.village-page-bg .btn:focus-visible {
  background: rgba(255, 255, 255, 0.26);
}

.histoire-page {
  background:
    radial-gradient(circle at 10% 0%, rgba(232, 198, 134, 0.34), rgba(232, 198, 134, 0) 42%),
    radial-gradient(circle at 90% 8%, rgba(144, 188, 180, 0.26), rgba(144, 188, 180, 0) 44%),
    #ddd3bf;
}

.train-article-page {
  background:
    radial-gradient(circle at 14% 8%, rgba(255, 255, 255, 0.56), rgba(255, 255, 255, 0) 42%),
    radial-gradient(circle at 86% 0%, rgba(242, 229, 204, 0.38), rgba(242, 229, 204, 0) 44%),
    linear-gradient(180deg, #f2ebde 0%, #e8dfcf 100%);
}

.histoire-main {
  padding: 10px 0 26px;
}

.histoire-page .overlay-page {
  max-width: 780px;
}

.histoire-page .overlay-page h1 {
  font-size: clamp(2rem, 5vw, 3.2rem);
  letter-spacing: 0.01em;
  margin-bottom: 6px;
  color: #fff7ea;
}

.histoire-page .overlay-page p {
  font-size: clamp(1rem, 2vw, 1.3rem);
  color: rgba(255, 245, 224, 0.95);
}

.histoire-page .histoire-bloc {
  display: grid;
  grid-template-columns: minmax(0, 1.06fr) minmax(0, 0.94fr);
  gap: 26px;
  align-items: center;
  max-width: 1240px;
  margin: 26px auto;
  padding: 24px;
  border-radius: 22px;
  border: 1px solid rgba(222, 189, 124, 0.5);
  background: linear-gradient(135deg, rgba(255, 251, 242, 0.9), rgba(247, 239, 224, 0.82));
  box-shadow: 0 18px 34px rgba(47, 34, 17, 0.08);
}

.histoire-page .histoire-bloc .texte,
.histoire-page .histoire-bloc .image {
  width: auto;
  padding: 0;
}

.histoire-page .histoire-bloc-reverse {
  grid-template-columns: minmax(0, 0.94fr) minmax(0, 1.06fr);
}

.histoire-page .histoire-bloc h2 {
  margin-top: 0;
  margin-bottom: 10px;
  color: #3d2d19;
  font-size: clamp(1.4rem, 2.2vw, 1.95rem);
}

.histoire-page .histoire-bloc p {
  color: #4a3d30;
}

.histoire-page .image img {
  border-radius: 18px;
  box-shadow: 0 14px 28px rgba(36, 26, 13, 0.16);
}

.histoire-page .btn {
  border-radius: 999px;
  background: linear-gradient(90deg, #ba6b3c, #e0a14f);
  border: 1px solid rgba(255, 247, 230, 0.72);
  color: #fff8ef;
  letter-spacing: 0.02em;
  padding: 11px 20px;
  box-shadow: 0 10px 20px rgba(122, 70, 34, 0.22);
}

.histoire-page .btn:hover {
  filter: brightness(1.08) saturate(1.04);
}

.histoire-timeline-wrap {
  max-width: 1200px;
  margin: 8px auto 24px;
  padding: 18px 20px;
  border-radius: 20px;
  border: 1px solid rgba(221, 189, 131, 0.45);
  background: linear-gradient(120deg, rgba(255, 247, 232, 0.84), rgba(238, 247, 245, 0.7));
  box-shadow: 0 12px 24px rgba(36, 28, 19, 0.07);
}

.histoire-timeline {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 14px;
  position: relative;
}

.histoire-timeline::before {
  content: "";
  position: absolute;
  left: 4px;
  right: 4px;
  top: 50%;
  height: 1px;
  background: linear-gradient(90deg, rgba(232, 166, 66, 0.0), rgba(232, 166, 66, 0.5), rgba(84, 168, 156, 0.45), rgba(84, 168, 156, 0.0));
  transform: translateY(-50%);
  pointer-events: none;
}

.histoire-step {
  position: relative;
  padding: 14px;
  border-radius: 12px;
  border: 1px solid rgba(223, 188, 118, 0.45);
  background: linear-gradient(180deg, rgba(255, 250, 241, 0.86), rgba(255, 243, 220, 0.78));
  box-shadow: 0 12px 24px rgba(41, 31, 14, 0.08);
  transition: transform 0.2s ease, box-shadow 0.2s ease, border-color 0.2s ease;
}

.histoire-step::before {
  content: "";
  position: absolute;
  top: 10px;
  right: 10px;
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: linear-gradient(180deg, #f0a93b, #5f9f92);
}

.histoire-step:hover {
  transform: translateY(-3px);
  box-shadow: 0 16px 28px rgba(41, 31, 14, 0.14);
  border-color: rgba(217, 157, 52, 0.58);
}

.histoire-step h3 {
  margin: 0 0 8px;
  font-size: 0.95rem;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  color: #58411f;
}

.histoire-step p {
  margin: 0;
  color: #3e352a;
  line-height: 1.55;
}

.histoire-callout {
  max-width: 1200px;
  margin: 26px auto 48px;
  padding: 20px;
  border-radius: 14px;
  border: 1px solid rgba(218, 177, 100, 0.45);
  background: linear-gradient(120deg, rgba(255, 244, 222, 0.92), rgba(233, 248, 245, 0.88));
  box-shadow: 0 10px 22px rgba(28, 24, 18, 0.08);
}

.histoire-callout h2 {
  margin: 0 0 8px;
  color: #3f301d;
}

.histoire-callout p {
  margin: 0;
  line-height: 1.65;
  color: #3f3b33;
}

.histoire-dossier-nav {
  max-width: 1200px;
  margin: 16px auto 26px;
  padding: 24px;
  border-radius: 18px;
  border: 1px solid rgba(236, 226, 208, 0.58);
  background: rgba(234, 224, 205, 0.56);
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
  box-shadow: 0 12px 24px rgba(34, 27, 17, 0.14);
}

.histoire-dossier-nav::before {
  content: none;
}

.histoire-dossier-head {
  margin-bottom: 16px;
}

.histoire-dossier-head h2 {
  margin: 0 0 6px;
  color: #3a2b1b;
}

.histoire-dossier-head p {
  margin: 0;
  color: #4f4337;
  line-height: 1.6;
}

.histoire-dossier-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 16px;
}

.histoire-dossier-grid-top {
  grid-template-columns: 1fr;
  margin-bottom: 14px;
}

.histoire-dossier-grid-bottom {
  margin-top: 14px;
}

.histoire-dossier-card {
  display: block;
  overflow: hidden;
  border-radius: 14px;
  border: 1px solid rgba(199, 156, 90, 0.48);
  background: rgba(246, 236, 218, 0.93);
  text-decoration: none;
  box-shadow: 0 12px 24px rgba(35, 28, 19, 0.12);
  transition: transform 0.18s ease, box-shadow 0.18s ease, border-color 0.18s ease;
}

.histoire-dossier-card:hover {
  transform: translateY(-3px);
  box-shadow: 0 14px 28px rgba(35, 28, 19, 0.1);
  border-color: rgba(204, 144, 62, 0.58);
}

.histoire-dossier-media {
  position: relative;
  height: 190px;
}

.histoire-dossier-media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.histoire-dossier-body {
  padding: 14px 16px 16px;
  border-top: 1px solid rgba(165, 123, 60, 0.4);
  background: linear-gradient(180deg, rgba(244, 233, 212, 0.94), rgba(234, 218, 187, 0.96));
}

.histoire-dossier-num {
  position: absolute;
  top: 10px;
  left: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 38px;
  height: 38px;
  border-radius: 999px;
  background: rgba(22, 18, 12, 0.52);
  color: rgba(255, 245, 225, 0.95);
  border: 1px solid rgba(255, 255, 255, 0.35);
  font-weight: 700;
  letter-spacing: 0.05em;
}

.histoire-dossier-card h3 {
  margin: 0 0 8px;
  color: #4a3520;
  font-size: 1.05rem;
}

.histoire-dossier-card p {
  margin: 0;
  color: #4a4034;
  line-height: 1.56;
}

.histoire-dossier-card-soon {
  background: linear-gradient(180deg, rgba(252, 246, 235, 0.76), rgba(243, 240, 233, 0.82));
}

.histoire-dossier-mini {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 10px;
  margin: 0;
}

.histoire-dossier-mini-title {
  margin: 2px 0 8px;
  font-size: 0.9rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: #76552e;
}

.histoire-dossier-mini-card {
  display: flex;
  align-items: center;
  gap: 8px;
  min-height: 38px;
  padding: 7px 10px;
  border-radius: 10px;
  border: 1px solid rgba(171, 125, 60, 0.44);
  background: linear-gradient(180deg, rgba(246, 233, 207, 0.94), rgba(236, 216, 180, 0.92));
  text-decoration: none;
  color: #483625;
  font-size: 0.84rem;
  line-height: 1.3;
  box-shadow: 0 4px 10px rgba(63, 44, 20, 0.08);
  transition: border-color 0.18s ease, background-color 0.18s ease, transform 0.18s ease, box-shadow 0.18s ease;
}

.histoire-dossier-mini-card:hover {
  border-color: rgba(156, 108, 43, 0.62);
  background: linear-gradient(180deg, rgba(241, 223, 190, 0.98), rgba(230, 204, 159, 0.96));
  box-shadow: 0 7px 14px rgba(63, 44, 20, 0.14);
  transform: translateY(-1px);
}

.histoire-dossier-mini-num {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 24px;
  height: 24px;
  border-radius: 999px;
  background: rgba(118, 81, 33, 0.18);
  color: #5f401f;
  font-weight: 700;
  font-size: 0.76rem;
  letter-spacing: 0.04em;
  flex: 0 0 auto;
}

.histoire-article {
  max-width: 1200px;
  margin: 18px auto 48px;
  padding: 28px;
  border-radius: 18px;
  border: 1px solid rgba(218, 177, 100, 0.38);
  background: linear-gradient(130deg, rgba(255, 251, 242, 0.94), rgba(247, 239, 224, 0.9));
  box-shadow: 0 14px 28px rgba(28, 24, 18, 0.08);
}

.histoire-article h2 {
  margin: 0 0 14px;
  color: #3a2b1b;
  font-size: clamp(1.5rem, 2.6vw, 2rem);
}

.histoire-article h3 {
  margin: 22px 0 8px;
  color: #4b3520;
  font-size: clamp(1.15rem, 2vw, 1.35rem);
}

.histoire-article h4 {
  margin: 16px 0 6px;
  color: #5a4127;
  font-size: 1rem;
  text-transform: uppercase;
  letter-spacing: 0.03em;
}

.histoire-article p {
  margin: 0 0 12px;
  color: #3f372e;
  line-height: 1.68;
}

.histoire-article ul {
  margin: 0 0 12px;
  padding-left: 20px;
  color: #3f372e;
}

.histoire-article li {
  margin: 0 0 8px;
  line-height: 1.58;
}

  .histoire-article {
    margin: 14px;
    padding: 16px;
    border-radius: 12px;
  }

@media (max-width: 768px) {
  .index-menu-btn {
    top: 14px;
    right: 14px;
    width: 46px;
    height: 46px;
  }

  .index-menu {
    top: 68px;
    right: 12px;
    left: 12px;
    min-width: auto;
    width: auto;
  }

  .index-menu a {
    font-size: 1.08rem;
    padding: 10px 4px;
  }

  .hero-cta {
    width: 64px;
    height: 64px;
    min-width: 64px;
    min-height: 64px;
  }

  .hero-cta-icon {
    width: 26px;
    height: 26px;
  }

  .index-nav-band {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 8px;
    width: calc(100% - 28px);
    max-width: none;
    margin-bottom: 14px;
    padding: 10px;
  }

  .index-nav-card {
    padding: 10px 6px;
    gap: 4px;
  }

  .index-nav-icon {
    font-size: 1.15rem;
  }

  .index-nav-label {
    font-size: 0.7rem;
    letter-spacing: 0.04em;
    text-align: center;
    line-height: 1.15;
  }

  .histoire-dossier-nav {
    margin: 14px;
    padding: 16px;
    border-radius: 12px;
  }

  .histoire-dossier-grid {
    grid-template-columns: 1fr;
    gap: 10px;
  }

  .histoire-dossier-grid-top {
    margin-bottom: 10px;
  }

  .histoire-dossier-grid-bottom {
    margin-top: 10px;
  }

  .histoire-dossier-mini {
    grid-template-columns: 1fr 1fr;
    gap: 8px;
  }

  .histoire-dossier-mini-title {
    margin: 0 0 6px;
    font-size: 0.84rem;
  }

  .histoire-dossier-mini-card {
    min-height: 40px;
    padding: 8px 10px;
    font-size: 0.9rem;
  }

  .histoire-dossier-media {
    height: 170px;
  }

  .event-card {
    grid-template-columns: 1fr;
    align-items: stretch;
    gap: 12px;
    padding: 12px;
  }

  .event-thumb {
    width: 100%;
    height: 170px;
  }

  .event-content {
    width: 100%;
  }

  .event-action {
    justify-content: flex-end;
  }

  .event-image-modal {
    padding: 4px;
  }

  .event-image-card {
    width: min(1800px, 99.2vw);
    padding: 8px;
    border-radius: 12px;
  }

  .event-image-close {
    top: 8px;
    width: 40px;
    height: 40px;
    font-size: 1.8rem;
  }

  .event-image-full {
    max-height: calc(100vh - 24px);
    border-radius: 8px;
  }

  .histoire-page .histoire-bloc,
  .histoire-page .histoire-bloc-reverse {
    grid-template-columns: 1fr;
    gap: 14px;
    margin: 18px 14px;
    padding: 14px;
    border-radius: 14px;
  }

  .histoire-page .image img {
    border-radius: 12px;
  }

  .histoire-timeline-wrap {
    margin: 4px auto 10px;
    padding: 0 14px;
    border-radius: 14px;
  }

  .histoire-timeline {
    grid-template-columns: 1fr;
    gap: 10px;
  }

  .histoire-timeline::before {
    display: none;
  }

  .histoire-step {
    padding: 12px;
  }

  .histoire-callout {
    margin: 18px 14px 30px;
    padding: 14px;
    border-radius: 12px;
  }
}

.article .texte {
  width: 100%;
  padding: 0;
  line-height: 1.7;
}

.article .texte hr {
  border: none;
  border-top: 1px solid rgba(0,0,0,0.15);
  margin: 28px 0;
}

.split-heading {
  max-width: 1200px;
  margin: 0 auto 24px;
  padding: 0 20px;
}

.section-separator {
  max-width: 1200px;
  margin: 0 auto 32px;
  border: none;
  border-top: 1px solid rgba(0,0,0,0.15);
}

.video-caption {
  margin-top: 10px;
  color: #7f7f7f;
  font-size: 0.97rem;
  line-height: 1.5;
  font-family: inherit;
}

.histoire-page .histoire-intro .article-byline-inline {
  margin: 10px 0 0;
  text-align: right;
  font-style: italic;
  font-family: inherit;
  font-size: 1rem;
  color: rgba(74, 61, 45, 0.9);
}

/* Navigation ronde entre pages historiques */
.histoire-nav-pages {
  display: flex;
  justify-content: space-between;
  align-items: center;
  max-width: 1200px;
  margin: 40px auto 56px;
  padding: 0 24px;
}

.histoire-nav-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 56px;
  height: 56px;
  border-radius: 50%;
  background: rgba(255, 251, 242, 0.92);
  border: 1.5px solid rgba(196, 155, 91, 0.48);
  box-shadow: 0 6px 18px rgba(47, 34, 17, 0.1);
  color: #5a3e1e;
  font-size: 2rem;
  line-height: 1;
  text-decoration: none;
  transition: background 0.18s ease, box-shadow 0.18s ease, transform 0.18s ease;
}

.histoire-nav-btn:hover {
  background: rgba(255, 244, 218, 0.98);
  box-shadow: 0 10px 24px rgba(47, 34, 17, 0.16);
  transform: scale(1.07);
}

.histoire-nav-home {
  font-size: 1.5rem;
}

.histoire-nav-spacer {
  width: 56px;
  height: 56px;
  flex-shrink: 0;
}

.archive-page .archive-intro {
  max-width: 1200px;
  margin: 40px auto;
  padding: 0 20px;
}

.archive-image-wrapper {
  float: right;
  margin: 0 0 20px 32px;
}

.archive-image-wrapper a {
  display: block;
}

.archive-image-wrapper img {
  width: 260px;
  height: auto;
  cursor: pointer;
  border-radius: 8px;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
  transition: opacity 0.2s ease;
  display: block;
}

.archive-image-link {
  position: relative;
  display: inline-block;
}

.archive-image-btn {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  background: rgba(26, 30, 34, 0.72);
  backdrop-filter: blur(11px) saturate(1.18);
  -webkit-backdrop-filter: blur(11px) saturate(1.18);
  color: rgba(255, 250, 240, 0.96);
  font-size: 0.82rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  padding: 6px 16px;
  border-radius: 999px;
  border: 1px solid rgba(220, 228, 235, 0.62);
  box-shadow: 0 3px 12px rgba(0, 0, 0, 0.34), inset 0 1px 0 rgba(255, 255, 255, 0.2);
  white-space: nowrap;
  pointer-events: none;
  z-index: 2;
}

.archive-image-btn::before {
  content: '';
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 220%;
  height: 320%;
  background: radial-gradient(ellipse at center, rgba(95, 95, 95, 0.3) 0%, rgba(0, 0, 0, 0) 72%);
  border-radius: 50%;
  z-index: -1;
  pointer-events: none;
}

.archive-image-link:hover .archive-image-btn {
  background: rgba(36, 41, 46, 0.78);
  box-shadow: 0 4px 14px rgba(0, 0, 0, 0.42), inset 0 1px 0 rgba(255, 255, 255, 0.24);
}

@media (max-width: 768px) {
  .archive-image-wrapper {
    float: none;
    display: flex;
    justify-content: center;
    margin: 0 0 24px 0;
  }

  .archive-image-wrapper img {
    width: 130px;
  }
}

/* Galerie Archives: les images des cartes doivent occuper toute la largeur */
.gallery-card .archive-image-wrapper {
  float: none;
  margin: 0;
}

.gallery-card .archive-image-link {
  display: block;
}

.gallery-card .archive-image-wrapper img {
  width: 100%;
  aspect-ratio: 4 / 3;
  object-fit: cover;
  border-radius: 0;
  box-shadow: none;
}

@media (max-width: 768px) {
  .gallery-card .archive-image-wrapper {
    display: block;
    margin: 0;
  }

  .gallery-card .archive-image-wrapper img {
    width: 100%;
  }

  .village-page-bg {
    background-attachment: scroll;
  }

  .village-page-bg .book-page {
    padding-top: 20px;
    padding-bottom: 30px;
  }

  .village-page-bg .page-frame {
    padding-top: 16px;
    gap: 12px;
  }

  .village-page-bg .bloc {
    gap: 14px;
  }

  .village-page-bg .texte,
  .village-page-bg .image {
    width: 100%;
  }

  .event-image-caption {
    width: calc(100% - 28px);
    border-radius: 22px;
    flex-wrap: wrap;
    gap: 8px;
  }

  .event-image-caption-text {
    order: -1;
    width: 100%;
    min-width: 0;
  }

  .event-image-version-btn {
    flex: 1 1 140px;
    min-width: 0;
  }
}

.archive-page .archive-intro .archive-transcript h2 {
  margin-top: 8px;
}

.archive-page .archive-transcript {
  line-height: 1.72;
}

.archive-page .archive-transcript h2 {
  margin: 0 0 12px;
  font-size: clamp(1.35rem, 2.2vw, 1.9rem);
  color: #3d2d1b;
}

.archive-page .archive-transcript p {
  margin: 0 0 12px;
  color: #40362c;
}

.archive-page .archive-note {
  margin-top: 18px;
  font-size: 0.95rem;
  font-style: italic;
  color: #5b4a36;
}

.archive-nav-foot {
  max-width: 1200px;
  margin: -16px auto 40px;
  padding: 0 24px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  clear: both;
}

.archive-nav-back {
  font-size: 2rem;
}

.archive-nav-next {
  font-size: 2rem;
  position: relative;
}

.archive-nav-next::after {
  content: 'Archives';
  position: absolute;
  bottom: 100%;
  right: 0;
  background: rgba(20, 12, 4, 0.88);
  color: rgba(255, 250, 240, 0.96);
  padding: 4px 10px;
  border-radius: 4px;
  font-size: 0.72rem;
  letter-spacing: 0.05em;
  white-space: nowrap;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.2s ease;
  margin-bottom: 8px;
}

.archive-nav-next:hover::after {
  opacity: 1;
}


.archive-page .archive-dating {
  margin-top: 8px;
}

.archive-page .archive-dating h3 {
  margin: 0 0 12px;
  color: #3d2d1b;
  font-size: clamp(1.25rem, 2vw, 1.6rem);
}

.archive-page .archive-dating h4 {
  margin: 18px 0 8px;
  color: #4b3520;
  font-size: 1.05rem;
}

.archive-page .archive-dating ul {
  margin: 0 0 12px;
  padding-left: 20px;
  color: #3f372e;
}

.archive-page .archive-dating li {
  margin: 0 0 6px;
  line-height: 1.58;
}

@media (max-width: 768px) {
  .histoire-page .histoire-intro .article-byline-inline {
    margin-top: 8px;
    font-size: 0.96rem;
  }

  .archive-page .archive-transcript h2 {
    margin-top: 4px;
  }

  .histoire-nav-pages {
    margin: 28px 0 40px;
    padding: 0 20px;
  }

  .histoire-nav-btn {
    width: 48px;
    height: 48px;
    font-size: 1.7rem;
  }

  .histoire-nav-home {
    font-size: 1.3rem;
  }

  .histoire-nav-spacer {
    width: 48px;
    height: 48px;
  }
}



/* ═══════════════════════════════════════════════
   CARTES VERRE DÉPOLI — modèle unifié
   ═══════════════════════════════════════════════ */

.vp-collecte-inner {
  padding: .6rem .6rem .75rem;
}

.vp-collecte-titre {
  display: flex;
  align-items: center;
  gap: .6rem;
  font-size: clamp(1rem, 2vw, 1.15rem);
  font-weight: 700;
  color: rgba(255,255,255,.92);
  letter-spacing: .03em;
  margin: 0 0 1rem;
  padding-bottom: .6rem;
  border-bottom: 1px solid rgba(255,255,255,.18);
}

.vp-collecte-titre span { font-size: 1.3em; }

.vp-collecte-grille,
.vp-grille-2 {
  display: grid;
  grid-template-columns: 1fr;
  gap: .75rem;
}

@media (min-width: 640px) {
  .vp-collecte-grille,
  .vp-grille-2 {
    grid-template-columns: 1fr 1fr;
  }
}

.vp-card {
  background: rgba(255,255,255,.11);
  border: 1px solid rgba(255,255,255,.24);
  border-radius: 12px;
  padding: .9rem 1rem;
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  min-width: 0;
  box-sizing: border-box;
}

.vp-card p {
  color: rgba(255,255,255,.92);
  margin: 0 0 .3rem;
  font-size: .9rem;
  line-height: 1.45;
}

.vp-card p:last-child { margin-bottom: 0; }

.vp-card-titre {
  font-size: .72rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .08em;
  color: rgba(255,255,255,.62);
  margin: 0 0 .6rem;
  padding-bottom: .45rem;
  border-bottom: 1px solid rgba(255,255,255,.12);
}

.vp-liste {
  display: flex;
  flex-direction: column;
  gap: .2rem;
  margin: 0;
  padding: 0;
  list-style: none;
}

.vp-item {
  display: flex;
  flex-direction: column;
  gap: .1rem;
  padding: .2rem 0;
  border-bottom: 1px solid rgba(255,255,255,.08);
}

.vp-item:last-child { border-bottom: none; }

.vp-label {
  font-size: .78rem;
  font-weight: 600;
  color: rgba(255,255,255,.65);
}

.vp-val {
  font-size: .9rem;
  color: rgba(255,255,255,.92);
  line-height: 1.45;
  word-break: break-word;
  overflow-wrap: break-word;
}

.vp-val a {
  color: rgba(255,255,255,.75);
  text-decoration: underline;
}

.vp-note {
  margin-top: .75rem;
  font-size: .8rem;
  color: rgba(255,255,255,.45);
  font-style: italic;
}

/* ── Navigation cartes-lien ── */
.nav-liens {
  display: grid;
  grid-template-columns: 1fr;
  gap: .75rem;
}

@media (min-width: 640px) {
  .nav-liens { grid-template-columns: 1fr 1fr 1fr; }
}

.nav-lien-carte {
  display: block;
  padding: .75rem 1rem;
  background: rgba(255,255,255,.11);
  border: 1px solid rgba(255,255,255,.24);
  border-radius: 12px;
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  text-decoration: none;
  text-align: center;
  font-size: 1rem;
  font-weight: 700;
  color: rgba(255,255,255,.95);
  transition: background .18s, transform .18s;
}

.nav-lien-carte:hover {
  background: rgba(255,255,255,.2);
  transform: translateY(-2px);
}

/* ── Bloc vidéo sans bordure ── */
.panel-video { padding: 4px 0 0 !important; }

.page-frame:has(.panel-video) { padding: 8px 0 0 !important; }

.page-sheet:has(.panel-video) {
  background: transparent !important;
  border-color: transparent !important;
  box-shadow: none !important;
  backdrop-filter: none !important;
  -webkit-backdrop-filter: none !important;
}

/* ── Ajustements contextuels ── */
.page-frame:has(.mairie-panel-info) { padding: .6rem; }

/* Carte événement accueil — mobile : colonne / desktop : ligne */
.event-accueil {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.event-accueil__img {
  width: 100%;
  height: 200px;
  object-fit: cover;
  border-radius: 10px;
  flex-shrink: 0;
}

.event-accueil__corps {
  flex: 1;
  min-width: 0;
}

@media (min-width: 640px) {
  .event-accueil {
    flex-direction: row;
    align-items: center;
  }
  .event-accueil__img {
    width: 200px;
    height: 130px;
  }
}

.mairie-page .card-link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 44px;
  height: 44px;
  font-size: 1.4rem;
  border-radius: 50%;
  margin-right: 10px;
  flex-shrink: 0;
  text-decoration: none;
  line-height: 1;
}
.mairie-page .card-link span {
  display: flex;
  align-items: center;
  justify-content: center;
  transform: none;
  text-decoration: none;
  border: none;
  line-height: 1;
}

#meteoWidget { padding-top: .3rem; }

@media (max-width: 768px) {
  .mairie-armoriaux { justify-content: center; width: 100%; }
}

@media (max-width: 639px) {
  .decouvrir-page .book-page,
  .article-page .book-page { padding-left: 10px; padding-right: 10px; }
}

@media (max-width: 767px) {
  .mairie-page {
    background-image: linear-gradient(rgba(0,0,0,.35), rgba(0,0,0,.35)),
                      url('images/index-fond-1920-1920.webp');
    background-attachment: scroll;
  }
}

.article-lien-ext {
  display: inline-flex;
  align-items: center;
  margin-top: .9rem;
  padding: .4rem .9rem;
  background: rgba(255,255,255,.11);
  border: 1px solid rgba(255,255,255,.28);
  border-radius: 20px;
  color: rgba(160,210,255,.95);
  text-decoration: none;
  font-size: .88rem;
  font-weight: 600;
  letter-spacing: .02em;
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  transition: background .18s, transform .18s;
}

.article-lien-ext:hover {
  background: rgba(255,255,255,.2);
  transform: translateX(3px);
}

.vp-collecte-inner .page-title {
  font-size: clamp(1rem, 2vw, 1.15rem);
  font-weight: 700;
  color: rgba(255,255,255,.92);
  letter-spacing: .03em;
  margin: 0 0 1rem;
  padding-bottom: .6rem;
  border-bottom: 1px solid rgba(255,255,255,.18);
}

/* ── Vidéo custom player ── */
.video-wrapper {
  position: relative;
  cursor: pointer;
  border-radius: 16px;
  overflow: hidden;
  line-height: 0;
}

.video-play-btn {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(0,0,0,.3);
  border: none;
  cursor: pointer;
  transition: background .2s;
  width: 100%;
}

.video-play-btn:hover { background: rgba(0,0,0,.45); }

.video-play-btn.hidden { display: none; }

/* Masquer la barre du bas vidéo sur mobile, garder le bouton play central */
@media (max-width: 640px) {
  .village-video::-webkit-media-controls-enclosure { display: none !important; }
  .village-video::-webkit-media-controls-overlay-play-button { display: block !important; }
}

/* Poster vidéo cliquable */
.video-poster-wrap {
  position: relative;
  line-height: 0;
  border-radius: 16px;
  overflow: hidden;
  cursor: pointer;
}

.video-poster-play {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  background: transparent;
  border: none;
  cursor: pointer;
  width: 100%;
}

.video-poster-play svg { width: 72px; height: 72px; }
