:root {
  color-scheme: light;
  --ink: #2b241d;
  --muted: #6d6258;
  --paper: #fffaf0;
  --paper-2: #f4ead7;
  --line: rgba(71, 55, 34, 0.18);
  --brand: #7b4e24;
  --brand-dark: #4d321d;
  --accent: #276b5d;
  --shadow: 0 24px 70px rgba(62, 43, 22, 0.16);
  --radius: 8px;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0 !important;
  padding-top: 78px;
  min-width: 0;
  overflow-x: hidden;
  color: var(--ink) !important;
  background:
    linear-gradient(180deg, rgba(255, 250, 240, 0.96), rgba(245, 235, 218, 0.92)),
    url("../images/fond-accueil.jpg") center top / 980px auto fixed !important;
  font-family: "Trebuchet MS", "Avenir Next", Arial, sans-serif !important;
  font-size: clamp(16px, 1.2vw, 18px);
  line-height: 1.65;
}

body::before {
  content: "";
  position: fixed;
  inset: 0;
  pointer-events: none;
  background-image:
    linear-gradient(rgba(83, 57, 26, 0.035) 1px, transparent 1px),
    linear-gradient(90deg, rgba(83, 57, 26, 0.03) 1px, transparent 1px);
  background-size: 42px 42px;
  mask-image: linear-gradient(to bottom, rgba(0, 0, 0, 0.7), transparent 60%);
}

a {
  color: var(--brand-dark) !important;
  text-decoration-thickness: 1px;
  text-underline-offset: 0.18em;
  transition: color 180ms ease, background-color 180ms ease, transform 180ms ease;
}

a:hover {
  color: var(--accent) !important;
}

img {
  max-width: 100% !important;
  height: auto !important;
  border-radius: var(--radius);
  object-fit: cover;
}

iframe {
  max-width: 100%;
  border-radius: var(--radius);
  border: 0;
  background: #1f1a16;
}

font,
span,
div,
p,
td,
big,
small,
strong {
  font-family: inherit !important;
  color: inherit;
}

p {
  max-width: 76ch;
}

.modern-header {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 20;
  border-bottom: 1px solid rgba(71, 55, 34, 0.16);
  background: rgba(255, 250, 240, 0.9);
  backdrop-filter: blur(14px);
  box-shadow: 0 10px 30px rgba(62, 43, 22, 0.08);
}

.modern-nav {
  display: grid;
  grid-template-columns: minmax(220px, 1fr) auto;
  gap: 18px;
  align-items: center;
  max-width: 1180px;
  margin: 0 auto;
  padding: 14px 22px;
}

.modern-brand {
  display: flex;
  flex-direction: column;
  gap: 1px;
  color: var(--ink) !important;
  text-decoration: none;
}

.modern-brand strong {
  font-size: clamp(18px, 2vw, 24px);
  line-height: 1.05;
  letter-spacing: 0;
}

