/* Fonts */
@import url("https://fonts.googleapis.com/css2?family=Barlow:ital,wght@0,400;0,500;0,600;0,700;0,800;0,900;1,500;1,600;1,700&family=Roboto+Mono:ital,wght@0,100..700;1,100..700&display=swap");
@import url("./variables.css");
@import url("./grid.css");
@import url("./card.css");

/* Base reveal.js overrides */
html,
body,
.reveal-viewport,
.reveal .slide-background {
  background-color: var(--color-bg);
}

html,
body {
  height: 100%;
}

body {
  margin: 0;
}

.reveal .slides {
  width: 100%;
  height: 100%;
  text-align: center;
  perspective: 1000px;
}

.reveal .slides section {
  color: var(--color-primary);
  padding: 2rem;
  max-width: 100%;
  box-sizing: border-box;
  transition-timing-function: cubic-bezier(0.22, 1, 0.36, 1);
}

/* Slide 2-5 left-aligned content */
/* .reveal .slides section:nth-of-type(2),
.reveal .slides section:nth-of-type(3),
.reveal .slides section:nth-of-type(4),
.reveal .slides section:nth-of-type(5),
.reveal .slides section:nth-of-type(6) {
  text-align: left;
  align-items: stretch;
  padding-top: 3rem;
  padding-bottom: 3rem;
  padding-left: clamp(2rem, 5%, 5rem);
  padding-right: clamp(2rem, 5%, 5rem);
} */

.reveal .slides section h1,
.reveal .slides section h2,
.reveal .slides section h3 {
  font-family: "Barlow", sans-serif;
  color: var(--color-primary);
}

.reveal .slides section h1 {
  font-weight: 700;
  font-size: var(--fs-title);
}

.reveal .slides section h2 {
  font-weight: 500;
  font-size: var(--fs-subtitle);
  margin: 0.5em 0;
}

.reveal .slides section p,
.reveal .slides section ul,
.reveal .slides section ol,
.reveal .slides section li {
  font-family: "Barlow", sans-serif;
  font-weight: 400;
  color: var(--color-primary);
}

.reveal h1,
.reveal h2,
.reveal h3 {
  margin: 0 0 0.5em 0;
}

/* Typography helpers */
.slide-label {
  display: block;
  font-family: "Roboto Mono", monospace;
  font-size: var(--fs-tag);
  font-weight: 500;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  color: var(--color-divider);
  margin-bottom: 20px;
}

.slide-title {
  font-family: "Barlow", sans-serif;
  font-size: var(--fs-title);
  font-weight: 400;
  line-height: 1.2;
  color: var(--color-primary);
  margin-bottom: 8px;
}

.slide-title-tight {
  margin-bottom: 4px;
}

.slide-title em {
  font-style: italic;
  color: var(--color-accent);
}

.slide-subtitle {
  font-family: "Roboto Mono", monospace;
  font-size: var(--fs-small);
  color: var(--color-muted);
  letter-spacing: 0.1em;
  text-transform: uppercase;
  margin-bottom: 36px;
}

/* Slide 1 */
.s1-eyebrow {
  font-family: "Roboto Mono", monospace;
  font-size: 0.65rem;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--color-divider);
  margin-bottom: 24px;
}

.s1-name {
  font-family: "Barlow", sans-serif;
  font-size: clamp(2rem, 5vw, 3.5rem);
  font-weight: 700;
  color: var(--color-primary);
  line-height: 1.1;
  margin-bottom: 32px;
}

.s1-name strong {
  font-weight: 800;
  color: var(--color-accent);
}

.s1-stage-title {
  min-height: 62vh;
  display: flex;
  align-items: center;
  justify-content: center;
}

.s1-stage-title .s1-name {
  margin-bottom: 0;
}

.s1-divider {
  width: 60px;
  height: 2px;
  background: var(--color-divider);
  margin: 32px auto;
}

.s1-realities {
  display: inline-block;
  text-align: left;
  max-width: min(100%, 68rem);
  margin: 0;
  padding-left: 1.2em;
}

.reveal .slides section .s1-realities .s1-reality {
  margin: 0;
  font-size: clamp(1.2rem, 1.6vw, 1.45rem);
  color: var(--color-primary);
  font-weight: 400;
  line-height: 1.55;
  padding-left: 0.15em;
}

.s1-reality + .s1-reality {
  margin-top: 8px;
}

.s1-realities .s1-reality::marker {
  color: var(--color-accent);
}

.s1-reality strong {
  color: var(--color-accent);
  font-weight: 600;
}

.s1-pillars {
  width: 100%;
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 16px;
  margin-top: 48px;
}

