:root {
  --blue: #093d83;
  --blue-deep: #072e5b;
  --ink: #1c2430;
  --paper: #f4f6f8;
  --header-offset: 8.5rem;
  --shadow: 0 10px 30px rgba(9, 61, 131, 0.12);
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  padding: 0;
  font-family: "Source Sans 3", "Segoe UI", sans-serif;
  color: var(--ink);
  background: var(--paper);
  line-height: 1.65;
}

img {
  max-width: 100%;
}

.leaflet-container img {
  max-width: none;
}

#block1,
#photostitle,
#title {
  scroll-margin-top: var(--header-offset);
}

#contact,
#carte,
#photos,
#map {
  scroll-margin-top: calc(var(--header-offset) + 3.6rem);
}

/* Header */
#entete {
  position: sticky;
  top: 0;
  z-index: 1000;
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  grid-template-areas:
    "logo title burger"
    "logo nav burger";
  align-items: center;
  column-gap: 0.75rem;
  row-gap: 0.15rem;
  width: 100%;
  min-height: 128px;
  margin: 0;
  padding: 0.55rem 1.25rem 0.45rem;
  background: var(--blue);
  box-shadow: 0 2px 14px rgba(0, 0, 0, 0.18);
}

#entete h1 {
  grid-area: title;
  grid-column: 1 / -1;
  width: 100%;
  margin: 0;
  padding-inline: clamp(15.5rem, 27vw, 17rem);
  color: white;
  text-align: center;
  font-size: clamp(1.2rem, 2.5vw, 1.95rem);
  font-weight: 700;
  line-height: 1.2;
  letter-spacing: 0.01em;
}

#entete img {
  grid-area: logo;
  float: none;
  width: auto;
  height: 112px;
  max-width: min(230px, 26vw);
  object-fit: contain;
  object-position: left center;
}

#entete > nav,
#entete > menu {
  grid-area: nav;
  grid-column: 1 / -1;
  min-width: 0;
}

#hamburger {
  grid-area: burger;
  display: none;
  align-items: center;
  justify-content: center;
  flex-direction: column;
  gap: 5px;
  width: 44px;
  height: 44px;
  margin: 0;
  padding: 0;
  border: 0;
  border-radius: 10px;
  background: transparent;
  cursor: pointer;
}

#hamburger span {
  display: block;
  width: 22px;
  height: 2px;
  background: white;
  border-radius: 2px;
  transition: transform 0.2s ease, opacity 0.2s ease;
}

#hamburger.active span:nth-child(1) {
  transform: translateY(7px) rotate(45deg);
}

#hamburger.active span:nth-child(2) {
  opacity: 0;
}

#hamburger.active span:nth-child(3) {
  transform: translateY(-7px) rotate(-45deg);
}

ul {
  list-style: none;
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  align-items: center;
  gap: 0.15rem;
  margin: 0;
  padding: 0;
}

ul li {
  display: block;
}

ul li:last-child {
  display: flex;
  margin-left: 0.35rem;
}

ul li a {
  display: block;
  padding: 0.45rem 0.85rem;
  color: white;
  font-weight: 600;
  text-align: center;
  text-decoration: none;
  border-radius: 999px;
  transition: background-color 0.2s ease, color 0.2s ease;
}

ul li a:hover,
ul li a:focus-visible {
  background: white;
  color: var(--blue);
}

ul li:last-child a {
  padding: 0.3rem 0.45rem;
  font-size: 1.2rem;
  line-height: 1;
}

/* Intro */
#block1 {
  position: relative;
  display: flex;
  align-items: flex-start;
  width: 100%;
  min-height: clamp(680px, 92vh, 960px);
  height: auto;
  margin: 0;
  padding: clamp(1.25rem, 3vw, 2.5rem) 1rem 2rem;
  background-image: url(font2-min.png);
  background-repeat: no-repeat;
  background-position: center;
  background-size: cover;
  background-attachment: fixed;
}

#block1::before {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.55), rgba(255, 255, 255, 0.28) 42%, rgba(9, 61, 131, 0.12));
  z-index: 1;
}

#block1 .block {
  position: relative;
  z-index: 2;
  width: min(980px, 100%);
  margin: 0 auto;
  padding: clamp(1.1rem, 2.5vw, 2rem);
  background: rgba(255, 255, 255, 0.9);
  border-radius: 18px;
  box-shadow: var(--shadow);
}

