/* ============================================================
   Tovalo — One-page B2B vitrine
   Stylesheet · brand book Pivot v2
   ============================================================ */

:root {
  /* brand */
  --nuit: #1B2A4E;
  --nuit-deep: #131e3a;
  --emerald: #10B981;
  --emerald-hover: #0ea372;
  --paper: #FFFFFF;
  --warm: #F8F5F0;
  --grey-light: #F4F4F5;
  --ink: #1B2A4E;
  --body: #374151;
  --muted: #6b7280;
  --line: #e7e5e0;
  --line-dark: #2a3a5e;

  /* type */
  --font-sans: 'Manrope', system-ui, -apple-system, 'Segoe UI', sans-serif;
  --font-mono: 'JetBrains Mono', ui-monospace, monospace;

  /* layout */
  --container: 1200px;
  --gutter: clamp(20px, 4vw, 40px);
  --nav-h: 70px;
}

* { box-sizing: border-box; }
html {
  scroll-behavior: smooth;
  scroll-padding-top: calc(var(--nav-h) + 12px);
  -webkit-text-size-adjust: 100%;
}
body {
  margin: 0;
  font-family: var(--font-sans);
  font-size: 17px;
  line-height: 1.55;
  color: var(--body);
  background: var(--paper);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

img, svg { display: block; max-width: 100%; }
a { color: inherit; text-decoration: none; }
button { font: inherit; cursor: pointer; }

/* ============================================================
   TYPOGRAPHY
   ============================================================ */
.h1 {
  font-weight: 700;
  font-size: clamp(2.2rem, 5.2vw, 4rem);
  letter-spacing: -0.035em;
  line-height: 1.04;
  color: var(--nuit);
  margin: 0;
  text-wrap: balance;
}
.h2 {
  font-weight: 700;
  font-size: clamp(1.8rem, 3.6vw, 2.75rem);
  letter-spacing: -0.03em;
  line-height: 1.08;
  color: var(--nuit);
  margin: 0;
  text-wrap: balance;
}
.h3 {
  font-weight: 700;
  font-size: 1.15rem;
  letter-spacing: -0.02em;
  color: var(--nuit);
  margin: 0;
  line-height: 1.25;
}
.lede {
  font-weight: 500;
  font-size: clamp(1.05rem, 1.4vw, 1.2rem);
  color: var(--body);
  line-height: 1.55;
  margin: 0;
  max-width: 60ch;
  text-wrap: pretty;
}
.eyebrow {
  font-family: var(--font-mono);
  font-size: 12px;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--muted);
  font-weight: 500;
}
.mono { font-family: var(--font-mono); }

/* ============================================================
   CONTAINER
   ============================================================ */
.container {
  width: 100%;
  max-width: var(--container);
  margin: 0 auto;
  padding: 0 var(--gutter);
}
section {
  padding: clamp(64px, 9vw, 120px) 0;
  position: relative;
}
.section-head {
  display: flex;
  flex-direction: column;
  gap: 12px;
  margin-bottom: clamp(40px, 5vw, 64px);
  max-width: 720px;
}

/* ============================================================
   NAV
   ============================================================ */
.nav {
  position: fixed;
  top: 0; left: 0; right: 0;
  height: var(--nav-h);
  background: rgba(255,255,255,0.96);
  backdrop-filter: saturate(180%) blur(8px);
  -webkit-backdrop-filter: saturate(180%) blur(8px);
  z-index: 100;
  transition: box-shadow 0.2s ease, background 0.2s ease;
  border-bottom: 1px solid transparent;
}
.nav.scrolled {
  box-shadow: 0 1px 0 rgba(27,42,78,0.06), 0 8px 24px -8px rgba(27,42,78,0.08);
  border-bottom-color: var(--line);
}
.nav-inner {
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
}
.nav-logo {
  display: flex;
  align-items: center;
  gap: 10px;
  font-weight: 700;
  font-size: 18px;
  letter-spacing: -0.035em;
  color: var(--nuit);
  line-height: 1;
}
.nav-logo svg { width: 30px; height: 30px; }
.nav-links {
  display: flex;
  align-items: center;
  gap: 32px;
  list-style: none;
  padding: 0;
  margin: 0;
}
.nav-links a {
  font-size: 14.5px;
  font-weight: 500;
  color: var(--body);
  position: relative;
  padding: 6px 0;
  transition: color 0.15s ease;
}
.nav-links a:hover {
  color: var(--nuit);
}
.nav-links a::after {
  content: "";
  position: absolute;
  left: 0; right: 0;
  bottom: 0;
  height: 1px;
  background: var(--nuit);
  transform: scaleX(0);
  transition: transform 0.2s ease;
}
.nav-links a:hover::after { transform: scaleX(1); }
.nav-cta-wrap {
  display: flex;
  align-items: center;
  gap: 12px;
}
.nav-burger {
  display: none;
  background: transparent;
  border: 1px solid var(--line);
  border-radius: 6px;
  padding: 8px;
  color: var(--nuit);
}
.nav-burger svg { width: 18px; height: 18px; }

