/* Hessed VeEmet — feuille de style
   Concept : pierre gravée et lumière de veille. Pages calmes, larges marges,
   capitales inscrites (Marcellus) pour les titres, texte courant lisible (Figtree),
   hébreu en Frank Ruhl Libre. Un seul accent chaud : la flamme. */

:root {
  --stone: #f4f4f0;        /* fond : pierre claire, légèrement verte */
  --stone-2: #e9eae3;      /* surfaces secondaires */
  --ink: #1d2a2c;          /* texte principal : ardoise profonde */
  --ink-soft: #4d5b5c;     /* texte secondaire */
  --olive: #56653e;        /* accent : olivier */
  --flame: #b98a3a;        /* lumière : flamme, détails */
  --line: #d3d6cb;         /* filets */
  --night: #182224;        /* bandeaux sombres */
  --on-night: #ecebe4;
  --mark: #fff2c4;         /* surlignage « à confirmer » */
  --mark-ink: #6b4e00;

  --f-display: "Marcellus", "Trajan Pro", Georgia, serif;
  --f-body: "Figtree", "Segoe UI", system-ui, -apple-system, sans-serif;
  --f-hebrew: "Frank Ruhl Libre", "David", "Times New Roman", serif;

  --step--1: clamp(0.84rem, 0.8rem + 0.15vw, 0.92rem);
  --step-0: clamp(1rem, 0.96rem + 0.2vw, 1.1rem);
  --step-1: clamp(1.2rem, 1.1rem + 0.45vw, 1.45rem);
  --step-2: clamp(1.5rem, 1.3rem + 0.9vw, 2rem);
  --step-3: clamp(1.9rem, 1.5rem + 1.8vw, 2.9rem);
  --step-4: clamp(2.3rem, 1.7rem + 3vw, 4rem);

  --wrap: 72rem;
  --gutter: clamp(1rem, 0.6rem + 2vw, 2rem);
  --radius: 4px;
  color-scheme: light;
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --stone: #121a1c; --stone-2: #1a2427; --ink: #e8e8e1; --ink-soft: #a9b3b1;
    --olive: #a7b682; --flame: #d9b26a; --line: #2c3a3d; --night: #0c1213;
    --on-night: #ecebe4; --mark: #3d3214; --mark-ink: #f3dc9a; color-scheme: dark;
  }
}
:root[data-theme="dark"] {
  --stone: #121a1c; --stone-2: #1a2427; --ink: #e8e8e1; --ink-soft: #a9b3b1;
  --olive: #a7b682; --flame: #d9b26a; --line: #2c3a3d; --night: #0c1213;
  --on-night: #ecebe4; --mark: #3d3214; --mark-ink: #f3dc9a; color-scheme: dark;
}

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0; background: var(--stone); color: var(--ink);
  font-family: var(--f-body); font-size: var(--step-0); line-height: 1.65;
  -webkit-font-smoothing: antialiased;
}
img, svg { max-width: 100%; }
a { color: var(--olive); text-underline-offset: 3px; }
a:hover { color: var(--ink); }
:focus-visible { outline: 2px solid var(--flame); outline-offset: 3px; }
h1, h2, h3 { font-family: var(--f-display); font-weight: 400; line-height: 1.15; text-wrap: balance; margin: 0; letter-spacing: 0.01em; }
h1 { font-size: var(--step-4); }
h2 { font-size: var(--step-3); }
h3 { font-size: var(--step-1); }
p { margin: 0; }
.he { font-family: var(--f-hebrew); direction: rtl; unicode-bidi: isolate; }
.wrap { width: 100%; max-width: var(--wrap); margin-inline: auto; padding-inline: var(--gutter); }
.measure { max-width: 40rem; }
.eyebrow { font-size: var(--step--1); letter-spacing: 0.14em; text-transform: uppercase; color: var(--olive); font-weight: 600; }
.lead { font-size: var(--step-1); color: var(--ink-soft); line-height: 1.55; }
.muted { color: var(--ink-soft); }
.stack { display: grid; gap: 1rem; }
.stack-lg { display: grid; gap: 1.75rem; }
.skip { position: absolute; left: -999px; top: 0; background: var(--ink); color: var(--stone); padding: .5rem 1rem; z-index: 100; }
.skip:focus { left: 1rem; }

