/* ============================================================
   BASE.CSS — Global Reset & Typography Defaults
   ============================================================
   PURPOSE:
     Establishes consistent baseline styles across all browsers.
     Sets the default font, line height, and color for the page.

   SAFE TO EDIT:
     - body font-size if you want the page to scale up/down
     - line-height for tighter or looser reading rhythm
     - html scroll-behavior (smooth is standard; auto disables it)

   DO NOT MODIFY:
     - The box-sizing reset (first rule). It ensures padding
       is included in element widths everywhere — removing it
       breaks all layout calculations.
     - margin/padding reset on * — this prevents browser
       default spacing from conflicting with your own.
============================================================ */

/* ── Universal Box Model Reset ──────────────────────────────
   Makes width calculations predictable: padding and border
   are INCLUDED in an element's stated width, not added on top.
────────────────────────────────────────────────────────────── */
*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

/* ── Smooth Anchor Scrolling ─────────────────────────────── */
html {
  scroll-behavior: smooth;
}

/* ── Body Defaults ───────────────────────────────────────────
   Sets the base font, weight, color, and rendering quality
   for the entire page. All other type inherits from here.
────────────────────────────────────────────────────────────── */
body {
  font-family: var(--font-sans);
  font-weight: 300;
  color: var(--ink);
  background: var(--white);
  line-height: 1.65;

  /* Smooths font rendering on Mac/retina displays */
  -webkit-font-smoothing: antialiased;
}

/* ── Common Section Spacing ──────────────────────────────────
   All <section> elements get consistent vertical padding.
   Individual section overrides live in their own CSS file.
────────────────────────────────────────────────────────────── */
section {
  padding: 100px var(--gutter);
}

/* ── Shared Eyebrow Label ────────────────────────────────────
   The small all-caps label above headings (e.g. "À propos").
   Used across multiple sections.
────────────────────────────────────────────────────────────── */
.section-eyebrow {
  font-size: 0.72rem;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--gold);
  font-weight: 500;
  margin-bottom: 1rem;
  display: flex;
  align-items: center;
  gap: 0.8rem;
}

/* Decorative line before eyebrow text */
.section-eyebrow::before {
  content: '';
  display: block;
  width: 24px;
  height: 1px;
  background: var(--gold);
}

/* ── Shared Section Title ─────────────────────────────────── */
.section-title {
  font-family: var(--font-serif);
  font-weight: 300;
  font-size: clamp(2rem, 3vw, 2.8rem);
  line-height: 1.18;
  color: var(--ink);
  max-width: 560px;
  margin-bottom: 1rem;
}

/* Italic accent within titles */
.section-title em {
  font-style: italic;
  color: var(--gold);
}

/* ── Shared Section Lead Paragraph ───────────────────────── */
.section-lead {
  font-size: 1rem;
  color: var(--stone);
  max-width: 500px;
  line-height: 1.75;
  margin-bottom: 3.5rem;
}

/* ── Shared Primary Button ───────────────────────────────────
   Used across Hero, Services, Process, Contact, CTA sections.
   Override background color inline or via modifier classes.
────────────────────────────────────────────────────────────── */
.btn-primary {
  display: inline-block;
  background: var(--ink);
  color: var(--white);
  padding: 0.9rem 2rem;
  text-decoration: none;
  font-size: 0.82rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  font-weight: 500;
  border-radius: var(--radius);
  transition: background 0.2s, transform 0.15s;
  border: none;
  cursor: pointer;
  font-family: inherit;
}

.btn-primary:hover {
  background: var(--gold);
  transform: translateY(-1px);
}

/* Full-width button variant */
.btn-primary.full {
  width: 100%;
  text-align: center;
}

/* ── Reveal Animation (Scroll-triggered) ─────────────────────
   Elements with class="reveal" start invisible and slide up.
   JavaScript in animations.js adds class="visible" when the
   element enters the viewport.

   SAFE TO EDIT:
     - transition duration (0.6s) for faster/slower reveals
     - translateY distance (20px) for more/less movement

   DO NOT REMOVE:
     - opacity: 0 is essential — without it, all content
       appears immediately and the animation never triggers.
────────────────────────────────────────────────────────────── */
.reveal {
  opacity: 0;
  transform: translateY(20px);
  transition: opacity 0.6s ease, transform 0.6s ease;
}

.reveal.visible {
  opacity: 1;
  transform: translateY(0);
}

/* ── Language-Switch Acknowledgment (subtle, brief) ───────────
   Played by pulseTranslatedContent() in index.html AFTER the FR/EN
   text swap already happened — text is never hidden mid-swap, this
   only softens the instant reflow that follows (FR/EN copy lengths
   differ, so elements resize; a hard cut felt like a "jump").
   html.lang-swap is added for ~260ms on every manual toggle click,
   never on initial page load.
────────────────────────────────────────────────────────────── */
@keyframes lang-swap-fade {
  from { opacity: 0.45; }
  to   { opacity: 1; }
}

html.lang-swap [data-fr],
html.lang-swap [data-fr-html] {
  animation: lang-swap-fade 0.22s ease-out;
}

/* Respect reduced-motion preferences — content already updated instantly;
   this animation is decorative only. */
@media (prefers-reduced-motion: reduce) {
  html.lang-swap [data-fr],
  html.lang-swap [data-fr-html] {
    animation: none;
  }
}
