/* Kalame 360 — « Le cabinet d'argile » (voir DESIGN-BRIEF.md) */
:root {
  --ivoire: #FAF7F0;
  --encre: #22312C;
  --doux: #5C6B64;
  --sapin: #1E4D40;
  --sapin-fonce: #163B31;
  --sapin-clair: #E7EFEA;
  --carte: #FFFFFF;
  --ligne: rgba(34, 49, 44, .14);
  --ombre: 0 16px 40px -24px rgba(30, 77, 64, .35);
  --font-display: "Bricolage Grotesque", "Switzer", sans-serif;
  --font-body: "Switzer", system-ui, sans-serif;
}
* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0; background: var(--ivoire); color: var(--encre);
  font-family: var(--font-body); font-size: 17px; line-height: 1.65;
  overflow-x: hidden;
}
h1, h2, h3 { font-family: var(--font-display); letter-spacing: -0.015em; text-wrap: balance; margin: 0; }
a { color: inherit; }
img { max-width: 100%; display: block; }
::selection { background: var(--sapin); color: var(--ivoire); }
:focus-visible { outline: 3px solid rgba(30, 77, 64, .5); outline-offset: 3px; border-radius: 4px; }
.container { max-width: 1180px; margin: 0 auto; padding: 0 28px; }

/* ---------- Nav ---------- */
nav.topnav {
  position: fixed; top: 0; left: 0; right: 0; z-index: 50;
  display: flex; align-items: center; gap: 26px;
  padding: 14px clamp(20px, 4vw, 44px);
  background: rgba(250, 247, 240, .82); backdrop-filter: blur(14px);
  border-bottom: 1px solid var(--ligne); white-space: nowrap;
}
nav.topnav .brand {
  font-family: var(--font-display); font-weight: 800; font-size: 21px;
  color: var(--encre); text-decoration: none; margin-right: auto;
}
nav.topnav .brand b { color: var(--sapin); font-weight: 800; }
nav.topnav a.link { color: var(--doux); text-decoration: none; font-size: 14.5px; font-weight: 500; transition: color .2s; }
nav.topnav a.link:hover { color: var(--sapin); }
.btn {
  display: inline-block; border-radius: 999px; text-decoration: none;
  font-family: var(--font-body); font-weight: 600; font-size: 15px;
  padding: 13px 26px; transition: transform .2s ease, background .2s, border-color .2s, color .2s;
}
.btn:hover { transform: translateY(-2px); }
.btn:active { transform: translateY(0) scale(.98); }
.btn.solid { background: var(--sapin); color: var(--ivoire); }
.btn.solid:hover { background: var(--sapin-fonce); }
.btn.ghost { border: 1.5px solid var(--ligne); color: var(--encre); background: transparent; }
.btn.ghost:hover { border-color: var(--sapin); color: var(--sapin); }
nav.topnav .btn { padding: 10px 20px; font-size: 14px; }