/* mobile menu panel */
.mobile-menu {
  position: fixed;
  top: var(--nav-h);
  left: 0; right: 0;
  background: var(--paper);
  border-bottom: 1px solid var(--line);
  padding: 16px var(--gutter) 24px;
  display: none;
  z-index: 99;
}
.mobile-menu.open { display: block; }
.mobile-menu ul {
  list-style: none;
  padding: 0;
  margin: 0;
  display: flex;
  flex-direction: column;
  gap: 4px;
}
.mobile-menu a {
  display: block;
  padding: 12px 0;
  font-size: 16px;
  font-weight: 600;
  color: var(--nuit);
  border-bottom: 1px solid var(--line);
}
.mobile-menu a:last-child { border-bottom: none; }

/* ============================================================
   BUTTONS
   ============================================================ */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  height: 46px;
  padding: 0 22px;
  border-radius: 8px;
  font-weight: 600;
  font-size: 15px;
  letter-spacing: -0.005em;
  border: 1px solid transparent;
  transition: transform 0.12s ease, background 0.15s ease, border-color 0.15s ease, color 0.15s ease, box-shadow 0.15s ease;
  white-space: nowrap;
}
.btn-primary {
  background: var(--emerald);
  color: #fff;
  box-shadow: 0 1px 0 rgba(0,0,0,0.04), 0 6px 16px -6px rgba(16,185,129,0.45);
}
.btn-primary:hover {
  background: var(--emerald-hover);
  transform: translateY(-1px);
  box-shadow: 0 1px 0 rgba(0,0,0,0.04), 0 10px 22px -6px rgba(16,185,129,0.55);
}
.btn-secondary {
  background: transparent;
  color: var(--nuit);
  border-color: var(--nuit);
}
.btn-secondary:hover {
  background: var(--nuit);
  color: #fff;
}
.btn-sm {
  height: 38px;
  padding: 0 16px;
  font-size: 14px;
  border-radius: 6px;
}

/* ============================================================
   HERO
   ============================================================ */
.hero {
  padding-top: calc(var(--nav-h) + clamp(40px, 7vw, 96px));
  padding-bottom: clamp(64px, 9vw, 120px);
  background: var(--paper);
  overflow: hidden;
}
.hero-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.15fr) minmax(0, 0.85fr);
  gap: clamp(40px, 6vw, 80px);
  align-items: center;
}
.hero-text {
  display: flex;
  flex-direction: column;
  gap: 24px;
}
.hero-ctas {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 8px;
}
.hero-meta {
  display: flex;
  align-items: center;
  gap: 8px;
  font-family: var(--font-mono);
  font-size: 11.5px;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--muted);
  margin-top: 8px;
}
.hero-meta .dot { color: var(--emerald); }

.hero-visual {
  display: block;
  padding: 0;
  position: relative;
  aspect-ratio: 4 / 5;
  max-height: 560px;
  border-radius: 12px;
  overflow: hidden;
  box-shadow: 0 24px 60px -24px rgba(27,42,78,0.28), 0 8px 20px -8px rgba(27,42,78,0.14);
  background: var(--warm);
}
.hero-visual img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}
.hero-visual .photo-caption {
  position: absolute;
  left: 14px;
  bottom: 14px;
  font-family: var(--font-mono);
  font-size: 10px;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: #fff;
  background: rgba(27,42,78,0.78);
  padding: 6px 10px;
  border-radius: 4px;
  z-index: 1;
  backdrop-filter: blur(4px);
}

/* ============================================================
   KPI BAND
   ============================================================ */
