/* =========================================================================
   mParsio — présentation commerciale
   Charte : src/renderer/src/theme/README.md (navy #0C106E, emerald #10B981,
   cyan #27D3EE, IBM Plex Sans/Mono). Ne pas introduire de couleur hors charte.
   ========================================================================= */

:root {
  /* Marque */
  --navy: #0C106E;
  --navy-700: #0A0E5B;
  --navy-400: #4148A4;
  --navy-300: #7479C7;
  --navy-100: #CFD1EE;
  --navy-50: #ECEDF8;
  --emerald: #10B981;
  --emerald-600: #059669;
  --emerald-50: #ECFDF5;
  --cyan: #27D3EE;
  --cyan-50: #ECFEFF;
  --charcoal: #111827;
  --gray: #F3F4F6;
  --white: #FFFFFF;

  /* Fonctionnels */
  --red: #dc2626;
  --amber: #d97706;
  --teal: #0d9488;
  --indigo: #4f46e5;

  /* Surfaces */
  --bg: #FFFFFF;
  --bg-alt: #F7F8FC;
  --text: #111827;
  --text-soft: #4B5563;
  --text-faint: #9CA3AF;
  --border: #E5E7EB;

  --font-sans: 'IBM Plex Sans', -apple-system, BlinkMacSystemFont, 'Segoe UI', system-ui, sans-serif;
  --font-mono: 'IBM Plex Mono', ui-monospace, SFMono-Regular, Menlo, monospace;

  --radius: 14px;
  --shadow-sm: 0 1px 2px rgba(12, 16, 110, .06), 0 1px 3px rgba(12, 16, 110, .08);
  --shadow: 0 10px 30px -12px rgba(12, 16, 110, .28);
  --shadow-lg: 0 30px 70px -20px rgba(12, 16, 110, .38);

  --slide-pad: clamp(28px, 4.5vw, 80px);
}

* { box-sizing: border-box; }

html, body {
  margin: 0;
  padding: 0;
  background: var(--charcoal);
  color: var(--text);
  font-family: var(--font-sans);
  font-variant-numeric: tabular-nums;
  -webkit-font-smoothing: antialiased;
}

/* =========================================================================
   Moteur de slides — défilement vertical avec accroche, plus navigation
   clavier. Le mode « impression » (Ctrl+P) déroule tout, une slide par page.
   ========================================================================= */

.deck {
  height: 100vh;
  overflow-y: scroll;
  scroll-snap-type: y mandatory;
  scroll-behavior: smooth;
}

.slide {
  position: relative;
  min-height: 100vh;
  scroll-snap-align: start;
  scroll-snap-stop: always;
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding: var(--slide-pad);
  background: var(--bg);
  overflow: hidden;
}