/* ---------- Expérience scrollytelling ---------- */
#experience { position: relative; height: 1250vh; }
.xp-sticky { position: sticky; top: 0; height: 100dvh; overflow: hidden; }
.xp-sticky video, .xp-sticky .xp-fallback {
  position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover;
}
.xp-veil { position: absolute; inset: 0; background: linear-gradient(to top, rgba(34, 49, 44, .38), rgba(34, 49, 44, .05) 45%); }
.xp-panel {
  position: absolute; inset: 0; display: flex; align-items: flex-end;
  opacity: 0; visibility: hidden; transition: opacity .5s ease, visibility .5s;
  pointer-events: none; padding-bottom: clamp(56px, 10vh, 120px);
}
.xp-panel.on { opacity: 1; visibility: visible; }
.xp-panel .inner { pointer-events: auto; }
#xp-hero { align-items: center; padding-bottom: 0; }
#xp-hero .inner { max-width: 760px; margin-left: clamp(28px, 7vw, 110px); }
#xp-hero h1 {
  font-size: clamp(2.5rem, 5.2vw, 4.4rem); font-weight: 800; line-height: 1.04;
  color: #fff; margin-bottom: 20px; text-shadow: 0 2px 24px rgba(34, 49, 44, .35);
}
#xp-hero p.lede { color: rgba(255, 255, 255, .92); font-size: 18px; max-width: 34rem; margin: 0 0 30px; text-shadow: 0 1px 12px rgba(34, 49, 44, .4); }
.btn-row { display: flex; gap: 14px; flex-wrap: wrap; }
#xp-hero .btn.ghost { border-color: rgba(255, 255, 255, .55); color: #fff; }
#xp-hero .btn.ghost:hover { border-color: #fff; }
.xp-chapter .inner {
  margin-left: clamp(28px, 7vw, 110px); max-width: 480px;
  background: rgba(250, 247, 240, .92); backdrop-filter: blur(8px);
  border-radius: 16px; padding: 26px 30px; box-shadow: var(--ombre);
}
.xp-chapter .step {
  font-family: var(--font-display); font-weight: 700; font-size: 14px;
  color: var(--sapin); margin-bottom: 8px;
}
.xp-chapter h2 { font-size: clamp(1.4rem, 2.4vw, 1.9rem); font-weight: 700; line-height: 1.15; margin-bottom: 10px; }
.xp-chapter p { margin: 0; color: var(--doux); font-size: 15.5px; }
.xp-chapter .chips { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 14px; }
.xp-chapter .chip {
  font-size: 12.5px; font-weight: 600; color: var(--sapin);
  background: var(--sapin-clair); border-radius: 999px; padding: 5px 12px;
}
#xp-dots {
  position: absolute; right: 24px; top: 50%; transform: translateY(-50%);
  display: flex; flex-direction: column; gap: 12px; z-index: 5;
}
#xp-dots span { width: 7px; height: 7px; border-radius: 999px; background: rgba(255, 255, 255, .45); transition: all .3s; }
#xp-dots span.on { background: #fff; height: 24px; }

/* Repli statique (mobile étroit / reduced motion) */
body.xp-off #experience { height: auto; }
body.xp-off .xp-sticky { position: relative; height: auto; min-height: 72dvh; }
body.xp-off .xp-panel { display: none; }
body.xp-off #xp-hero { display: flex; position: relative; opacity: 1; visibility: visible; min-height: 72dvh; padding: 110px 0 60px; }
body.xp-off #xp-dots { display: none; }
body.xp-off .xp-chapters-static { display: block; }
.xp-chapters-static { display: none; }

/* ---------- Bande de confiance ---------- */
.trust-band { border-top: 1px solid var(--ligne); border-bottom: 1px solid var(--ligne); background: var(--carte); }
.trust-band .container { display: grid; grid-template-columns: repeat(4, 1fr); gap: 20px; padding-top: 30px; padding-bottom: 30px; }
.trust { border-left: 2px solid var(--sapin-clair); padding-left: 18px; }
.trust .num { font-family: var(--font-display); font-weight: 800; font-size: 26px; color: var(--sapin); line-height: 1.15; }
.trust .lbl { font-size: 13.5px; color: var(--doux); margin-top: 4px; }

/* ---------- Sections ---------- */
section { padding: 110px 0; }
h2.title { font-size: clamp(1.9rem, 3.3vw, 2.8rem); font-weight: 800; line-height: 1.1; margin-bottom: 14px; max-width: 46rem; }
p.sub { color: var(--doux); font-size: 16.5px; max-width: 40rem; margin: 0 0 48px; text-wrap: pretty; }
.tinted { background: var(--sapin-clair); }

