/* ── layout slide ───────────────────────────────────── */

.reveal .slides section {
  display: flex !important;
  flex-direction: column;
  justify-content: flex-start;
  height: 100%;
  box-sizing: border-box;
}

slide-body {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  width: 100%;
}

back-link {
  display: flex;
  justify-content: center;
  align-items: center;
  padding-top: 16px;
  font-size: 0.7em;
}

back-link:has(a + a) {
  justify-content: space-between;
}

back-link a {
  color: #6b7280;
  text-decoration: none;
}

back-link a:hover {
  color: #374151;
}

/* ── titres ─────────────────────────────────────────── */

.reveal h1 { font-size: 1.2em; text-transform: none; margin-bottom: 0.3em; }
.reveal h2 { font-size: 1.3em; text-transform: none; margin-bottom: 0.4em; }
.reveal h3 { font-size: 1.1em; text-transform: none; margin-bottom: 0.4em; }

/* ── nav-grid ───────────────────────────────────────── */

nav-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 30px;
  padding: 10px 30px;
  width: 100%;
  box-sizing: border-box;
}

nav-grid > a {
  width: calc(100% - 16px);
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 14px;
  padding: 20px 16px;
  text-decoration: none;
  color: white;
  aspect-ratio: 5 / 3;
  font-size: 0.8em;
  font-weight: 600;
  text-align: center;
  line-height: 1.4;
  transition: transform 0.15s, box-shadow 0.15s;
}

nav-grid > a:hover {
  transform: scale(1.04);
  box-shadow: 0 6px 20px rgba(0,0,0,0.15);
}

