/* ==========================================================================
   cfo.valmetrics.com : feuille de styles
   Même grammaire visuelle que eco. et pme.valmetrics.com :
   Swiss Style, noir et blanc, rouge sourd en accent, angles droits.
   ========================================================================== */

/* --- 1. Jetons (couleurs, polices, dimensions) --------------------------- */
:root {
  --white: #ffffff;
  --surface: hsl(0 0% 96%);      /* sections grises */
  --ink: hsl(0 0% 10%);          /* texte principal */
  --ink-2: hsl(0 0% 32%);        /* texte secondaire */
  --muted: hsl(0 0% 40%);        /* texte descriptif */
  --line: hsl(0 0% 88%);         /* filets */
  --line-strong: hsl(0 0% 78%);
  --black: hsl(0 0% 6%);         /* sections noires et pied de page */
  --accent: #a4161a;             /* rouge sourd, usage parcimonieux */
  --accent-light: #ff7a7f;       /* rouge éclairci, lisible sur noir */
  --blue: #1f4e79;               /* bleu profond, colonne Valmetrics du comparatif */
  --blue-tint: hsl(210 55% 97%);
  --blue-line: hsl(210 35% 88%);

  --ff-sans: "Inter", "Helvetica Neue", Arial, sans-serif;
  --ff-mono: "Roboto Mono", ui-monospace, SFMono-Regular, Menlo, monospace;

  --shell: 80rem;                                  /* largeur max du contenu */
  --gut: clamp(1.5rem, 6vw, 6rem);                 /* marges latérales */
  --sec: 5rem;                                     /* espacement vertical des sections */
  --header-h: 72px;
  color-scheme: light;
}

/* --- 2. Base ------------------------------------------------------------- */
*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: calc(var(--header-h) + 8px); -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--white);
  color: var(--ink);
  font-family: var(--ff-sans);
  font-size: 1rem;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}
body.menu-open { overflow: hidden; }
[hidden] { display: none !important; }
img { display: block; max-width: 100%; height: auto; }
a { color: var(--ink); }
a:hover { color: var(--accent); }
h1, h2, h3 { margin: 0; color: inherit; }
p { margin: 0; }
dl, dd { margin: 0; }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; }

.shell { width: 100%; max-width: var(--shell); margin: 0 auto; padding-inline: var(--gut); }
.mono { font-family: var(--ff-mono); }
.tn { font-variant-numeric: tabular-nums; }
.sr-only {
  position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0;
}

/* Lien d'évitement, visible au clavier uniquement */
.skip {
  position: absolute; left: 1rem; top: -4rem; z-index: 100;
  background: var(--ink); color: var(--white); padding: .75rem 1rem; text-decoration: none;
}
.skip:focus { top: 1rem; color: var(--white); }

/* --- 3. Typographie commune --------------------------------------------- */
.eyebrow {
  display: flex; align-items: center; gap: .75rem;
  margin-bottom: 1.25rem;
  font-family: var(--ff-mono); font-size: .75rem; font-weight: 500;
  letter-spacing: .18em; text-transform: uppercase; color: var(--ink-2);
}
.eyebrow::before { content: ""; flex: 0 0 1.75rem; height: 2px; background: var(--accent); }
.eyebrow-center { justify-content: center; }

.h2 {
  max-width: 26ch;
  font-size: clamp(1.875rem, 3.4vw, 2.375rem); font-weight: 700;
  letter-spacing: -.03em; line-height: 1.12; text-wrap: balance;
}
.intro { max-width: 46rem; margin-top: 1.25rem; font-size: 1.125rem; line-height: 1.75; color: var(--muted); }
.body { max-width: 44rem; font-size: 1.0625rem; line-height: 1.8; color: var(--ink-2); }
.label {
  font-family: var(--ff-mono); font-size: .6875rem; font-weight: 500;
  letter-spacing: .16em; text-transform: uppercase; color: var(--muted);
}
.label-accent { color: var(--accent); }

