/* JCR Patrimoine — surface styles.
   Reuses the Ex‑Ante foundations (tokens, fonts) from the project root.
   Component visuals stay inline so each .jsx is self-contained. */

@import "./colors_and_type.css";

* { box-sizing: border-box; }

/* =====================================================================
   Blob organique animé (metaball) — accent du bouton "Prendre RDV"
   ===================================================================== */
.fe-blob { transform-box: fill-box; transform-origin: center; }
.fe-blob--a { animation: feBlobA 2.6s ease-in-out infinite; }
.fe-blob--b { animation: feBlobB 3.2s ease-in-out infinite; }
.fe-blob--c { animation: feBlobC 2.15s ease-in-out infinite; }
.fe-blob--core { animation: feBlobCore 3.4s ease-in-out infinite; }
@keyframes feBlobCore { 0%,100% { transform: scale(1); }       50% { transform: scale(1.12); } }
@keyframes feBlobA    { 0%,100% { transform: translate(0,0) scale(1); }     50% { transform: translate(6px,-7px) scale(1.2); } }
@keyframes feBlobB    { 0%,100% { transform: translate(0,0) scale(1); }     50% { transform: translate(-8px,6px) scale(1.18); } }
@keyframes feBlobC    { 0%,100% { transform: translate(0,0) scale(1); }     50% { transform: translate(6px,8px) scale(1.16); } }
@media (prefers-reduced-motion: reduce) {
  .fe-blob--a, .fe-blob--b, .fe-blob--c, .fe-blob--core { animation: none; }
}

/* =====================================================================
   Monogramme hero — entrée par translation (jamais masqué : base visible,
   on anime UNIQUEMENT le transform → robuste si l'animation ne joue pas)
   ===================================================================== */
@media (prefers-reduced-motion: no-preference) {
  .jcr-plate { animation: jcrPlateIn 0.9s cubic-bezier(0.22,1,0.36,1) 0.1s both; }
}
@keyframes jcrPlateIn { from { transform: translateY(16px) scale(0.99); } to { transform: none; } }

/* =====================================================================
   Scroll-reveal global + filets qui se tracent
   ===================================================================== */
@media (prefers-reduced-motion: no-preference) {
  .r-reveal { transform: translateY(24px); }
  .r-in {
    transform: none;
    transition: transform 0.8s cubic-bezier(0.22,1,0.36,1);
    will-change: transform;
  }
  .draw-x { transform: scaleX(0); transform-origin: left center; }
  .draw-x.r-in {
    transform: scaleX(1);
    transition: transform 0.9s cubic-bezier(0.65,0,0.35,1);
  }
}

/* =====================================================================
   Curseur sur-mesure desktop — point exact + anneau inertiel
   ===================================================================== */
.cur-none, .cur-none a, .cur-none button, .cur-none input, .cur-none select, .cur-none textarea, .cur-none label { cursor: none !important; }
.cur-ring {
  position: fixed; top: 0; left: 0;
  width: 30px; height: 30px;
  border: 1px solid #ffffff;
  border-radius: 50%;
  opacity: 0;
  pointer-events: none;
  z-index: 9999;
  mix-blend-mode: difference;
  transition: width 0.2s ease, height 0.2s ease, background-color 0.2s ease, opacity 0.3s ease;
}
.cur-ring--active { width: 54px; height: 54px; background: rgba(255,255,255,0.22); }
.cur-dot {
  position: fixed; top: 0; left: 0;
  width: 6px; height: 6px;
  border-radius: 50%;
  background: #ffffff;
  opacity: 0;
  pointer-events: none;
  z-index: 10000;
  mix-blend-mode: difference;
  transition: opacity 0.3s ease;
}
.cur-dot--active { transform: scale(1.6); }
@media (pointer: coarse) { .cur-ring, .cur-dot { display: none; } }
@media (prefers-reduced-motion: reduce) { .cur-ring, .cur-dot { display: none; } }

html, body { margin: 0; padding: 0; background: var(--bg-1); color: var(--fg-1); }
body { font-family: var(--font-body); font-size: var(--p-size); line-height: var(--p-line); }

/* Section primitive */
.jc-section { padding: 96px 64px; }
.jc-section-inner { max-width: var(--content-max); margin: 0 auto; }
.jc-section--ink { background: var(--ink-1000); color: var(--bone-100); }
.jc-section--ink .fe-eyebrow { color: var(--ink-400); }
.jc-section--bone-alt { background: var(--bone-200); }

/* Anchored sections so header nav can scrollTo */
section[id] { scroll-margin-top: calc(var(--header-h) + 24px); }
html { scroll-behavior: smooth; }

/* Body paragraphs justified for an editorial / institutional feel. */
section[id] p[style*="--font-body"] {
  text-align: justify;
  hyphens: auto;
  -webkit-hyphens: auto;
}

/* ---------------------------------------------------------------------
   RESPONSIVE / MOBILE
   --------------------------------------------------------------------- */
@media (max-width: 980px) {
  .jc-section { padding: 64px 24px; }
}

@media (max-width: 820px) {
  .jc-section { padding: 56px 20px !important; }

  /* Collapse content grids to a single column */
  section[id] [style*="grid-template-columns"],
  footer [style*="grid-template-columns"] {
    grid-template-columns: 1fr !important;
    gap: 28px !important;
  }
  /* keep the hero credibility strip 2-up */
  #top [style*="repeat(2, 1fr)"] { grid-template-columns: repeat(2, 1fr) !important; gap: 24px 20px !important; }

  section h1, section h2, section h3 { overflow-wrap: anywhere; }
  section [style*="font-mono"], footer [style*="font-mono"] { overflow-wrap: anywhere; }

  section[id] h1 { font-size: clamp(34px, 9vw, 56px) !important; line-height: 1.06 !important; }
  section[id] h2 { font-size: clamp(28px, 7.5vw, 44px) !important; line-height: 1.08 !important; }
  section[id] h3 { font-size: clamp(20px, 5.5vw, 28px) !important; }

  section[id] [style*="font-size: 56px"] { font-size: clamp(40px, 11vw, 56px) !important; }

  /* Body copy: drop justification on narrow screens */
  section[id] p[style*="--font-body"] { text-align: left !important; }

  /* Accompagnement — stacked steps: top rule instead of left rule */
  .jc-steps { border-top: 0 !important; }
  .jc-step { border-left: 0 !important; border-top: 1px solid rgba(245,242,234,0.16) !important; padding: 28px 0 8px !important; }

  /* Le cabinet — founder stat strip stacks cleanly (blanket collapse) */

  /* Contact form padding tightens */
  #contact form { padding: 28px 22px !important; }
}

@media (max-width: 480px) {
  .jc-section { padding: 48px 16px !important; }
  section[id] h1 { font-size: clamp(30px, 9vw, 40px) !important; }
}

/* ---------------------------------------------------------------------
   LEGAL PAGES — mobile
   --------------------------------------------------------------------- */
@media (max-width: 820px) {
  .jc-legal-header { padding: 20px 22px !important; }
  .jc-legal { padding: 48px 22px 72px !important; }
  .jc-legal h1 { font-size: clamp(32px, 9vw, 44px) !important; }
  .jc-legal-dl {
    grid-template-columns: 1fr !important;
    gap: 4px 0 !important;
    padding: 20px 22px !important;
  }
  .jc-legal-dl dt { padding-top: 16px !important; }
  .jc-legal-dl dt:first-of-type { padding-top: 0 !important; }
}
