:root {
  --bg: #FBF6EE;
  --bg-alt: #F3E9D8;
  --ink: #2B211B;
  --ink-soft: #5B4C3F;
  --terracotta: #C9683A;
  --terracotta-dark: #A6502A;
  --teal: #1F3A3D;
  --amber: #E0A458;
  --border: rgba(43, 33, 27, 0.12);
  --max-width: 1080px;
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: 'Karla', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  font-size: 17px;
  line-height: 1.65;
}

h1, h2, h3 {
  font-family: 'Fraunces', Georgia, serif;
  font-weight: 600;
  color: var(--teal);
  margin: 0 0 0.5em;
}

.wrap {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0 24px;
}

a { color: inherit; }

.visually-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

/* Hero banner image */

.hero-banner-logo {
  display: flex;
  justify-content: center;
  padding: 2.5rem 0 0.5rem;
  margin-bottom: 1.5rem;
}

.hero-banner-logo img {
  width: 100%;
  max-width: 260px;
  display: block;
}

/* Top bar — language switcher */

.theme-switcher {
  background: #1B1712;
  color: #F3E9D8;
  font-size: 0.85rem;
}

.theme-switcher-inner {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  height: 44px;
  overflow-x: auto;
  white-space: nowrap;
}

.theme-switcher-label {
  font-weight: 700;
  letter-spacing: 0.02em;
  white-space: nowrap;
}

.lang-buttons {
  display: flex;
  gap: 0.4rem;
  flex-shrink: 0;
}

.lang-btn {
  font: inherit;
  font-size: 0.8rem;
  font-weight: 700;
  color: #F3E9D8;
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.2);
  border-radius: 999px;
  padding: 0.35rem 0.7rem;
  cursor: pointer;
  white-space: nowrap;
  transition: background 0.2s ease, border-color 0.2s ease;
}

.lang-btn:hover {
  background: rgba(255, 255, 255, 0.16);
}

.lang-btn.active {
  background: var(--terracotta);
  border-color: var(--terracotta);
  color: #FBF6EE;
}

/* Header */

.site-header {
  position: sticky;
  top: 0;
  z-index: 10;
  background: rgba(251, 246, 238, 0.9);
  backdrop-filter: blur(6px);
  border-bottom: 1px solid var(--border);
}

.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 72px;
  flex-wrap: wrap;
  gap: 0.5rem 1.5rem;
  padding-top: 0.5rem;
  padding-bottom: 0.5rem;
}

.brand {
  font-family: 'Fraunces', serif;
  font-weight: 600;
  font-size: 1.3rem;
  text-decoration: none;
  color: var(--terracotta-dark);
  letter-spacing: 0.02em;
}

.nav {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem 1.5rem;
}

.nav a {
  text-decoration: none;
  font-weight: 500;
  color: var(--ink-soft);
  font-size: 0.95rem;
  transition: color 0.2s ease;
}

.nav a:hover,
.nav a[aria-current="page"] {
  color: var(--terracotta);
}

/* Page header (used on faq/intermediaires/ressources) */

.page-hero {
  padding: 3.5rem 0 2.5rem;
  text-align: center;
}

.page-hero h1 {
  font-size: clamp(2rem, 4.5vw, 2.8rem);
  margin-bottom: 0.75rem;
}

.page-hero p {
  color: var(--ink-soft);
  max-width: 60ch;
  margin: 0 auto;
}

/* Hero (homepage) */

.hero {
  padding: 6rem 0 5rem;
}

.hero-inner {
  max-width: 640px;
}

.eyebrow {
  text-transform: uppercase;
  letter-spacing: 0.12em;
  font-size: 0.8rem;
  font-weight: 700;
  color: var(--terracotta);
  margin: 0 0 1rem;
}

.hero h1 {
  font-size: clamp(2.6rem, 5vw, 3.8rem);
  margin-bottom: 1.2rem;
}

.lead {
  font-size: 1.15rem;
  color: var(--ink-soft);
  margin-bottom: 2rem;
  max-width: 54ch;
}

