/* ============================================================
   COMPONENTS — boutons, header, nav, formulaires, cartes
   ============================================================ */

/* ============== BUTTONS ============== */
.btn {
  --btn-bg: var(--primary);
  --btn-fg: #fff;
  --btn-bd: var(--primary);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.6em;
  padding: 0.85em 1.5em;
  font-family: var(--font-body);
  font-weight: 500;
  font-size: var(--fs-200);
  letter-spacing: 0.01em;
  background: var(--btn-bg);
  color: var(--btn-fg);
  border: 1.5px solid var(--btn-bd);
  border-radius: var(--radius-pill);
  cursor: pointer;
  transition: transform var(--t-fast), background var(--t-fast), color var(--t-fast), border-color var(--t-fast), box-shadow var(--t-base);
  white-space: nowrap;
  text-decoration: none;
  position: relative;
  isolation: isolate;
}
.btn:hover { transform: translateY(-1px); box-shadow: var(--shadow-sm); }
.btn:active { transform: translateY(0); }
.btn svg { transition: transform var(--t-fast); }
.btn:hover svg { transform: translateX(3px); }

.btn--primary { --btn-bg: var(--primary); --btn-bd: var(--primary); --btn-fg: #fff; }
.btn--primary:hover { --btn-bg: var(--primary-hover); --btn-bd: var(--primary-hover); color: #fff; }

.btn--secondary {
  --btn-bg: transparent;
  --btn-fg: var(--ink-900);
  --btn-bd: var(--ink-900);
}
.btn--secondary:hover { --btn-bg: var(--ink-900); --btn-fg: #fff; }

.btn--ghost {
  --btn-bg: transparent;
  --btn-fg: var(--ink-900);
  --btn-bd: transparent;
  padding-inline: 0.75em;
}
.btn--ghost::after {
  content: "";
  position: absolute;
  left: 1.25em; right: 1.25em;
  bottom: 0.5em;
  height: 1.5px;
  background: currentColor;
  transform: scaleX(0.4);
  transform-origin: left;
  transition: transform var(--t-base);
  opacity: 0.6;
}
.btn--ghost:hover { color: var(--primary); box-shadow: none; transform: translateY(-1px); }
.btn--ghost:hover::after { transform: scaleX(1); opacity: 1; }

.btn--lg { padding: 1em 1.85em; font-size: var(--fs-300); }
.btn--sm { padding: 0.6em 1.1em; font-size: var(--fs-100); }
.btn--block { width: 100%; }

/* ============== HEADER ============== */
.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: rgba(250, 246, 239, 0.78);
  backdrop-filter: saturate(180%) blur(14px);
  -webkit-backdrop-filter: saturate(180%) blur(14px);
  transition: background var(--t-base), box-shadow var(--t-base), border-color var(--t-base);
  border-bottom: 1px solid transparent;
}
.site-header[data-elevation="scrolled"] {
  background: rgba(250, 246, 239, 0.92);
  border-bottom-color: var(--line-soft);
  box-shadow: 0 6px 30px rgba(45, 50, 45, 0.05);
}

.header__inner {
  height: var(--header-h);
  display: flex;
  align-items: center;
  gap: var(--space-7);
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 0.75rem;
  color: var(--primary);
  flex: 0 0 auto;
}
.brand__mark {
  width: 44px; height: 44px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: var(--surface);
  border-radius: 12px;
  box-shadow: var(--shadow-sm);
  color: var(--primary);
  flex: 0 0 auto;
}
.brand__text {
  display: inline-flex;
  flex-direction: column;
  line-height: 1.1;
}
.brand__name {
  font-family: var(--font-display);
  font-size: 1.25rem;
  font-weight: 600;
  color: var(--ink-900);
  letter-spacing: -0.01em;
}
.brand__tag {
  font-size: 0.72rem;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--ink-500);
  font-weight: 500;
  display: none;
}
/* Tagline only restored in the footer brand for context */
.brand--footer .brand__tag { display: inline-block; }

.nav { flex: 1; display: flex; justify-content: center; min-width: 0; }
.site-header .nav__list { display: flex; gap: 0.1rem; align-items: center; flex-wrap: nowrap !important; white-space: nowrap; }
.site-header .nav__list li { white-space: nowrap; flex: 0 0 auto; }
.site-header .nav__list a { white-space: nowrap !important; }
.nav__list a {
  display: inline-block;
  padding: 0.6em 0.7em;
  font-size: var(--fs-100);
  font-weight: 500;
  color: var(--ink-700);
  border-radius: var(--radius-sm);
  transition: color var(--t-fast), background var(--t-fast);
  position: relative;
  white-space: nowrap;
}
.nav__list a:hover { color: var(--primary); background: var(--primary-soft); }
.nav__list a.is-active {
  color: var(--primary);
}
.nav__list a.is-active::after {
  content: "";
  position: absolute;
  left: 50%; bottom: 4px;
  width: 6px; height: 6px;
  background: var(--accent-warm);
  border-radius: 50%;
  transform: translateX(-50%);
}

.header__cta { flex: 0 0 auto; }

/* ---- Burger ---- */
.burger {
  display: none;
  width: 44px; height: 44px;
  padding: 10px;
  flex-direction: column;
  gap: 5px;
  align-items: center;
  justify-content: center;
}
.burger span {
  width: 22px; height: 2px;
  background: var(--ink-900);
  border-radius: 2px;
  transition: transform var(--t-fast), opacity var(--t-fast);
}
.burger[aria-expanded="true"] span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.burger[aria-expanded="true"] span:nth-child(2) { opacity: 0; }
.burger[aria-expanded="true"] span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

/* ---- Mobile menu ---- */
.mobile-menu {
  position: fixed;
  inset: var(--header-h) 0 0 0;
  background: var(--bg);
  padding: var(--space-7) var(--gutter) var(--space-9);
  transform: translateY(-110%);
  transition: transform var(--t-base);
  z-index: 90;
  border-top: 1px solid var(--line-soft);
  overflow-y: auto;
}
.mobile-menu.is-open { transform: translateY(0); }
.mobile-menu ul { display: flex; flex-direction: column; gap: 4px; margin-bottom: var(--space-7); }
.mobile-menu a {
  display: block;
  padding: 1em 1.2em;
  font-family: var(--font-display);
  font-size: 1.5rem;
  font-weight: 500;
  color: var(--ink-900);
  border-bottom: 1px solid var(--line-soft);
}
.mobile-menu a:hover { color: var(--primary); }

/* ============== FORM ============== */
.form-row { display: grid; grid-template-columns: 1fr 1fr; gap: var(--space-5); }

.form-field { display: flex; flex-direction: column; gap: 0.45rem; margin-bottom: var(--space-5); }
.form-field label {
  font-size: var(--fs-100);
  font-weight: 500;
  letter-spacing: 0.04em;
  color: var(--ink-700);
}

.form-field input,
.form-field select,
.form-field textarea {
  padding: 0.95em 1.1em;
  background: var(--surface);
  color: var(--ink-900);
  border: 1.5px solid var(--line);
  border-radius: var(--radius-md);
  font-size: var(--fs-200);
  transition: border-color var(--t-fast), box-shadow var(--t-fast), background var(--t-fast);
  font-family: inherit;
}
.form-field input:hover,
.form-field select:hover,
.form-field textarea:hover { border-color: var(--sage-300); }
.form-field input:focus,
.form-field select:focus,
.form-field textarea:focus {
  outline: 0;
  border-color: var(--primary);
  box-shadow: 0 0 0 4px rgba(120, 138, 120, 0.18);
}
.form-field textarea { resize: vertical; min-height: 130px; line-height: 1.55; }

.form-field--check {
  flex-direction: row;
  align-items: flex-start;
  gap: 0.7rem;
  font-size: var(--fs-100);
  color: var(--ink-500);
}
.form-field--check input { width: 18px; height: 18px; margin-top: 3px; accent-color: var(--primary); }
.form-field--check label { font-weight: 400; line-height: 1.5; }
.form-field--check a { color: var(--primary); text-decoration: underline; text-underline-offset: 3px; }

.form-feedback,
.newsletter__feedback {
  margin-top: var(--space-3);
  font-size: var(--fs-100);
  min-height: 1.4em;
}
.form-feedback.is-success,
.newsletter__feedback.is-success { color: var(--sage-600); }
.form-feedback.is-error,
.newsletter__feedback.is-error { color: var(--warm-500); }

/* ============== NEWSLETTER ============== */
.newsletter {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: var(--space-3);
  max-width: 480px;
}
.newsletter input {
  padding: 0.95em 1.1em;
  background: var(--surface);
  border: 1.5px solid var(--line);
  border-radius: var(--radius-pill);
  font-size: var(--fs-200);
  transition: border-color var(--t-fast), box-shadow var(--t-fast);
}
.newsletter input:focus {
  outline: 0;
  border-color: var(--primary);
  box-shadow: 0 0 0 4px rgba(120, 138, 120, 0.18);
}
.newsletter__feedback { grid-column: 1 / -1; }

/* ============== RESPONSIVE HEADER ============== */
@media (max-width: 1500px) {
  .brand__tag { display: none; }
  .header__inner { gap: var(--space-5); }
}
@media (max-width: 1280px) {
  .nav, .header__cta { display: none; }
  .burger { display: inline-flex; }
}
@media (max-width: 640px) {
  .form-row { grid-template-columns: 1fr; }
  .newsletter { grid-template-columns: 1fr; }
}
