/* Gites de la Vallée de l'Artois — « Carnet de campagne »
   Nature Distilled (ui-ux-pro-max) : verts de prairie, terre, crème, grain papier,
   masque organique, vagues, notes manuscrites. Aucune classe custom : ids, attributs
   data-*, classes Bootstrap natives et pseudo-éléments uniquement. */

:root {
  --g-moss: #3f5a36;
  --g-moss-deep: #2c4127;
  --g-fern: #6f8f52;
  --g-sage: #c9d4b4;
  --g-earth: #8a4b26;
  --g-ochre: #c99a3b;
  --g-cream: #f6efdf;
  --g-paper: #fbf7ec;
  --g-straw: #efe4c8;
  --g-ink: #2b2a20;
  --g-bark: #4a3626;
  --g-serif: 'Brygada 1918', Georgia, serif;
  --g-hand: 'Kalam', 'Comic Sans MS', cursive;
  --g-sans: 'Wix Madefor Text', system-ui, -apple-system, 'Segoe UI', sans-serif;
  --g-ease: cubic-bezier(0.22, 0.8, 0.24, 1);
  --g-wave: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 1440 80' preserveAspectRatio='none'%3E%3Cpath d='M0 46c120-26 240-38 360-28s240 44 360 46 240-30 360-42 240 4 360 22v36H0z'/%3E%3C/svg%3E");
  --g-grain: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='220' height='220'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.85' numOctaves='4' stitchTiles='stitch'/%3E%3CfeColorMatrix values='0 0 0 0 0.25 0 0 0 0 0.2 0 0 0 0 0.12 0 0 0 0.55 0'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");

  --bs-body-font-family: var(--g-sans);
  --bs-body-color: var(--g-ink);
  --bs-body-bg: var(--g-paper);
  --bs-primary: var(--g-moss);
  --bs-primary-rgb: 63, 90, 54;
  --bs-secondary: var(--g-earth);
  --bs-secondary-rgb: 138, 75, 38;
  --bs-link-color: var(--g-earth);
  --bs-link-color-rgb: 138, 75, 38;
  --bs-link-hover-color: var(--g-moss);
  --bs-link-hover-color-rgb: 63, 90, 54;
  --bs-border-color: #ddd2b5;
  --bs-focus-ring-color: rgba(201, 154, 59, 0.45);
}

html { scroll-behavior: smooth; scroll-padding-top: 110px; }
body {
  background-color: var(--g-paper);
  font-size: 1.02rem;
  line-height: 1.7;
  position: relative;
  overflow-x: hidden;
}
/* grain papier sur toute la page */
body::before {
  content: '';
  position: fixed;
  inset: 0;
  background-image: var(--g-grain);
  opacity: 0.32;
  mix-blend-mode: multiply;
  pointer-events: none;
  z-index: 2000;
}

h1, h2, h3, h4, h5, .h5, .h6, .display-3 {
  font-family: var(--g-serif);
  font-weight: 600;
  color: var(--g-moss-deep);
  letter-spacing: -0.01em;
}
h1 em, h2 em { font-style: italic; color: var(--g-earth); font-weight: 500; }
::selection { background: var(--g-ochre); color: var(--g-ink); }
a { text-underline-offset: 0.2em; text-decoration-thickness: 1px; transition: color 0.2s var(--g-ease); }

:focus-visible { outline: 3px solid var(--g-ochre); outline-offset: 3px; }

main { overflow-x: clip; }