#block1 h3 {
  margin: 0 0 1.25rem;
  padding: 0;
  color: var(--ink);
  font-size: clamp(1rem, 1.5vw, 1.12rem);
  font-weight: 400;
  line-height: 1.7;
  text-align: left;
  background: transparent;
}

#block1 h1 {
  margin: 0;
  color: var(--blue);
  text-align: center;
  font-size: clamp(1.35rem, 2.4vw, 1.85rem);
  line-height: 1.35;
}

#block1 a {
  color: var(--blue);
  font-weight: 700;
  text-decoration: underline;
  text-underline-offset: 2px;
}

/* Section titles */
#title {
  margin: 0;
  padding: 1.6rem 1rem 0.85rem;
  text-align: center;
}

#title h2,
#photostitle {
  margin: 0;
  padding: 0.25rem 1rem;
  color: var(--blue);
  font-size: clamp(1.35rem, 2.4vw, 1.8rem);
  font-weight: 700;
  text-align: center;
}

#photostitle {
  padding-top: 1.6rem;
  padding-bottom: 0.85rem;
}

#photostitle a {
  color: inherit;
  text-decoration: none;
}

#photostitle a:hover,
#photostitle a:focus-visible {
  text-decoration: underline;
}

/* Contact */
#contact {
  position: relative;
  width: 100%;
  min-height: 0;
  margin: 0;
  padding: 1.25rem 1rem 2rem;
  overflow: hidden;
  background-image: url(font1-min.png);
  background-repeat: no-repeat;
  background-position: center;
  background-size: cover;
}

#contact::before {
  content: "";
  position: absolute;
  inset: 0;
  background: rgba(255, 255, 255, 0.62);
  z-index: 1;
}

#contact .block2 {
  position: relative;
  z-index: 2;
}

#contact h3 {
  max-width: 640px;
  margin: 1.25rem auto 0;
  padding: 0.85rem 1rem;
  background: rgba(255, 255, 255, 0.94);
  border-radius: 14px;
  text-align: center;
  box-shadow: var(--shadow);
}

#contact a {
  color: var(--ink);
  text-decoration: none;
}

#contact h3 a:hover,
#contact h3 a:focus-visible {
  text-decoration: underline;
}

form {
  max-width: 640px;
  margin: 0 auto;
  padding: 1.25rem 1.25rem 1.1rem;
  background: rgba(255, 255, 255, 0.94);
  border-radius: 16px;
  box-shadow: var(--shadow);
}

form label {
  display: block;
  margin-bottom: 0.35rem;
  font-weight: 700;
}

form input,
form textarea {
  width: 100%;
  margin-bottom: 0.9rem;
  padding: 0.7rem 0.8rem;
  border: 1px solid #d5dbe3;
  border-radius: 10px;
  background: white;
  color: var(--ink);
  font: inherit;
  font-size: 16px;
}

form textarea {
  min-height: 140px;
  resize: vertical;
}

form input:focus,
form textarea:focus {
  outline: none;
  border-color: var(--blue);
  box-shadow: 0 0 0 3px rgba(9, 61, 131, 0.16);
}

.recaptcha-wrap {
  max-width: 100%;
  margin-bottom: 0.9rem;
  overflow: hidden;
}

form button {
  width: 100%;
  padding: 0.8rem 1rem;
  border: 0;
  border-radius: 10px;
  background: var(--blue);
  color: white;
  font: inherit;
  font-size: 1rem;
  font-weight: 700;
  cursor: pointer;
  transition: background-color 0.2s ease;
}

form button:hover,
form button:focus-visible {
  background: var(--blue-deep);
}

.confirmation-message {
  max-width: 640px;
  margin: 1rem auto 0;
  padding: 0.9rem 1rem;
  background: #e8f6ee;
  border: 1px solid #8dcea8;
  border-radius: 12px;
  color: #155724;
  font-weight: 700;
}

.confirmation-message p {
  margin: 0;
}

/* Menu booklet and gallery */
#carte {
  margin: 0 0 0.5rem;
  padding: 0 1rem 1rem;
}

