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

@import "./colors_and_type.css?v=20261022b";

* { box-sizing: border-box; }

/* =====================================================================
   Grain filmique (repris du site Cost Killer Service, décision JC
   du 19/10/2026) : texture papier très légère sur toute la page.
   ===================================================================== */
body::after {
  content: "";
  position: fixed;
  inset: 0;
  background-image: url("assets/grain.png");
  background-repeat: repeat;
  background-size: 128px 128px;
  opacity: 0.075;
  pointer-events: none;
  z-index: 9998;
  mix-blend-mode: multiply;
}


/* =====================================================================
   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; }

  /* Texte courant justifié aussi sur téléphone (JC, 20/10/2026), avec césure pour éviter les rivières. */
  section[id] p[style*="--font-body"] { text-align: justify !important; hyphens: auto; -webkit-hyphens: auto; }

  /* 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; }
}

/* =====================================================================
   SECTIONS PORTÉES DE LA PARTIE COST KILLER (19/10/2026)
   Deux axes, Principe, Convictions, Méthode, Risque, Family office,
   Découverte, Honoraires : classes fe- reprises telles quelles de la
   feuille d'origine (reference-cks/styles.css). Les règles jc- ne sont
   pas touchées. Non repris car inutilisés ici : FrontierViz (.fv-*),
   blob du hero (.fe-bh-*), .fe-section-marker, .fe-calc, logos #mission.
   ===================================================================== */

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

/* Tabular nums for mono */
.tnum { font-variant-numeric: tabular-nums; }

/* Body paragraphs justified (la règle section[id] du site JCR couvre déjà
   ces sections) ; petits paragraphes de mention laissés au fer à gauche.
   Pages légales (main.jc-legal) justifiées aussi (JC, 20/10/2026). */
.fe-section p[style*="--font-body"],
.jc-legal p[style*="--font-body"] {
  text-align: justify;
  hyphens: auto;
  -webkit-hyphens: auto;
}
.fe-section p[style*="font-size: 12"] {
  text-align: left;
  hyphens: manual;
}
/* Notes de l'ingénierie patrimoniale : justifiées sur toute la largeur, ordinateur et téléphone (JC, 20/10/2026). */
.jc-note-justifiee { text-align: justify !important; hyphens: auto; -webkit-hyphens: auto; max-width: none !important; }

/* Deux sections de même fond qui se suivent : filet de séparation discret
   (Deux axes → Expertises, Méthode → Risque, Honoraires → Cabinet). */
:is(.jc-section--ink, .fe-section--ink) + :is(.jc-section--ink, .fe-section--ink) {
  border-top: 1px solid rgba(245,242,234,0.12);
}
:is(.jc-section--bone-alt, .fe-section--bone-alt) + :is(.jc-section--bone-alt, .fe-section--bone-alt) {
  border-top: 1px solid var(--border-1);
}

/* Rythme : même seuil que .jc-section (980 px ; 900 px dans la feuille
   d'origine) pour que toutes les sections gardent la même gouttière. */
@media (max-width: 980px) {
  .fe-section { padding: 64px 24px; }
}

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

  /* Giant mono KPI numbers (comparatif fiscal, méthode) */
  section[id] [style*="font-size: 144px"],
  section[id] [style*="font-size: 120px"],
  section[id] [style*="font-size: 96px"] {
    font-size: clamp(56px, 16vw, 92px) !important;
  }

  /* Comparatif fiscal : tableau → cartes empilées */
  .fe-cmp__head { display: none !important; }
  .fe-cmp__row {
    display: block !important;
    padding: 22px 20px !important;
  }
  .fe-cmp__label { margin-bottom: 6px !important; }
  .fe-cmp__cell {
    display: grid !important;
    grid-template-columns: 1fr auto !important;
    align-items: baseline !important;
    column-gap: 16px !important;
    text-align: right !important;
    padding: 13px 0 !important;
    border-top: 1px solid rgba(245,242,234,0.10) !important;
    font-size: 17px !important;
  }
  .fe-cmp__cell::before {
    content: attr(data-label);
    grid-column: 1;
    font-family: var(--font-mono);
    font-size: 10px;
    letter-spacing: 0.14em;
    text-transform: uppercase;
    color: var(--ink-400);
    font-weight: 500;
    text-align: left;
    align-self: center;
  }
  .fe-cmp__v { grid-column: 2; text-align: right; white-space: nowrap; }
  .fe-cmp__note {
    grid-column: 1 / -1 !important;
    text-align: right !important;
    margin-top: 2px !important;
  }

  /* Honoraires — keep the zero-strip 3-up; left-align rates when stacked */
  #honoraires [style*="text-align: right"] { text-align: left !important; }
  #honoraires [style*="repeat(3, 1fr)"] { grid-template-columns: repeat(3, 1fr) !important; gap: 14px !important; }
}

