/* Présentations reveal des sites NSI : habillage Lumina Rayleigh 1.1.0 (jour et nuit).
   Remplace reveal8w.css et chroma-reveal.css. Polices : celles du site (Oswald, Lora, IBM Plex Mono). */
@import url('https://fonts.googleapis.com/css2?family=Oswald:wght@400;500;600&family=Lora:ital,wght@0,400;0,600;0,700;1,400;1,600&family=IBM+Plex+Mono:ital,wght@0,400;0,600;1,400&display=swap');

:root {
  --fond: #EDF8FF; --surface: #E5F2FA; --surface-2: #D9E6EE; --filet: #C9D6DE; --halo: #D1E4F8;
  --encre: #1D2F47; --encre-2: #394C66; --discret: #576C81; --ln: #9EA9B1;
  --accent: #0160A7; --accent-2: #00508B; --or: #906003;
  --vert: #187538; --vert-fond: #DFF8F2; --rouge: #941419; --rouge-fond: #E8D7DA;
  --nuit: #091D30; --nuit-encre: #D4DFEB; --nuit-encre-2: #B4BFCA; --nuit-or: #F1CC79;
  --k: #0160A7; --fn: #906003; --ty: #A93977; --str: #A8451F; --num: #7244A9; --bi: #056271;
  --com: #576C81; --doc: #455A6E; --punct: #394C66; --op: #394C66;
}
html[data-theme="dark"] {
  --fond: #091D30; --surface: #0F243A; --surface-2: #172B41; --filet: #21364C; --halo: #112B42;
  --encre: #D4DFEB; --encre-2: #B4BFCA; --discret: #849BB4; --ln: #3A516E;
  --accent: #6FC3FF; --accent-2: #4EA3DD; --or: #F1CC79;
  --vert: #96D2A1; --vert-fond: #11343B; --rouge: #DA6D65; --rouge-fond: #211B27;
  --k: #6FC3FF; --fn: #F1CC79; --ty: #EEA3C9; --str: #F9B094; --num: #BF9EF1; --bi: #AFDEE6;
  --com: #849BB4; --doc: #889FB8; --punct: #B4BFCA; --op: #B4BFCA;
}

* { font-variant-ligatures: none; }
html, body { background: var(--fond); }

.reveal {
  font-family: "Lora", Georgia, serif;
  font-size: 30px;
  font-weight: 400;
  color: var(--encre);
  background: transparent;
  text-align: left;
}
.reveal .slides section, .reveal .slides section > section { line-height: 1.35; text-align: left; font-weight: inherit; }
.reveal p { margin: 0.45em 0; line-height: 1.35; text-align: left; }
.reveal em { font-style: italic; }
.reveal b, .reveal strong { font-weight: 700; color: var(--encre); }
.reveal .underline { text-decoration: underline; }
.reveal a { color: var(--accent); text-decoration: underline; text-decoration-thickness: 0.06em; text-underline-offset: 0.14em; }
.reveal a:hover { color: var(--accent-2); }

/* ---- Titres : Oswald, une seule encre ; les débuts de partie se distinguent par leur taille ---- */
.reveal h1, .reveal h2, .reveal h3, .reveal h4, .reveal h5, .reveal h6 {
  font-family: "Oswald", "Helvetica Neue", Arial, sans-serif;
  letter-spacing: 0.01em; text-transform: none; text-shadow: none; word-wrap: break-word; overflow-wrap: anywhere;
  text-align: left; margin: 0 0 0.45em;
}
.reveal h2 { font-weight: 500; font-size: 2.1em; line-height: 1.15; color: var(--accent); margin: 0.1em 0 0.5em; }
.reveal h3 { font-weight: 500; font-size: 1.6em; line-height: 1.2; color: var(--accent); }
.reveal h3.suite-titre { font-size: 1.25em; margin-bottom: 0.4em; }
.reveal .suite { font-family: "Lora", serif; font-style: italic; font-weight: 400; font-size: 0.6em; color: var(--discret); margin-left: 0.4em; letter-spacing: 0; }
.reveal h4 { font-family: "Lora", serif; font-weight: 700; font-size: 1.1em; color: var(--encre); margin-top: 0.6em; }
.reveal h5 { font-family: "Lora", serif; font-weight: 700; font-size: 1em; color: var(--encre-2); }
.reveal h6 { font-family: "Lora", serif; font-weight: 400; font-size: 0.9em; color: var(--encre-2); }
.reveal h2 code, .reveal h3 code, .reveal h4 code { color: inherit; background: none; padding: 0; font-size: 0.92em; }

/* ---- Diapositive de titre : la nuit Rayleigh, quel que soit le mode ---- */
.reveal .backgrounds > .slide-background:first-child { background-color: var(--nuit); }
.reveal #sec-title-slide { text-align: center; }
.reveal #sec-title-slide h1 { font-weight: 500; font-size: 2.9em; line-height: 1.12; color: var(--nuit-encre); text-align: center; margin: 0 auto 0.3em; max-width: 90%; }
.reveal #sec-title-slide h1::after { content: ""; display: block; width: 2.2em; height: 0.09em; margin: 0.32em auto 0; border-radius: 0.05em; background: var(--nuit-or); }
.reveal #sec-title-slide h6 { font-family: "Lora", serif; font-style: italic; font-size: 0.95em; color: var(--nuit-encre-2); text-align: center; margin: 0.6em 0 0; }