/* ---------- Univers (bento) ---------- */
.bento { display: grid; grid-template-columns: repeat(6, 1fr); gap: 18px; }
.cell {
  background: var(--carte); border: 1px solid var(--ligne); border-radius: 16px;
  padding: 26px; grid-column: span 2; display: flex; flex-direction: column;
  text-decoration: none; transition: transform .3s ease, box-shadow .3s;
}
.cell:hover { transform: translateY(-3px); box-shadow: var(--ombre); }
.cell.wide { grid-column: span 3; }
.cell h3 { font-size: 19px; font-weight: 700; margin-bottom: 6px; }
.cell p.benefit { margin: 0 0 14px; color: var(--doux); font-size: 14.5px; }
.cell ul { margin: 0 0 16px; padding: 0; list-style: none; }
.cell ul li { font-size: 13.5px; color: var(--encre); padding: 4px 0 4px 18px; position: relative; }
.cell ul li::before { content: ""; position: absolute; left: 0; top: 12px; width: 8px; height: 2px; background: var(--sapin); }
.cell .shot { margin-top: auto; border-radius: 10px; border: 1px solid var(--ligne); overflow: hidden; }
.cell .more { margin-top: auto; font-weight: 600; font-size: 14px; color: var(--sapin); }
.cell.full { grid-column: span 6; flex-direction: row; gap: 36px; align-items: center; background: var(--sapin-clair); border-color: transparent; }
.cell.full .full-text { flex: 1 1 40%; }
.cell.full .shot { flex: 1 1 55%; margin-top: 0; }
@media (max-width: 980px) { .cell.full { flex-direction: column; align-items: stretch; } }

/* ---------- IA (bande sapin) ---------- */
#ia { background: var(--sapin); color: var(--ivoire); }
#ia h2.title { color: #fff; }
#ia p.sub { color: rgba(250, 247, 240, .8); }
.engagements { display: grid; grid-template-columns: repeat(4, 1fr); gap: 18px; }
.engagement {
  border: 1px solid rgba(250, 247, 240, .22); border-radius: 16px; padding: 24px;
  background: rgba(250, 247, 240, .06); font-size: 15px; line-height: 1.5;
}
.engagement b { display: block; font-family: var(--font-display); font-size: 16px; margin-bottom: 8px; color: #fff; }

/* ---------- Témoignages (défilement horizontal continu) ---------- */
.quotes {
  display: flex; gap: 18px; overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  padding: 4px 4px 10px; scrollbar-width: none;
}
.quotes::-webkit-scrollbar { display: none; }
/* centre les cartes quand elles tiennent toutes dans la largeur,
   sans empêcher d'atteindre la première carte quand ça déborde
   (justify-content:center rendrait le début du scroll inaccessible) */
.quotes::before, .quotes::after { content: ""; margin: auto; }
.quote {
  flex: 0 0 min(400px, 82vw);
  background: var(--carte); border: 1px solid var(--ligne); border-radius: 16px;
  padding: 30px; display: flex; flex-direction: column; gap: 16px;
}
.quote.featured { background: var(--sapin-clair); border-color: transparent; }
.quote blockquote { margin: 0; font-size: 16px; line-height: 1.6; }
.quote.featured blockquote { font-family: var(--font-display); font-size: 19px; font-weight: 600; line-height: 1.45; }
.quote .who { margin-top: auto; font-size: 14px; color: var(--doux); }
.quote .who b { color: var(--encre); }

/* ---------- Métiers ---------- */
.metiers { border-top: 1px solid var(--ligne); }
.metier-row {
  display: grid; grid-template-columns: 240px 1fr auto; align-items: center; gap: 22px;
  padding: 22px 14px; border-bottom: 1px solid var(--ligne); text-decoration: none;
  transition: background .25s;
}
.metier-row:hover { background: var(--sapin-clair); }
.metier-row h3 { font-size: 19px; font-weight: 700; }
.metier-row p { margin: 0; color: var(--doux); font-size: 14.5px; }
.metier-row .arrow { color: var(--sapin); font-weight: 700; font-size: 18px; }

/* ---------- Sécurité ---------- */
.securite-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 18px; }
.secu {
  background: var(--carte); border: 1px solid var(--ligne); border-radius: 16px; padding: 24px;
}
.secu h3 { font-size: 16.5px; font-weight: 700; margin-bottom: 6px; }
.secu p { margin: 0; color: var(--doux); font-size: 14.5px; }
a.secu.linkcard { text-decoration: none; display: flex; flex-direction: column; transition: transform .25s ease, box-shadow .25s, border-color .25s; }
a.secu.linkcard:hover { transform: translateY(-3px); box-shadow: var(--ombre); border-color: var(--sapin); }
a.secu.linkcard .go { margin-top: auto; padding-top: 12px; color: var(--sapin); font-weight: 600; font-size: 14px; }
a.secu.linkcard.full { grid-column: 1 / -1; flex-direction: row; align-items: baseline; gap: 20px; background: var(--sapin-clair); border-color: transparent; }
a.secu.linkcard.full h3 { flex: 0 0 240px; margin: 0; }
a.secu.linkcard.full p { flex: 1; }
a.secu.linkcard.full .go { margin-top: 0; padding-top: 0; white-space: nowrap; }
@media (max-width: 760px) { a.secu.linkcard.full { flex-direction: column; align-items: stretch; } a.secu.linkcard.full h3 { flex: none; } }

