/* De But en Bois — Feuille de style principale (partagée) */

/* ============ RESET ============ */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; }
img, video { max-width: 100%; display: block; }
button { cursor: pointer; border: none; background: none; font: inherit; }
a { color: inherit; text-decoration: none; }
ul { list-style: none; }

/* ============ TOKENS ============ */
:root {
  /* Palette */
  --c-brun:        oklch(0.666 0.103 53);   /* #c08963 */
  --c-brun-fonce:  oklch(0.520 0.087 53);   /* #956a4b */
  --c-brun-light:  oklch(0.760 0.098 53);   /* miel clair — texte sur fond bleu foncé (AA) */
  --c-bleu:        #103e4e;
  --c-bleu-nuit:   #0a2933;
  --c-blanc:       #ffffff;
  --c-fond:        oklch(0.976 0.004 55);
  --c-texte:       oklch(0.135 0.008 55);
  --c-texte-doux:  oklch(0.42 0.012 55);
  --c-ligne:       oklch(0.915 0.006 55);

  /* Typographie */
  --font-titre:  'Barlow Semi Condensed', sans-serif;
  --font-corps:  'Barlow', sans-serif;

  /* Espacement (base 4px) */
  --sp-1:  0.25rem;
  --sp-2:  0.5rem;
  --sp-3:  0.75rem;
  --sp-4:  1rem;
  --sp-5:  1.25rem;
  --sp-6:  1.5rem;
  --sp-8:  2rem;
  --sp-10: 2.5rem;
  --sp-12: 3rem;
  --sp-16: 4rem;
  --sp-20: 5rem;
  --sp-24: 6rem;

  /* Conteneur */
  --max-w: 1200px;
  --radius: 3px;

  /* Z-index */
  --z-sticky: 100;
  --z-nav-mobile: 200;
}

/* ============ BASE ============ */
html {
  font-size: 16px;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

body {
  font-family: var(--font-corps);
  font-weight: 400;
  color: var(--c-texte);
  background: var(--c-fond);
  line-height: 1.6;
}

h1, h2, h3, h4 {
  font-family: var(--font-titre);
  font-weight: 700;
  line-height: 1.1;
  letter-spacing: -0.01em;
  text-wrap: balance;
}

h1 { font-size: clamp(2.25rem, 5.5vw, 4.75rem); letter-spacing: -0.025em; }
h2 { font-size: clamp(1.75rem, 3.5vw, 2.625rem); }
h3 { font-size: clamp(1.0625rem, 1.8vw, 1.25rem); font-weight: 600; }

p { text-wrap: pretty; }

/* ============ CONTENEUR ============ */
.container {
  max-width: var(--max-w);
  margin: 0 auto;
  padding: 0 var(--sp-6);
}

/* ============ BOUTONS ============ */
.btn {
  display: inline-flex;
  align-items: center;
  gap: var(--sp-2);
  padding: 0.875rem 2rem;
  font-family: var(--font-corps);
  font-size: 0.9375rem;
  font-weight: 600;
  border-radius: var(--radius);
  transition: background 0.2s, color 0.2s, border-color 0.2s, transform 0.15s;
  white-space: nowrap;
  letter-spacing: 0.01em;
}

.btn:hover { transform: translateY(-1px); }
.btn:active { transform: translateY(0); }

.btn-primary {
  background: var(--c-brun);
  color: var(--c-blanc);
}
.btn-primary:hover { background: var(--c-brun-fonce); }

.btn-outline {
  background: transparent;
  color: var(--c-blanc);
  border: 1.5px solid rgba(255 255 255 / 0.45);
}
.btn-outline:hover {
  background: rgba(255 255 255 / 0.08);
  border-color: rgba(255 255 255 / 0.75);
}

.btn-bleu {
  background: var(--c-bleu);
  color: var(--c-blanc);
}
.btn-bleu:hover { background: var(--c-bleu-nuit); }

/* ============ HEADER ============ */
.site-header {
  position: fixed;
  inset: 0 0 auto 0;
  z-index: var(--z-sticky);
  background: var(--c-blanc);
  border-bottom: 1px solid transparent;
  transition: border-color 0.25s, box-shadow 0.25s;
}

.site-header.scrolled {
  border-color: var(--c-ligne);
  box-shadow: 0 4px 20px rgba(0 36 48 / 0.08);
}

.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 96px;
  gap: var(--sp-8);
}