.modern-brand span {
  color: var(--muted);
  font-size: 12px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.modern-links {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  justify-content: flex-end;
}

.modern-links a {
  border: 1px solid transparent;
  border-radius: 999px;
  padding: 8px 12px;
  color: var(--ink) !important;
  font-size: 14px;
  line-height: 1;
  text-decoration: none;
}

.modern-links a:hover,
.modern-links a.is-active {
  border-color: var(--line);
  background: rgba(123, 78, 36, 0.1);
  color: var(--brand-dark) !important;
}

.modern-shell {
  max-width: 1180px;
  margin: 0 auto;
  padding: 32px 22px 72px;
}

.modern-page-title {
  margin: 0 0 28px;
  padding: 54px 0 22px;
  border-bottom: 1px solid var(--line);
}

.modern-page-title .eyebrow {
  margin: 0 0 10px;
  color: var(--accent);
  font-size: 13px;
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}

.modern-page-title h1 {
  max-width: 860px;
  margin: 0;
  color: var(--ink);
  font-family: Georgia, "Times New Roman", serif;
  font-size: clamp(42px, 7vw, 84px);
  font-weight: 500;
  line-height: 0.96;
  letter-spacing: 0;
}

.modern-page-title p {
  max-width: 680px;
  margin: 18px 0 0;
  color: var(--muted);
  font-size: clamp(17px, 1.6vw, 21px);
}

.modern-shell > table:first-of-type,
.modern-shell > table:nth-of-type(2),
.modern-shell > table:nth-of-type(3),
.modern-shell > table:nth-of-type(4) {
  margin-top: 18px;
}

table {
  width: 100% !important;
  max-width: 100% !important;
  height: auto !important;
  margin: 26px auto !important;
  border-collapse: separate !important;
  border-spacing: 0 !important;
  color: var(--ink) !important;
}

td {
  width: auto !important;
  max-width: 100% !important;
  padding: 12px !important;
  vertical-align: middle !important;
  color: var(--ink) !important;
}

table[border],
table[border="1"] {
  overflow: hidden;
  border: 1px solid var(--line) !important;
  border-radius: var(--radius);
  background: rgba(255, 250, 240, 0.76);
  box-shadow: 0 12px 34px rgba(62, 43, 22, 0.08);
}

table[border] td,
table[border="1"] td {
  border: 0 !important;
  border-right: 1px solid var(--line) !important;
}

table[border] td:last-child,
table[border="1"] td:last-child {
  border-right: 0 !important;
}

table[border] a,
table[border="1"] a {
  display: block;
  border-radius: 6px;
  padding: 12px 8px;
  color: var(--brand-dark) !important;
  font-weight: 700;
  text-decoration: none;
}

table[border] a:hover,
table[border="1"] a:hover {
  background: rgba(39, 107, 93, 0.1);
  transform: translateY(-1px);
}

.modern-shell > table:not([border]) {
  border: 1px solid rgba(71, 55, 34, 0.11);
  border-radius: var(--radius);
  background: rgba(255, 250, 240, 0.72);
  box-shadow: 0 18px 54px rgba(62, 43, 22, 0.08);
}

.modern-shell > table:not([border]) tr {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(270px, 100%), 1fr));
  align-items: center;
  gap: 12px;
}

.modern-shell > table:not([border]) td {
  display: block;
}

.modern-shell > table:not([border]) img {
  box-shadow: 0 16px 34px rgba(62, 43, 22, 0.16);
}

body[data-page="index.html"] .modern-shell > table:nth-of-type(2) {
  border: 0;
  background: transparent;
  box-shadow: none;
}

body[data-page="index.html"] .modern-shell > table:nth-of-type(2) tr {
  grid-template-columns: 0.75fr 2fr 0.8fr;
}

body[data-page="index.html"] .modern-shell > table:nth-of-type(2) img {
  width: 100% !important;
  min-height: 250px;
}

body[data-page="index.html"] .modern-shell > table:nth-of-type(2) td:nth-child(2) img {
  min-height: 360px;
}

.modern-shell br + br {
  display: none;
}

.modern-shell p,
.modern-shell div {
  text-wrap: pretty;
}

.modern-shell [style*="position: absolute"] {
  position: static !important;
}

.modern-shell table.modern-legacy-nav,
.modern-shell table.modern-legacy-masthead {
  display: none !important;
}

.modern-shell [style*="margin-left"],
.modern-shell [style*="width"] {
  max-width: 100% !important;
}

.modern-footer {
  max-width: 1180px;
  margin: 0 auto;
  padding: 28px 22px 40px;
  border-top: 1px solid var(--line);
  color: var(--muted);
  font-size: 14px;
}

.modern-footer a {
  font-weight: 700;
}

@media (max-width: 760px) {
  body.modern-ready {
    padding-top: 0;
  }

  body {
    padding-top: 0;
  }

  .modern-header {
    position: static;
  }

  .modern-nav {
    grid-template-columns: 1fr;
    padding: 16px;
  }

  .modern-links {
    justify-content: flex-start;
    overflow-x: auto;
    padding-bottom: 4px;
  }

  .modern-links a {
    white-space: nowrap;
  }

  .modern-shell {
    padding: 20px 14px 48px;
  }

  .modern-page-title {
    padding: 28px 0 18px;
  }

  table,
  tbody,
  tr,
  td {
    display: block !important;
  }

  td {
    padding: 10px !important;
    text-align: center !important;
  }

  table[border] td,
  table[border="1"] td {
    border-right: 0 !important;
    border-bottom: 1px solid var(--line) !important;
  }

  table[border] td:last-child,
  table[border="1"] td:last-child {
    border-bottom: 0 !important;
  }

  body[data-page="index.html"] .modern-shell > table:nth-of-type(2) tr {
    grid-template-columns: 1fr;
  }
}
