/* Styles pour "IA : La fête est finie — 8 recommandations pour économiser vos tokens"
 * Thème sombre — fond GitHub dark, accent orange vif, typo Inter
 */

@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700&display=swap');

/* ===========================================
   CSS VARIABLES
   =========================================== */
:root {
  --background-color: #0d1117;
  --section-divider-bg: #161b22;

  --heading-font: "Inter", Helvetica, sans-serif;
  --body-font: "Inter", Helvetica, sans-serif;
  --base-font-size: 32px;
  --text-size: 16pt;
  --h1-size: 46pt;
  --h2-size: 28pt;
  --h3-size: 20pt;
  --footnote-size: 10pt;

  --primary-color: #F96D00;
  --secondary-color: #FFB347;
  --text-color: #e6edf3;
  --muted-color: #8b949e;
  --line-color: #30363d;

  --slide-padding: 60px;
  --slide-padding-top: 38px;
  --content-gap: 22px;

  --box-radius: 6px;
  --card-bg: #161b22;
  --card-border: #30363d;
}

/* ===========================================
   BASE STYLES - Override reveal.js defaults
   =========================================== */

.reveal {
  font-family: var(--body-font);
  font-size: var(--base-font-size);
}

/* Restore bold after reset.css strips it with font: inherit */
.reveal strong,
.reveal b {
  font-weight: bold;
}

/* Apply background colors */
.reveal-viewport {
  background-color: var(--background-color);
}

/* Section divider background via data-state */
.reveal-viewport.is-section-divider .slide-background.present {
  background-color: var(--section-divider-bg) !important;
}

.reveal h1,
.reveal h2,
.reveal h3,
.reveal h4,
.reveal h5,
.reveal h6 {
  font-family: var(--heading-font);
  text-transform: none;
  color: var(--text-color);
  font-weight: 600;
  line-height: 1.2;
}

.reveal h1 { font-size: var(--h1-size); }
.reveal h2 { font-size: var(--h2-size); margin-bottom: 0; }
.reveal h3 { font-size: var(--h3-size); }

.reveal p,
.reveal li,
.reveal td,
.reveal th,
.reveal blockquote {
  font-size: var(--text-size);
  color: var(--text-color);
  line-height: 1.5;
}

/* ===========================================
   LISTS
   =========================================== */

.reveal ul {
  list-style: none;
  padding-left: 0;
  margin: 15px 0;
}

.reveal ul li {
  position: relative;
  padding-left: 25px;
  margin-bottom: 10px;
}

.reveal ul li::before {
  content: '';
  position: absolute;
  left: 0;
  top: 0.6em;
  width: 8px;
  height: 8px;
  background: var(--text-color);
  border-radius: 50%;
}

.reveal ul ul li::before {
  background: var(--muted-color);
  width: 6px;
  height: 6px;
}

/* Prevent double-sizing for nested elements */
.reveal blockquote p {
  font-size: inherit;
}

/* ===========================================
   SLIDE LAYOUT
   =========================================== */

.reveal .slides section {
  height: 100%;
  display: flex !important;
  flex-direction: column !important;
  padding: var(--slide-padding-top) var(--slide-padding) var(--slide-padding) var(--slide-padding) !important;
  box-sizing: border-box;
  text-align: left;
}

/* Vertical stack wrapper - no padding, just pass through */
.reveal .slides section.stack {
  padding: 0 !important;
}

/* Content area - fills remaining space */
.reveal .slides section > .content {
  flex: 1;
  display: flex;
  flex-direction: column;
  justify-content: flex-start;
  padding-top: var(--content-gap);
  text-align: left;
}

/* Footnotes at bottom */
.reveal .slides section > .footnote {
  position: absolute;
  bottom: 15px;
  left: var(--slide-padding);
  right: var(--slide-padding);
  font-size: var(--footnote-size);
  color: var(--muted-color);
}

/* ===========================================
   SECTION DIVIDERS - Centered title slides
   =========================================== */

.reveal .slides section.section-divider {
  display: flex !important;
  flex-direction: column !important;
  justify-content: center !important;
  align-items: center !important;
  text-align: center;
}

.reveal .slides section.section-divider h1 {
  font-size: 56pt;
  text-align: center;
}

.reveal .slides section.section-divider p {
  font-size: 20pt;
  color: var(--muted-color);
}

/* ===========================================
   TEXT SIZE UTILITIES

   Base text is 16pt - use these to scale UP when
   slides have less content and you want to fill space.
   =========================================== */

.text-lg { font-size: 18pt !important; }   /* Slightly larger */
.text-xl { font-size: 20pt !important; }   /* Medium emphasis */
.text-2xl { font-size: 24pt !important; }  /* Strong emphasis */
.text-3xl { font-size: 28pt !important; }  /* Very large */
.text-4xl { font-size: 32pt !important; }  /* Maximum body text */