/* ---- Listes ---- */
.reveal ol, .reveal ul, .reveal dl { display: block; text-align: left; margin: 0.3em 0 0.3em 1.2em; }
.reveal ul { list-style: disc; }
.reveal ul ul { list-style: circle; }
.reveal li { margin: 0.12em 0; }
.reveal li::marker { color: var(--accent); }
.reveal ol li::marker { font-family: "Oswald", sans-serif; font-weight: 500; }

/* ---- Code : IBM Plex Mono, six encres Rayleigh, surface = l'ombre de l'encre ---- */
.reveal pre, .reveal code, .reveal pre.example {
  font-family: "IBM Plex Mono", Menlo, Consolas, monospace;
}
.reveal code {
  font-size: 0.88em; font-weight: 400; color: var(--accent-2);
  background: var(--surface); padding: 0.04em 0.32em; border-radius: 0.3em;
}
.reveal pre, .reveal pre.example {
  display: block; width: 100%; box-sizing: border-box;
  font-size: 0.86em; line-height: 1.35; color: var(--encre);
  background: var(--surface); border: 1px solid var(--filet); border-radius: 0.5em;
  padding: 0.5em 0.75em; margin: 0.55em 0;
  box-shadow: none; text-align: left;
  white-space: pre-wrap !important; overflow: auto !important; max-height: 550px;
}
.reveal pre code { display: block; padding: 0; background: transparent; color: inherit; font-size: 1em; max-height: none; overflow: visible; word-wrap: normal; }
.reveal .highlight { margin: 0.55em 0; width: 100%; }
.reveal .highlight pre { margin: 0; }
.reveal .chroma { background: transparent; }
.reveal .chroma .line, .reveal .chroma .cl { display: inline; }
.reveal .chroma .ln, .reveal .chroma .lnt { color: var(--ln); user-select: none; margin-right: 0.6em; }
.reveal .chroma .hl { background: var(--halo); display: block; }
.reveal .chroma .k, .reveal .chroma .kc, .reveal .chroma .kd, .reveal .chroma .kn, .reveal .chroma .kp, .reveal .chroma .kr,
.reveal .chroma .ow, .reveal .chroma .nd, .reveal .chroma .nt, .reveal .chroma .cp, .reveal .chroma .cpf { color: var(--k); font-weight: 400; }
.reveal .chroma .kt, .reveal .chroma .nc, .reveal .chroma .ne { color: var(--ty); font-weight: 400; }
.reveal .chroma .nf, .reveal .chroma .fm { color: var(--fn); }
.reveal .chroma .nb, .reveal .chroma .bp, .reveal .chroma .na { color: var(--bi); }
.reveal .chroma .nn, .reveal .chroma .no, .reveal .chroma .ss, .reveal .chroma .nl { color: var(--num); font-weight: 400; }
.reveal .chroma .nv, .reveal .chroma .vm, .reveal .chroma .vi, .reveal .chroma .vc, .reveal .chroma .vg, .reveal .chroma .n, .reveal .chroma .nx, .reveal .chroma .py { color: var(--encre); }
.reveal .chroma .s, .reveal .chroma .s1, .reveal .chroma .s2, .reveal .chroma .sa, .reveal .chroma .sb, .reveal .chroma .sc, .reveal .chroma .dl,
.reveal .chroma .sh, .reveal .chroma .sx, .reveal .chroma .si, .reveal .chroma .se, .reveal .chroma .sr { color: var(--str); font-weight: 400; }
.reveal .chroma .sd { color: var(--doc); font-style: italic; }
.reveal .chroma .m, .reveal .chroma .mi, .reveal .chroma .mf, .reveal .chroma .mh, .reveal .chroma .mo, .reveal .chroma .mb, .reveal .chroma .il { color: var(--num); }
.reveal .chroma .o { color: var(--op); }
.reveal .chroma .p { color: var(--punct); }
.reveal .chroma .c, .reveal .chroma .c1, .reveal .chroma .cm, .reveal .chroma .ch, .reveal .chroma .cs { color: var(--com); font-style: italic; font-weight: 400; }
.reveal .chroma .err { color: var(--rouge); background: transparent; }
.reveal .chroma .gd { background: var(--rouge-fond); }
.reveal .chroma .gi { background: var(--vert-fond); }
.reveal .chroma .go { color: var(--discret); }
.reveal .chroma .gp, .reveal .chroma .gh, .reveal .chroma .gu { color: var(--accent); font-weight: 600; }
.reveal .chroma .gr { color: var(--rouge); }
.reveal .chroma .gt { color: var(--str); }
.reveal .chroma .ge { font-style: italic; }
.reveal .chroma .gs { font-weight: 600; }
.reveal .chroma .w { color: var(--ln); }

