/* ==========================================================================
   Express-Admin — single stylesheet
   Fluid-first responsive design: dimensions, typography and spacing scale
   continuously with the viewport via clamp()/min()/max(). Media queries are
   reserved for structural changes only (burger menu below 54rem).
   ========================================================================== */

/* ---- Self-hosted variable fonts (no external request at runtime) ---- */
@font-face {
  font-family: "Jura";
  src: url("../fonts/jura-latin.woff2") format("woff2");
  font-weight: 300 700;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: "Raleway";
  src: url("../fonts/raleway-latin.woff2") format("woff2");
  font-weight: 100 900;
  font-style: normal;
  font-display: swap;
}

/* ---- Design tokens ---- */
:root {
  /* Section colours — correct them here, in one place */
  --c-brand: #7b2d5e;       /* aubergine: brand, Accueil, Contact, legal pages */
  --c-secretariat: #5c4a3f; /* brown */
  --c-voyages: #2f2f8f;     /* indigo */
  --c-section: var(--c-brand);

  --c-band: #dbdbdb;
  --c-text: #333333;
  --c-muted: #555555;
  --c-nav: #4a4a4a;
  --c-nav-current: #6f6f6f; /* dimmed current-page state, AA on white */
  --c-rule: #bdbdbd;

  /* Fluid spacing scale */
  --gutter: clamp(1rem, 4vw, 3rem);
  --edge: clamp(0.75rem, 2vw, 1.5rem);
  --space-s: clamp(0.5rem, 0.4rem + 0.5vw, 0.875rem);
  --space-m: clamp(1rem, 0.8rem + 1vw, 1.75rem);
  --space-l: clamp(1.75rem, 1.2rem + 2.5vw, 3.25rem);

  /* Fluid type scale */
  --fs-base: clamp(1rem, 0.95rem + 0.25vw, 1.125rem);
  --fs-small: clamp(0.85rem, 0.82rem + 0.15vw, 0.95rem);
  --fs-h1: clamp(1.4rem, 1.15rem + 1.3vw, 2.2rem);
  --fs-h2: clamp(1.15rem, 1.02rem + 0.7vw, 1.55rem);
  --fs-brand: clamp(1.5rem, 0.9rem + 2.8vw, 3rem);
  --fs-baseline: clamp(0.85rem, 0.75rem + 0.55vw, 1.3rem);
}

/* Per-page section colour, driven by the body class */
.page-secretariat { --c-section: var(--c-secretariat); }
.page-voyages    { --c-section: var(--c-voyages); }
/* Accueil, Contact and the legal pages keep the brand aubergine default. */

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

body {
  margin: 0;
  font-family: "Raleway", "Helvetica Neue", Arial, sans-serif;
  font-size: var(--fs-base);
  line-height: 1.6;
  color: var(--c-text);
  background: #ffffff;
}

h1, h2, h3 {
  font-family: "Jura", "Trebuchet MS", sans-serif;
  font-weight: 600;
  line-height: 1.25;
  margin: 0 0 var(--space-m);
}
h1 { font-size: var(--fs-h1); }
h2 { font-size: var(--fs-h2); margin-top: var(--space-l); }

p, ul { margin: 0 0 var(--space-m); }
ul { padding-left: 1.4em; }
li { margin-bottom: 0.35em; }

a { color: inherit; }
a:hover { text-decoration-thickness: 2px; }

:focus-visible {
  outline: 2px solid var(--c-section);
  outline-offset: 2px;
}

/* Centred content column with fluid gutters */
.wrap {
  width: min(100% - 2 * var(--gutter), 68rem);
  margin-inline: auto;
}

/* Coloured square marker (the original site's defining motif) */
.sq {
  display: inline-block;
  width: 0.75em;
  height: 0.75em;
  margin-right: 0.5em;
  background: var(--c-section);
  flex: none;
}

/* Skip link */
.skip-link {
  position: absolute;
  left: -999px;
  top: 0;
  background: var(--c-brand);
  color: #ffffff;
  padding: 0.5em 1em;
  z-index: 10;
}
.skip-link:focus {
  left: 0;
}