/* Liste à tirets dessinés */
.ticks { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: .6rem; }
.ticks li { position: relative; padding-left: 1.1rem; font-size: .9375rem; line-height: 1.6; color: var(--ink-2); }
.ticks li::before { content: ""; position: absolute; left: 0; top: .8em; width: .5rem; height: 1px; background: currentColor; }

/* --- 4. Boutons ---------------------------------------------------------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: .6rem;
  min-height: 48px; padding: 0 2rem;
  border: 1px solid var(--ink);
  font: inherit; font-size: .9375rem; font-weight: 500; text-decoration: none;
  cursor: pointer;
  transition: background .15s, color .15s, border-color .15s;
}
.btn-primary { background: var(--ink); color: var(--white); }
.btn-primary:hover { background: transparent; color: var(--ink); }
.btn-secondary { background: transparent; color: var(--ink); border-color: var(--line-strong); }
.btn-secondary:hover { border-color: var(--ink); color: var(--ink); }

/* --- 5. En-tête et navigation ------------------------------------------- */
.site-header {
  position: sticky; top: 0; z-index: 50;
  background: rgba(255, 255, 255, .92);
  -webkit-backdrop-filter: blur(12px); backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--line);
}
.header-bar {
  min-height: var(--header-h);
  display: flex; align-items: center; justify-content: space-between; gap: 1rem 2rem;
}
.brand { display: flex; align-items: center; text-decoration: none; }
.mark { flex: 0 0 auto; overflow: visible; }
.mark-face { fill: rgb(28, 28, 28); }
.mark-light .mark-face { fill: #ffffff; }

.nav { display: flex; flex-wrap: wrap; align-items: center; gap: .75rem 1.75rem; }
.nav a { padding-block: .5rem; font-size: .875rem; color: var(--ink-2); text-decoration: none; }
.nav a:hover {
  color: var(--ink);
  text-decoration: underline; text-decoration-color: var(--accent); text-underline-offset: 6px;
}
.nav a.nav-cta { border: 1px solid var(--ink); color: var(--ink); padding: .6rem 1.1rem; text-decoration: none; }
.nav a.nav-cta:hover { background: var(--ink); color: var(--white); }

/* Bouton hamburger : deux barres qui se croisent en X */
.nav-toggle {
  display: none;
  width: 44px; height: 44px; padding: 0;
  border: 0; background: transparent; cursor: pointer;
  flex-direction: column; align-items: center; justify-content: center; gap: 6px;
}
.nav-toggle span { display: block; width: 22px; height: 1.5px; background: var(--ink); transition: transform .2s; }
.nav-toggle[aria-expanded="true"] span:first-child { transform: translateY(3.75px) rotate(45deg); }
.nav-toggle[aria-expanded="true"] span:last-child { transform: translateY(-3.75px) rotate(-45deg); }

/* Panneau du menu mobile */
.nav-mobile {
  display: flex; flex-direction: column;
  /* absolute (et non fixed) : le flou de l'en-tête piège les éléments fixes */
  position: absolute; top: 100%; left: 0; right: 0;
  height: calc(100vh - var(--header-h)); height: calc(100dvh - var(--header-h));
  background: var(--white); overflow-y: auto;
  border-top: 1px solid var(--line);
  animation: menu-in .25s ease;
}
.nav-mobile[hidden] { display: none; }
.nav-mobile a {
  padding: 1.1rem var(--gut);
  font-size: 1.25rem; font-weight: 500; color: var(--ink); text-decoration: none;
  border-bottom: 1px solid var(--line);
}
.nav-mobile a.nav-cta { background: var(--ink); color: var(--white); }
@keyframes menu-in { from { opacity: 0; transform: translateY(12px); } to { opacity: 1; transform: none; } }

/* --- 6. Hero ------------------------------------------------------------- */
.hero { padding: 6rem 0 4rem; }
.badge {
  display: inline-flex; align-items: center; gap: 1rem;
  padding: .375rem .375rem .375rem 1.125rem;
  border: 1px solid var(--line-strong); border-radius: 999px;
  background: rgba(255, 255, 255, .85);
  font-family: var(--ff-mono); font-size: .6875rem; font-weight: 500;
  letter-spacing: .14em; text-transform: uppercase; color: var(--ink-2);
}
.badge svg { flex: 0 0 auto; display: block; }
.hero h1 {
  max-width: 16ch; margin-top: 1.75rem;
  font-size: clamp(2.25rem, 6vw, 4.5rem); font-weight: 700;
  letter-spacing: -.04em; line-height: 1.04; text-wrap: balance;
}
.lead {
  max-width: 40rem; margin-top: 1.75rem;
  font-size: clamp(1.15rem, 1.8vw, 1.375rem); font-weight: 300; line-height: 1.6; color: var(--ink-2);
}
.actions { display: flex; flex-wrap: wrap; gap: 1rem; margin-top: 2.5rem; }


/* --- 7. Points forts ----------------------------------------------------- */
.strengths { padding-bottom: var(--sec); }
.strengths-grid {
  display: grid; grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 1px; background: var(--line); border: 1px solid var(--line);
}
.strength { display: flex; flex-direction: column; gap: .75rem; padding: 2rem 1.75rem; background: var(--white); }
.strength-title { font-size: clamp(1.375rem, 2vw, 1.625rem); font-weight: 700; letter-spacing: -.03em; line-height: 1.2; text-wrap: balance; }
.strength-text { font-size: .9375rem; color: var(--muted); }

/* --- 8. Sections --------------------------------------------------------- */
.band { padding: var(--sec) 0; }
.band-alt { background: var(--surface); }
.band-rule { border-top: 1px solid var(--line); }   /* sépare deux sections blanches consécutives */

/* Section noire : on redéfinit les couleurs plutôt que réécrire les composants */
.band-dark {
  background: var(--black); color: var(--white);
  --ink-2: rgba(255, 255, 255, .78);
  --muted: rgba(255, 255, 255, .62);
}
.band-dark .eyebrow { color: rgba(255, 255, 255, .65); }
.band-dark .eyebrow::before { background: var(--accent-light); }
.band-dark .intro { color: rgba(255, 255, 255, .7); }

/* --- 9. Le principe : intro à gauche, quatre cartes à droite ----------- */
.principle {
  display: grid; grid-template-columns: minmax(0, 5fr) minmax(0, 7fr);
  gap: 3rem 4rem; align-items: start;
}
.principle .h2 { max-width: 18ch; }
/* Sur grand écran, l'intro reste visible pendant le défilement des cartes */
.principle-intro { position: sticky; top: calc(var(--header-h) + 2rem); }
.proofs {
  list-style: none; margin: 0; padding: 0;
  display: grid; grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 1px; background: var(--line); border: 1px solid var(--line);
}
.proof {
  display: flex; flex-direction: column; gap: .75rem;
  padding: 2rem 1.75rem; background: var(--white);
  box-shadow: inset 0 0 0 0 var(--accent);
  transition: box-shadow .2s;
}
.proof:hover { box-shadow: inset 0 3px 0 0 var(--accent); }
.proof-top { display: flex; align-items: center; justify-content: space-between; margin-bottom: .5rem; }
.proof-icon {
  display: inline-flex; align-items: center; justify-content: center;
  width: 48px; height: 48px; border: 1px solid var(--ink); color: var(--ink);
}
.proof-icon svg { fill: none; stroke: currentColor; stroke-width: 1.5; stroke-linecap: round; stroke-linejoin: round; }
.proof-num { font-family: var(--ff-mono); font-size: .75rem; font-weight: 500; letter-spacing: .12em; color: var(--accent); }
.proof h3 { font-size: 1.1875rem; font-weight: 700; letter-spacing: -.02em; line-height: 1.25; }
.proof p { font-size: .9375rem; line-height: 1.65; color: hsl(0 0% 36%); }

/* --- 10. Trois étages ---------------------------------------------------- */
.floor { display: flex; flex-wrap: wrap; gap: 1.5rem 3rem; padding: 2.25rem 2rem; }
.floor-head { flex: 2 1 20rem; min-width: 0; }
.floor .ticks { flex: 3 1 22rem; min-width: 0; align-self: center; }
.floor h3 { margin-top: .75rem; font-size: 1.375rem; font-weight: 700; letter-spacing: -.03em; line-height: 1.2; color: var(--white); }
.floor-head > p:not(.label):not(.floor-num) { margin-top: .75rem; font-size: .9375rem; line-height: 1.65; color: rgba(255, 255, 255, .72); }
.floor-head .label { color: rgba(255, 255, 255, .6); }
.floor-num + .label { margin-top: .5rem; }
.floor-num { font-family: var(--ff-mono); font-size: 2rem; font-weight: 500; line-height: 1.2; color: rgba(255, 255, 255, .9); }
.floor-num-accent { color: var(--accent-light); }

.floor-base { margin-top: 3.5rem; border: 1px dashed rgba(255, 255, 255, .35); }
.floors {
  display: flex; flex-direction: column; gap: 1px; margin-top: 1rem;
  background: rgba(255, 255, 255, .14); border: 1px solid rgba(255, 255, 255, .14);
}
.floor-1 { background: hsl(0 0% 9%); }
.floor-2 { background: hsl(0 0% 11%); }
.floor-3 { background: hsl(0 0% 13%); }

/* --- 11. Comparatif ------------------------------------------------------ */
.cmp-wrap { margin-top: 3rem; overflow-x: auto; }
.cmp {
  width: 100%; min-width: 46rem;
  border-collapse: collapse; border: 1px solid var(--line-strong);
  table-layout: fixed;
}
.cmp th, .cmp td { text-align: left; vertical-align: middle; }
.cmp thead th {
  padding: 1rem 1.5rem;
  font-family: var(--ff-mono); font-size: .75rem; font-weight: 500;
  letter-spacing: .16em; text-transform: uppercase;
  border-bottom: 1px solid var(--line-strong);
}
.cmp .cmp-corner { width: 12rem; background: var(--surface); border-right: 1px solid var(--line); }
.cmp .cmp-head-a { background: var(--white); color: hsl(0 0% 35%); }
.cmp .cmp-head-b { width: 46%; background: var(--blue); color: var(--white); border-bottom-color: var(--blue); }

.cmp tbody th, .cmp tbody td { padding: 1rem 1.5rem; font-size: .9375rem; line-height: 1.5; border-bottom: 1px solid var(--line); }
.cmp tbody tr:last-child th, .cmp tbody tr:last-child td { border-bottom: 0; }
.cmp tbody th { font-weight: 600; letter-spacing: -.01em; background: var(--surface); border-right: 1px solid var(--line); }
.cmp td.a { color: hsl(0 0% 38%); background: var(--white); }
/* Colonne Valmetrics : fond bleuté très léger, liserés et coche bleus */
.cmp td.b {
  position: relative; padding-left: 2.75rem;
  background: var(--blue-tint); color: var(--ink); font-weight: 600;
  border-left: 2px solid var(--blue); border-right: 2px solid var(--blue);
  border-bottom-color: var(--blue-line);
}
.cmp tbody tr:last-child td.b { border-bottom: 2px solid var(--blue); }
.cmp .cmp-head-b { border-left: 2px solid var(--blue); border-right: 2px solid var(--blue); }
.cmp td.b::before {
  content: ""; position: absolute; left: 1.4rem; top: 50%;
  width: .75rem; height: .4rem; margin-top: -.3rem;
  border-left: 2px solid var(--blue); border-bottom: 2px solid var(--blue);
  transform: rotate(-45deg);
}

/* --- 12. Profil ---------------------------------------------------------- */
.profile { display: flex; flex-wrap: wrap; gap: 3rem 4rem; }
.profile-photo { flex: 0 1 27rem; min-width: 0; margin: 0; }
.profile-photo img {
  width: 100%; aspect-ratio: 4 / 5; object-fit: cover; object-position: center 25%;
  border: 1px solid var(--line);
}
.profile-body { flex: 999 1 26rem; min-width: 0; }
.rule { width: 3rem; height: 2px; margin-top: 1rem; background: var(--accent); }
.profile-body .body { margin-top: 1.5rem; }
.profile-body .body + .body { margin-top: 1rem; }

.stats {
  display: grid; grid-template-columns: repeat(auto-fit, minmax(7.5rem, 1fr));
  gap: 1px; margin-top: 2.5rem; background: var(--line); border: 1px solid var(--line);
}
.stats > div { padding: 1.25rem; background: var(--white); }
.stats dt { font-size: 1.75rem; font-weight: 700; letter-spacing: -.03em; line-height: 1.2; }
.stats dd { margin-top: .4rem; }

.cv { display: grid; grid-template-columns: repeat(auto-fit, minmax(16rem, 1fr)); gap: 2.5rem; margin-top: 2.5rem; }
.cv-list { margin-top: 1rem; }
.cv-list > div { padding: .7rem 0; border-top: 1px solid hsl(0 0% 90%); }
.cv-list dt { font-size: .9375rem; font-weight: 600; }
.cv-list dd { margin-top: .15rem; font-size: .875rem; color: var(--muted); }
.cv-sectors-label { margin-top: 2rem; }
.cv-sectors { margin-top: .75rem; font-size: .9375rem; line-height: 1.7; color: var(--ink-2); }

/* --- 13. Conditions ------------------------------------------------------ */
.terms { display: flex; flex-wrap: wrap; gap: 3rem; margin-top: 3rem; }
.price-card {
  flex: 2 1 22rem; min-width: 0;
  display: flex; flex-direction: column; gap: 1rem;
  padding: 2.25rem; border: 1px solid var(--ink);
}
.price { font-size: clamp(1.75rem, 3vw, 2.5rem); font-weight: 700; letter-spacing: -.03em; line-height: 1.1; }
.price-from { display: block; margin-bottom: .35rem; font-size: 1rem; font-weight: 500; letter-spacing: 0; color: var(--muted); }
.price-value { white-space: nowrap; }
.price-unit { font-size: 1rem; font-weight: 400; letter-spacing: 0; color: var(--muted); }
.price-text { margin-top: .5rem; font-size: .9375rem; line-height: 1.65; color: var(--ink-2); }
.price-note { font-size: .875rem; line-height: 1.6; color: var(--muted); }
.price-cta { margin-top: auto; }

.terms-list {
  flex: 3 1 26rem; min-width: 0;
  display: grid; grid-template-columns: repeat(auto-fit, minmax(14rem, 1fr)); gap: 0 2.5rem;
  align-content: start;
}
.terms-list > div { padding: 1.25rem 0; border-top: 1px solid var(--line); }
.terms-list dd { margin-top: .5rem; font-size: .9375rem; line-height: 1.6; }

/* --- 14. FAQ ------------------------------------------------------------- */
.faq { margin-top: 2.5rem; border-top: 1px solid hsl(0 0% 85%); }
.faq details { padding: 1.4rem 0; border-bottom: 1px solid hsl(0 0% 85%); }
.faq summary {
  display: flex; justify-content: space-between; gap: 2rem;
  list-style: none; cursor: pointer;
  font-size: 1.0625rem; font-weight: 600; letter-spacing: -.01em;
}
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after { content: "+"; font-family: var(--ff-mono); font-weight: 400; color: var(--muted); }
.faq details[open] summary::after { content: "−"; }
.faq details p { max-width: 46rem; margin-top: .9rem; font-size: .9375rem; line-height: 1.7; color: hsl(0 0% 36%); }

/* --- 15. Contact --------------------------------------------------------- */
/* Le conteneur reste large : Calendly n'affiche la photo et la présentation
   à côté du calendrier qu'au-delà d'environ 1000 px de largeur. */
.contact { text-align: center; }
.contact .h2, .contact .intro { margin-inline: auto; }
.calendar { margin-top: 2.5rem; text-align: left; }
/* data-resize="true" (index.html) : Calendly ajuste lui-même la hauteur à son contenu,
   ce qui supprime la barre de défilement interne. Ne pas forcer de hauteur ici. */
.calendly-inline-widget { position: relative; min-width: 0 !important; width: 100%; }
.email { display: flex; justify-content: center; align-items: center; min-height: 48px; margin-top: 1.5rem; }
.email-link { font-size: .9375rem; text-decoration: underline; text-decoration-color: var(--accent); text-underline-offset: 6px; }

/* --- 16. Pied de page ---------------------------------------------------- */
.site-footer { padding: 3.5rem 0; background: var(--black); color: var(--white); }
.footer-inner { display: flex; flex-direction: column; align-items: center; gap: .9rem; text-align: center; }
.footer-name { font-size: .8125rem; letter-spacing: .2em; }
.footer-address { font-size: .875rem; color: rgba(255, 255, 255, .65); }

/* ==========================================================================
   Responsive
   ========================================================================== */

/* Sous 900 px (tablettes portrait et mobiles) : menu hamburger, points forts
   en une colonne */
@media (max-width: 899px) {
  .nav { display: none; }
  .nav-toggle { display: flex; }
  .strengths-grid { grid-template-columns: minmax(0, 1fr); }
  .principle { grid-template-columns: minmax(0, 1fr); }
  .principle .h2 { max-width: 26ch; }
  .principle-intro { position: static; }
}

/* Comparatif : version compacte sur petit laptop et tablette paysage */
@media (min-width: 1024px) and (max-width: 1199px) {
  .cmp .cmp-corner { width: 10rem; }
  .cmp .cmp-head-b { width: 42%; }
  .cmp tbody th, .cmp tbody td { padding: .9rem 1.1rem; font-size: .875rem; }
  .cmp td.b { padding-left: 2.4rem; }
  .cmp td.b::before { left: 1.1rem; }
}

/* Comparatif empilé sous 1024 px : le critère en bandeau, les deux options côte à côte */
@media (max-width: 1023px) {
  .cmp-wrap { overflow-x: visible; }
  .cmp { min-width: 0; table-layout: auto; }
  .cmp thead tr, .cmp tbody tr { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); }
  .cmp .cmp-corner { display: none; }
  .cmp thead th { padding: .9rem 1rem; font-size: .6875rem; letter-spacing: .12em; }
  .cmp .cmp-head-b { width: auto; }
  .cmp tbody th {
    grid-column: 1 / -1;
    padding: .7rem 1rem; border-right: 0;
    border-bottom: 1px solid var(--line);
  }
  .cmp tbody td { padding: .9rem 1rem; font-size: .875rem; }
  .cmp td.b { padding-left: 2.1rem; border-left: 0; border-right: 0; }
  .cmp tbody tr:last-child td.b { border-bottom: 0; }
  .cmp .cmp-head-b { border-left: 0; border-right: 0; }
  .cmp td.b::before { left: .85rem; }
  .cmp tbody tr:last-child th { border-bottom: 1px solid var(--line); }
}