/* ---- Encadrés : objectifs, questions flash, essentiel, citations ---- */
.reveal .sc-objectifs, .reveal .sc-flash, .reveal .sc-synthese, .reveal blockquote {
  display: block; width: auto; margin: 0.5em 0; padding: 0.45em 0.9em 0.5em;
  background: var(--surface); border: 0; border-left: 0.22em solid var(--accent); border-radius: 0 0.5em 0.5em 0;
  font-size: 0.85em; font-style: normal; box-shadow: none; text-align: left;
}
.reveal .sc-objectifs-header, .reveal .sc-flash-header, .reveal .sc-synthese-header {
  font-family: "Oswald", sans-serif; font-weight: 500; font-size: 0.85em; letter-spacing: 0.07em; text-transform: uppercase;
  color: var(--accent); margin: 0 0 0.3em;
}
.reveal .sc-objectifs p:last-child, .reveal .sc-flash p:last-child, .reveal blockquote p:last-child { margin-bottom: 0; }

/* ---- Indices et réponses repliés ---- */
.reveal details { font-size: 0.85em; margin: 0.4em 0; }
.reveal details summary {
  display: inline-block; cursor: pointer; list-style: none;
  font-family: "Oswald", sans-serif; font-weight: 500; font-size: 0.85em; letter-spacing: 0.04em;
  color: var(--accent); background: var(--halo); border-radius: 999px; padding: 0.12em 0.85em 0.12em 0.7em;
}
.reveal details summary::-webkit-details-marker { display: none; }
.reveal details summary::before { content: "▸ "; }
.reveal details[open] summary::before { content: "▾ "; }
.reveal details[open] { border-left: 0.15em solid var(--halo); padding-left: 0.6em; }
.reveal details[open] > :not(summary) { margin-top: 0.3em; }

/* ---- Corrections : lavis vert, titre vert ---- */
.reveal section.correction { background: var(--vert-fond); border-radius: 0.6em; padding: 0.5em 0.9em !important; box-sizing: border-box; }
.reveal section.correction h3 { color: var(--vert); }
.reveal section.correction pre { background: var(--fond); }
.reveal p.correction-attente { display: inline-block; font-style: italic; color: var(--encre-2); background: var(--surface); border-radius: 0.4em; padding: 0.15em 0.7em; }

/* ---- Tableaux : filets fins, en-tête en encre d'accent, pas de rayures ---- */
.reveal table { font-size: 0.8em; width: 100%; border-collapse: collapse; margin: 0.5em 0 0.8em; }
.reveal table th {
  font-family: "Oswald", sans-serif; font-weight: 500; font-size: 1em; letter-spacing: 0.03em;
  color: var(--accent); background: transparent; text-align: left; vertical-align: bottom;
  padding: 0.3em 0.6em; border: 0; border-bottom: 0.12em solid var(--accent);
}
.reveal table td { padding: 0.3em 0.6em; border: 0; border-bottom: 1px solid var(--filet); text-align: left; vertical-align: top; }
.reveal table tr:nth-child(even), .reveal table tr:hover { background: transparent; }
.reveal table td code { font-size: 0.9em; }

/* ---- Figures ---- */
.reveal figure { margin: 0; }
.reveal figure.video-cours { margin: 0.4em auto; }
.reveal section img { display: block; margin: 0.4em auto; max-height: 430px; width: auto; max-width: 95%; border: 0; box-shadow: none; background: transparent; }
.reveal section video, .reveal section iframe { display: block; margin: 0.4em auto; max-width: 95%; max-height: 95%; }
.reveal svg.figure { display: block; margin: 10px auto; width: 70% !important; max-width: 90% !important; height: auto; max-height: 430px; }
.reveal figcaption { font-family: "Lora", serif; font-style: italic; font-size: 0.68em; color: var(--encre-2); text-align: center; margin-top: 0.2em; }
.reveal section.deborde { overflow-y: auto; }

/* ---- Habillage reveal : flèches d'or, numéro discret ---- */
.reveal .controls { color: var(--or); }
.reveal .progress { background: var(--surface-2); }
.reveal .progress span { background: var(--or); }
.reveal .slide-number { background: transparent; color: var(--discret); font-family: "IBM Plex Mono", monospace; font-size: 14px; }
.reveal .slide-number a { color: inherit; text-decoration: none; }

/* ---- Bouton jour / nuit (même règle que le site : exception jusqu'au prochain changement de l'appareil) ---- */
#theme-toggle {
  position: fixed; top: 14px; right: 14px; z-index: 50; width: 36px; height: 36px;
  display: flex; align-items: center; justify-content: center;
  border: 0; border-radius: 999px; background: transparent; color: var(--discret); cursor: pointer;
  opacity: 0.55; transition: opacity 0.2s;
}
#theme-toggle:hover { opacity: 1; background: var(--surface); }