.button {
  display: inline-block;
  background: var(--terracotta);
  color: #FBF6EE;
  text-decoration: none;
  padding: 0.85rem 1.8rem;
  border-radius: 999px;
  font-weight: 700;
  font-size: 0.95rem;
  transition: background 0.2s ease, transform 0.2s ease;
  border: none;
  cursor: pointer;
}

.button:hover {
  background: var(--terracotta-dark);
  transform: translateY(-1px);
}

.button-outline {
  background: transparent;
  border: 2px solid var(--terracotta);
  color: var(--terracotta-dark);
  padding: 0.75rem 1.8rem;
}

.button-outline:hover {
  background: var(--terracotta);
  color: #FBF6EE;
}

/* About (homepage) */

.about {
  background: var(--bg-alt);
  padding: 5rem 0;
}

.about h2 {
  font-size: 2rem;
  text-align: center;
  margin-bottom: 2.5rem;
}

.about-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 2rem;
  margin-bottom: 3rem;
}

.about-card {
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: 16px;
  padding: 2rem;
}

.about-card h3 {
  font-size: 1.2rem;
  color: var(--terracotta-dark);
  margin-bottom: 0.75rem;
}

.about-card p {
  color: var(--ink-soft);
  margin: 0;
}

.pull-quote {
  font-family: 'Fraunces', serif;
  font-size: clamp(1.3rem, 2.6vw, 1.7rem);
  font-weight: 500;
  color: var(--teal);
  text-align: center;
  max-width: 46ch;
  margin: 0 auto;
  line-height: 1.5;
  position: relative;
  padding: 0 1rem;
}

/* Contact (homepage) */

.contact {
  padding: 5.5rem 0;
}

.contact h2 {
  font-size: 2rem;
}

.contact-split {
  text-align: center;
}

.contact-split p {
  color: var(--ink-soft);
  max-width: 46ch;
  margin: 0 auto 2rem;
}

/* Footer */

.site-footer {
  border-top: 1px solid var(--border);
  padding: 2rem 0;
}

.site-footer p {
  margin: 0 0 0.5rem;
  font-size: 0.85rem;
  color: var(--ink-soft);
  text-align: center;
}

.site-footer .footer-links {
  text-align: center;
  font-size: 0.85rem;
}

.site-footer .footer-links a {
  color: var(--ink-soft);
  text-decoration: underline;
  text-decoration-color: var(--border);
}

/* ==========================================================
   FAQ page — native <details>/<summary> accordion
   ========================================================== */

.faq-section {
  padding: 1rem 0 5rem;
}

.faq-group {
  margin-bottom: 2.5rem;
}

.faq-group-title {
  font-size: 1.1rem;
  color: var(--terracotta-dark);
  text-transform: uppercase;
  letter-spacing: 0.06em;
  margin-bottom: 1rem;
}

.faq-item {
  border-bottom: 1px solid var(--border);
}

.faq-item summary {
  cursor: pointer;
  list-style: none;
  padding: 1.1rem 2rem 1.1rem 0;
  font-family: 'Fraunces', serif;
  font-weight: 600;
  font-size: 1.1rem;
  color: var(--teal);
  position: relative;
}

.faq-item summary::-webkit-details-marker { display: none; }

.faq-item summary::after {
  content: "+";
  position: absolute;
  right: 0;
  top: 1.1rem;
  font-size: 1.4rem;
  line-height: 1;
  color: var(--terracotta);
  transition: transform 0.2s ease;
}

.faq-item[open] summary::after {
  content: "−";
}

.faq-item .faq-answer {
  padding: 0 1rem 1.5rem 0;
  color: var(--ink-soft);
}

.faq-item .faq-answer p {
  margin: 0 0 1rem;
}

.faq-item .faq-answer p:last-child { margin-bottom: 0; }

.faq-item .faq-answer ul {
  margin: 0 0 1rem;
  padding-left: 1.2rem;
}

.faq-cta {
  margin-top: 1rem;
}

/* ==========================================================
   Intermédiaires page — world map + country list
   ========================================================== */

.map-section {
  padding: 1rem 0 3rem;
}

.map-wrap {
  max-width: 760px;
  margin: 0 auto;
}

.map-legend {
  display: flex;
  justify-content: center;
  gap: 1.5rem;
  margin-top: 1rem;
  font-size: 0.85rem;
  color: var(--ink-soft);
}

