/* ==========================================================================
   Les Encens de Cassou — Base (tokens, reset, utilitaires)
   ========================================================================== */

:root {
  /* Palette chaleureuse : cacao, terre cuite, ambre, safran, crème */
  --c-cocoa-950: #1f130d;
  --c-cocoa-900: #2b1a12;
  --c-cocoa-800: #3b2519;
  --c-cocoa-700: #553525;
  --c-terracotta: #b4532a;
  --c-terracotta-600: #9a4422;
  --c-amber: #d98c36;
  --c-saffron: #eab35a;
  --c-gold: #c9a063;
  --c-cream: #fcf6ec;
  --c-paper: #fffaf2;
  --c-sand: #f4e7d3;
  --c-linen: #ead8bd;
  --c-ink: #2e1f17;
  --c-muted: #7d6353;
  --c-line: rgba(85, 53, 37, .14);

  /* Typographie */
  --font-display: "EB Garamond", Garamond, Georgia, "Times New Roman", serif;
  --font-body: "Jost", system-ui, -apple-system, "Segoe UI", sans-serif;

  /* Formes & ombres */
  --radius-sm: 8px;
  --radius: 14px;
  --radius-lg: 22px;
  --shadow-soft: 0 10px 30px -14px rgba(59, 37, 25, .28);
  --shadow-lg: 0 28px 60px -22px rgba(43, 26, 18, .38);

  /* Mouvement */
  --ease-out: cubic-bezier(.22, 1, .36, 1);
  --ease-in-out: cubic-bezier(.65, 0, .35, 1);

  /* Mise en page */
  --container: 1320px;
  --gutter: clamp(16px, 3vw, 32px);
  --topbar-h: 40px;
  --header-h: 88px;
  --header-h-compact: 70px;
}

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

html {
  -webkit-text-size-adjust: 100%;
  scroll-behavior: smooth;
}

body {
  margin: 0;
  font-family: var(--font-body);
  font-size: 16px;
  line-height: 1.6;
  color: var(--c-ink);
  background-color: var(--c-cream);
  background-image:
    radial-gradient(1200px 500px at 85% -10%, rgba(234, 179, 90, .14), transparent 60%),
    radial-gradient(900px 500px at -10% 20%, rgba(180, 83, 42, .07), transparent 60%);
  background-attachment: fixed;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

body.no-scroll { overflow: hidden; }

img, svg { display: block; max-width: 100%; }
a { color: inherit; text-decoration: none; }
button { font: inherit; color: inherit; background: none; border: 0; padding: 0; cursor: pointer; }
ul { list-style: none; margin: 0; padding: 0; }
input { font: inherit; }

:focus-visible {
  outline: 2px solid var(--c-amber);
  outline-offset: 3px;
  border-radius: 6px;
}

.container {
  width: 100%;
  max-width: var(--container);
  margin-inline: auto;
  padding-inline: var(--gutter);
}

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

.skip-link {
  position: fixed;
  left: 16px; top: -100px;
  z-index: 1000;
  padding: 10px 18px;
  border-radius: 999px;
  background: var(--c-cocoa-900);
  color: var(--c-cream);
  font-weight: 500;
  transition: top .3s var(--ease-out);
}
.skip-link:focus { top: 12px; }

/* Boutons */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  height: 46px;
  padding: 0 24px;
  border-radius: 999px;
  font-size: 13px;
  font-weight: 500;
  letter-spacing: .1em;
  text-indent: .1em; /* compense l'espacement ajouté après la dernière lettre : texte bien centré */
  text-transform: uppercase;
  white-space: nowrap;
  transition: background .3s, color .3s, transform .3s var(--ease-out), box-shadow .3s;
}
.btn--primary {
  background: var(--c-cocoa-900);
  color: var(--c-cream);
}
.btn--primary:hover {
  background: var(--c-terracotta);
  box-shadow: 0 10px 24px -10px rgba(180, 83, 42, .7);
  transform: translateY(-1px);
}

.btn--outline {
  background: transparent;
  color: var(--c-cocoa-900);
  box-shadow: inset 0 0 0 1px rgba(85, 53, 37, .3);
}
.btn--outline:hover { box-shadow: inset 0 0 0 1px var(--c-gold); color: var(--c-terracotta); }
.btn:disabled { opacity: .55; cursor: not-allowed; transform: none; }
.btn.is-loading { position: relative; color: transparent !important; }
.btn.is-loading::after {
  content: "";
  position: absolute;
  inset: 0;
  margin: auto;
  width: 18px; height: 18px;
  border: 2px solid currentColor;
  border-color: var(--c-muted) var(--c-muted) var(--c-muted) transparent;
  border-radius: 50%;
  animation: btn-spin .7s linear infinite;
}
@keyframes btn-spin { to { transform: rotate(360deg); } }

/* Boutons pour fonds sombres */
.btn--light {
  background: #f6ecdf;
  color: var(--c-cocoa-950);
}
.btn--light:hover {
  background: var(--c-saffron);
  box-shadow: 0 14px 34px -12px rgba(233, 179, 90, .6);
  transform: translateY(-1px);
}
.btn--ghost {
  background: rgba(246, 236, 223, .04);
  color: #f6ecdf;
  box-shadow: inset 0 0 0 1px rgba(246, 236, 223, .32);
  -webkit-backdrop-filter: blur(6px);
  backdrop-filter: blur(6px);
}
.btn--ghost:hover {
  background: rgba(246, 236, 223, .1);
  box-shadow: inset 0 0 0 1px rgba(233, 179, 90, .7);
  color: var(--c-saffron);
}

/* Emplacements des partials : réservent la place pour éviter les sauts */
[data-include="topbar"] { display: block; min-height: var(--topbar-h); background: var(--c-cocoa-900); }
[data-include="header"] { display: block; min-height: var(--header-h); }

.site-main { min-height: 60vh; outline: none; }

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after {
    animation-duration: .01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: .01ms !important;
    transition-delay: 0s !important;
  }
}

/* Attribut hidden toujours respecté (navigation masquée si les menus sont indisponibles…) */
[hidden] { display: none !important; }
