/* ============================================================
   Amélie Pacheco — Formalités notariales
   Système de design partagé
   ============================================================ */

:root {
  /* Couleurs */
  --bg: #F6F2EA;
  --bg-2: #EFE9DD;
  --bg-3: #E7DFCF;
  --ink: #1C2321;
  --ink-2: #3A423F;
  --ink-3: #6C7471;
  --line: #D9D1BE;
  --line-2: #C8BFAA;

  --accent: #0C978C;
  --accent-ink: #075F58;
  --accent-wash: #D8EBE8;
  --accent-glow: #0C978C20;

  --warm: #C8704B;
  --warm-wash: #F4E3D8;

  --white: #FFFFFF;

  /* Typo — 2 familles seulement : serif pour titres, sans pour texte */
  --font-serif: "Instrument Serif", "Cormorant Garamond", Georgia, serif;
  --font-sans: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  --font-mono: "Inter", -apple-system, BlinkMacSystemFont, sans-serif;

  /* Espacements */
  --container: 1200px;
  --container-narrow: 880px;

  /* Radius system — 5 tokens, pas plus */
  --r-pill: 999px;   /* Boutons, badges, statuts */
  --r-sm: 8px;       /* Inputs, petits éléments */
  --r-md: 14px;      /* Cards standard */
  --r-lg: 20px;      /* Hero visuels, grandes cards */
  --r-full: 50%;     /* Cercles : dots, avatars */
  /* Legacy (à supprimer progressivement) */
  --radius: var(--r-sm);
  --radius-lg: var(--r-md);

  /* Transitions */
  --ease: cubic-bezier(.2, .7, .2, 1);
}

* { box-sizing: border-box; }

html, body {
  margin: 0;
  padding: 0;
  background: var(--white);
  color: var(--ink);
  font-family: var(--font-sans);
  font-size: 16px;
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-rendering: optimizeLegibility;
}

img { display: block; max-width: 100%; }

a {
  color: inherit;
  text-decoration: none;
  transition: color .2s var(--ease);
}

button {
  font-family: inherit;
  cursor: pointer;
  border: none;
  background: none;
}

/* Typographie */
h1, h2, h3, h4 {
  font-family: var(--font-serif);
  font-weight: 400;
  letter-spacing: -0.01em;
  line-height: 1.05;
  margin: 0;
  text-wrap: balance;
}

h1 { font-size: clamp(44px, 6vw, 88px); }
h2 { font-size: clamp(32px, 4vw, 56px); }
h3 { font-size: clamp(22px, 2.4vw, 30px); }
h4 { font-family: var(--font-sans); font-weight: 600; font-size: 14px; letter-spacing: 0; }

p { text-wrap: pretty; font-weight: 400; }
strong, b { font-weight: 600; }

.eyebrow {
  font-family: var(--font-sans);
  font-size: 12px;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  color: var(--ink-3);
  font-weight: 500;
}

/* Container */
.container {
  max-width: var(--container);
  margin: 0 auto;
  padding: 0 32px;
}
.container-narrow {
  max-width: var(--container-narrow);
  margin: 0 auto;
  padding: 0 32px;
}

/* ============================================================
   Header
   ============================================================ */
.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: color-mix(in oklch, var(--white) 88%, transparent);
  backdrop-filter: blur(16px) saturate(1.1);
  -webkit-backdrop-filter: blur(16px) saturate(1.1);
  border-bottom: 1px solid var(--line);
}

.site-header__inner {
  max-width: var(--container);
  margin: 0 auto;
  padding: 18px 32px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 32px;
}

.logo {
  display: flex;
  align-items: center;
  gap: 12px;
  font-family: var(--font-serif);
  font-size: 22px;
  letter-spacing: -0.01em;
  line-height: 1;
}
.logo-name {
  font-weight: 400;
  font-style: italic;
  color: var(--ink);
  position: relative;
}
.logo-name::after {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  bottom: -4px;
  height: 1px;
  background: var(--accent);
}
.logo-suffix {
  font-family: var(--font-sans);
  font-size: 10px;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--ink-3);
  margin-left: 4px;
  padding-left: 10px;
  border-left: 1px solid var(--line-2);
}