/* ---------- Boutons ---------- */
.btn { font-weight: 500; transition: transform 0.25s var(--g-ease), box-shadow 0.25s var(--g-ease), background-color 0.2s; }
.btn-primary {
  --bs-btn-bg: var(--g-moss);
  --bs-btn-border-color: var(--g-moss);
  --bs-btn-hover-bg: var(--g-moss-deep);
  --bs-btn-hover-border-color: var(--g-moss-deep);
  --bs-btn-active-bg: var(--g-bark);
  --bs-btn-active-border-color: var(--g-bark);
  box-shadow: 0 6px 0 -1px var(--g-ochre);
}
.btn-primary:hover { transform: translateY(-2px); box-shadow: 0 9px 0 -1px var(--g-ochre); }
.btn-primary:active { transform: translateY(2px); box-shadow: 0 2px 0 -1px var(--g-ochre); }
.btn-outline-primary {
  --bs-btn-color: var(--g-moss);
  --bs-btn-border-color: var(--g-moss);
  --bs-btn-hover-bg: var(--g-moss);
  --bs-btn-hover-border-color: var(--g-moss);
  --bs-btn-active-bg: var(--g-moss-deep);
  border-width: 2px;
  border-style: dashed;
}
.btn-outline-primary:hover { border-style: solid; transform: translateY(-2px); }

/* ---------- Bandeau d'infos ---------- */
[id] > div:first-child.py-2.small {
  background: var(--g-bark);
  color: var(--g-cream);
  font-size: 0.82rem;
  letter-spacing: 0.02em;
}
header .link-light { color: var(--g-cream) !important; opacity: 0.88; }
header .link-light:hover { opacity: 1; color: var(--g-ochre) !important; }

/* ---------- Navbar : logo centré, liens de part et d'autre ---------- */
header .navbar {
  background: rgba(251, 247, 236, 0.92);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  border-bottom: 2px dashed rgba(63, 90, 54, 0.22);
  z-index: 1030;
}
header .navbar-brand img {
  height: 64px;
  width: auto;
  border-radius: 16px;
  background: #fff;
  transition: transform 0.4s var(--g-ease);
}
header .navbar-brand:hover img { transform: rotate(-6deg) scale(1.04); }
header .nav-link {
  font-family: var(--g-hand);
  font-size: 1.22rem;
  color: var(--g-bark);
  position: relative;
  padding-inline: 0.2rem !important;
}
header .nav-link::after {
  content: '';
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0.25rem;
  height: 6px;
  background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 100 8' preserveAspectRatio='none'%3E%3Cpath d='M1 5c12-4 22 2 34-1s22-3 32 0 20 2 32-2' fill='none' stroke='%23c99a3b' stroke-width='2.4' stroke-linecap='round'/%3E%3C/svg%3E") center / 100% 100% no-repeat;
  transform: scaleX(0);
  transform-origin: left;
  transition: transform 0.35s var(--g-ease);
}
header .nav-link:hover, header .nav-link:focus-visible { color: var(--g-moss); }
header .nav-link:hover::after, header .nav-link:focus-visible::after { transform: scaleX(1); }
@media (min-width: 992px) {
  header .navbar { padding-block: 0.6rem !important; }
  header .navbar-brand {
    position: absolute;
    left: 50%;
    top: 50%;
    transform: translate(-50%, -50%);
    margin: 0;
    z-index: 2;
  }
  header .navbar-brand img { height: 92px; box-shadow: 0 0 0 6px var(--g-paper), 0 8px 22px rgba(74, 54, 38, 0.18); }
  header .navbar-collapse { min-height: 56px; }
  header .navbar-nav:first-child { padding-right: 140px; }
  header .navbar-nav:last-child { padding-left: 140px; }
}
@media (max-width: 991.98px) {
  header .navbar-collapse { padding-block: 0.75rem; }
}

/* ---------- Hero split + masque organique ---------- */
main > section:nth-of-type(2) {
  background:
    radial-gradient(60% 55% at 85% 30%, rgba(201, 212, 180, 0.55), transparent 70%),
    radial-gradient(40% 40% at 5% 90%, rgba(201, 154, 59, 0.16), transparent 70%);
}
.display-3 { font-size: clamp(2.5rem, 5.4vw, 4.6rem); line-height: 1.02; }
main > section:nth-of-type(2) .lead { font-size: 1.15rem; max-width: 36rem; }
main > section:nth-of-type(2) .lead a {
  font-family: var(--g-hand);
  font-size: 1.18em;
  color: var(--g-earth);
  text-decoration: none;
  background: linear-gradient(transparent 62%, rgba(201, 154, 59, 0.38) 62%);
  padding-inline: 0.1em;
}
main > section:nth-of-type(2) .lead a:hover { background: linear-gradient(transparent 40%, rgba(201, 154, 59, 0.55) 40%); }