.logo {
  display: flex;
  align-items: center;
  gap: var(--sp-3);
  flex-shrink: 0;
}

.logo-img {
  height: 68px;
  width: auto;
  display: block;
}

.logo-img--footer {
  height: 80px;
  width: auto;
}

.logo-mark {
  width: 38px;
  height: 38px;
  background: var(--c-bleu);
  border-radius: 2px;
  display: grid;
  place-items: center;
  flex-shrink: 0;
}

.logo-mark svg { width: 22px; height: 22px; }

.logo-name {
  font-family: var(--font-titre);
  font-weight: 700;
  font-size: 1.0625rem;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--c-bleu);
  line-height: 1.15;
}

.logo-name small {
  display: block;
  font-size: 0.625rem;
  font-weight: 500;
  letter-spacing: 0.14em;
  color: var(--c-texte-doux);
  margin-top: 1px;
}

/* Navigation desktop */
.site-nav {
  display: flex;
  align-items: center;
  gap: var(--sp-1);
}

.site-nav a {
  font-size: 0.9375rem;
  font-weight: 500;
  color: var(--c-texte-doux);
  padding: var(--sp-2) var(--sp-3);
  border-radius: var(--radius);
  transition: color 0.15s;
}
.site-nav a:hover { color: var(--c-texte); }
.site-nav a.active { color: var(--c-bleu); font-weight: 600; }

.nav-contact {
  margin-left: var(--sp-3);
  background: var(--c-brun) !important;
  color: var(--c-blanc) !important;
  padding: 0.625rem 1.25rem !important;
  font-weight: 600 !important;
  border-radius: var(--radius) !important;
  transition: background 0.2s !important;
}
.nav-contact:hover { background: oklch(0.520 0.087 53) !important; }

/* Hamburger */
.nav-toggle {
  display: none;
  flex-direction: column;
  justify-content: center;
  gap: 5px;
  width: 40px;
  height: 40px;
  padding: var(--sp-2);
  border-radius: var(--radius);
  transition: background 0.2s;
}
.nav-toggle:hover { background: var(--c-fond); }

.nav-toggle span {
  display: block;
  height: 2px;
  background: var(--c-texte);
  border-radius: 2px;
  transition: transform 0.25s, opacity 0.25s, width 0.25s;
  width: 100%;
}
.nav-toggle.open span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.nav-toggle.open span:nth-child(2) { opacity: 0; width: 0; }
.nav-toggle.open span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

/* Nav mobile overlay */
.nav-mobile {
  display: none;
  position: fixed;
  inset: 96px 0 0 0;
  z-index: var(--z-nav-mobile);
  background: var(--c-blanc);
  padding: 0 var(--sp-6) var(--sp-8);
  flex-direction: column;
  gap: var(--sp-1);
  border-top: 1px solid var(--c-ligne);
  overflow-y: auto;
}

.nav-mobile.open { display: flex; }

.nav-mobile a {
  font-size: 1.125rem;
  font-weight: 500;
  color: var(--c-texte);
  padding: var(--sp-4) var(--sp-3);
  border-bottom: 1px solid var(--c-ligne);
  transition: color 0.15s;
}
.nav-mobile a:hover { color: var(--c-brun-fonce); }

.nav-mobile .nav-contact-mobile {
  margin-top: var(--sp-4);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: var(--sp-4);
  background: var(--c-bleu);
  color: var(--c-blanc) !important;
  border-radius: var(--radius);
  font-weight: 600;
  font-size: 1rem;
  border-bottom: none !important;
}

/* ============ CTA BANDEAU ============ */
.section-cta {
  padding: var(--sp-20) 0;
  background: var(--c-bleu-nuit);
}

.cta-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--sp-12);
}

.cta-inner h2 {
  color: var(--c-blanc);
  max-width: 22ch;
}