/* Laptops à écran peu haut (1366 × 768, 1280 × 800) : le bouton principal reste visible sans défiler */
@media (min-width: 900px) and (max-height: 820px) {
  .hero { padding-top: 3.5rem; }
  .hero h1 { margin-top: 1.25rem; }
  .lead { margin-top: 1.25rem; }
  .actions { margin-top: 2rem; }
}
@media (min-width: 900px) {
  .nav-mobile { display: none !important; }
}

/* Tablette et mobile */
@media (max-width: 760px) {
  :root { --sec: 3.5rem; --header-h: 64px; }
  .hero { padding: 3rem 0 2.5rem; }
  .actions .btn { flex: 1 1 100%; }
  .intro { font-size: 1.0625rem; }
  .floor { padding: 1.5rem 1.25rem; }
  .price-card { padding: 1.5rem; }
  .proof { padding: 1.5rem 1.25rem; }
}

@media (max-width: 560px) {
  .proofs { grid-template-columns: minmax(0, 1fr); }
}

@media (max-width: 420px) {
  .price { font-size: 1.5rem; }
  .cmp tbody td { font-size: .8125rem; }
  .strength { padding: 1.5rem 1.25rem; }
}

/* Respect du réglage « réduire les animations » */
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation: none !important; transition: none !important; }
}