.s1-pillar {
  background: rgba(6, 55, 56, 0.04);
  border: 1px solid var(--color-card-border);
  border-radius: var(--radius-sm);
  padding: 18px 20px;
  text-align: left;
}

.s1-pillar .label {
  font-family: "Roboto Mono", monospace;
  font-size: 0.66rem;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  color: var(--color-divider);
  margin-bottom: 6px;
}

.s1-pillar .val {
  font-family: "Barlow", sans-serif;
  font-size: 1.6rem;
  font-weight: 700;
  color: var(--color-primary);
  line-height: 1;
}

.s1-pillar .sub {
  font-size: 0.9rem;
  color: var(--color-muted);
  margin-top: 4px;
  line-height: 1.4;
}

/* Slide 2 */
.s2-lite {
  width: 100%;
  margin: 0;
  text-align: left;
}

.reveal .slides section .s2-lite .slide-title {
  font-size: clamp(2.1rem, 4.8vw, 3.2rem);
  line-height: 1.04;
  font-weight: 600;
}

.s2-hero-accent {
  color: var(--color-accent);
}

.s2-observations {
  margin-top: 18px;
}

.s2-observation {
  display: grid;
  grid-template-columns: 72px 1fr;
  gap: 14px;
  align-items: center;
  padding: 12px 0;
  border-bottom: 1px solid var(--color-card-border);
}

.s2-observation:first-child {
  border-top: 1px solid var(--color-card-border);
}

.s2-observation-num {
  font-family: "Barlow", sans-serif;
  font-size: 3rem;
  font-weight: 700;
  color: var(--color-accent);
  line-height: 1;
}

.s2-observation p {
  margin: 0;
  font-size: clamp(1.2rem, 1.7vw, 1.45rem);
  line-height: 1.5;
}

/* Slide 4: Message central */
.s4-central {
  width: min(1000px, 100%);
  margin: 0 auto;
  text-align: left;
}

.s4-central-lede {
  font-size: clamp(1.4rem, 3.1vw, 2.4rem);
  font-weight: 700;
  line-height: 1.2;
  margin: 0 0 18px;
}

.s4-central-main {
  font-size: clamp(1rem, 1.8vw, 1.35rem);
  line-height: 1.55;
  margin: 0 0 8px;
  max-width: 70ch;
}

.s4-central-main strong {
  color: var(--color-accent);
  font-weight: 600;
}

.s4-central-grid {
  margin-top: 26px;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 32px;
}

.s4-central-col {
  border-top: 1px solid var(--color-card-border);
  padding-top: 12px;
  position: relative;
}

.s4-central-col.is-circled {
  position: relative;
  border-top: none;
  padding: 12px 16px;
  min-height: 150px;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  text-align: center;
}

.s4-circle-draw {
  position: absolute;
  left: -16px;
  top: -12px;
  width: calc(100% + 32px);
  height: calc(100% + 24px);
  pointer-events: none;
}

.s4-circle-draw ellipse {
  fill: none;
  stroke: var(--color-accent);
  stroke-width: 2.5;
  stroke-linecap: round;
  stroke-dasharray: 920;
  stroke-dashoffset: 920;
}

.is-circled.fragment.visible .s4-circle-draw ellipse {
  animation: s4-circle-draw 2s ease-out forwards;
}

@keyframes s4-circle-draw {
  to {
    stroke-dashoffset: 0;
  }
}

@media (prefers-reduced-motion: reduce) {
  .s4-circle-draw ellipse {
    animation: none;
    stroke-dashoffset: 0;
  }
}

.s4-central-label {
  font-family: "Roboto Mono", monospace;
  font-size: var(--fs-tag);
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--color-muted);
}

.s4-central-value {
  margin-top: 6px;
  font-family: "Barlow", sans-serif;
  font-size: clamp(1.5rem, 2.8vw, 2.2rem);
  font-weight: 700;
  color: var(--color-primary);
}

.s4-central-sub {
  margin-top: 4px;
  font-size: 1.15rem;
  color: var(--color-muted);
}

.s4-system-up {
  border-top: none;
  padding: 12px 16px 12px 48px;
  min-height: 150px;
  display: flex;
  flex-direction: column;
  justify-content: center;
  text-align: center;
  align-items: flex-start;
}

.s4-system-up > :not(.s4-arrow-draw) {
  margin-left: 78px;
}

.s4-arrow-draw {
  position: absolute;
  left: -200px;
  top: -12px;
  width: calc(100% + 32px);
  height: calc(100% + 24px);
  pointer-events: none;
}