/* ---------- Tarifs ---------- */
#tarifs .panel {
  display: grid; grid-template-columns: 1.2fr 1fr; gap: 0;
  background: var(--carte); border: 1px solid var(--ligne); border-radius: 20px;
  overflow: hidden; box-shadow: var(--ombre);
}
#tarifs .price-side { padding: 46px; }
#tarifs .price { font-family: var(--font-display); font-weight: 800; font-size: clamp(2.6rem, 4.5vw, 3.6rem); line-height: 1; }
#tarifs .price small { font-size: 18px; color: var(--doux); font-weight: 500; }
#tarifs .alt { color: var(--doux); margin: 10px 0 26px; font-size: 15.5px; }
#tarifs ul.inclus { list-style: none; margin: 0 0 30px; padding: 0; }
#tarifs ul.inclus li { padding: 7px 0 7px 28px; position: relative; font-size: 15.5px; }
#tarifs ul.inclus li::before {
  content: ""; position: absolute; left: 0; top: 13px; width: 14px; height: 8px;
  border-left: 2.5px solid var(--sapin); border-bottom: 2.5px solid var(--sapin); transform: rotate(-45deg);
}
#tarifs .cab-side { background: var(--sapin-clair); padding: 46px; display: flex; flex-direction: column; justify-content: center; gap: 14px; }
#tarifs .cab-side h3 { font-size: 20px; }
#tarifs .cab-side p { margin: 0; color: var(--doux); font-size: 15px; }

/* ---------- Histoire ---------- */
#histoire .split { display: grid; grid-template-columns: 1fr 1fr; gap: 56px; align-items: center; }
#histoire .visual { border-radius: 16px; overflow: hidden; box-shadow: var(--ombre); }
#histoire p { color: var(--doux); font-size: 16px; text-wrap: pretty; }
#histoire .team { display: flex; gap: 28px; margin-top: 26px; }
#histoire .member b { display: block; font-family: var(--font-display); font-size: 16px; }
#histoire .member span { display: block; font-size: 13.5px; color: var(--doux); }
#histoire .member a.rdv { display: inline-block; margin-top: 8px; font-size: 13.5px; font-weight: 600; color: var(--sapin); text-decoration: none; }
#histoire .member a.rdv:hover { text-decoration: underline; }

/* ---------- CTA final ---------- */
#cta-final { background: var(--sapin); color: var(--ivoire); }
#cta-final .wrap { display: flex; align-items: center; justify-content: space-between; gap: 32px; flex-wrap: wrap; }
#cta-final h2 { color: #fff; font-size: clamp(1.7rem, 3vw, 2.5rem); font-weight: 800; max-width: 34rem; line-height: 1.12; }
#cta-final p { color: rgba(250, 247, 240, .8); margin: 10px 0 0; max-width: 32rem; }
#cta-final .btn.solid { background: var(--ivoire); color: var(--sapin); }
#cta-final .btn.solid:hover { background: #fff; }
#cta-final .btn.ghost { border-color: rgba(250, 247, 240, .5); color: var(--ivoire); }
#cta-final .btn.ghost:hover { border-color: #fff; color: #fff; }

