:root {
  --bg: #fbfbfd;
  --bg-alt: #f5f5f7;
  --surface: #ffffff;
  --text: #1d1d1f;
  --muted: #6e6e73;
  --border: #e5e5ea;
  --accent: #0071e3;
  --grad-start: #5b6eea;
  --grad-end: #2dd7c0;
  --font-sans: -apple-system, BlinkMacSystemFont, "SF Pro Display", "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  --font-mono: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;
}

* { box-sizing: border-box; margin: 0; padding: 0; }

html, body {
  height: 100%;
  background: var(--bg);
  color: var(--text);
  font-family: var(--font-sans);
  -webkit-font-smoothing: antialiased;
  overflow: hidden;
}

/* TOPBAR */
.topbar {
  height: 56px;
  padding: 0 40px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  border-bottom: 1px solid var(--border);
  background: rgba(251, 251, 253, 0.9);
}

.brand { display: flex; align-items: center; gap: 10px; font-size: 14px; }
.brand-logo { width: 24px; height: 24px; object-fit: contain; }
.brand-fallback {
  width: 24px; height: 24px; border-radius: 6px;
  background: linear-gradient(135deg, var(--grad-start), var(--grad-end));
  color: #fff; font-weight: 700; font-size: 11px;
  align-items: center; justify-content: center;
}
.brand-name { font-weight: 600; letter-spacing: -0.01em; }
.brand-sep, .brand-sub { color: var(--muted); }
.slide-counter { font-family: var(--font-mono); font-size: 13px; color: var(--muted); }

/* DECK & SLIDES */
.deck {
  height: calc(100vh - 56px - 56px);
  position: relative;
}

.slide {
  display: none;
  height: 100%;
  max-width: 1200px;
  margin: 0 auto;
  padding: 40px 48px;
  flex-direction: column;
  justify-content: center;
}

.slide.active { display: flex; }

.eyebrow {
  display: inline-block;
  font-family: var(--font-mono);
  font-size: 15px;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--accent);
  margin-bottom: 12px;
}

.slide-header { margin-bottom: 36px; }
.slide-header h2 {
  font-size: clamp(26px, 3.2vw, 38px);
  font-weight: 600;
  letter-spacing: -0.025em;
  line-height: 1.15;
}

/* SLIDE 1 : COVER */
.slide-cover { text-align: left; }
.cover-inner { max-width: 820px; }
.cover-logo-wrap { margin-bottom: 28px; }
.cover-logo { width: 64px; height: 64px; object-fit: contain; }
.cover-logo-fallback {
  width: 64px; height: 64px; border-radius: 16px;
  background: linear-gradient(135deg, var(--grad-start), var(--grad-end));
  color: #fff; font-size: 24px; font-weight: 700;
  align-items: center; justify-content: center;
}
.kicker {
  font-size: 14px; font-weight: 500; color: var(--muted);
  margin-bottom: 12px;
}
.cover-title {
  font-size: clamp(44px, 6vw, 68px);
  font-weight: 700;
  letter-spacing: -0.035em;
  line-height: 1.05;
  margin-bottom: 18px;
}
.cover-subtitle {
  font-size: clamp(18px, 2.1vw, 24px);
  color: var(--muted);
  line-height: 1.45;
  font-weight: 400;
  margin-bottom: 36px;
}
.cover-meta {
  display: flex; flex-wrap: wrap; gap: 12px;
  font-size: 14px; color: var(--text);
  padding-top: 20px;
  border-top: 1px solid var(--border);
}

