/* Le 58 — styles partagés par toutes les pages.
   Jetons de couleur et de rythme, navigation, boutons, ossature de section,
   pied de page, accessibilité. Les styles propres à une page restent dans la page. */

  :root {
    /* Signature */
    --green: #113a28;
    --green-deep: #0b2a1d;
    --green-soft: #1f4d38;

    /* Neutrals */
    --cream: #f5f1ea;
    --cream-warm: #ede5d3;
    --ivory: #faf7f2;
    --ink: #1a1a1a;
    --ink-soft: #3a3a3a;

    /* Accent */
    --brass: #c9a961;
    --brass-deep: #a6884a;

    /* Surfaces */
    --bg: var(--cream);
    --surface: var(--ivory);
    --on-bg: var(--ink);
    --line: rgba(17, 58, 40, 0.14);

    /* Type */
    --font-display: "Playfair Display", "Cormorant Garamond", Georgia, serif;
    --font-serif: "Cormorant Garamond", Georgia, serif;
    --font-sans: "DM Sans", -apple-system, system-ui, sans-serif;

    /* Rhythm */
    --space-xs: 8px;
    --space-sm: 16px;
    --space-md: 28px;
    --space-lg: 56px;
    --space-xl: 96px;
    --space-2xl: 144px;
  }

  [data-density="compact"] {
    --space-lg: 40px;
    --space-xl: 72px;
    --space-2xl: 104px;
  }

  [data-title="cormorant"] { --font-display: "Cormorant Garamond", Georgia, serif; }
  [data-title="playfair"]  { --font-display: "Playfair Display", Georgia, serif; }

  [data-dark="true"] {
    --bg: var(--green-deep);
    --surface: var(--green);
    --on-bg: var(--cream);
    --line: rgba(245, 241, 234, 0.14);
  }

  * { box-sizing: border-box; margin: 0; padding: 0; }

  html { scroll-behavior: smooth; }

  body {
    background: var(--bg);
    color: var(--on-bg);
    font-family: var(--font-sans);
    font-size: 15px;
    line-height: 1.6;
    font-weight: 300;
    letter-spacing: 0.01em;
    -webkit-font-smoothing: antialiased;
    transition: background 400ms ease, color 400ms ease;
  }

  img { max-width: 100%; display: block; }
  a { color: inherit; text-decoration: none; }
  button { font: inherit; color: inherit; cursor: pointer; background: none; border: 0; }

  .container {
    max-width: 1400px;
    margin: 0 auto;
    padding: 0 var(--space-md);
  }
  .container-narrow {
    max-width: 1100px;
    margin: 0 auto;
    padding: 0 var(--space-md);
  }

  /* ---------- Type helpers ---------- */
  .display {
    font-family: var(--font-display);
    font-weight: 400;
    line-height: 1;
    letter-spacing: -0.02em;
  }
  .italic { font-style: italic; }
  .eyebrow {
    font-family: var(--font-sans);
    font-size: 11px;
    font-weight: 400;
    letter-spacing: 0.32em;
    text-transform: uppercase;
    color: var(--green);
  }
  [data-dark="true"] .eyebrow { color: var(--brass); }

  .rule {
    display: inline-block;
    width: 40px;
    height: 1px;
    background: currentColor;
    vertical-align: middle;
    margin: 0 12px;
    opacity: 0.5;
  }

  /* ---------- Braid divider (signature pattern from logo) ---------- */
  .braid {
    height: 18px;
    background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 60 18' preserveAspectRatio='xMinYMid repeat'><g fill='none' stroke='%23113a28' stroke-width='1.2' stroke-linecap='round'><path d='M0 9 C 5 2, 10 2, 15 9 C 20 16, 25 16, 30 9 C 35 2, 40 2, 45 9 C 50 16, 55 16, 60 9'/><path d='M0 9 C 5 16, 10 16, 15 9 C 20 2, 25 2, 30 9 C 35 16, 40 16, 45 9 C 50 2, 55 2, 60 9'/><circle cx='0' cy='9' r='1' fill='%23113a28'/><circle cx='15' cy='9' r='1' fill='%23113a28'/><circle cx='30' cy='9' r='1' fill='%23113a28'/><circle cx='45' cy='9' r='1' fill='%23113a28'/><circle cx='60' cy='9' r='1' fill='%23113a28'/></g></svg>");
    background-size: 60px 18px;
    background-repeat: repeat-x;
    opacity: 0.55;
  }
  [data-dark="true"] .braid { filter: invert(1) brightness(1.3) hue-rotate(180deg); opacity: 0.35; }

  /* ---------- Navigation ---------- */
  .nav {
    position: sticky;
    top: 0;
    z-index: 50;
    background: color-mix(in srgb, var(--bg) 88%, transparent);
    backdrop-filter: blur(12px) saturate(1.1);
    -webkit-backdrop-filter: blur(12px) saturate(1.1);
    border-bottom: 1px solid var(--line);
    transition: background 400ms ease, border-color 400ms ease;
  }
  .nav-inner {
    display: grid;
    grid-template-columns: 1fr auto 1fr;
    align-items: center;
    gap: var(--space-md);
    padding: 18px var(--space-md);
    max-width: 1400px;
    margin: 0 auto;
  }
  .nav-links {
    display: flex;
    gap: 32px;
    font-size: 12px;
    letter-spacing: 0.2em;
    text-transform: uppercase;
    font-weight: 400;
  }
  .nav-links a {
    color: var(--on-bg);
    opacity: 0.75;
    transition: opacity 200ms;
    position: relative;
  }
  .nav-links a:hover { opacity: 1; }
  .nav-logo {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    height: 52px;
  }
  .nav-logo img {
    height: 100%;
    width: auto;
    display: block;
    object-fit: contain;
  }
  [data-dark="true"] .nav-logo img { filter: invert(1) brightness(1.1) sepia(0.15); }
  .nav-cta {
    justify-self: end;
    display: inline-flex;
    align-items: center;
    gap: 10px;
    padding: 10px 20px;
    border: 1px solid var(--green);
    border-radius: 999px;
    font-size: 11px;
    letter-spacing: 0.2em;
    text-transform: uppercase;
    color: var(--green);
    transition: all 200ms;
  }
  [data-dark="true"] .nav-cta { border-color: var(--brass); color: var(--brass); }
  .nav-cta:hover { background: var(--green); color: var(--cream); }
  [data-dark="true"] .nav-cta:hover { background: var(--brass); color: var(--green-deep); }

  /* ---------- Buttons ---------- */
  .btn {
    display: inline-flex;
    align-items: center;
    gap: 12px;
    padding: 16px 32px;
    font-size: 12px;
    letter-spacing: 0.22em;
    text-transform: uppercase;
    transition: all 250ms ease;
    border-radius: 999px;
  }
  .btn-primary {
    background: var(--green);
    color: var(--cream);
    border: 1px solid var(--green);
  }
  .btn-primary:hover {
    background: var(--green-deep);
    transform: translateY(-1px);
  }
  .btn-ghost {
    color: var(--on-bg);
    border: 1px solid currentColor;
  }
  .btn-ghost:hover { background: var(--on-bg); color: var(--bg); }
  .btn .arrow {
    width: 20px; height: 1px; background: currentColor; position: relative;
  }
  .btn .arrow::after {
    content: ""; position: absolute; right: 0; top: -3px;
    width: 7px; height: 7px; border-top: 1px solid currentColor; border-right: 1px solid currentColor; transform: rotate(45deg);
  }

  /* ---------- SECTION scaffolding ---------- */
  section[data-section] {
    padding: var(--space-2xl) 0;
    position: relative;
  }
  .section-head {
    display: grid;
    grid-template-columns: 1fr 2fr;
    gap: var(--space-lg);
    margin-bottom: var(--space-xl);
    align-items: end;
  }
  .section-head .s-num {
    font-family: var(--font-serif);
    font-style: italic;
    font-size: 13px;
    color: var(--green);
    opacity: 0.7;
    letter-spacing: 0.05em;
  }
  [data-dark="true"] .section-head .s-num { color: var(--brass); }
  .section-title {
    font-family: var(--font-display);
    font-weight: 400;
    font-size: clamp(40px, 5vw, 76px);
    line-height: 1;
    letter-spacing: -0.02em;
  }
  .section-intro {
    font-family: var(--font-serif);
    font-size: 19px;
    line-height: 1.5;
    font-weight: 300;
    color: var(--ink-soft);
    max-width: 52ch;
  }
  [data-dark="true"] .section-intro { color: color-mix(in srgb, var(--cream) 80%, transparent); }

  /* ---------- Footer ---------- */
  footer {
    background: var(--ink);
    color: var(--cream);
    padding: var(--space-xl) 0 var(--space-md);
  }
  .foot-grid {
    display: grid;
    grid-template-columns: 2fr 1fr 1fr 1fr;
    gap: var(--space-lg);
    padding-bottom: var(--space-lg);
    border-bottom: 1px solid rgba(245,241,234,0.12);
  }
  .foot-brand .wordmark {
    font-family: var(--font-display);
    font-style: italic;
    font-size: 48px;
    line-height: 1;
  }
  .foot-brand .wordmark .num { font-style: normal; font-weight: 500; }
  .foot-brand p {
    font-family: var(--font-serif);
    font-size: 15px;
    line-height: 1.5;
    margin-top: var(--space-sm);
    max-width: 38ch;
    opacity: 0.7;
  }
  .foot-col h5 {
    font-size: 11px;
    letter-spacing: 0.3em;
    text-transform: uppercase;
    color: var(--brass);
    margin-bottom: var(--space-sm);
    font-weight: 400;
  }
  .foot-col ul { list-style: none; display: grid; gap: 10px; }
  .foot-col a { font-size: 14px; opacity: 0.75; transition: opacity 200ms; }
  .foot-col a:hover { opacity: 1; }

  .foot-bottom {
    display: flex; justify-content: space-between;
    padding-top: var(--space-md);
    font-size: 11px;
    letter-spacing: 0.2em;
    text-transform: uppercase;
    opacity: 0.5;
    flex-wrap: wrap; gap: var(--space-sm);
  }

  /* ---------- Navigation mobile ---------- */
  .nav-burger {
    display: none;
    background: none;
    border: 1px solid var(--line);
    border-radius: 999px;
    width: 42px; height: 42px;
    cursor: pointer;
    align-items: center;
    justify-content: center;
    flex-direction: column;
    gap: 4px;
    justify-self: start;
  }
  .nav-burger span {
    display: block;
    width: 16px; height: 1px;
    background: var(--on-bg);
    transition: transform 250ms ease, opacity 250ms ease;
  }
  .nav-burger[aria-expanded="true"] span:nth-child(1) { transform: translateY(5px) rotate(45deg); }
  .nav-burger[aria-expanded="true"] span:nth-child(2) { opacity: 0; }
  .nav-burger[aria-expanded="true"] span:nth-child(3) { transform: translateY(-5px) rotate(-45deg); }

  .nav-drawer {
    position: fixed;
    inset: 0;
    background: var(--bg);
    z-index: 60;
    display: flex;
    flex-direction: column;
    justify-content: center;
    gap: var(--space-md);
    padding: var(--space-xl) var(--space-md);
    transform: translateY(-100%);
    transition: transform 400ms cubic-bezier(0.16, 1, 0.3, 1);
    visibility: hidden;
  }
  .nav-drawer.open { transform: translateY(0); visibility: visible; }
  .nav-drawer a {
    font-family: var(--font-display);
    font-size: clamp(28px, 8vw, 40px);
    color: var(--on-bg);
    text-decoration: none;
  }
  .nav-drawer .drawer-cta {
    font-family: var(--font-sans);
    font-size: 12px;
    letter-spacing: 0.2em;
    text-transform: uppercase;
    color: var(--green);
    border: 1px solid var(--green);
    border-radius: 999px;
    padding: 14px 24px;
    text-align: center;
    margin-top: var(--space-md);
  }
  .nav-drawer-close {
    position: absolute;
    top: 24px; right: 24px;
    background: none; border: none;
    font-size: 28px; line-height: 1;
    color: var(--on-bg);
    cursor: pointer;
  }
  body.nav-open { overflow: hidden; }

  @media (max-width: 960px) {
    .nav-burger { display: flex; }
    .nav-cta { display: none; }
    .nav-inner { grid-template-columns: auto 1fr; }
    .nav-logo { justify-self: end; }
  }

  /* ---------- Accessibilité ---------- */
  .skip-link {
    position: absolute;
    left: -9999px;
    top: 0;
    background: var(--green);
    color: var(--cream);
    padding: 12px 20px;
    z-index: 200;
  }
  .skip-link:focus { left: 8px; top: 8px; }
  a:focus-visible, button:focus-visible {
    outline: 2px solid var(--brass);
    outline-offset: 3px;
  }
  @media (prefers-reduced-motion: reduce) {
    html { scroll-behavior: auto; }
    .reveal { opacity: 1 !important; transform: none !important; transition: none !important; }
    .strip-track { animation: none !important; }
    * { transition-duration: 0.01ms !important; }
  }

  .foot-bottom a { color: inherit; text-decoration: underline; text-underline-offset: 3px; }

  /* Reveal on scroll */
  .reveal { opacity: 0; transform: translateY(24px); transition: opacity 800ms ease, transform 800ms ease; }
  .reveal.in { opacity: 1; transform: none; }
  /* ---------- responsive : éléments partagés ---------- */
  @media (max-width: 960px) {
    .section-head { grid-template-columns: 1fr; }
    .foot-grid { grid-template-columns: 1fr 1fr; }
    .nav-links { display: none; }
    .nav-inner { grid-template-columns: auto 1fr; }
  }