/* À confirmer : repères visibles pour la relecture */
.tbc { background: var(--mark); color: var(--mark-ink); padding: 0 .3em; border-radius: 2px; font-size: .92em; }

/* ---------- En-tête ---------- */
.top-bar { background: var(--night); color: var(--on-night); font-size: var(--step--1); }
.top-bar .wrap { display: flex; flex-wrap: wrap; gap: .25rem 1.5rem; justify-content: space-between; padding-block: .45rem; }
.top-bar a { color: var(--on-night); text-decoration: none; font-weight: 600; }
.dot { display: inline-block; width: .5rem; height: .5rem; border-radius: 50%; background: var(--flame); margin-right: .45rem; vertical-align: middle; animation: pulse 3s ease-in-out infinite; }
@keyframes pulse { 50% { opacity: .35; } }

.site-header { position: sticky; top: env(safe-area-inset-top, 0px); z-index: 50; background: color-mix(in srgb, var(--stone) 92%, transparent); backdrop-filter: blur(8px); border-bottom: 1px solid var(--line); }
.site-header .wrap { display: flex; align-items: center; justify-content: space-between; gap: 1rem; padding-block: .8rem; }
.brand { display: flex; align-items: center; gap: .7rem; text-decoration: none; color: var(--ink); }
.brand img { width: 52px; height: 52px; flex: none; border-radius: 50%; }
.footer-logo { width: 88px; height: 88px; border-radius: 50%; }
.brand-name { font-family: var(--f-display); font-size: 1.35rem; line-height: 1; display: block; }
.brand-sub { font-size: .72rem; letter-spacing: .12em; text-transform: uppercase; color: var(--ink-soft); display: block; margin-top: .3rem; }
.nav { display: flex; align-items: center; gap: 1.4rem; }
.nav ul { display: flex; gap: 1.1rem; list-style: none; margin: 0; padding: 0; }
.nav a { color: var(--ink); text-decoration: none; font-size: .93rem; font-weight: 500; white-space: nowrap; }
.nav a[aria-current="page"] { color: var(--olive); box-shadow: inset 0 -2px 0 var(--flame); }
.nav a:hover { color: var(--olive); }
.btn { display: inline-flex; align-items: center; gap: .55rem; padding: .8rem 1.25rem; border-radius: var(--radius); font-weight: 600; text-decoration: none; border: 1px solid transparent; transition: transform .2s ease, background .2s ease; }
.btn:hover { transform: translateY(-1px); }
.btn-call { background: var(--ink); color: var(--stone); }
.btn-call:hover { color: var(--stone); background: var(--olive); }
.nav .btn-call, .nav .btn-call:hover { color: var(--stone); white-space: nowrap; }
.btn-ghost { border-color: var(--line); color: var(--ink); }
.btn-ghost:hover { border-color: var(--olive); color: var(--olive); }
.btn svg { width: 18px; height: 18px; flex: none; }
.menu-toggle { display: none; background: none; border: 1px solid var(--line); border-radius: var(--radius); color: var(--ink); padding: .5rem .75rem; font: inherit; font-weight: 600; cursor: pointer; }

@media (min-width: 1321px) {
  .brand { flex: none; white-space: nowrap; }
}
@media (min-width: 1321px) and (max-width: 1500px) {
  .brand-sub { display: none; }
  .nav { gap: 1rem; }
  .nav ul { gap: .95rem; }
}
@media (max-width: 1320px) {
  .menu-toggle { display: inline-block; }
  .nav { position: absolute; inset: 100% 0 auto 0; background: var(--stone); border-bottom: 1px solid var(--line); flex-direction: column; align-items: stretch; padding: 1rem var(--gutter) 1.5rem; display: none; }
  .nav.open { display: flex; }
  .nav ul { flex-direction: column; gap: 0; }
  .nav li a { display: block; padding: .75rem 0; border-bottom: 1px solid var(--line); }
  .nav .btn { justify-content: center; margin-top: .75rem; }
}