/* ---------- Footer ---------- */
footer.site { padding: 60px 0 36px; border-top: 1px solid var(--ligne); background: var(--carte); }
footer.site .cols { display: grid; grid-template-columns: 2fr 1fr 1fr 1fr; gap: 30px; margin-bottom: 40px; }
footer.site .brand { font-family: var(--font-display); font-weight: 800; font-size: 20px; margin-bottom: 8px; }
footer.site .brand b { color: var(--sapin); }
footer.site p, footer.site a { color: var(--doux); font-size: 14px; text-decoration: none; }
footer.site a:hover { color: var(--sapin); }
footer.site h4 { font-size: 14px; font-weight: 700; margin: 0 0 12px; color: var(--encre); }
footer.site ul { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 8px; }
footer.site .legal { border-top: 1px solid var(--ligne); padding-top: 22px; display: flex; justify-content: space-between; flex-wrap: wrap; gap: 10px; font-size: 12.5px; color: var(--doux); }

/* ---------- Icônes générées (vert sur blanc, fondues par multiply) ---------- */
.cell .ico { width: 34px; height: auto; mix-blend-mode: multiply; margin-bottom: 12px; }

/* ---------- Entête sécurité avec visuel ---------- */
.sec-head { display: grid; grid-template-columns: 1.4fr 1fr; gap: 44px; align-items: center; margin-bottom: 48px; }
.sec-head img { border-radius: 16px; box-shadow: var(--ombre); }
@media (max-width: 980px) { .sec-head { grid-template-columns: 1fr; } }

/* ---------- Pages intérieures (fiches) ---------- */
.page-hero { padding: 150px 0 56px; }
.page-hero .crumb { font-size: 14px; color: var(--doux); margin-bottom: 14px; }
.page-hero .crumb a { color: var(--sapin); text-decoration: none; font-weight: 600; }
h1.page-title { font-size: clamp(2.1rem, 4vw, 3.3rem); font-weight: 800; line-height: 1.08; max-width: 52rem; margin-bottom: 16px; }
.page-hero .lede { color: var(--doux); font-size: 17.5px; max-width: 44rem; margin: 0 0 28px; text-wrap: pretty; }
.fiche-shot { border-radius: 16px; overflow: hidden; box-shadow: var(--ombre); border: 1px solid var(--ligne); }
.avantavec { display: grid; grid-template-columns: 1fr 1fr; gap: 18px; }
.avantavec .pane { border-radius: 16px; padding: 30px; }
.avantavec .pane.avant { background: var(--carte); border: 1px solid var(--ligne); }
.avantavec .pane.avec { background: var(--sapin-clair); }
.avantavec .pane .tag { font-family: var(--font-display); font-weight: 700; font-size: 14px; margin-bottom: 10px; }
.avantavec .pane.avant .tag { color: var(--doux); }
.avantavec .pane.avec .tag { color: var(--sapin); }
.avantavec .pane p { margin: 0; font-size: 16px; }
.punchline {
  font-family: var(--font-display); font-weight: 700; font-size: clamp(1.4rem, 2.6vw, 2rem);
  line-height: 1.25; color: var(--sapin); max-width: 44rem; margin: 48px 0 0;
}
.fonctions-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
.fonctions-grid .fn {
  background: var(--carte); border: 1px solid var(--ligne); border-radius: 12px;
  padding: 16px 20px; font-size: 15px;
}
.exemple-box {
  background: var(--sapin); color: var(--ivoire); border-radius: 16px; padding: 34px;
  font-size: 17px; line-height: 1.6; max-width: 52rem;
}
.exemple-box .tag { font-family: var(--font-display); font-weight: 700; font-size: 14px; color: rgba(250,247,240,.7); margin-bottom: 10px; }
.atout-row { display: grid; grid-template-columns: 260px 1fr; gap: 22px; padding: 20px 0; border-bottom: 1px solid var(--ligne); }
.atout-row h3 { font-size: 17.5px; font-weight: 700; }
.atout-row p { margin: 0; color: var(--doux); font-size: 15px; }
.faq details { border-bottom: 1px solid var(--ligne); padding: 16px 0; }
.faq summary { font-family: var(--font-display); font-weight: 700; font-size: 17px; cursor: pointer; }
.faq p { color: var(--doux); margin: 12px 0 0; max-width: 46rem; }
@media (max-width: 760px) {
  .avantavec, .fonctions-grid { grid-template-columns: 1fr; }
  .atout-row { grid-template-columns: 1fr; gap: 6px; }
}