.cta-inner p {
  color: rgba(255 255 255 / 0.6);
  font-size: 1.0625rem;
  margin-top: var(--sp-3);
  max-width: 44ch;
}

.cta-action { flex-shrink: 0; }

/* ============ PAGE HERO (pages intérieures) ============ */
.page-hero {
  margin-top: 96px;
  background: linear-gradient(
    to bottom,
    var(--c-bleu-nuit) 0%,
    var(--c-bleu) 100%
  );
  padding: var(--sp-16) 0;
}

.page-hero h1 {
  color: var(--c-blanc);
  font-size: clamp(1.75rem, 3.5vw, 2.75rem);
  margin-bottom: var(--sp-3);
}

.page-hero p {
  color: rgba(255 255 255 / 0.7);
  font-size: 1.0625rem;
  max-width: 52ch;
}

/* ============ FOOTER ============ */
.site-footer {
  background: linear-gradient(
    to bottom,
    var(--c-bleu-nuit) 0%,
    var(--c-bleu) 100%
  );
  padding: var(--sp-16) 0 0;
}

.footer-grid {
  display: grid;
  grid-template-columns: 2.2fr 1fr 1.4fr;
  gap: var(--sp-12);
  padding-bottom: var(--sp-12);
  border-bottom: 1px solid rgba(255 255 255 / 0.1);
}

.footer-logo { margin-bottom: var(--sp-4); }
.footer-logo .logo-name { color: var(--c-blanc); }
.footer-logo .logo-name small { color: rgba(255 255 255 / 0.45); }

.footer-desc {
  font-size: 0.9375rem;
  color: rgba(255 255 255 / 0.6);
  line-height: 1.65;
  max-width: 34ch;
}

.footer-col h4 {
  font-family: var(--font-titre);
  font-size: 0.6875rem;
  font-weight: 600;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: rgba(255 255 255 / 0.38);
  margin-bottom: var(--sp-5);
}

.footer-col ul {
  display: flex;
  flex-direction: column;
  gap: var(--sp-3);
}

.footer-col a {
  font-size: 0.9375rem;
  color: rgba(255 255 255 / 0.7);
  transition: color 0.15s;
}
.footer-col a:hover { color: var(--c-blanc); }

.footer-contact p {
  font-size: 0.9375rem;
  color: rgba(255 255 255 / 0.7);
  line-height: 1.5;
  margin-bottom: var(--sp-2);
}

.footer-contact a {
  color: var(--c-brun-light);
  font-weight: 500;
}
.footer-contact a:hover { color: oklch(0.82 0.09 53); }

.footer-bottom {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: var(--sp-5) 0;
  font-size: 0.8125rem;
  color: rgba(255 255 255 / 0.3);
}

/* ============ ANIMATIONS ============ */
@keyframes fadeUp {
  from { opacity: 0; transform: translateY(18px); }
  to   { opacity: 1; transform: translateY(0); }
}

@keyframes scrollPulse {
  0%, 100% { opacity: 0.5; transform: scaleY(1); transform-origin: top; }
  50%       { opacity: 1;   transform: scaleY(0.5); transform-origin: top; }
}

/* ============ RESPONSIVE ============ */
@media (max-width: 900px) {
  .cta-inner {
    flex-direction: column;
    text-align: center;
    gap: var(--sp-8);
  }
  .cta-inner h2 { max-width: unset; }
  .cta-inner p { max-width: unset; margin: var(--sp-3) auto 0; }
  .footer-grid { grid-template-columns: 1fr 1fr; }
  .footer-grid > :first-child { grid-column: span 2; }
}

@media (max-width: 640px) {
  .site-nav { display: none; }
  .nav-toggle { display: flex; }
  .header-inner { height: 70px; }
  .logo-img { height: 46px; }
  .nav-mobile { top: 70px; inset: 70px 0 0 0; }
  .page-hero { margin-top: 70px; }

  .footer-grid {
    grid-template-columns: 1fr;
    gap: var(--sp-8);
  }
  .footer-grid > :first-child { grid-column: span 1; }
  .footer-bottom { flex-direction: column; gap: var(--sp-2); text-align: center; }
}

@media (prefers-reduced-motion: reduce) {
  .btn { transition: none; }
}