[data-blob] { max-width: 600px; }
[data-blob] img {
  aspect-ratio: 1 / 0.95;
  object-fit: cover;
  border-radius: 62% 38% 46% 54% / 55% 45% 55% 45%;
  animation: g-morph 14s ease-in-out infinite alternate;
  box-shadow: 0 30px 60px -30px rgba(44, 65, 39, 0.55);
  position: relative;
  z-index: 1;
}
/* contour « tracé à la main » décalé derrière l'image */
[data-blob]::before {
  content: '';
  position: absolute;
  inset: -4% -3% -2% -5%;
  border: 2px dashed var(--g-fern);
  border-radius: 46% 54% 60% 40% / 48% 58% 42% 52%;
  animation: g-morph 18s ease-in-out infinite alternate-reverse;
}
/* tache de terre ocre */
[data-blob]::after {
  content: '';
  position: absolute;
  width: 34%;
  aspect-ratio: 1;
  right: -4%;
  bottom: -6%;
  background: var(--g-ochre);
  opacity: 0.85;
  border-radius: 58% 42% 63% 37% / 47% 60% 40% 53%;
  z-index: 0;
  animation: g-morph 11s ease-in-out infinite alternate;
}
@keyframes g-morph {
  0% { border-radius: 62% 38% 46% 54% / 55% 45% 55% 45%; }
  50% { border-radius: 44% 56% 58% 42% / 42% 58% 42% 58%; }
  100% { border-radius: 55% 45% 38% 62% / 60% 40% 60% 40%; }
}

/* ---------- Séparateurs en vague ---------- */
[data-wave] { margin-top: 70px; }
[data-wave]::before,
[data-wave='both']::after {
  content: '';
  position: absolute;
  left: 0;
  right: 0;
  height: 70px;
  background: inherit;
  -webkit-mask: var(--g-wave) center / 100% 100% no-repeat;
  mask: var(--g-wave) center / 100% 100% no-repeat;
  pointer-events: none;
}
[data-wave]::before { top: -69px; }
[data-wave='both']::after { bottom: -69px; transform: scaleY(-1) scaleX(-1); }

/* ---------- Diaporama : polaroïd scotché + index manuscrit ---------- */
[data-wave='top'] { background-color: var(--g-straw); }
[data-wave='top'] .carousel { max-width: 640px; margin-inline: auto; padding: 1.5rem 0.5rem; }
[data-wave='top'] .carousel-item figure {
  transform: rotate(-1.6deg);
  border-radius: 4px;
  box-shadow: 0 18px 38px -18px rgba(74, 54, 38, 0.55) !important;
  position: relative;
}
[data-wave='top'] .carousel-item figure::before,
[data-wave='top'] .carousel-item figure::after {
  content: '';
  position: absolute;
  width: 120px;
  height: 32px;
  background: rgba(201, 154, 59, 0.55);
  background-image: repeating-linear-gradient(90deg, rgba(255, 255, 255, 0.18) 0 4px, transparent 4px 9px);
  top: -14px;
  z-index: 3;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.08);
}
[data-wave='top'] .carousel-item figure::before { left: -18px; transform: rotate(-32deg); }
[data-wave='top'] .carousel-item figure::after { right: -18px; transform: rotate(28deg); background-color: rgba(111, 143, 82, 0.5); }
[data-wave='top'] figcaption { font-family: var(--g-hand); color: var(--g-bark); }
[data-wave='top'] .carousel-control-prev,
[data-wave='top'] .carousel-control-next {
  width: 52px;
  height: 52px;
  top: 50%;
  bottom: auto;
  transform: translateY(-50%);
  background: var(--g-moss);
  border-radius: 50%;
  opacity: 0.92;
}
[data-wave='top'] .carousel-control-prev { left: -8px; }
[data-wave='top'] .carousel-control-next { right: -8px; }
[data-wave='top'] .carousel-control-prev-icon,
[data-wave='top'] .carousel-control-next-icon { width: 1.3rem; height: 1.3rem; }