/* ---- Header ---- */
.site-header {
  background: #ffffff;
}
.header-inner {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-end;
  justify-content: space-between;
  gap: var(--space-m);
  padding-block: var(--space-m) var(--space-s);
}
.brand { margin: 0; }
.brand-link {
  display: inline-block;
  text-decoration: none;
  color: var(--c-brand);
}
.brand-name {
  display: block;
  font-family: "Jura", "Trebuchet MS", sans-serif;
  font-weight: 600;
  font-size: var(--fs-brand);
  line-height: 1.05;
  letter-spacing: 0.01em;
}
.brand-baseline {
  display: block;
  font-family: "Jura", "Trebuchet MS", sans-serif;
  font-weight: 500;
  font-size: var(--fs-baseline);
  margin-top: 0.15em;
}

/* ---- Navigation ---- */
.site-nav {
  font-family: "Jura", "Trebuchet MS", sans-serif;
}
.nav-toggle {
  display: none; /* shown only below the structural breakpoint when JS runs */
  align-items: center;
  gap: 0.5em;
  font: inherit;
  font-weight: 600;
  line-height: 1;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--c-nav);
  background: none;
  border: 1px solid var(--c-rule);
  padding: 0.55em 0.9em;
  cursor: pointer;
}
.nav-toggle::before {
  /* Burger icon drawn as three bars, vertically centred by the flex button */
  content: "";
  width: 1.05em;
  height: 0.75em;
  background: repeating-linear-gradient(
    to bottom,
    currentColor 0 2px,
    transparent 2px calc((100% - 2px) / 2)
  );
}
.nav-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-wrap: wrap;
  gap: 0.4em clamp(0.9em, 2.5vw, 2em);
}
.nav-link {
  display: inline-flex;
  align-items: center;
  text-decoration: none;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  font-weight: 500;
  font-size: clamp(0.95rem, 0.9rem + 0.25vw, 1.1rem);
  color: var(--c-nav);
  padding-block: 0.2em;
}
.nav-link:hover { text-decoration: underline; }
/* Each nav item shows its own section colour on its square marker
   (Accueil has no marker, matching the original design). */
.nav-secretariat .sq { background: var(--c-secretariat); }
.nav-voyages .sq    { background: var(--c-voyages); }
.nav-contact .sq    { background: var(--c-brand); }
/* Current page: dimmed, as in the original (plus aria-current in the HTML) */
.page-accueil .nav-accueil,
.page-secretariat .nav-secretariat,
.page-voyages .nav-voyages,
.page-contact .nav-contact {
  color: var(--c-nav-current);
}

/* ---- Content band with section-coloured edge bars ---- */
.band {
  background: var(--c-band);
  border-inline: var(--edge) solid var(--c-section);
}
.band-inner {
  display: flex;
  flex-wrap: wrap; /* the sidebar wraps below the content when space runs out — no media query needed */
  gap: var(--space-l);
  padding-block: var(--space-l);
  align-items: flex-start;
}
.content {
  flex: 1 1 34rem;
  min-width: 0;
}
.sidebar {
  flex: 1 1 13rem;
  max-width: 24rem;
  font-family: "Jura", "Trebuchet MS", sans-serif;
}

/* Section heading with its coloured marker */
.section-title {
  display: flex;
  align-items: center;
}
.section-title .sq {
  width: 0.8em;
  height: 0.8em;
}
/* The home headline has no marker, matching the original */
.headline {
  font-weight: 500;
  max-width: 32ch;
}

/* ---- Home teasers ---- */
.teasers {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(16rem, 100%), 1fr));
  gap: var(--space-l);
  margin-top: var(--space-l);
}
.teaser {
  display: flex;
  align-items: flex-start;
  text-decoration: none;
  background: #ffffff;
  padding: var(--space-m);
  border-left: 0.35rem solid;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.15);
  transition: box-shadow 0.15s ease, transform 0.15s ease;
}
.teaser:hover,
.teaser:focus-visible {
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
  transform: translateY(-2px);
}
.teaser .sq { margin-top: 0.3em; }
.teaser-body {
  display: flex;
  flex-direction: column;
  gap: 0.9em;
}
.teaser-cta {
  font-family: "Jura", "Trebuchet MS", sans-serif;
  font-weight: 600;
  font-size: 0.85em;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  text-decoration: underline;
  text-underline-offset: 0.2em;
}
.teaser:hover .teaser-cta .arrow { transform: translateX(0.25em); }
.teaser-cta .arrow {
  display: inline-block;
  transition: transform 0.15s ease;
}
.teaser-secretariat { border-left-color: var(--c-secretariat); }
.teaser-secretariat .sq { background: var(--c-secretariat); }
.teaser-secretariat .teaser-cta { color: var(--c-secretariat); }
.teaser-voyages { border-left-color: var(--c-voyages); }
.teaser-voyages .sq { background: var(--c-voyages); }
.teaser-voyages .teaser-cta { color: var(--c-voyages); }