.slide + .slide { border-top: 1px solid var(--border); }
.slide--alt { background: var(--bg-alt); }
.slide--dark { background: var(--navy); color: #fff; }
.slide--charcoal { background: var(--charcoal); color: #fff; }

.slide__inner {
  width: 100%;
  max-width: 1180px;
  margin: 0 auto;
}

/* Numéro + filet de progression */
.slide__num {
  position: absolute;
  right: var(--slide-pad);
  bottom: calc(var(--slide-pad) / 2);
  font-family: var(--font-mono);
  font-size: 12px;
  color: var(--text-faint);
  letter-spacing: .04em;
}
.slide--dark .slide__num,
.slide--charcoal .slide__num { color: rgba(255,255,255,.45); }

.progress {
  position: fixed;
  top: 0; left: 0;
  height: 3px;
  width: 0;
  background: linear-gradient(90deg, var(--emerald), var(--cyan));
  z-index: 100;
  transition: width .15s linear;
}

/* Sommaire latéral */
.dots {
  position: fixed;
  right: 18px;
  top: 50%;
  transform: translateY(-50%);
  display: flex;
  flex-direction: column;
  gap: 10px;
  z-index: 90;
}
.dots button {
  width: 9px; height: 9px;
  padding: 0;
  border: 0;
  border-radius: 50%;
  background: var(--navy-100);
  cursor: pointer;
  transition: transform .2s, background .2s;
  position: relative;
}
.dots button:hover { transform: scale(1.5); }
.dots button[aria-current='true'] {
  background: var(--emerald);
  transform: scale(1.6);
}
.dots button::after {
  content: attr(data-label);
  position: absolute;
  right: 18px; top: 50%;
  transform: translateY(-50%) translateX(6px);
  white-space: nowrap;
  font-size: 12px;
  font-family: var(--font-sans);
  background: var(--charcoal);
  color: #fff;
  padding: 4px 9px;
  border-radius: 6px;
  opacity: 0;
  pointer-events: none;
  transition: opacity .18s, transform .18s;
}
.dots button:hover::after { opacity: 1; transform: translateY(-50%) translateX(0); }

/* =========================================================================
   Typographie
   ========================================================================= */

h1, h2, h3, h4 { margin: 0; line-height: 1.12; letter-spacing: -.022em; }

.eyebrow {
  font-family: var(--font-mono);
  font-size: 12px;
  letter-spacing: .16em;
  text-transform: uppercase;
  color: var(--emerald-600);
  margin-bottom: 18px;
  display: flex;
  align-items: center;
  gap: 10px;
}
.eyebrow::before {
  content: '';
  width: 26px; height: 2px;
  background: var(--emerald);
  display: inline-block;
}
.slide--dark .eyebrow, .slide--charcoal .eyebrow { color: var(--cyan); }
.slide--dark .eyebrow::before, .slide--charcoal .eyebrow::before { background: var(--cyan); }

h1 { font-size: clamp(38px, 6vw, 76px); font-weight: 700; }
h2 { font-size: clamp(28px, 3.6vw, 46px); font-weight: 700; }
h3 { font-size: clamp(18px, 1.7vw, 22px); font-weight: 600; }

.lead {
  font-size: clamp(17px, 1.5vw, 21px);
  line-height: 1.55;
  color: var(--text-soft);
  max-width: 62ch;
  margin: 20px 0 0;
}
.slide--dark .lead, .slide--charcoal .lead { color: rgba(255,255,255,.78); }

.hl { color: var(--emerald-600); }
.slide--dark .hl, .slide--charcoal .hl { color: var(--cyan); }
.mono { font-family: var(--font-mono); }

/* =========================================================================
   Composants
   ========================================================================= */

.grid { display: grid; gap: 18px; }
.grid--2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.grid--3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.grid--4 { grid-template-columns: repeat(4, minmax(0, 1fr)); }

.card {
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 22px;
  box-shadow: var(--shadow-sm);
  transition: transform .25s cubic-bezier(.2,.7,.3,1), box-shadow .25s;
}
.card:hover { transform: translateY(-4px); box-shadow: var(--shadow); }
.card__icon {
  width: 38px; height: 38px;
  border-radius: 10px;
  display: grid; place-items: center;
  background: var(--navy-50);
  color: var(--navy);
  margin-bottom: 14px;
}
.card h3 { margin-bottom: 8px; }
.card p { margin: 0; font-size: 14.5px; line-height: 1.55; color: var(--text-soft); }

.slide--dark .card, .slide--charcoal .card {
  background: rgba(255,255,255,.05);
  border-color: rgba(255,255,255,.14);
  color: #fff;
}
.slide--dark .card p, .slide--charcoal .card p { color: rgba(255,255,255,.72); }
.slide--dark .card__icon, .slide--charcoal .card__icon {
  background: rgba(39,211,238,.14); color: var(--cyan);
}

/* Chiffre-clé */
.stat { text-align: left; }
.stat__value {
  font-family: var(--font-mono);
  font-size: clamp(30px, 3.4vw, 46px);
  font-weight: 600;
  color: var(--navy);
  line-height: 1;
}
.slide--dark .stat__value, .slide--charcoal .stat__value { color: var(--cyan); }
.stat__label { margin-top: 8px; font-size: 14px; color: var(--text-soft); }
.slide--dark .stat__label, .slide--charcoal .stat__label { color: rgba(255,255,255,.7); }

/* Badges */
.badge {
  display: inline-flex; align-items: center; gap: 6px;
  font-size: 12px; font-weight: 600;
  padding: 4px 10px;
  border-radius: 999px;
  background: var(--emerald-50);
  color: var(--emerald-600);
  border: 1px solid rgba(16,185,129,.28);
}
.badge--navy { background: var(--navy-50); color: var(--navy); border-color: var(--navy-100); }
.badge--cyan { background: var(--cyan-50); color: #0E7490; border-color: #A5F3FC; }
.badge--amber { background: #FFFBEB; color: var(--amber); border-color: #FDE68A; }

/* Cadre de capture d'écran */
.shot {
  border-radius: 12px;
  overflow: hidden;
  border: 1px solid var(--border);
  box-shadow: var(--shadow-lg);
  background: var(--white);
  cursor: zoom-in;
  transition: transform .25s cubic-bezier(.2,.7,.3,1), box-shadow .25s;
}
.shot:hover { transform: scale(1.02); }

/* Loupe : la capture survolée s'affiche en grand au centre de l'écran.
   pointer-events:none partout, pour que le survol de l'original persiste. */
.zoomlens {
  position: fixed;
  inset: 0;
  z-index: 200;
  display: grid;
  place-items: center;
  background: rgba(12, 16, 110, .55);
  backdrop-filter: blur(3px);
  pointer-events: none;
  opacity: 0;
  transition: opacity .18s ease;
}
.zoomlens.show { opacity: 1; }
.zoomlens img {
  max-width: 92vw;
  max-height: 90vh;
  border-radius: 12px;
  box-shadow: 0 40px 100px -20px rgba(0, 0, 0, .6);
  background: var(--white);
  transform: scale(.96);
  transition: transform .18s ease;
}
.zoomlens.show img { transform: scale(1); }
@media print { .zoomlens { display: none !important; } }
.shot__bar {
  height: 34px;
  background: linear-gradient(180deg, #FAFBFD, #F1F3F9);
  border-bottom: 1px solid var(--border);
  display: flex; align-items: center; gap: 7px;
  padding: 0 13px;
}
.shot__bar i { width: 10px; height: 10px; border-radius: 50%; background: #D5D8E2; display: block; }
.shot__bar span {
  margin-left: 10px;
  font-size: 11.5px;
  color: var(--text-faint);
  font-family: var(--font-mono);
}
.shot__img { display: block; width: 100%; height: auto; }
/* Emplacement tant que la capture n'est pas déposée */
.shot__slot {
  aspect-ratio: 16 / 10;
  display: grid; place-items: center;
  background:
    repeating-linear-gradient(45deg, #F7F8FC 0 12px, #F1F3F9 12px 24px);
  color: var(--text-faint);
  font-size: 13px;
  font-family: var(--font-mono);
  text-align: center;
  padding: 20px;
  line-height: 1.7;
}
.shot__caption {
  font-size: 13px;
  color: var(--text-soft);
  margin-top: 10px;
}

/* Tableau comparatif */
.cmp { width: 100%; border-collapse: separate; border-spacing: 0; font-size: 14.5px; }
.cmp th, .cmp td { padding: 13px 14px; text-align: left; border-bottom: 1px solid var(--border); }
.cmp thead th {
  font-size: 12px; text-transform: uppercase; letter-spacing: .07em;
  color: var(--text-soft); font-weight: 600;
  border-bottom: 2px solid var(--charcoal);
  position: sticky; top: 0; background: var(--bg-alt);
}
.cmp tbody tr:hover { background: var(--navy-50); }
.cmp .col-us { background: rgba(16,185,129,.06); font-weight: 600; }
.cmp thead .col-us { background: rgba(16,185,129,.12); color: var(--emerald-600); }
.yes { color: var(--emerald-600); font-weight: 700; }
.no { color: var(--text-faint); }
.partial { color: var(--amber); font-weight: 600; }
.cmp__scroll { overflow-x: auto; border-radius: var(--radius); border: 1px solid var(--border); background: var(--white); }
.cmp__note { font-size: 12.5px; color: var(--text-faint); margin-top: 12px; line-height: 1.6; }

/* Offres */
.offer {
  display: flex; flex-direction: column;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--white);
  overflow: hidden;
  transition: transform .25s, box-shadow .25s, border-color .25s;
}
.offer:hover { transform: translateY(-6px); box-shadow: var(--shadow); }
.offer--featured { border-color: var(--emerald); box-shadow: 0 0 0 3px rgba(16,185,129,.14); }
.offer__head { padding: 20px 20px 16px; border-bottom: 1px solid var(--border); }
.offer__name { font-size: 19px; font-weight: 700; color: var(--navy); }
.offer__for { font-size: 13px; color: var(--text-soft); margin-top: 5px; }
.offer__body { padding: 18px 20px; flex: 1; }
.offer ul { margin: 0; padding: 0; list-style: none; display: grid; gap: 9px; }
.offer li { font-size: 13.6px; line-height: 1.5; padding-left: 22px; position: relative; color: var(--text-soft); }
.offer li::before {
  content: '';
  position: absolute; left: 0; top: 6px;
  width: 12px; height: 7px;
  border-left: 2px solid var(--emerald);
  border-bottom: 2px solid var(--emerald);
  transform: rotate(-45deg);
}
.offer li.off { color: var(--text-faint); }
.offer li.off::before {
  border: 0;
  width: 11px; height: 2px;
  background: var(--text-faint);
  top: 10px; transform: none;
}

/* Liste à coches — le format de base de toute la présentation */
.ticks { list-style: none; margin: 0; padding: 0; display: grid; gap: 10px; }
.ticks li {
  position: relative;
  padding-left: 30px;
  font-size: 15px;
  line-height: 1.5;
  color: var(--text-soft);
}
.ticks li::before {
  content: '';
  position: absolute; left: 2px; top: 7px;
  width: 13px; height: 7px;
  border-left: 2.5px solid var(--emerald);
  border-bottom: 2.5px solid var(--emerald);
  transform: rotate(-45deg);
}
.ticks li strong { color: var(--text); }
.slide--dark .ticks li, .slide--charcoal .ticks li { color: rgba(255,255,255,.78); }
.slide--dark .ticks li strong, .slide--charcoal .ticks li strong { color: #fff; }
.slide--dark .ticks li::before, .slide--charcoal .ticks li::before { border-color: var(--cyan); }
.card .ticks { gap: 8px; }
.card .ticks li { font-size: 14px; }

/* Coches révélées en cascade quand la slide devient visible */
.ticks li {
  opacity: 0;
  transform: translateY(10px);
  transition: opacity .5s cubic-bezier(.2,.7,.3,1), transform .5s cubic-bezier(.2,.7,.3,1);
  transition-delay: var(--d, 0ms);
}
.is-visible .ticks li { opacity: 1; transform: none; }
@media (prefers-reduced-motion: reduce) {
  .ticks li { opacity: 1 !important; transform: none !important; transition: none !important; }
}

/* Croix et coche du tableau « avant / mParsio » */
.x { color: var(--red); font-weight: 700; opacity: .75; }
.v { color: var(--emerald-600); font-weight: 700; }
.cmp td.dim { color: var(--text-faint); }

/* Icône de carte en SVG */
.card__icon svg { width: 20px; height: 20px; display: block; }

/* Grand mot-clé (AI, Cloud…) */
.key {
  display: inline-flex; align-items: center; gap: 8px;
  font-family: var(--font-mono); font-weight: 600; font-size: 13px;
  letter-spacing: .1em; text-transform: uppercase;
  color: var(--cyan);
}

/* Frise / étapes */
.flow { display: grid; gap: 14px; }
.flow__step {
  display: grid;
  grid-template-columns: 42px 1fr;
  gap: 16px;
  align-items: start;
}
.flow__n {
  width: 42px; height: 42px; border-radius: 12px;
  display: grid; place-items: center;
  font-family: var(--font-mono); font-weight: 600;
  background: var(--navy); color: #fff;
}
.flow__step--auto .flow__n { background: var(--emerald); }
.flow__t { font-weight: 600; font-size: 15.5px; }
.flow__d { font-size: 14px; color: var(--text-soft); margin-top: 3px; line-height: 1.5; }

/* Avant / après */
.ba { display: grid; grid-template-columns: 1fr auto 1fr; gap: 22px; align-items: stretch; }
.ba__col { border-radius: var(--radius); padding: 22px; border: 1px solid var(--border); background: var(--white); }
.ba__col--before { border-style: dashed; }
.ba__col--after { border-color: var(--emerald); background: var(--emerald-50); }
.ba__arrow { display: grid; place-items: center; color: var(--emerald); }
.ba h3 { margin-bottom: 12px; }
.ba ol, .ba ul { margin: 0; padding-left: 18px; font-size: 14px; line-height: 1.75; color: var(--text-soft); }

/* Citation */
.quote {
  border-left: 3px solid var(--emerald);
  padding-left: 20px;
  font-size: clamp(18px, 2vw, 26px);
  line-height: 1.45;
  font-weight: 500;
}
.quote__src { display: block; margin-top: 12px; font-size: 13px; color: var(--text-faint); font-weight: 400; }

/* =========================================================================
   Animations d'entrée — jouées quand la slide devient visible
   ========================================================================= */

[data-anim] {
  opacity: 0;
  transform: translateY(18px);
  transition: opacity .6s cubic-bezier(.2,.7,.3,1), transform .6s cubic-bezier(.2,.7,.3,1);
  transition-delay: var(--d, 0ms);
}
.is-visible [data-anim] { opacity: 1; transform: none; }
[data-anim='left']  { transform: translateX(-24px); }
[data-anim='right'] { transform: translateX(24px); }
[data-anim='zoom']  { transform: scale(.96); }

@media (prefers-reduced-motion: reduce) {
  .deck { scroll-behavior: auto; }
  [data-anim] { opacity: 1 !important; transform: none !important; transition: none !important; }
}

/* =========================================================================
   Écrans étroits
   ========================================================================= */

@media (max-width: 900px) {
  .grid--4 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .grid--3 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .ba { grid-template-columns: 1fr; }
  .ba__arrow { transform: rotate(90deg); }
  .dots { display: none; }
}
@media (max-width: 620px) {
  .grid--2, .grid--3, .grid--4 { grid-template-columns: 1fr; }
  .slide { min-height: auto; padding-block: 56px; }
  .deck { scroll-snap-type: none; }
}

/* =========================================================================
   Impression / export PDF — une slide par page
   ========================================================================= */

@media print {
  html, body { background: #fff; }
  .deck { height: auto; overflow: visible; }
  .dots, .progress, .helpbar { display: none !important; }
  .slide {
    min-height: auto;
    page-break-after: always;
    break-after: page;
    padding: 26mm 18mm;
    border: 0;
  }
  .slide--dark, .slide--charcoal { -webkit-print-color-adjust: exact; print-color-adjust: exact; }
  [data-anim] { opacity: 1 !important; transform: none !important; }
  .card:hover, .offer:hover { transform: none; box-shadow: var(--shadow-sm); }
}

/* Barre d'aide (raccourcis) */
.helpbar {
  position: fixed;
  left: 50%; bottom: 14px;
  transform: translateX(-50%);
  display: flex; gap: 14px; align-items: center;
  background: rgba(17,24,39,.86);
  color: #fff;
  padding: 7px 14px;
  border-radius: 999px;
  font-size: 12px;
  z-index: 95;
  backdrop-filter: blur(8px);
  opacity: 0;
  transition: opacity .3s;
  pointer-events: none;
}
.helpbar.show { opacity: 1; }
.helpbar kbd {
  font-family: var(--font-mono);
  background: rgba(255,255,255,.14);
  border-radius: 4px;
  padding: 2px 6px;
  font-size: 11px;
}