.nav {
  display: flex;
  align-items: center;
  gap: 28px;
}
.nav a {
  font-size: 14px;
  color: var(--ink-2);
  position: relative;
  padding: 6px 0;
}
.nav a:hover { color: var(--ink); }
.nav a.active {
  color: var(--ink);
}
.nav a.active::after {
  content: "";
  position: absolute;
  bottom: -2px;
  left: 0;
  right: 0;
  height: 1px;
  background: var(--accent);
}

/* --- Menu WordPress (wp_nav_menu) ---
   Le menu sort en <li class="menu-item"> (sans <ul>, via items_wrap '%3$s').
   On neutralise les puces des <li> et on mappe l'état actif de WordPress
   (.current-menu-item / .current_page_item) sur le même soulignement que
   .nav a.active, utilisé par la maquette statique et le menu de repli. */
.nav li {
  list-style: none;
  margin: 0;
  padding: 0;
}
.nav .current-menu-item > a,
.nav .current_page_item > a,
.nav .current-menu-ancestor > a {
  color: var(--ink);
}
.nav .current-menu-item > a::after,
.nav .current_page_item > a::after,
.nav .current-menu-ancestor > a::after {
  content: "";
  position: absolute;
  bottom: -2px;
  left: 0;
  right: 0;
  height: 1px;
  background: var(--accent);
}

.btn {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 12px 20px;
  border-radius: var(--r-pill);
  font-size: 14px;
  font-weight: 500;
  transition: all .25s var(--ease);
  white-space: nowrap;
  cursor: pointer;
  border: 1px solid transparent;
}
.btn-primary {
  background: var(--ink);
  color: var(--bg);
}
.btn-primary:hover {
  background: var(--accent-ink);
}
.btn-accent {
  background: var(--accent);
  color: var(--white);
}
.btn-accent:hover {
  background: var(--accent-ink);
}
.btn-ghost {
  background: transparent;
  color: var(--ink);
  border: 1px solid var(--ink);
}
.btn-ghost:hover {
  background: var(--ink);
  color: var(--bg);
}
.btn-arrow { transition: transform .25s var(--ease); }
.btn:hover .btn-arrow { transform: translateX(3px); }

/* ============================================================
   Footer
   ============================================================ */
.site-footer {
  margin-top: 120px;
  padding: 72px 0 40px;
  border-top: 1px solid var(--line);
  background: var(--bg-2);
}
.site-footer__grid {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr 1fr;
  gap: 48px;
  margin-bottom: 56px;
}
.site-footer h4 {
  font-family: var(--font-sans);
  font-size: 11px;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--ink-3);
  font-weight: 500;
  margin-bottom: 20px;
}
.site-footer ul {
  list-style: none;
  padding: 0;
  margin: 0;
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.site-footer ul a {
  color: var(--ink-2);
  font-size: 14px;
}
.site-footer ul a:hover { color: var(--accent); }
.site-footer__tagline {
  font-family: var(--font-serif);
  font-size: 28px;
  line-height: 1.1;
  max-width: 380px;
  margin-bottom: 20px;
}
.site-footer__bottom {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding-top: 28px;
  border-top: 1px solid var(--line);
  font-family: var(--font-sans);
  font-size: 11px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--ink-3);
}

/* ============================================================
   Badges / chips
   ============================================================ */
.chip {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 6px 14px;
  border-radius: var(--r-pill);
  border: 1px solid var(--line-2);
  background: var(--bg);
  font-family: var(--font-sans);
  font-size: 11px;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--ink-2);
}
.chip::before {
  content: "—";
  color: var(--accent);
  font-weight: 500;
}

/* Variant : statut en cours (avec dot pulsant accent) */
.chip--status {
  color: var(--accent-ink);
  background: color-mix(in srgb, var(--accent) 8%, var(--bg));
  border-color: color-mix(in srgb, var(--accent) 25%, transparent);
}
.chip--status::before { content: none; }
.chip--status .chip__dot {
  width: 8px;
  height: 8px;
  border-radius: var(--r-full);
  background: var(--accent);
  box-shadow: 0 0 0 4px color-mix(in srgb, var(--accent) 15%, transparent);
  animation: chip-pulse 2s ease-in-out infinite;
}
@keyframes chip-pulse {
  0%, 100% { box-shadow: 0 0 0 4px color-mix(in srgb, var(--accent) 15%, transparent); }
  50%      { box-shadow: 0 0 0 7px color-mix(in srgb, var(--accent) 5%, transparent); }
}