/* ---------- Héros ---------- */
.hero { position: relative; overflow: hidden; padding-block: clamp(3rem, 7vw, 6rem) clamp(3rem, 6vw, 5rem); }
.hero-grid { display: grid; grid-template-columns: minmax(0, 1.25fr) minmax(0, 1fr); gap: clamp(2rem, 5vw, 4rem); align-items: center; }
.hero h1 span { display: block; color: var(--olive); font-size: .55em; margin-top: .6rem; letter-spacing: .02em; }
.hero .lead { margin-top: 1.4rem; max-width: 34rem; }
.hero-actions { display: flex; flex-wrap: wrap; gap: .75rem; margin-top: 2rem; }
.hero-facts { display: flex; flex-wrap: wrap; gap: .5rem 2rem; margin-top: 2.25rem; padding-top: 1.5rem; border-top: 1px solid var(--line); font-size: var(--step--1); color: var(--ink-soft); }
.hero-facts strong { display: block; font-family: var(--f-display); font-size: 1.5rem; color: var(--ink); font-weight: 400; }
.hero-watermark { position: absolute; inset: auto -2rem -3.5rem auto; font-size: clamp(7rem, 18vw, 15rem); line-height: 1; color: var(--ink); opacity: .045; pointer-events: none; user-select: none; }

/* La veilleuse : flamme animée */
.vigil { position: relative; display: grid; place-items: center; }
.vigil svg { width: min(100%, 340px); height: auto; overflow: visible; }
.flame { transform-origin: 50% 100%; animation: flicker 4.5s ease-in-out infinite; }
.flame-core { transform-origin: 50% 100%; animation: flicker 3.2s ease-in-out infinite reverse; }
.halo { animation: breathe 6s ease-in-out infinite; transform-origin: center; }
@keyframes flicker { 0%,100% { transform: scale(1,1) rotate(0); } 25% { transform: scale(.97,1.04) rotate(-1.2deg); } 50% { transform: scale(1.02,.97) rotate(.8deg); } 75% { transform: scale(.99,1.02) rotate(-.5deg); } }
@keyframes breathe { 0%,100% { opacity: .55; transform: scale(1); } 50% { opacity: .85; transform: scale(1.06); } }
.vigil-caption { text-align: center; margin-top: 1rem; font-size: var(--step--1); color: var(--ink-soft); }
.vigil-caption .he { font-size: 1.5rem; color: var(--ink); display: block; }

/* Entrée de page (contenu visible au repos, simple glissement) */
.rise { animation: rise .9s cubic-bezier(.2,.7,.2,1) both; }
.rise-2 { animation-delay: .12s; } .rise-3 { animation-delay: .24s; } .rise-4 { animation-delay: .36s; }
@keyframes rise { from { opacity: .001; transform: translateY(14px); } to { opacity: 1; transform: none; } }
@supports (animation-timeline: view()) {
  .reveal { animation: reveal linear both; animation-timeline: view(); animation-range: entry 0% entry 40%; }
  @keyframes reveal { from { transform: translateY(28px); } to { transform: none; } }
}

/* ---------- Sections ---------- */
.section { padding-block: clamp(3.5rem, 8vw, 6.5rem); }
.section-alt { background: var(--stone-2); }
.section-night { background: var(--night); color: var(--on-night); }
.section-night .eyebrow { color: var(--flame); }
.section-night .muted, .section-night .lead { color: color-mix(in srgb, var(--on-night) 72%, transparent); }
.section-head { display: grid; gap: .8rem; margin-bottom: clamp(2rem, 4vw, 3rem); max-width: 44rem; }
.split { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: clamp(2rem, 5vw, 4.5rem); align-items: start; }
.split > * { min-width: 0; }

/* Services : liste éditoriale plutôt que cartes */
.services { list-style: none; margin: 0; padding: 0; border-top: 1px solid var(--line); }
.services li { border-bottom: 1px solid var(--line); }
.services a { display: grid; grid-template-columns: 3.5rem minmax(0, 1fr) auto; gap: 1.25rem; align-items: center; padding: 1.6rem 0; text-decoration: none; color: var(--ink); transition: padding .3s ease, background .3s ease; }
.services a:hover { padding-inline: 1rem; background: var(--stone-2); }
.services svg.ico { width: 44px; height: 44px; color: var(--olive); }
.services h3 { font-size: var(--step-2); }
.services p { color: var(--ink-soft); margin-top: .3rem; }
.services .arrow { font-size: 1.5rem; color: var(--flame); transition: transform .3s ease; }
.services a:hover .arrow { transform: translateX(6px); }