.fp-iframe,
#photos iframe {
  display: block;
  width: 100%;
  height: clamp(440px, 72vh, 680px);
  border: 0;
  border-radius: 16px;
  background: white;
  box-shadow: var(--shadow);
}

#photos {
  height: auto;
  margin: 0;
  padding: 0 1rem 1.25rem;
  background: transparent;
  border: 0;
}

#photos iframe {
  height: clamp(380px, 68vh, 640px);
}

/* Map */
#map {
  height: clamp(300px, 58vh, 520px);
  width: 100%;
  margin: 0;
  padding: 0;
}

#rando-info {
  max-width: 720px;
  margin: 1rem auto 1.75rem;
  padding: 1rem 1.15rem;
  background: white;
  border: 1px solid rgba(9, 61, 131, 0.1);
  border-radius: 14px;
  box-shadow: var(--shadow);
  font-family: inherit;
  line-height: 1.65;
}

/* Footer */
footer {
  position: relative;
  width: 100%;
  padding: 1rem 1rem;
  background: var(--blue);
  color: white;
  text-align: center;
  font-size: 0.95rem;
}

footer p {
  margin: 0;
  padding: 0;
  line-height: 1.5;
}

/* Floating actions */
#floating-menu {
  position: fixed;
  right: 16px;
  bottom: max(16px, env(safe-area-inset-bottom));
  z-index: 1100;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

#floating-menu a {
  display: block;
}

#floating-menu img,
#back-to-top img {
  width: 46px;
  height: 46px;
  padding: 7px;
  background: white;
  border-radius: 50%;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.22);
  transition: transform 0.2s ease;
}

#floating-menu img:hover,
#floating-menu a:focus-visible img {
  transform: scale(1.06);
}

/* Countdown kept for the commented seasonal block */
#countdown {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 0.75rem;
  padding: 1rem 0 0;
  text-align: center;
}

#countdown > div {
  display: flex;
  flex-direction: column;
  align-items: center;
}

.time-unit {
  min-width: 4.5rem;
  padding: 0.7rem 0.8rem;
  background: var(--blue);
  color: white;
  font-size: clamp(1.6rem, 4vw, 2.4rem);
  font-weight: 700;
  border-radius: 12px;
}

.time-label {
  margin-top: 0.35rem;
  color: #555;
  font-size: 0.95rem;
}

@media (max-width: 860px) {
  :root {
    --header-offset: 5.25rem;
  }

  #entete {
    min-height: 0;
    padding: 0.45rem 0.7rem;
  }

  #entete img {
    height: 62px;
    max-width: 38vw;
  }

  #entete h1 {
    grid-column: 2;
    width: auto;
    padding-inline: 0;
    text-align: left;
    font-size: clamp(1rem, 4.4vw, 1.25rem);
  }

  #hamburger {
    display: inline-flex;
  }

  #entete > nav,
  #entete > menu {
    position: static;
  }

  ul {
    display: none;
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    flex-direction: column;
    align-items: stretch;
    gap: 0.15rem;
    padding: 0.45rem 0.65rem 0.7rem;
    background: var(--blue-deep);
    box-shadow: 0 12px 24px rgba(0, 0, 0, 0.22);
  }

  ul.show {
    display: flex;
  }

  ul li,
  ul li:last-child {
    width: 100%;
    margin: 0;
    justify-content: center;
  }

  ul li a {
    border-radius: 10px;
  }

  #block1,
  #contact {
    background-attachment: scroll;
  }

  #block1 {
    min-height: 0;
    padding: 0.85rem 0.75rem 1.25rem;
  }

  #block1 .block,
  form,
  #contact h3,
  #rando-info {
    padding-right: 3.5rem;
  }

  #carte,
  #photos {
    padding-left: 0.75rem;
    padding-right: 0.75rem;
  }

  .fp-iframe,
  #photos iframe {
    height: clamp(420px, 78vh, 640px);
    border-radius: 12px;
  }

  #floating-menu img,
  #back-to-top img {
    width: 40px;
    height: 40px;
    padding: 6px;
  }
}

@media (max-width: 420px) {
  .recaptcha-wrap {
    height: 62px;
  }

  .g-recaptcha {
    transform: scale(0.77);
    transform-origin: left top;
  }
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }

  *,
  *::before,
  *::after {
    transition: none !important;
  }
}