/* SLIDE 2 : PARCOURS ÉDITORIAL */
.editorial-split {
  display: grid;
  grid-template-columns: 1fr 1px 1fr;
  gap: 44px;
  align-items: start;
}
.editorial-divider { background: var(--border); height: 100%; min-height: 280px; }
.slide[data-index="2"] { position: relative; }
.slide-logos {
  position: absolute;
  left: 48px;
  bottom: 20px;
  display: flex;
  align-items: center;
  gap: 20px;
  width: calc(50% - 72px);
}
.cesi-logo {
  height: 200px;
  max-width: 55%;
  flex: 0 1 auto;
  min-width: 0;
  object-fit: contain;
}
.sogefi-logo {
  height: 120px;
  max-width: calc(45% - 20px);
  flex: 0 1 auto;
  min-width: 0;
  object-fit: contain;
}
.col-label {
  font-size: 13px; text-transform: uppercase; letter-spacing: 0.06em;
  color: var(--muted); margin-bottom: 14px;
}
.lead-text {
  font-size: 18px; line-height: 1.5; margin-bottom: 20px; color: var(--text);
}
.clean-list { list-style: none; display: flex; flex-direction: column; gap: 14px; }
.clean-list li {
  position: relative; padding-left: 18px;
  font-size: 15.5px; line-height: 1.55; color: #3a3a3c;
}
.clean-list li::before {
  content: "—"; position: absolute; left: 0; color: var(--muted);
}

/* SLIDE 3 : FICHE TECHNIQUE CHIFFRES */
.spec-table {
  border-top: 1px solid var(--text);
  border-bottom: 1px solid var(--border);
}
.spec-row {
  display: grid;
  grid-template-columns: 200px 1fr;
  gap: 32px;
  padding: 26px 0;
  border-bottom: 1px solid var(--border);
  align-items: baseline;
}
.spec-row:last-child { border-bottom: none; }
.spec-metric {
  font-family: var(--font-mono);
  font-size: clamp(36px, 4.2vw, 52px);
  font-weight: 700;
  letter-spacing: -0.03em;
  color: var(--text);
}
.spec-detail strong {
  display: block; font-size: 19px; font-weight: 600; margin-bottom: 6px;
}
.spec-detail span {
  font-size: 15.5px; color: var(--muted); line-height: 1.45;
}
.footnote {
  margin-top: 24px; font-size: 14.5px; color: var(--muted);
}