[data-index] { counter-reset: ch; }
[data-index] .list-group-item {
  counter-increment: ch;
  border-color: rgba(74, 54, 38, 0.25);
  border-bottom-style: dashed;
  color: var(--g-bark);
  font-family: var(--g-hand);
  transition: padding-left 0.3s var(--g-ease), color 0.2s;
}
[data-index] .list-group-item::before {
  content: counter(ch, decimal-leading-zero);
  font-family: var(--g-serif);
  font-style: italic;
  font-size: 1rem;
  color: var(--g-fern);
  min-width: 2rem;
}
[data-index] .list-group-item:hover { padding-left: 1.6rem; color: var(--g-moss); }
[data-index] .list-group-item.active {
  background: transparent !important;
  color: var(--g-earth);
  border-color: rgba(74, 54, 38, 0.25);
}
[data-index] .list-group-item.active span { background: linear-gradient(transparent 60%, rgba(201, 154, 59, 0.45) 60%); }

/* ---------- Olhain : texte carnet + vidéo cadrée organique ---------- */
[data-frame] {
  border-radius: 38px 120px 38px 120px;
  box-shadow: 18px 18px 0 var(--g-sage);
}
[data-frame] video { background: var(--g-moss-deep); }
main > section:nth-of-type(4) p::first-letter {
  font-family: var(--g-serif);
  float: left;
  font-size: 4.2em;
  line-height: 0.85;
  padding: 0.08em 0.12em 0 0;
  color: var(--g-earth);
}
main > section:nth-of-type(4) p a { font-family: var(--g-hand); font-size: 1.12em; }

/* ---------- Gîtes en onglets (bande verte) ---------- */
[data-wave='both'] {
  background-color: var(--g-moss);
  color: var(--g-cream);
  margin-bottom: 70px;
}
[data-wave='both']::before { background: var(--g-moss); }
[data-wave='both']::after { background: var(--g-moss); }
[data-wave='both'] .nav-pills {
  --bs-nav-pills-link-active-bg: var(--g-cream);
  --bs-nav-pills-link-active-color: var(--g-moss-deep);
}
[data-wave='both'] .nav-link {
  color: var(--g-cream);
  border: 1px dashed rgba(246, 239, 223, 0.4);
  transition: background-color 0.25s var(--g-ease), transform 0.25s var(--g-ease);
}
[data-wave='both'] .nav-link h3 { color: inherit; font-weight: 500; }
[data-wave='both'] .nav-link:hover { background: rgba(246, 239, 223, 0.1); transform: translateX(4px); }
[data-wave='both'] .nav-link.active { border-style: solid; border-color: var(--g-cream); }
[data-wave='both'] .nav-link.active h3 { font-style: italic; }
[data-wave='both'] .tab-pane figure .ratio {
  border-radius: 28px 150px 28px 28px;
  border: 10px solid var(--g-cream);
  box-shadow: 0 24px 50px -24px rgba(0, 0, 0, 0.55);
}
[data-wave='both'] figcaption {
  font-family: var(--g-hand);
  font-size: 1.12rem;
  line-height: 1.5;
  color: var(--g-straw);
  border-left: 3px solid var(--g-ochre);
  padding-left: 1rem;
}
@media (max-width: 991.98px) {
  [data-wave='both'] .nav-pills { flex-wrap: wrap; }
  [data-wave='both'] .nav-link { padding-inline: 1rem !important; }
}