/* Citation du nom */
.name-verse { display: grid; gap: 1.25rem; text-align: center; max-width: 46rem; margin-inline: auto; }
.name-verse .he { font-size: clamp(2.6rem, 2rem + 4vw, 5rem); line-height: 1.1; color: var(--flame); }
.name-verse blockquote { margin: 0; font-family: var(--f-display); font-size: var(--step-2); line-height: 1.35; }
.name-verse cite { font-style: normal; font-size: var(--step--1); letter-spacing: .12em; text-transform: uppercase; }

/* Étapes (une vraie séquence) */
.steps { counter-reset: step; list-style: none; margin: 0; padding: 0; display: grid; gap: 0; }
.steps > li { counter-increment: step; display: grid; grid-template-columns: 3.25rem minmax(0, 1fr); gap: 1.25rem; padding-block: 1.4rem; border-top: 1px solid var(--line); }
.steps > li::before { content: counter(step); font-family: var(--f-display); font-size: 1.6rem; color: var(--flame); width: 2.6rem; height: 2.6rem; border: 1px solid var(--line); border-radius: 50%; display: grid; place-items: center; line-height: 1; }
.steps h3 { margin-bottom: .35rem; }
.section-night .steps > li { border-color: color-mix(in srgb, var(--on-night) 18%, transparent); }
.section-night .steps > li::before { border-color: color-mix(in srgb, var(--on-night) 25%, transparent); }

/* Engagements */
.pillars { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 15rem), 1fr)); gap: 2rem 2.5rem; }
.pillars > div { display: grid; gap: .5rem; align-content: start; padding-top: 1.1rem; border-top: 2px solid var(--flame); }
.pillars h3 { font-size: var(--step-1); }

/* Bloc avis */
.rating { display: flex; flex-wrap: wrap; align-items: center; gap: 1rem 1.5rem; }
.rating .score { font-family: var(--f-display); font-size: clamp(3rem, 2.5rem + 2vw, 4.5rem); line-height: 1; }
.stars { color: var(--flame); letter-spacing: .15em; font-size: 1.3rem; }

/* Emplacements photo */
.photo-slot { position: relative; aspect-ratio: 4 / 3; max-width: 100%; border: 1px dashed var(--line); border-radius: var(--radius); background:
  repeating-linear-gradient(135deg, transparent 0 14px, color-mix(in srgb, var(--line) 45%, transparent) 14px 15px), var(--stone-2);
  display: grid; place-items: center; text-align: center; padding: 1.5rem; color: var(--ink-soft); font-size: var(--step--1); }
.photo-slot strong { display: block; color: var(--ink); font-weight: 600; font-size: var(--step-0); }
.photo-slot.tall { aspect-ratio: 3 / 4; }

/* Portrait du fondateur */
.portrait { margin: 0; }
.portrait img { display: block; width: 100%; height: auto; aspect-ratio: 3 / 4; object-fit: cover; border-radius: var(--radius); }
.portrait figcaption { margin-top: .75rem; color: var(--ink-soft); font-size: var(--step--1); }
.signature { font-style: italic; color: var(--ink-soft); }

/* Illustrations */
.illus { color: var(--olive); }
.illus .draw { stroke-dasharray: 900; stroke-dashoffset: 900; animation: draw 3.5s ease forwards .3s; }
@keyframes draw { to { stroke-dashoffset: 0; } }
.route-plane { offset-path: path("M60 150 C 200 30, 420 30, 560 120"); animation: fly 7s ease-in-out infinite; }
@keyframes fly { 0% { offset-distance: 0%; opacity: 0; } 8% { opacity: 1; } 92% { opacity: 1; } 100% { offset-distance: 100%; opacity: 0; } }

/* En-tête des pages intérieures */
.page-hero { padding-block: clamp(3rem, 7vw, 5.5rem) clamp(2rem, 5vw, 3.5rem); border-bottom: 1px solid var(--line); position: relative; overflow: hidden; }
.page-hero .lead { margin-top: 1.25rem; max-width: 40rem; }
.breadcrumb { font-size: var(--step--1); color: var(--ink-soft); margin-bottom: 1.5rem; }
.breadcrumb a { color: var(--ink-soft); }

/* Texte long */
.prose { display: grid; gap: 1.1rem; max-width: 42rem; }
.prose h2 { font-size: var(--step-2); margin-top: 1.5rem; }
.prose h3 { margin-top: .75rem; }
.prose ul { margin: 0; padding-left: 1.2rem; display: grid; gap: .45rem; }
.prose li::marker { color: var(--flame); }
.aside { border-left: 2px solid var(--flame); padding: .25rem 0 .25rem 1.25rem; color: var(--ink-soft); }