/* Other text utilities */
.text-muted { color: var(--muted-color) !important; }
.text-center { text-align: center !important; }
.text-uppercase { text-transform: uppercase; letter-spacing: 0.1em; }
.font-light { font-weight: 300; }
.font-bold { font-weight: 600; }

/* ===========================================
   BLOCKQUOTES
   =========================================== */

.reveal blockquote {
  border-left: 4px solid var(--primary-color);
  padding-left: 20px;
  margin: 20px 0;
  font-style: italic;
  background: none;
  box-shadow: none;
  width: 100%;
  max-width: none;
}

.reveal blockquote cite {
  display: block;
  margin-top: 10px;
  font-style: normal;
  color: var(--muted-color);
}

/* ===========================================
   OPTIONAL: TITLE WITH UNDERLINE

   Add this to presentations where you want
   a line under the slide title.
   =========================================== */

/*
.reveal .slides section > h1,
.reveal .slides section > h2 {
  flex-shrink: 0;
  margin: 0;
  padding-bottom: 15px;
  border-bottom: 2px solid var(--line-color);
}
*/

/* ===========================================
   OPTIONAL: DECORATIVE ELEMENTS
   =========================================== */

/* Top decorative line on all slides */
/*
.reveal .slides section::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 4px;
  background: var(--primary-color);
}
*/

/* Bottom decorative line */
/*
.reveal .slides section::after {
  content: '';
  position: absolute;
  bottom: 40px;
  left: var(--slide-padding);
  right: var(--slide-padding);
  height: 2px;
  background: var(--line-color);
}
*/

/* ===========================================
   CUSTOM COMPONENTS — Token presentation
   =========================================== */

/* Numéro de recommandation (badge orange) */
.reco-number {
  display: inline-block;
  background: var(--primary-color);
  color: #fff;
  font-weight: 700;
  font-size: 11pt;
  padding: 3px 12px;
  border-radius: 20px;
  margin-bottom: 10px;
  letter-spacing: 0.05em;
  text-transform: uppercase;
}

/* Carte / encadré de contenu */
.card {
  background: var(--card-bg);
  border: 1px solid var(--card-border);
  border-radius: var(--box-radius);
  padding: 18px 22px;
}

/* Encadré avec bord gauche coloré */
.card-accent {
  background: var(--card-bg);
  border-left: 4px solid var(--primary-color);
  border-radius: 0 var(--box-radius) var(--box-radius) 0;
  padding: 14px 20px;
}

/* Stat / chiffre mis en valeur */
.stat-box {
  background: var(--card-bg);
  border: 1px solid var(--card-border);
  border-radius: var(--box-radius);
  padding: 16px 20px;
  text-align: center;
}
.stat-box .stat-value {
  display: block;
  font-size: 30pt;
  font-weight: 700;
  color: var(--primary-color);
  line-height: 1;
}
.stat-box .stat-label {
  display: block;
  font-size: 12pt;
  color: var(--muted-color);
  margin-top: 6px;
}

/* Tag/badge token type */
.token-badge {
  display: inline-block;
  font-size: 11pt;
  font-weight: 600;
  padding: 4px 14px;
  border-radius: 4px;
  margin-bottom: 8px;
}
.token-badge.input  { background: #1f3a5f; color: #79c0ff; }
.token-badge.output { background: #2d1f3f; color: #d2a8ff; }
.token-badge.cache  { background: #1a3a2a; color: #56d364; }

/* Image responsive dans une slide */
.slide-img {
  max-width: 100%;
  max-height: 320px;
  object-fit: contain;
  border-radius: 6px;
  border: 1px solid var(--card-border);
}

/* Séparateur ligne horizontale */
.reveal hr.divider {
  border: none;
  border-top: 1px solid var(--card-border);
  margin: 18px 0;
}

/* Titre de slide avec accent orange sous le titre */
.reveal .slides section > h2 {
  border-bottom: 2px solid var(--primary-color);
  padding-bottom: 10px;
  margin-bottom: 0;
}

/* Section divider — grand titre centré */
.reveal .slides section.section-divider h1 {
  color: var(--primary-color);
}
.reveal .slides section.section-divider p {
  color: var(--muted-color);
}

/* Override chart.js default colors for dark theme */
.reveal canvas {
  filter: none;
}

/* ===========================================
   LIENS
   =========================================== */

.reveal a {
  color: var(--primary-color);
  text-decoration: none;
  border-bottom: 1px solid transparent;
  transition: border-color 0.2s;
}

.reveal a:hover {
  border-bottom-color: var(--primary-color);
}

.reveal .footnote a {
  color: var(--muted-color);
  font-size: var(--footnote-size);
}

.reveal .footnote a:hover {
  color: var(--primary-color);
}

/* ===========================================
   NAVIGATION CONTROLS (ARROWS)
   =========================================== */

.reveal .controls {
  color: #ffffff !important;
}