.s4-arrow-line,
.s4-arrow-head {
  fill: none;
  stroke: var(--color-accent);
  stroke-width: 2.5;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.s4-arrow-line {
  stroke-dasharray: 320;
  stroke-dashoffset: 320;
}

.s4-system-up.fragment.visible .s4-arrow-line {
  animation: s4-arrow-line-draw 1.1s ease-out 0.4s forwards;
}

.s4-arrow-head {
  stroke-dasharray: 140;
  stroke-dashoffset: 140;
}

.s4-system-up.fragment.visible .s4-arrow-head {
  animation: s4-arrow-head-draw 0.55s ease-out 1.5s forwards;
}

@keyframes s4-arrow-line-draw {
  to {
    stroke-dashoffset: 0;
  }
}

@keyframes s4-arrow-head-draw {
  to {
    stroke-dashoffset: 0;
  }
}

@media (prefers-reduced-motion: reduce) {
  .s4-arrow-line,
  .s4-arrow-head {
    animation: none;
    stroke-dashoffset: 0;
  }
}

/* Slide 3 */
.s3-quote {
  background: var(--color-accent-soft);
  border: 1px solid var(--color-card-border);
  border-radius: var(--radius-sm);
  padding: 32px;
  margin-bottom: 32px;
}

.s3-quote p {
  font-size: clamp(1rem, 1.9vw, 1.3rem);
  font-style: italic;
  color: var(--color-blockquote);
  line-height: 1.5;
}

.s3-quote-strong {
  font-style: normal;
  color: var(--color-primary);
}

.s3-grid {
  width: 100%;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 32px;
  margin-top: 40px;
}

.race-connect {
  grid-column: 1 / -1;
  text-align: center;
  font-size: 0.95rem;
  font-style: italic;
  color: var(--color-muted);
  padding-top: 8px;
}

.race-connect strong {
  color: var(--color-primary);
  font-style: normal;
}

/* Slide 4 */
.s4-axes {
  width: 100%;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 16px;
  margin-top: 32px;
  margin-bottom: 32px;
}

.s4-bottom {
  background: var(--color-accent-soft);
  border: 1px solid var(--color-card-border);
  border-radius: var(--radius-sm);
  padding: 28px 32px;
  display: flex;
  align-items: center;
  gap: 24px;
}

.s4-bottom p {
  font-size: 1rem;
  font-style: italic;
  color: var(--color-primary);
  line-height: 1.5;
  flex: 1;
}

.s4-bottom-strong {
  color: var(--color-accent);
  font-style: normal;
}

.s4-timeline {
  flex-shrink: 0;
  text-align: center;
}

.s4-timeline .tl-val {
  font-family: "Barlow", sans-serif;
  font-size: 2rem;
  font-weight: 700;
  color: var(--color-accent);
  line-height: 1;
}

.s4-timeline .tl-label {
  font-size: 0.65rem;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  color: var(--color-muted);
}

/* Slide 6 */
.s6-axes {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  column-gap: 16px;
  row-gap: 16px;
  margin-top: 24px;
  margin-bottom: 20px;
}

.s6-footnote {
  font-size: 0.85rem;
  font-style: italic;
  color: var(--color-muted);
  text-align: center;
  margin: 0;
  line-height: 1.5;
}

.s6-footnote strong {
  color: var(--color-primary);
  font-style: normal;
}

.reveal .slides section .s6-mandat-quote {
  font-size: clamp(1.1rem, 2.2vw, 1.6rem);
  font-style: italic;
  color: var(--color-primary);
  line-height: 1.6;
  margin: auto auto 1.5rem;
  text-align: center;
}

.s6-mandat-quote strong {
  font-style: normal;
  color: var(--color-accent);
}

.s6-mandat-weeks {
  font-family: "Barlow", sans-serif;
  font-size: 4rem;
  font-weight: 700;
  color: var(--color-accent);
  text-align: center;
  line-height: 1;
}

.s6-mandat-weeks::after {
  content: " semaines";
  font-size: 0.7rem;
  font-weight: 400;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  color: var(--color-muted);
  display: block;
  margin-top: 4px;
}

/* Slide 5 */
.slide-5 .s5-divider {
  width: 100%;
  height: 3px;
  background-color: var(--color-divider);
  margin: 0.5em 0 1.2em;
}

/* Uniforme pour tous les titres avec drapeau */
.slide-title.s5-title-flex {
  display: inline-flex;
  align-items: center;
  gap: 0.5em;
  text-transform: uppercase;
}

.slide-5 .slide-title.s5-title-flex {
  margin-bottom: 1em;
}

.slide-title .s5-title-icon {
  color: var(--color-accent);
  font-size: 0.95em;
  vertical-align: middle;
}

.slide-5 .s5-cols {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 24px;
  margin-bottom: 1.5em;
}

.slide-5 .s5-cols-single {
  display: flex;
  justify-content: center;
  margin-bottom: 1.5em;
}

.slide-5 .s5-quote {
  border-left: none;
  padding: 12px 0 12px 0;
  max-width: 42rem;
  margin: 0 auto 1.5em;
  text-align: center;
}

.slide-5 .s5-quote p {
  font-size: clamp(1.2rem, 2.4vw, 1.6rem);
  font-style: italic;
  color: var(--color-blockquote);
  line-height: 1.55;
  margin: 0;
}

.slide-5 .s5-quote-strong {
  font-style: normal;
  color: var(--color-primary);
}

.slide-5 .s5-card {
  background: transparent;
  padding: 18px 20px;
  box-sizing: border-box;
}

.slide-5 .s5-card-tag {
  font-size: clamp(1.1rem, 1.6vw, 1.35rem);
  letter-spacing: 0.1em;
  text-transform: uppercase;
  margin-bottom: 10px;
  padding-bottom: 8px;
  border-bottom: 1px solid var(--color-card-border);
  font-family: "Roboto Mono", monospace;
  color: var(--color-divider);
}

.slide-5 .s5-card ul {
  list-style: none;
  margin: 0;
  padding: 0;
}

.slide-5 .s5-card ul li {
  font-size: clamp(1.35rem, 1.95vw, 1.6rem);
  color: var(--color-primary);
  border-bottom: none;
  padding: 4px 0;
  display: grid;
  grid-template-columns: 8px 1fr;
  column-gap: 10px;
  align-items: start;
}

.slide-5 .s5-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  margin-top: 0.45em;
  flex-shrink: 0;
  background: var(--color-divider);
}