.kpi-section {
  background: var(--warm);
  padding: clamp(48px, 6vw, 80px) 0;
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
}
.kpi-grid {
  display: grid;
  grid-template-columns: 1fr 1fr 1fr;
}
.kpi-cell {
  padding: 12px 16px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 12px;
  position: relative;
  text-align: center;
}
.kpi-cell + .kpi-cell::before {
  content: "";
  position: absolute;
  left: 0;
  top: 18%;
  bottom: 18%;
  width: 1px;
  background: var(--line);
}
.kpi-num {
  font-family: var(--font-mono);
  font-weight: 500;
  font-size: clamp(2.2rem, 5.5vw, 3.6rem);
  letter-spacing: -0.02em;
  line-height: 1;
  color: var(--nuit);
  white-space: nowrap;
}
.kpi-num.accent { color: var(--emerald); }
.kpi-label {
  font-family: var(--font-mono);
  font-size: 11.5px;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--muted);
  font-weight: 500;
}

/* ============================================================
   SERVICE
   ============================================================ */
.service-body {
  max-width: 780px;
  font-size: 1.075rem;
  line-height: 1.7;
  color: var(--body);
}
.service-body p { margin: 0 0 1em 0; }
.service-body p:last-child { margin: 0; }

/* ============================================================
   FONCTIONNEMENT — steps 2x2
   ============================================================ */
.section-grey { background: var(--warm); }
.steps-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 20px;
}
.step-card {
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: 10px;
  padding: 28px 28px 24px;
  display: flex;
  flex-direction: column;
  gap: 12px;
  transition: transform 0.15s ease, box-shadow 0.15s ease, border-color 0.15s ease;
}
.step-card:hover {
  transform: translateY(-2px);
  box-shadow: 0 4px 18px -8px rgba(27,42,78,0.18);
  border-color: rgba(27,42,78,0.16);
}
.step-num {
  font-family: var(--font-mono);
  font-weight: 600;
  font-size: 14px;
  color: var(--emerald);
  letter-spacing: 0.04em;
  margin-bottom: 4px;
}
.step-card h3 { font-size: 1.2rem; }
.step-card p {
  font-size: 0.97rem;
  color: var(--body);
  margin: 0;
  line-height: 1.55;
}

/* ============================================================
   POUR QUI — use cases
   ============================================================ */