/* ---------- Détail produit (groupes de capacités) ---------- */
.detail-groups { display: grid; grid-template-columns: 1fr 1fr; gap: 18px; }
.dg { background: var(--carte); border: 1px solid var(--ligne); border-radius: 16px; padding: 26px; }
.tinted .dg { border-color: transparent; }
.dg h3 { font-size: 17.5px; font-weight: 700; margin-bottom: 12px; }
.dg ul { margin: 0; padding: 0; list-style: none; }
.dg ul li { font-size: 14.5px; color: var(--encre); padding: 5px 0 5px 18px; position: relative; }
.dg ul li::before { content: ""; position: absolute; left: 0; top: 13px; width: 8px; height: 2px; background: var(--sapin); }
.dg .note { font-size: 13px; color: var(--doux); margin: 12px 0 0; }
@media (max-width: 760px) { .detail-groups { grid-template-columns: 1fr; } }

/* ---------- Catalogue des fonctionnalités ---------- */
.cat-univers { margin-bottom: 56px; }
.cat-univers > h2 { font-size: clamp(1.5rem, 2.6vw, 2.1rem); font-weight: 800; margin-bottom: 6px; }
.cat-univers > p.lead { color: var(--doux); margin: 0 0 22px; max-width: 46rem; }
.cat-univers .links { margin: 18px 0 0; font-size: 14.5px; }
.cat-univers .links a { color: var(--sapin); font-weight: 600; }

/* ---------- Pages légales ---------- */
.legal-prose { max-width: 760px; }
.legal-prose h2 { font-size: 20px; font-weight: 700; margin: 36px 0 10px; }
.legal-prose h3 { font-size: 16.5px; font-weight: 700; margin: 24px 0 8px; }
.legal-prose p, .legal-prose li { font-size: 15px; color: var(--encre); line-height: 1.7; margin: 0 0 10px; }
.legal-prose .meta { color: var(--doux); font-size: 14px; }
.legal-prose table { width: 100%; border-collapse: collapse; margin: 14px 0 18px; }
.legal-prose th, .legal-prose td { border: 1px solid var(--ligne); padding: 8px 10px; text-align: left; vertical-align: top; font-size: 14px; line-height: 1.5; }
.legal-prose th { background: var(--sapin-clair); font-weight: 600; }
.legal-nav { display: flex; flex-wrap: wrap; gap: 14px; margin: 0 0 40px; font-size: 14px; }
.legal-nav a { color: var(--sapin); font-weight: 600; text-decoration: none; }
.notice {
  background: var(--sapin-clair); border-radius: 12px; padding: 14px 18px;
  font-size: 14px; color: var(--encre); margin: 0 0 28px; max-width: 760px;
}

/* ---------- Reveal ---------- */
.reveal { opacity: 0; transform: translateY(28px); transition: opacity .6s ease, transform .6s ease; }
.reveal.in { opacity: 1; transform: none; }

/* ---------- Responsive ---------- */
@media (max-width: 980px) {
  nav.topnav a.link { display: none; }
  .trust-band .container { grid-template-columns: repeat(2, 1fr); }
  .bento { grid-template-columns: 1fr 1fr; }
  .cell, .cell.wide { grid-column: span 1; }
  .engagements, .securite-grid { grid-template-columns: 1fr 1fr; }
  #tarifs .panel, #histoire .split { grid-template-columns: 1fr; }
  .metier-row { grid-template-columns: 1fr auto; }
  .metier-row p { display: none; }
  footer.site .cols { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 640px) {
  section { padding: 72px 0; }
  .container { padding: 0 20px; }
  .bento, .engagements, .securite-grid { grid-template-columns: 1fr; }
  .trust-band .container { grid-template-columns: 1fr 1fr; }
  #xp-hero .inner { margin: 0 20px; }
}
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation: none !important; transition: none !important; }
  .reveal { opacity: 1; transform: none; }
}