.slide-5 .s5-connect {
  margin: 0;
  text-align: center;
  font-style: italic;
  color: var(--color-muted);
  line-height: 1.6;
}

.slide-5 .s5-connect strong {
  color: var(--color-primary);
  font-style: normal;
}

.s5-stage-intro {
  min-height: 62vh;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
}

.s5-stage-intro .slide-title,
.s5-stage-intro .s5-divider {
  text-align: center;
}

.s5-connect-stage {
  min-height: 62vh;
  display: flex;
  align-items: center;
  justify-content: center;
}

.s5-connect-stage .s5-connect {
  margin: 0;
}

/* Utility classes */

/* Slide 7 */
.s7-stage-intro {
  min-height: 62vh;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
}

.s7-stage-intro .slide-title,
.s7-stage-intro .slide-subtitle {
  text-align: center;
}

.s7-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
  max-width: 1000px;
  margin: 28px auto 24px;
}

.s7-grid-solo [data-id="s7-col-1"] {
  grid-column: 1 / 3;
  max-width: 100%;
  margin: 0 auto;
}

.s7-col-preload {
  opacity: 0;
  transform: translateX(70px);
  pointer-events: none;
}

.s7-grid-solo {
  position: relative;
}

.s7-grid-solo .s7-col-preload {
  position: absolute;
  top: 0;
  right: 0;
  width: calc(50% - 8px);
}

.s7-col {
  padding: 0 28px;
  border-left: 1px solid var(--color-card-border);
  text-align: left;
}

.s7-col:first-child {
  border-left: none;
  padding-left: 0;
}

.s7-period {
  font-family: "Roboto Mono", monospace;
  font-size: clamp(1.2rem, 1.85vw, 1.5rem);
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--color-accent);
  margin-bottom: 14px;
}

.s7-list {
  list-style: none;
  margin: 0;
  padding: 0;
}

.s7-list li {
  font-size: var(--fs-body);
  color: var(--color-primary);
  padding: 7px 0;
  border-bottom: 1px solid var(--color-card-border);
  line-height: 1.45;
}

.s7-list li:last-child {
  border-bottom: none;
}

.reveal .slides section .s7-conclusion {
  font-style: italic;
  color: var(--color-muted);
  text-align: center;
  margin: 0 auto;
  line-height: 1.6;
}

.s7-conclusion strong {
  color: var(--color-primary);
  font-style: normal;
}

.s7-conclusion-stage {
  min-height: 62vh;
  display: flex;
  align-items: center;
  justify-content: center;
}

.s7-conclusion-stage .s7-conclusion {
  margin: 0 auto;
}

.text-left {
  text-align: left;
}

.text-right {
  text-align: right;
}

.text-center {
  text-align: center;
}