/* Glossaire des rites */
.terms { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 17rem), 1fr)); gap: 1.75rem 2.5rem; margin: 0; }
.terms > div { display: grid; gap: .35rem; align-content: start; }
.terms dt { display: flex; align-items: baseline; justify-content: space-between; gap: 1rem; font-family: var(--f-display); font-size: var(--step-1); border-bottom: 1px solid var(--line); padding-bottom: .4rem; }
.terms dt .he { font-size: 1.3rem; color: var(--flame); }
.terms dd { margin: 0; color: var(--ink-soft); }

/* FAQ */
.faq { display: grid; gap: 0; border-top: 1px solid var(--line); max-width: 48rem; }
.faq details { border-bottom: 1px solid var(--line); }
.faq summary { cursor: pointer; list-style: none; padding: 1.3rem 2.5rem 1.3rem 0; position: relative; font-family: var(--f-display); font-size: var(--step-1); }
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after { content: "+"; position: absolute; right: .25rem; top: 1.05rem; font-family: var(--f-body); font-size: 1.6rem; color: var(--flame); transition: transform .3s ease; }
.faq details[open] summary::after { transform: rotate(45deg); }
.faq .answer { padding: 0 0 1.4rem; color: var(--ink-soft); display: grid; gap: .75rem; max-width: 42rem; }

/* Bandeau d'appel */
.cta-band { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 1.5rem 3rem; align-items: center; }
.cta-band .phone-big { font-family: var(--f-display); font-size: var(--step-3); color: var(--on-night); text-decoration: none; white-space: nowrap; }
.cta-band .phone-big:hover { color: var(--flame); }

/* Contact */
.contact-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 16rem), 1fr)); gap: 2rem; }
.contact-grid > div { display: grid; gap: .4rem; align-content: start; padding-top: 1rem; border-top: 1px solid var(--line); }
.contact-grid .big { font-family: var(--f-display); font-size: var(--step-2); color: var(--ink); text-decoration: none; }

/* Pied de page */
.site-footer { background: var(--night); color: var(--on-night); padding-block: 3.5rem 2rem; font-size: var(--step--1); }
.site-footer a { color: var(--on-night); text-decoration: none; }
.site-footer a:hover { color: var(--flame); }
.footer-grid { display: grid; grid-template-columns: minmax(0, 1.4fr) repeat(3, minmax(0, 1fr)); gap: 2rem; }
.footer-grid h4 { font-family: var(--f-display); font-weight: 400; font-size: 1.1rem; margin: 0 0 .8rem; color: var(--flame); }
.footer-grid ul { list-style: none; margin: 0; padding: 0; display: grid; gap: .45rem; }
.footer-legal { margin-top: 2.5rem; padding-top: 1.25rem; border-top: 1px solid color-mix(in srgb, var(--on-night) 15%, transparent); display: flex; flex-wrap: wrap; gap: .5rem 1.5rem; justify-content: space-between; color: color-mix(in srgb, var(--on-night) 65%, transparent); }

/* Barre d'appel mobile */
.call-dock { display: none; }
@media (max-width: 720px) {
  .call-dock { display: flex; position: fixed; left: 0; right: 0; bottom: 0; z-index: 60; padding: .6rem 1rem calc(.6rem + env(safe-area-inset-bottom, 0px)); background: var(--ink); gap: .6rem; }
  .call-dock a { flex: 1; justify-content: center; background: var(--flame); color: #1d1608; }
  body { padding-bottom: 4.5rem; }
}

@media (max-width: 860px) {
  .hero-grid, .split, .cta-band { grid-template-columns: minmax(0, 1fr); }
  .vigil svg { width: min(70%, 240px); }
  .footer-grid { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); }
  .services a { grid-template-columns: 2.75rem minmax(0, 1fr); }
  .services .arrow { display: none; }
}
@media (max-width: 520px) {
  .footer-grid { grid-template-columns: minmax(0, 1fr); }
  .top-bar .hide-sm { display: none; }
  .hero-watermark { display: none; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; scroll-behavior: auto !important; }
  .illus .draw { stroke-dashoffset: 0; }
}