/* ---------- Contact : feuille de carnet ligné ---------- */
[data-sheet] {
  background-color: #fffdf6;
  background-image:
    linear-gradient(90deg, transparent 54px, rgba(176, 72, 52, 0.35) 54px, rgba(176, 72, 52, 0.35) 56px, transparent 56px),
    repeating-linear-gradient(transparent 0 33px, rgba(111, 143, 82, 0.22) 33px 34px);
  border-radius: 6px 6px 22px 6px;
  box-shadow: 0 1px 0 #ece3cb, 0 2px 0 #fffdf6, 0 3px 0 #e2d7bb, 0 26px 50px -28px rgba(74, 54, 38, 0.5);
  transform: rotate(0.6deg);
  position: relative;
}
[data-sheet]::before {
  content: '';
  position: absolute;
  top: -16px;
  left: 50%;
  width: 150px;
  height: 34px;
  transform: translateX(-50%) rotate(-3deg);
  background: rgba(111, 143, 82, 0.5);
  background-image: repeating-linear-gradient(90deg, rgba(255, 255, 255, 0.2) 0 4px, transparent 4px 9px);
}
@media (min-width: 768px) { [data-sheet] { padding-left: 5.5rem !important; } }
[data-sheet] .form-label, [data-sheet] label { font-family: var(--g-hand); font-size: 1.15rem; color: var(--g-bark); }
[data-sheet] .form-control {
  background: transparent;
  border: 0;
  border-bottom: 2px solid rgba(74, 54, 38, 0.35);
  border-radius: 0;
  padding-inline: 0.25rem;
}
[data-sheet] textarea.form-control { border: 2px dashed rgba(74, 54, 38, 0.3); border-radius: 10px; padding: 0.6rem; }
[data-sheet] .form-control:focus { box-shadow: none; border-color: var(--g-moss); background: rgba(201, 212, 180, 0.18); }
[data-sheet] .form-control.is-invalid { border-color: #b04834; }

/* ---------- Bloc SEO (affiché en bas) ---------- */
main > section.order-last {
  background: var(--g-cream);
  color: var(--g-bark);
  border-top: 1px dashed rgba(74, 54, 38, 0.25);
}
main > section.order-last h2 { font-family: var(--g-hand); color: var(--g-moss); }

/* ---------- Footer arrondi ---------- */
body > footer, footer[id] {
  background: var(--g-moss-deep);
  color: var(--g-cream);
  border-radius: 56px 56px 0 0;
  position: relative;
  z-index: 1;
}
footer[id]::before {
  content: '';
  position: absolute;
  inset: 0;
  border-radius: inherit;
  background-image: var(--g-grain);
  opacity: 0.18;
  pointer-events: none;
}
footer[id] img { border-radius: 18px; transform: rotate(-4deg); box-shadow: 0 12px 24px -12px rgba(0, 0, 0, 0.6); }
footer[id] .ratio { border: 3px solid rgba(246, 239, 223, 0.2); }
footer[id] .ratio iframe { filter: sepia(0.25) saturate(0.85); }
footer[id] p { font-family: var(--g-hand); font-size: 1.1rem; }
footer[id] p span:first-child { font-family: var(--g-serif); font-size: 1.3rem; color: var(--g-ochre); }
footer[id] .link-light { color: var(--g-cream) !important; }
footer[id] .link-light:hover { color: var(--g-ochre) !important; }

/* ---------- Mouvement réduit ---------- */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; scroll-behavior: auto !important; }
}

@media (max-width: 575.98px) {
  body { font-size: 0.98rem; }
  [data-frame] { border-radius: 24px 70px 24px 70px; box-shadow: 10px 10px 0 var(--g-sage); }
  [data-wave='top'] .carousel-control-prev { left: 0; }
  [data-wave='top'] .carousel-control-next { right: 0; }
  footer[id] { border-radius: 34px 34px 0 0; }
  [data-blob]::before { inset: -2% -1% -1% -2%; }
}

/* panneau logo d'origine dans les onglets */
[data-fit='logo'] { background: var(--g-cream); }
[data-fit='logo'] img { mix-blend-mode: multiply; }