/* SLIDE 4 : MUR DE 24-30 PHOTOS */
.slide-photos { justify-content: flex-start; padding-top: 24px; padding-bottom: 20px; }
.slide-header.compact {
  display: flex; justify-content: space-between; align-items: flex-end;
  margin-bottom: 16px; gap: 16px;
}
.count-badge {
  font-family: var(--font-mono); font-size: 13px; font-weight: 500;
  background: var(--bg-alt); border: 1px solid var(--border);
  padding: 3px 10px; border-radius: 999px; color: var(--muted);
  vertical-align: middle; margin-left: 8px;
}
.photo-actions { display: flex; gap: 8px; }
.btn-upload {
  background: var(--text); color: #fff; font-size: 13px; font-weight: 500;
  padding: 8px 14px; border-radius: 8px; cursor: pointer;
}
.btn-subtle {
  background: var(--surface); border: 1px solid var(--border); color: var(--text);
  font-size: 13px; padding: 8px 12px; border-radius: 8px; cursor: pointer;
}
.photo-wall {
  flex: 1;
  display: grid;
  grid-template-columns: repeat(8, 1fr);
  grid-auto-rows: minmax(78px, 1fr);
  gap: 8px;
  overflow-y: auto;
  padding-right: 4px;
}
.photo-slot {
  background: var(--bg-alt);
  border: 1px dashed #c7c7cc;
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  position: relative;
  cursor: pointer;
  transition: border-color 0.15s;
}
.photo-slot:hover { border-color: var(--accent); }
.photo-slot.filled { border: 1px solid var(--border); background: #000; }
.photo-slot img {
  width: 100%; height: 100%; object-fit: cover; display: block;
}
.photo-slot span {
  font-family: var(--font-mono); font-size: 11px; color: #8e8e93;
}

/* SLIDE 5 : SITE ACTUEL (PLEINE HAUTEUR) */
.slide-site { padding-top: 24px; padding-bottom: 24px; }
.site-layout {
  display: grid;
  grid-template-columns: 1.25fr 0.85fr;
  gap: 44px;
  height: 100%;
  align-items: center;
}
.site-preview-tall {
  height: 100%;
  max-height: calc(100vh - 165px);
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 14px;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  box-shadow: 0 12px 32px rgba(0, 0, 0, 0.05);
}
.browser-bar {
  height: 38px;
  background: var(--bg-alt);
  border-bottom: 1px solid var(--border);
  padding: 0 14px;
  display: flex;
  align-items: center;
  gap: 7px;
  flex-shrink: 0;
}
.browser-bar .dot { width: 9px; height: 9px; border-radius: 50%; background: #d1d1d6; }
.url-pill {
  margin-left: 8px; flex: 1; background: #fff; border: 1px solid var(--border);
  border-radius: 6px; padding: 3px 10px; font-family: var(--font-mono);
  font-size: 12px; color: var(--muted);
}
.btn-mini-upload {
  font-size: 11px; color: var(--accent); cursor: pointer; font-weight: 500;
}
.browser-viewport {
  flex: 1;
  overflow-y: auto;
  background: #fff;
  display: flex;
  flex-direction: column;
}
.browser-viewport img {
  width: 100%; height: auto; display: block;
}
.site-mockup {
  flex: 1; padding: 28px; display: flex; flex-direction: column; justify-content: space-between;
  background: var(--bg);
}
.mock-nav { display: flex; justify-content: space-between; font-size: 13px; border-bottom: 1px solid var(--border); padding-bottom: 12px; }
.mock-hero { padding: 24px 0; }
.mock-badge { font-size: 11px; color: var(--accent); font-weight: 600; }
.mock-hero h4 { font-size: 24px; margin: 8px 0; letter-spacing: -0.02em; }
.mock-hero p { font-size: 14px; color: var(--muted); margin-bottom: 16px; }
.mock-cta { display: inline-block; background: var(--accent); color: #fff; font-size: 13px; padding: 8px 16px; border-radius: 999px; }
.mock-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 12px; border-top: 1px solid var(--border); padding-top: 16px; }
.mock-grid div strong { display: block; font-size: 13px; }
.mock-grid div span { font-size: 12px; color: var(--muted); }
.mock-hint { font-size: 12px; color: var(--muted); margin-top: 16px; }
.site-notes h2 { font-size: 30px; letter-spacing: -0.02em; margin-bottom: 16px; line-height: 1.2; }

/* SLIDE 6 : FRISE CHRONOLOGIQUE HORIZONTALE */
.timeline-wrapper {
  position: relative;
  margin-top: 28px;
  padding-top: 12px;
}
.timeline-track {
  position: absolute;
  top: 30px;
  left: 24px;
  right: 24px;
  height: 2px;
  background: var(--border);
  z-index: 0;
}
.timeline-steps {
  position: relative;
  z-index: 1;
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 28px;
}
.t-step { padding-right: 8px; }
.t-marker {
  width: 38px; height: 38px; border-radius: 50%;
  background: var(--surface); border: 2px solid var(--border);
  display: flex; align-items: center; justify-content: center;
  font-family: var(--font-mono); font-size: 14px; font-weight: 700;
  margin-bottom: 18px;
}
.t-step.done .t-marker {
  background: var(--text); border-color: var(--text); color: #fff;
}
.t-step.current .t-marker {
  background: var(--accent); border-color: var(--accent); color: #fff;
  box-shadow: 0 0 0 6px rgba(0, 113, 227, 0.14);
}
.t-date {
  display: block; font-family: var(--font-mono); font-size: 12px;
  color: var(--muted); margin-bottom: 6px;
}
.t-step.current .t-date { color: var(--accent); font-weight: 600; }
.t-step h3 { font-size: 18px; font-weight: 600; margin-bottom: 8px; }
.t-step p { font-size: 14.5px; color: var(--muted); line-height: 1.5; }

/* SLIDE 7 : APPORT SNEE */
.numbered-rows { border-top: 1px solid var(--border); }
.n-row {
  display: grid;
  grid-template-columns: 72px 1fr;
  gap: 24px;
  padding: 24px 0;
  border-bottom: 1px solid var(--border);
  align-items: start;
}
.n-num {
  font-family: var(--font-mono); font-size: 16px; font-weight: 600; color: var(--accent);
  padding-top: 3px;
}
.n-content h3 { font-size: 19px; font-weight: 600; margin-bottom: 6px; }
.n-content p { font-size: 15.5px; color: var(--muted); line-height: 1.5; }

/* SLIDE 8 : CONCLUSION */
.end-inner { max-width: 820px; }
.end-title {
  font-size: clamp(32px, 4vw, 46px);
  font-weight: 600;
  letter-spacing: -0.025em;
  line-height: 1.15;
  margin-bottom: 22px;
}
.end-body {
  font-size: 19px; line-height: 1.55; color: var(--muted); margin-bottom: 40px;
}
.end-footer {
  padding-top: 20px; border-top: 1px solid var(--border);
  font-size: 15px; font-weight: 500; color: var(--text);
}

/* AGRANDISSEMENT À L'ÉCRAN DES DIAPOS 1, 2, 6, 7 ET 8 */
.slide[data-index="1"] .cover-inner,
.slide[data-index="2"] .slide-header,
.slide[data-index="2"] .editorial-split,
.slide[data-index="6"] .slide-header,
.slide[data-index="6"] .timeline-wrapper,
.slide[data-index="7"] .slide-header,
.slide[data-index="7"] .numbered-rows,
.slide[data-index="8"] .end-inner {
  max-width: 1100px;
  width: 100%;
}

.slide[data-index="1"] .cover-logo { width: 72px; height: 72px; }
.slide[data-index="1"] .cover-title { font-size: clamp(52px, 7vw, 76px); }
.slide[data-index="1"] .cover-subtitle { font-size: clamp(21px, 2.4vw, 27px); }
.slide[data-index="1"] .kicker,
.slide[data-index="1"] .cover-meta { font-size: 16px; }

.slide[data-index="2"] .slide-header h2,
.slide[data-index="6"] .slide-header h2,
.slide[data-index="7"] .slide-header h2 { font-size: clamp(34px, 3.8vw, 44px); }
.slide[data-index="2"] .lead-text { font-size: 21px; }
.slide[data-index="2"] .clean-list li { font-size: 17.5px; }
.slide[data-index="2"] .col-label { font-size: 14px; }

.slide[data-index="6"] .t-marker { width: 44px; height: 44px; font-size: 16px; }
.slide[data-index="6"] .t-date { font-size: 14px; }
.slide[data-index="6"] .t-step h3 { font-size: 21px; }
.slide[data-index="6"] .t-step p { font-size: 16.5px; }

.slide[data-index="7"] .n-num { font-size: 18px; }
.slide[data-index="7"] .n-content h3 { font-size: 22px; }
.slide[data-index="7"] .n-content p { font-size: 18px; }

.slide[data-index="8"] .end-inner { max-width: 920px; }
.slide[data-index="8"] .end-title { font-size: clamp(38px, 5vw, 52px); }
.slide[data-index="8"] .end-body { font-size: 22px; }
.slide[data-index="8"] .end-footer { font-size: 17px; }

/* FOOTER CONTROLS */
.controls {
  height: 56px;
  padding: 0 40px;
  border-top: 1px solid var(--border);
  background: var(--bg);
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.controls-left, .controls-right { display: flex; gap: 8px; }
.ctrl-btn {
  background: var(--surface);
  border: 1px solid var(--border);
  color: var(--text);
  font-size: 13px;
  padding: 7px 14px;
  border-radius: 8px;
  cursor: pointer;
}
.ctrl-btn.primary { background: var(--text); color: #fff; border-color: var(--text); }
.ctrl-btn.active-edit { background: var(--accent); color: #fff; border-color: var(--accent); }
.progress-dots { display: flex; gap: 6px; }
.p-dot {
  width: 7px; height: 7px; border-radius: 50%; background: #d1d1d6; cursor: pointer;
}
.p-dot.active { background: var(--text); width: 18px; border-radius: 4px; }

[contenteditable="true"] {
  outline: 1px dashed var(--accent);
  background: rgba(0, 113, 227, 0.04);
  border-radius: 4px;
  padding: 2px 4px;
}

@media (max-width: 900px) {
  .editorial-split, .site-layout, .timeline-steps { grid-template-columns: 1fr; }
  .editorial-divider, .timeline-track { display: none; }
  .photo-wall { grid-template-columns: repeat(4, 1fr); }
}