/* Utilitaires */
.divider {
  height: 1px;
  background: var(--line);
  border: none;
  margin: 0;
}

.grid-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 40px; }
.grid-3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 32px; }
.grid-4 { display: grid; grid-template-columns: repeat(4, 1fr); gap: 24px; }

@media (max-width: 900px) {
  .grid-2, .grid-3, .grid-4, .site-footer__grid { grid-template-columns: 1fr; }
  .nav { display: none; }
  h1 { font-size: 48px; }
  .site-header__inner { padding: 14px 20px; }
  .container, .container-narrow { padding: 0 20px; }
}

/* Animations douces */
@keyframes fadeUp {
  from { opacity: 0; transform: translateY(14px); }
  to { opacity: 1; transform: translateY(0); }
}
.fade-in { animation: fadeUp .8s var(--ease) both; }
.fade-in-2 { animation: fadeUp .8s var(--ease) .1s both; }
.fade-in-3 { animation: fadeUp .8s var(--ease) .2s both; }
.fade-in-4 { animation: fadeUp .8s var(--ease) .3s both; }

/* Motif abstrait : lignes concentriques */
.motif-rings {
  position: absolute;
  width: 520px;
  height: 520px;
  border-radius: var(--r-full);
  background: radial-gradient(
    circle,
    transparent 0,
    transparent 80px,
    var(--line) 80px, var(--line) 81px,
    transparent 81px, transparent 140px,
    var(--line-2) 140px, var(--line-2) 141px,
    transparent 141px, transparent 200px,
    var(--line) 200px, var(--line) 201px,
    transparent 201px
  );
  opacity: .6;
  pointer-events: none;
}

/* Tweaks panel */
.tweaks-panel {
  position: fixed;
  bottom: 24px;
  right: 24px;
  width: 300px;
  background: var(--white);
  border: 1px solid var(--line-2);
  border-radius: var(--r-md);
  padding: 20px;
  box-shadow: 0 20px 50px rgba(28, 35, 33, 0.12);
  z-index: 100;
  font-family: var(--font-sans);
  display: none;
}
.tweaks-panel.open { display: block; animation: fadeUp .3s var(--ease) both; }
.tweaks-panel__title {
  font-family: var(--font-sans);
  font-size: 11px;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--ink-3);
  margin-bottom: 14px;
}
.tweak-row { margin-bottom: 16px; }
.tweak-row:last-child { margin-bottom: 0; }
.tweak-label {
  font-size: 12px;
  color: var(--ink-2);
  display: block;
  margin-bottom: 8px;
  font-weight: 500;
}
.tweak-swatches {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}
.tweak-swatch {
  width: 26px;
  height: 26px;
  border-radius: var(--r-full);
  border: 2px solid var(--bg);
  box-shadow: 0 0 0 1px var(--line-2);
  cursor: pointer;
  transition: transform .15s var(--ease);
}
.tweak-swatch:hover { transform: scale(1.1); }
.tweak-swatch.active {
  box-shadow: 0 0 0 2px var(--ink);
}
.tweak-segmented {
  display: flex;
  border: 1px solid var(--line-2);
  border-radius: var(--r-sm);
  overflow: hidden;
}
.tweak-segmented button {
  flex: 1;
  padding: 8px;
  font-size: 12px;
  background: transparent;
  color: var(--ink-2);
  transition: all .2s;
}
.tweak-segmented button.active {
  background: var(--ink);
  color: var(--bg);
}

/* ============================================================
   Accessibilité — focus visible (clavier)
   ============================================================ */
*:focus { outline: none; }
a:focus-visible,
button:focus-visible,
input:focus-visible,
textarea:focus-visible,
select:focus-visible,
[tabindex]:focus-visible,
.btn:focus-visible,
.service-card:focus-visible,
.form-option:focus-visible {
  outline: 2px solid var(--accent-ink);
  outline-offset: 3px;
  border-radius: 4px;
}
.form-field input:focus-visible,
.form-field textarea:focus-visible,
.form-field select:focus-visible {
  outline-offset: 0;
  border-radius: var(--r-sm, 6px);
}