/* ---- Sidebar contact block ---- */
.sidebar p { margin-bottom: 0.4em; }
.sidebar-name {
  display: flex;
  align-items: center;
  font-weight: 600;
}
.sidebar-name .sq { background: var(--c-brand); width: 0.9em; height: 0.9em; }
.sidebar-block { padding-left: 1.4em; }

/* Sidebar photo (4:3, one per page) */
.media-img {
  display: block;
  margin-top: var(--space-m);
  margin-left: 1.4em;
  width: 100%;
  max-width: 16rem;
  height: auto;
}

/* ---- Tariffs table ---- */
.table-wrap {
  overflow-x: auto; /* the table scrolls inside its own container on narrow screens */
  margin-bottom: var(--space-m);
}
.tarifs {
  border-collapse: collapse;
  width: 100%;
  min-width: 36rem;
}
.tarifs caption {
  text-align: left;
  font-size: var(--fs-small);
  color: var(--c-muted);
  padding-bottom: 0.5em;
}
.tarifs th,
.tarifs td {
  text-align: left;
  vertical-align: top;
  padding: 0.5em 1em 0.5em 0;
  border-bottom: 1px solid var(--c-rule);
}
.tarifs thead th {
  font-family: "Jura", "Trebuchet MS", sans-serif;
  font-weight: 600;
  border-bottom: 2px solid var(--c-section);
}
.tarifs td:nth-child(2),
.tarifs td:nth-child(3) { white-space: nowrap; }

/* ---- Contact page ---- */
.contact-card {
  margin-top: var(--space-m);
  padding: var(--space-m);
  background: #ffffff;
  border-left: 0.4rem solid var(--c-section);
  max-width: 28rem;
}
.contact-card p { margin-bottom: 0.4em; }
.contact-card .contact-name { font-weight: 700; }

/* ---- Legal pages ---- */
.legal h2 { font-size: var(--fs-h2); }
.legal .placeholder { background: #fff3b0; padding: 0 0.25em; }

/* ---- Footer ---- */
.site-footer {
  padding-block: var(--space-l);
  font-family: "Jura", "Trebuchet MS", sans-serif;
  font-size: var(--fs-small);
  color: var(--c-muted);
  text-align: center;
}
.site-footer a { color: inherit; }

/* ==========================================================================
   Structural breakpoint — the only media query: below 54rem the navigation
   collapses to a burger (when JS is available) and stacks vertically.
   Everything else on the site scales fluidly without breakpoints.
   ========================================================================== */
@media (max-width: 53.99rem) {
  /* Compact header: brand left, burger top right, no wasted vertical space */
  .site-header { position: relative; }
  .header-inner {
    align-items: center;
    justify-content: space-between;
    gap: var(--space-s);
    padding-block: var(--space-s);
  }
  .nav-list { flex-direction: column; gap: 0.2em; }
  .js .nav-toggle {
    display: inline-flex;
    font-size: 0.9rem;
    padding: 0.5em 0.75em;
  }
  .js .nav-list { display: none; }
  /* The open menu overlays the page below the header instead of pushing it */
  .js .nav-list.open {
    display: flex;
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    z-index: 5;
    background: #ffffff;
    padding: var(--space-s) var(--gutter) var(--space-m);
    border-bottom: 1px solid var(--c-rule);
    box-shadow: 0 6px 12px rgba(0, 0, 0, 0.12);
  }
  .nav-link { padding-block: 0.45em; }
  /* Without JavaScript the list simply stays visible, stacked, on its own row */
  .no-js .site-nav { flex: 1 1 100%; }
  /* Tighter vertical rhythm on small screens */
  .band-inner { padding-block: var(--space-m); gap: var(--space-m); }
  .site-footer { padding-block: var(--space-m); }
}