.map-legend span {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
}

.map-legend .dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  display: inline-block;
}

.map-legend .dot-active { background: var(--terracotta); }
.map-legend .dot-inactive { background: #C9C0B2; }

.map-credit-line {
  text-align: center;
  font-size: 0.75rem;
  color: var(--ink-soft);
  margin-top: 0.75rem;
}

#world-map {
  width: 100%;
  height: auto;
}

#world-map path {
  fill: #E4DCC8;
  stroke: var(--bg);
  stroke-width: 0.5;
  transition: fill 0.15s ease;
  cursor: default;
}

#world-map path.map-country-known {
  fill: #C9C0B2;
  cursor: pointer;
}

#world-map path.map-country-known:hover {
  fill: var(--amber);
}

#world-map path.has-intermediary {
  fill: var(--terracotta);
}

#world-map path.has-intermediary:hover {
  fill: var(--terracotta-dark);
}

.directory-section {
  padding: 1rem 0 5rem;
}

.country-block {
  border: 1px solid var(--border);
  border-radius: 16px;
  margin-bottom: 1.25rem;
  overflow: hidden;
  scroll-margin-top: 90px;
}

.country-block > summary {
  cursor: pointer;
  list-style: none;
  padding: 1.25rem 1.5rem;
  font-family: 'Fraunces', serif;
  font-weight: 600;
  font-size: 1.2rem;
  color: var(--teal);
  background: var(--bg-alt);
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.country-block > summary::-webkit-details-marker { display: none; }

.country-status {
  font-family: 'Karla', sans-serif;
  font-weight: 700;
  font-size: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  padding: 0.25rem 0.7rem;
  border-radius: 999px;
  background: #C9C0B2;
  color: #FBF6EE;
}

.country-status.active {
  background: var(--terracotta);
}

.region-list {
  padding: 0.5rem 1.5rem 1.5rem;
}

.region-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding: 0.9rem 0;
  border-top: 1px solid var(--border);
}

.region-row:first-child { border-top: none; }

.region-name {
  font-weight: 600;
  color: var(--ink);
}

.region-example {
  font-weight: 400;
  font-size: 0.8rem;
  color: var(--terracotta-dark);
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.region-contact a {
  color: var(--terracotta-dark);
  font-weight: 600;
  text-decoration: none;
  border-bottom: 1px solid var(--terracotta);
}

.region-needed {
  color: var(--ink-soft);
  font-size: 0.9rem;
  font-style: italic;
}

/* ==========================================================
   Ressources page
   ========================================================== */

.resources-section {
  padding: 1rem 0 5rem;
}

.resource-country {
  margin-bottom: 2rem;
}

.resource-country h2 {
  font-size: 1.3rem;
  color: var(--terracotta-dark);
  border-bottom: 2px solid var(--border);
  padding-bottom: 0.5rem;
  margin-bottom: 1rem;
}

.resource-item {
  padding: 0.75rem 0;
  border-bottom: 1px solid var(--border);
}

.resource-item:last-child { border-bottom: none; }

.resource-item a {
  font-weight: 600;
  color: var(--teal);
  text-decoration: none;
  border-bottom: 1px solid var(--border);
}

.resource-item a:hover { color: var(--terracotta); }

.resource-item p {
  margin: 0.3rem 0 0;
  color: var(--ink-soft);
  font-size: 0.95rem;
}

.example-tag {
  display: inline-block;
  font-size: 0.7rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: var(--terracotta-dark);
  background: var(--bg-alt);
  border-radius: 4px;
  padding: 0.15rem 0.4rem;
  margin-left: 0.5rem;
  vertical-align: middle;
}

/* Responsive */

@media (max-width: 780px) {
  .hero-inner { text-align: center; }
  .lead { margin-left: auto; margin-right: auto; }
  .about-grid { grid-template-columns: 1fr; }
  .header-inner { justify-content: center; text-align: center; }
  .nav { justify-content: center; }
  .brand { font-size: 1.1rem; }
  .country-block > summary { flex-wrap: wrap; gap: 0.5rem; }
  .region-row { flex-direction: column; align-items: flex-start; gap: 0.3rem; }
}