nav-grid > a[color="b"] { background: #FCA5A5; color: #7f1d1d; }
nav-grid > a[color="c"] { background: #93C5FD; color: #1e3a5f; }
nav-grid > a[color="d"] { background: #6EE7B7; color: #064e3b; }
nav-grid > a[color="e"] { background: #FCD34D; color: #78350f; }
nav-grid > a[color="f"] { background: #F9A8D4; color: #831843; }

nav-grid > a[color="b"]:hover { color: #7f1d1d; }
nav-grid > a[color="c"]:hover { color: #1e3a5f; }
nav-grid > a[color="d"]:hover { color: #064e3b; }
nav-grid > a[color="e"]:hover { color: #78350f; }
nav-grid > a[color="f"]:hover { color: #831843; }

/* ── geste-list ─────────────────────────────────────── */

geste-list {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 30px;
  padding: 10px 30px;
  width: 100%;
  box-sizing: border-box;
}

geste-list > a {
  width: calc(100% - 16px);
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 14px;
  padding: 20px 16px;
  text-decoration: none;
  aspect-ratio: 5 / 3;
  font-size: 0.8em;
  font-weight: 600;
  text-align: center;
  line-height: 1.4;
  transition: transform 0.15s, box-shadow 0.15s;
}

geste-list > a:hover {
  transform: scale(1.04);
  box-shadow: 0 6px 20px rgba(0,0,0,0.15);
}

geste-list > a[color="b"] { background: #FCA5A5; color: #7f1d1d; }
geste-list > a[color="b"]:hover { color: #7f1d1d; }
geste-list > a[color="c"] { background: #93C5FD; color: #1e3a5f; }
geste-list > a[color="c"]:hover { color: #1e3a5f; }
geste-list > a[color="d"] { background: #6EE7B7; color: #064e3b; }
geste-list > a[color="d"]:hover { color: #064e3b; }
geste-list > a[color="e"] { background: #FCD34D; color: #78350f; }
geste-list > a[color="e"]:hover { color: #78350f; }
geste-list > a[color="f"] { background: #F9A8D4; color: #831843; }
geste-list > a[color="f"]:hover { color: #831843; }

/* alternance 2 teintes par thème */
geste-list > a[color="b"]:nth-child(odd)  { background: #FECACA; color: #7f1d1d; }
geste-list > a[color="b"]:nth-child(even) { background: #FCA5A5; color: #7f1d1d; }

geste-list > a[color="c"]:nth-child(odd)  { background: #BFDBFE; color: #1e3a5f; }
geste-list > a[color="c"]:nth-child(even) { background: #93C5FD; color: #1e3a5f; }

geste-list > a[color="d"]:nth-child(odd)  { background: #A7F3D0; color: #064e3b; }
geste-list > a[color="d"]:nth-child(even) { background: #6EE7B7; color: #064e3b; }

geste-list > a[color="e"]:nth-child(odd)  { background: #FDE68A; color: #78350f; }
geste-list > a[color="e"]:nth-child(even) { background: #FCD34D; color: #78350f; }

geste-list > a[color="f"]:nth-child(odd)  { background: #FBCFE8; color: #831843; }
geste-list > a[color="f"]:nth-child(even) { background: #F9A8D4; color: #831843; }

/* ── decision-flow ──────────────────────────────────── */

decision-flow {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 12px;
  margin: 12px 0;
}

decision-question {
  display: block;
  border: 2px solid #d1d5db;
  border-radius: 12px;
  padding: 14px 24px;
  font-size: 0.75em;
  font-weight: 600;
  text-align: center;
  width: 100%;
}

decision-outcomes {
  display: flex;
  gap: 40px;
  justify-content: center;
}

decision-outcome {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
}

decision-answer {
  display: block;
  background: #e5e7eb;
  border-radius: 50px;
  padding: 6px 20px;
  font-size: 0.8em;
  font-weight: 700;
  color: #374151;
}

decision-label {
  display: block;
  border: 2px solid #d1d5db;
  border-radius: 10px;
  padding: 12px 18px;
  font-size: 0.75em;
  font-weight: 600;
  text-align: center;
  min-width: 160px;
  max-width: 380px;
  transition: background 0.15s, border-color 0.15s;
}

decision-outcome a {
  text-decoration: none;
  color: inherit;
}

decision-label a {
  display: inline-block;
  margin-top: 4px;
  font-size: 0.85em;
  color: #7C3AED;
  text-decoration: none;
  border-bottom: 1px solid #7C3AED;
}

decision-outcome a:hover decision-label {
  background: #f3f4f6;
  border-color: #9ca3af;
}

/* ── steps-flow ─────────────────────────────────────── */

steps-flow {
  display: flex;
  flex-direction: column;
  gap: 6px;
  width: 100%;
  max-width: 1024px;
  counter-reset: steps;
}

step-item {
  display: block;
  counter-increment: steps;
  border: 2px solid #d1d5db;
  border-radius: 10px;
  padding: 7px 12px 7px 38px;
  font-size: 0.65em;
  line-height: 1.35;
  position: relative;
  text-align: left;
}

step-item::before {
  content: counter(steps);
  position: absolute;
  left: 14px;
  top: 50%;
  transform: translateY(-50%);
  font-weight: 700;
  color: #9ca3af;
  font-size: 1.1em;
}

steps-flow[plain] step-item {
  padding-left: 16px;
}

steps-flow[plain] step-item::before {
  display: none;
}

step-note {
  display: block;
  margin-top: 4px;
  font-size: 0.85em;
  color: #6b7280;
}

step-note a {
  color: #7C3AED;
  text-decoration: none;
  border-bottom: 1px solid #7C3AED;
}

step-note > span {
  display: block;
  margin-bottom: 2px;
}

step-note ul {
  margin: 0;
  padding-left: 16px;
}

step-note li {
  margin-bottom: 2px;
}

/* ── slide-label ────────────────────────────────────── */

slide-label {
  display: block;
  font-size: 0.65em;
  color: #6b7280;
  font-weight: 600;
  text-align: center;
  margin: -10px 0 2px;
}

/* ── speech-bubble ──────────────────────────────────── */

speech-bubble {
  display: block;
  background: #f3f4f6;
  border: 2px solid #d1d5db;
  border-radius: 20px;
  padding: 12px 28px;
  position: relative;
  max-width: 560px;
  margin: 12px auto 20px;
  font-style: italic;
  font-size: 0.8em;
  line-height: 1.8;
  text-align: center;
}

speech-bubble::after {
  content: '';
  position: absolute;
  bottom: -18px;
  left: 36px;
  border-width: 18px 12px 0;
  border-style: solid;
  border-color: #d1d5db transparent transparent;
}

speech-bubble::before {
  content: '';
  position: absolute;
  bottom: -14px;
  left: 38px;
  border-width: 16px 10px 0;
  border-style: solid;
  border-color: #f3f4f6 transparent transparent;
  z-index: 1;
}

/* ── ua-matrix ──────────────────────────────────────── */

.matrix-title {
  font-weight: 700;
  font-size: 0.85em;
  margin-bottom: 16px;
  color: #374151;
}

ua-matrix {
  display: grid;
  grid-template-columns: auto 1fr 1fr;
  gap: 10px;
  max-width: 580px;
  width: 100%;
}

ua-cell {
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 18px 16px;
  border-radius: 12px;
  text-align: center;
  font-size: 0.75em;
  font-weight: 600;
  line-height: 1.4;
}

ua-cell.corner { background: transparent; }

ua-cell.col-header {
  background: transparent;
  font-weight: 700;
  color: #374151;
  font-size: 0.8em;
  padding-bottom: 4px;
}

ua-cell.row-header {
  background: transparent;
  font-weight: 700;
  color: #374151;
  font-size: 0.8em;
  justify-content: flex-end;
  padding-right: 8px;
}

ua-cell.ideal    { background: #D1FAE5; color: #065f46; }
ua-cell.pleasant { background: #FEF3C7; color: #78350f; }
ua-cell.useful   { background: #DBEAFE; color: #1e3a5f; }
ua-cell.avoid    { background: #FEE2E2; color: #7f1d1d; }

/* ── intro-blocks ───────────────────────────────────── */

intro-blocks {
  display: grid;
  grid-template-columns: 1fr;
  gap: 14px;
  margin-top: 20px;
  max-width: 680px;
  width: 100%;
}

intro-block {
  display: block;
  border: 2px solid #e5e7eb;
  border-radius: 14px;
  padding: 24px 20px;
  text-align: left;
}

intro-block p {
  margin: 0 0 6px 0;
  font-size: 0.85em;
  font-weight: 600;
  color: #111;
}

intro-block small {
  display: block;
  font-size: 0.65em;
  color: #6b7280;
  margin-bottom: 14px;
}

intro-block a {
  font-size: 0.65em;
  color: #7C3AED;
  text-decoration: none;
  border-bottom: 1px solid #7C3AED;
}