@media (max-width: 480px) {
  .fe-section { padding: 48px 16px !important; }
}

/* --- Interrupteur entre les deux pages du site (JC, 20/10/2026) --- */
.jc-switch__aide { position: absolute; left: 22px; top: 100%; margin-top: 8px; white-space: nowrap; font-size: 10px; letter-spacing: 0.12em; text-transform: none; color: var(--gold-700); opacity: 0; transform: translateY(-4px); transition: opacity .2s ease, transform .2s ease; pointer-events: none; }
.jc-switch__onglet--droite .jc-switch__aide { left: auto; right: 22px; }
.jc-switch__onglet:hover .jc-switch__aide, .jc-switch__onglet:focus-visible .jc-switch__aide { opacity: 1; transform: none; }
a.jc-switch__onglet:hover, a.jc-switch__onglet:focus-visible { color: var(--ink-1000) !important; background: var(--bone-50); }

/* --- Transition glissée entre / (Cost Killer Service) et /cabinet/ (JCR Patrimoine) ---
   La feuille Cost Killer recouvre la page du cabinet : vers le cabinet elle sort par la droite, vers le service elle revient par la droite.
   Navigateurs sans transition entre documents : simple changement de page. */
@view-transition { navigation: auto; }
@keyframes jc-sort-droite { to { transform: translateX(100%); } }
@keyframes jc-entre-droite { from { transform: translateX(100%); } }
@media (prefers-reduced-motion: no-preference) {
  html:active-view-transition-type(vers-cabinet)::view-transition-old(root) { animation: jc-sort-droite .5s cubic-bezier(.22,1,.36,1) forwards; z-index: 2; }
  html:active-view-transition-type(vers-cabinet)::view-transition-new(root) { animation: none; }
  html:active-view-transition-type(vers-service)::view-transition-new(root) { animation: jc-entre-droite .5s cubic-bezier(.22,1,.36,1); z-index: 2; }
  html:active-view-transition-type(vers-service)::view-transition-old(root) { animation: none; }
}
@media (prefers-reduced-motion: reduce) { ::view-transition-old(root), ::view-transition-new(root) { animation: none; } }
/* Sur mobile, la règle générale empile les grilles ; le sélecteur garde ses deux cases côte à côte. */
@media (max-width: 820px) { nav.jc-switch--mobile[style] { grid-template-columns: 1fr 1fr !important; gap: 0 !important; } }
/* --- Bandeau fixe en haut (JC, 20/10/2026) : il reste en place et passe en fondu pendant le glissement de la page --- */
.jc-bandeau { view-transition-name: bandeau; }
/* Sur téléphone, le sous-titre passe sur deux lignes au lieu de déborder sous le bouton du menu. */
@media (max-width: 480px) { .jc-bandeau__sous-titre { white-space: normal !important; letter-spacing: 0.14em !important; max-width: 200px; line-height: 1.35; } }
/* Sommaire de la feuille, sous l'interrupteur (JC, 20/10/2026). */
.jc-sommaire a { color: var(--fg-2); border-bottom: 1px solid transparent; padding-bottom: 2px; transition: color .2s ease, border-color .2s ease; }
.jc-sommaire a:hover, .jc-sommaire a:focus-visible { color: var(--gold-700); border-bottom-color: var(--gold-500); }
nav.jc-switch--mobile { min-width: 0; max-width: 100%; }
nav.jc-switch--mobile .jc-switch__onglet { min-width: 0; white-space: normal; overflow-wrap: anywhere; }
#jc-menu-mobile { overflow-x: hidden; }