.cases-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 20px;
}
.case-card {
  padding: 0;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: var(--paper);
  display: flex;
  flex-direction: column;
  overflow: hidden;
  transition: border-color 0.15s ease, transform 0.15s ease, box-shadow 0.15s ease;
}
.case-card:hover {
  border-color: var(--emerald);
  transform: translateY(-2px);
  box-shadow: 0 16px 36px -16px rgba(27,42,78,0.18);
}
.case-image {
  width: 100%;
  aspect-ratio: 4 / 3;
  background: var(--warm);
  overflow: hidden;
  position: relative;
}
.case-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  transition: transform 0.4s ease;
}
.case-card:hover .case-image img {
  transform: scale(1.04);
}
.case-content {
  padding: 20px 20px 22px;
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.case-card h3 {
  font-size: 1.05rem;
  letter-spacing: -0.015em;
}
.case-card p {
  font-size: 0.92rem;
  margin: 0;
  color: var(--body);
  line-height: 1.5;
}

/* ============================================================
   POURQUOI TOVALO — dark
   ============================================================ */
.section-dark {
  background: var(--nuit);
  color: #fff;
}
.section-dark .h2 { color: #fff; }
.section-dark .lede { color: #cdd4e3; }

.why-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 28px;
}
.why-card {
  display: flex;
  flex-direction: column;
  gap: 14px;
}
.why-check {
  width: 28px;
  height: 28px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  background: rgba(16,185,129,0.15);
  color: var(--emerald);
  flex-shrink: 0;
}
.why-check svg { width: 14px; height: 14px; }
.why-card h3 {
  color: #fff;
  font-size: 1.1rem;
}
.why-card p {
  color: #cdd4e3;
  font-size: 0.95rem;
  margin: 0;
  line-height: 1.55;
}

/* ============================================================
   FAQ — accordion
   ============================================================ */
.faq-list {
  max-width: 820px;
  display: flex;
  flex-direction: column;
  gap: 0;
  border-top: 1px solid var(--line);
}
.faq-item {
  border-bottom: 1px solid var(--line);
  padding: 0;
}
.faq-item summary {
  list-style: none;
  cursor: pointer;
  padding: 22px 0;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  font-weight: 600;
  font-size: 1.05rem;
  color: var(--nuit);
  letter-spacing: -0.015em;
  user-select: none;
  transition: color 0.15s ease;
}
.faq-item summary:hover { color: var(--emerald); }
.faq-item summary::-webkit-details-marker { display: none; }
.faq-icon {
  width: 24px;
  height: 24px;
  flex-shrink: 0;
  position: relative;
  transition: transform 0.2s ease;
}
.faq-icon::before,
.faq-icon::after {
  content: "";
  position: absolute;
  top: 50%;
  left: 50%;
  width: 12px;
  height: 1.6px;
  background: var(--nuit);
  transform-origin: center;
}
.faq-icon::before { transform: translate(-50%, -50%); }
.faq-icon::after { transform: translate(-50%, -50%) rotate(90deg); transition: transform 0.2s ease; }
.faq-item[open] .faq-icon::after { transform: translate(-50%, -50%) rotate(0deg); }
.faq-answer {
  padding: 0 0 24px 0;
  max-width: 720px;
  color: var(--body);
  font-size: 0.99rem;
  line-height: 1.6;
}

/* ============================================================
   CONTACT
   ============================================================ */
.contact-grid {
  display: grid;
  grid-template-columns: minmax(0, 0.85fr) minmax(0, 1.15fr);
  gap: clamp(32px, 5vw, 64px);
  align-items: start;
}
.contact-info {
  display: flex;
  flex-direction: column;
  gap: 32px;
}
.contact-coords {
  display: flex;
  flex-direction: column;
  gap: 16px;
}
.contact-coord {
  display: flex;
  flex-direction: column;
  gap: 6px;
}
.contact-coord .label {
  font-family: var(--font-mono);
  font-size: 10.5px;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: rgba(255,255,255,0.55);
}
.contact-coord .value {
  font-family: var(--font-mono);
  font-size: 16px;
  color: #fff;
  font-weight: 500;
}
.contact-coord .value a { color: #fff; }
.contact-coord .value a:hover { color: var(--emerald); }

.form-card {
  background: var(--paper);
  border-radius: 14px;
  padding: clamp(28px, 4vw, 40px);
  color: var(--body);
  box-shadow: 0 24px 60px -20px rgba(0,0,0,0.35);
}
.form-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 18px;
}
.field {
  display: flex;
  flex-direction: column;
  gap: 6px;
  margin-bottom: 16px;
}
.field-full { grid-column: 1 / -1; }
.field label {
  font-size: 12.5px;
  font-weight: 600;
  color: var(--nuit);
  letter-spacing: -0.005em;
}
.field label .opt {
  font-weight: 400;
  color: var(--muted);
  font-family: var(--font-mono);
  font-size: 10px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  margin-left: 6px;
}
.field input,
.field select,
.field textarea {
  font: inherit;
  font-size: 15px;
  color: var(--ink);
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 10px 12px;
  outline: none;
  transition: border-color 0.15s ease, box-shadow 0.15s ease;
}
.field textarea { resize: vertical; min-height: 90px; }
.field input:focus,
.field select:focus,
.field textarea:focus {
  border-color: var(--nuit);
  box-shadow: 0 0 0 3px rgba(27,42,78,0.08);
}
.form-submit {
  width: 100%;
  height: 50px;
  border-radius: 8px;
  background: var(--emerald);
  color: #fff;
  font-weight: 600;
  font-size: 15.5px;
  border: none;
  transition: background 0.15s ease, transform 0.12s ease;
  margin-top: 4px;
}
.form-submit:hover { background: var(--emerald-hover); transform: translateY(-1px); }
.form-submit:disabled { opacity: 0.6; cursor: not-allowed; transform: none; }
.form-success {
  text-align: center;
  padding: 28px 16px;
}
.form-success svg {
  width: 48px;
  height: 48px;
  color: var(--emerald);
  margin: 0 auto 16px;
}
.form-success h3 {
  font-size: 1.25rem;
  margin: 0 0 6px;
}
.form-success p {
  font-size: 0.95rem;
  color: var(--body);
  margin: 0;
}
.form-note {
  font-family: var(--font-mono);
  font-size: 10.5px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--muted);
  text-align: center;
  margin-top: 12px;
}

/* ============================================================
   FOOTER
   ============================================================ */
.footer {
  background: var(--nuit-deep);
  color: #cdd4e3;
  padding: 32px 0;
}
.footer-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 20px;
}
.footer-logo {
  display: flex;
  align-items: center;
  gap: 10px;
  color: #fff;
  font-weight: 700;
  font-size: 15px;
  letter-spacing: -0.03em;
}
.footer-logo svg { width: 24px; height: 24px; }
.footer-logo .mark-on-dark rect { fill: #fff; }
.footer-logo .mark-on-dark path { stroke: var(--emerald); }
.footer-links {
  display: flex;
  align-items: center;
  gap: 28px;
  flex-wrap: wrap;
}
.footer-legal {
  display: flex;
  gap: 16px;
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: rgba(255,255,255,0.55);
}
.footer-legal a:hover { color: #fff; }
.footer-social {
  display: flex;
  align-items: center;
  gap: 12px;
}
.footer-social a {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 32px;
  height: 32px;
  border-radius: 6px;
  border: 1px solid rgba(255,255,255,0.18);
  color: rgba(255,255,255,0.7);
  transition: color 0.15s ease, border-color 0.15s ease;
}
.footer-social a:hover {
  color: #fff;
  border-color: rgba(255,255,255,0.5);
}
.footer-copy {
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.1em;
  color: rgba(255,255,255,0.45);
}

/* ============================================================
   COOKIE BANNER
   ============================================================ */
.cookie {
  position: fixed;
  bottom: 16px;
  left: 16px;
  right: 16px;
  max-width: 720px;
  margin: 0 auto;
  background: var(--paper);
  border: 1px solid var(--line);
  box-shadow: 0 12px 40px -8px rgba(0,0,0,0.18);
  border-radius: 10px;
  padding: 16px 18px;
  display: flex;
  align-items: center;
  gap: 16px;
  z-index: 50;
  font-size: 13.5px;
  color: var(--body);
}
.cookie p { margin: 0; flex: 1; }
.cookie .btns { display: flex; gap: 8px; }
.cookie button {
  border-radius: 6px;
  padding: 8px 14px;
  font-size: 13px;
  font-weight: 600;
  border: none;
  cursor: pointer;
}
.cookie .accept { background: var(--nuit); color: #fff; }
.cookie .reject {
  background: transparent;
  color: var(--nuit);
  border: 1px solid var(--line);
}
.cookie.hidden { display: none; }

/* ============================================================
   FADE-IN
   ============================================================ */
.reveal {
  opacity: 0;
  transform: translateY(14px);
  transition: opacity 0.55s ease, transform 0.55s ease;
}
.reveal.visible {
  opacity: 1;
  transform: none;
}

/* ============================================================
   RESPONSIVE
   ============================================================ */
@media (max-width: 920px) {
  .hero-grid { grid-template-columns: 1fr; gap: 32px; }
  .hero-visual { order: -1; aspect-ratio: 16 / 10; max-height: 280px; }

  .steps-grid { grid-template-columns: 1fr; }
  .cases-grid { grid-template-columns: 1fr 1fr; }
  .why-grid { grid-template-columns: 1fr 1fr; gap: 24px; }
  .contact-grid { grid-template-columns: 1fr; }
  .footer-inner { justify-content: flex-start; gap: 16px; }
}

@media (max-width: 720px) {
  .nav-links { display: none; }
  .nav-cta-wrap .btn:not(.nav-burger) { display: none; }
  .nav-burger { display: inline-flex; }

  .kpi-grid { grid-template-columns: 1fr; gap: 28px; }
  .kpi-cell { padding: 18px 0; border-bottom: 1px solid var(--line); }
  .kpi-cell + .kpi-cell::before { display: none; }
  .kpi-cell:last-child { border-bottom: none; }

  .cases-grid { grid-template-columns: 1fr; }
  .why-grid { grid-template-columns: 1fr; }
  .form-row { grid-template-columns: 1fr; }

  .hero-ctas .btn { flex: 1 1 100%; }
  .footer-links { gap: 16px; }

  .cookie { flex-direction: column; align-items: flex-start; gap: 12px; }
  .cookie .btns { width: 100%; }
  .cookie button { flex: 1; }
}

@media (prefers-reduced-motion: reduce) {
  .reveal { opacity: 1 !important; transform: none !important; }
  * { animation: none !important; transition: none !important; }
}
