/* Thème commun des sites de Julien Miron.
   Base partagée mot pour mot entre SitePerso, STT-1000, STT-1900, STT-1920 et
   STT-4300 : toute modification faite ici doit être recopiée dans les 5 dépôts.
   Les ajouts spécifiques à un seul site sont isolés dans une section
   « AJOUTS PROPRES À ... » en fin de fichier, quand elle existe. */
:root {
  /* ===== Couleurs du thème =====
     Chaque couleur utilisée dans ce fichier est définie ici une seule fois.
     Les transparences sont nommées couleur de base + « -a » + opacité en %
     (ex. --blue-a18 = --blue à 18 %). Les mots-clés transparent et
     currentColor restent écrits tels quels. */

  /* Palette de base */
  --ulaval-yellow: #ffc103;   /* jaune Université Laval : bande gauche des citations et encadrés (blockquote, .ae-box, .challenge-box, .plan-section-copy blockquote, .module-arc-card__product), fond des en-têtes de tableau des diapositives, accents jaunes des mini-illustrations */
  --ink: #202124;             /* texte principal : corps de page, menus déroulants, titres des cartes, ressources et fiches, valeurs, étiquettes et puces */
  --muted: #5f6368;           /* texte secondaire : textes d'introduction, sous-titres, descriptions de cartes, libellés, métadonnées, citations, légende des tableaux de rétroaction */
  --line: #9467bd;            /* bordures : soulignement des h2, contour des cartes, fiches, puces, panneaux, étapes, tableaux (y compris des diapositives) et dépôts */
  --surface: #ffffff;         /* fond blanc : page, cartes, fiches, panneaux, étapes, figures, dépôts, bandes blanches des mini-illustrations, milieu des dégradés d'en-tête */
  --soft: #f6f7f9;            /* fond gris très pâle : survol des menus et de la table des matières, badges, étiquettes, puces de ressources, notes de parcours, métadonnées des jeux de données */
  --teal: #007c89;            /* sarcelle : bande gauche des fiches d'aventure et de rétroaction IA, numéros de ces fiches, éléments des mini-illustrations, couvertures de lecture de remplacement */
  --blue: #315f8c;            /* bleu : bouton secondaire, liens de source, bascules et notes de parcours, liens des dépôts, bande gauche du travail complété, éléments des mini-illustrations, couvertures de lecture */
  --purple: #9467bd;          /* violet, couleur principale : liens, surtitres, numéros, boutons et liens d'action, bordures au survol des cartes, bande gauche des en-têtes, table des matières active, titres h1/h2 des diapositives */
  --green: #0E9E6C;           /* vert de la barre de navigation (couleur réglée dans _quarto.yml) ; non utilisée dans ce fichier */
  --on-color: #ffffff;        /* texte blanc sur fond coloré : boutons et liens d'action, numéros dans les pastilles, pastilles du panneau de ressources, texte des couvertures et logos de remplacement */
  --heading: #2f2f2f;         /* titres h1, h2 et h3 des pages */

  /* Diapositives (reveal.js) */
  --slide-subheading: #515151;  /* titres h3 des diapositives (.reveal h3) */
  --slide-table-head: #000000;  /* texte des en-têtes de tableau des diapositives (.reveal table th) */

  /* Page d'accueil (reprises par --home-text, --home-muted et --home-line dans .home-page) */
  --home-ink: #071a34;                  /* texte de la page d'accueil : titre, sigle de cours, boutons, liens du rail */
  --home-ink-muted: #334155;            /* texte d'introduction de la page d'accueil (.home-lead) */
  --home-ink-a18: rgba(7, 26, 52, .18); /* lignes séparant les liens du rail de la page d'accueil (.home-rail, .home-rail-link) */
  --home-ink-a78: rgba(7, 26, 52, .78); /* contour des boutons de la page d'accueil (body.page-home .home-action et bouton secondaire) */

  /* En-têtes de page */
  --hero-start: #fff7f7;      /* début (gauche) du dégradé des en-têtes : .portal-hero, .module-banner, .resource-hero */
  --hero-end: #f7fbfc;        /* fin (droite) du dégradé des en-têtes : .portal-hero, .module-banner, .resource-hero */

  /* Fonds pâles des liens typés */
  --link-adventure-bg: #e9f4f6;  /* liens d'aventure (.adventure-link) */
  --link-exercise-bg: #eef5ec;   /* liens d'exercice (.exercise-link) */
  --link-challenge-bg: #fff0ee;  /* liens de défi et de paquet (.challenge-link, .package-link) */
  --link-data-bg: #edf3fb;       /* liens de données (.data-link) */
  --link-plan-bg: #fff3d4;       /* liens de plan (.plan-link) et fond des icônes de ressource (.resource-icon) */
  --link-summary-bg: #eaf7f7;    /* liens de résumé des fiches de rétroaction IA (.ai-feedback-card .summary-resource-link) */

  /* Encadrés, cartes et panneaux */
  --note-bg: #fff9e6;            /* fond jaune pâle : panneau rapide (.quick-panel), citations des plans (.plan-section-copy blockquote), encadrés .ae-box et .challenge-box */
  --note-border: #f1d880;        /* contour du panneau rapide (.quick-panel) */
  --brief-start: #f4fbfc;        /* début du dégradé de la fiche d'aventure (.adventure-brief) */
  --completed-work-bg: #f8fbff;  /* fond du bloc de travail complété (.completed-work) */
  --step-detail-bg: #fbfcfd;     /* fond du détail d'une étape (.step-detail) */
  --phase-card-end: #f8fbfc;     /* fin (bas) du dégradé des cartes de phase (.phase-card) */
  --path-open-border: #b8cbd9;   /* contour d'une carte de parcours ouverte (.path-card[open]) */
  --sage-bg: #f2f8f1;            /* fond des puces de vérification de la maquette (.mini-product-checks span) */
  --sage-pale: #f7fbf5;          /* fond du panneau de clôture (.closing-panel), de la navigation de rétroaction (.feedback-nav) et de l'en-tête du tableau de rétroaction (.feedback-table thead) */
  --sage-line: #dce7dc;          /* contour des puces de vérification (.mini-product-checks span) et du panneau de clôture (.closing-panel) */
  --sage-ink: #31784a;           /* icônes de vérification de la maquette (.mini-product-checks i) */
  --sage-border: #b8cdb3;        /* bande gauche des citations de la demande de rétroaction (.feedback-request blockquote) */
  --sage-focus: #496b3e;         /* contour de focus des liens de la navigation de rétroaction et du résumé de la demande (.feedback-nav a, .feedback-request summary) */

  /* Maquette de produit */
  --product-visual-bg: #f8fafb;  /* fond de base de l'illustration produit (.product-visual), sous les halos jaune et sarcelle */
  --mockup-border: #cfd8dc;      /* contour du tableau de bord fictif (.mini-product-board) */
  --mockup-toolbar: #f1f4f6;     /* barre d'outils de la maquette (.mini-product-toolbar) et première barre de l'illustration web (.visual-web span:nth-child(1)) */
  --mockup-divider: #dde4e8;     /* trait sous la barre d'outils de la maquette (.mini-product-toolbar) */
  --mockup-bar: #e6ebef;         /* fond des barres de progression fictives (.mini-bar) */

  /* Mini-illustrations */
  --visual-panel-start: #f7fafb; /* début du dégradé des panneaux d'illustration (.module-visual, .resource-mini-visual) */
  --visual-panel-end: #eef6f7;   /* fin du dégradé des panneaux d'illustration (.module-visual, .resource-mini-visual) */
  --visual-fill: #edf3f6;        /* rayures des illustrations de jointure, de tableau de bord et de soutien (.visual-join, .visual-dashboard span:nth-child(3), .support-mini::before) */
  --visual-stroke: #cbd6dc;      /* axes des illustrations d'éthique et de prédiction (.visual-ethics span:nth-child(1), .visual-predict::before) */

  /* Lectures */
  --cover-frame-bg: #f2f5f7;     /* fond du cadre des couvertures de lecture (.reading-cover-frame) */
  --cover-quarto: #30475e;       /* début du dégradé de la couverture de remplacement Quarto (.reading-cover-placeholder--quarto) */
  --cover-github: #202124;       /* début du dégradé de la couverture de remplacement GitHub (.reading-cover-placeholder--github) */

  /* Transparences */
  --white-a72: rgba(255, 255, 255, .72); /* fond translucide du panneau de ressources (.resource-panel) et des couvertures en vedette (.featured-covers) */
  --black-a04: rgba(0,0,0,.04);          /* ombre légère des cartes de portail, des cartes de ressources et de jeux de données, des cartes de parcours et des dépôts */
  --ink-a05: rgba(32, 33, 36, .05);      /* ombre des cartes : jeux de données et paquets, fiches d'aventure, cartes de ressources et de principes, étapes, arcs et aperçus de module, phases, figures, lectures */
  --ink-a08: rgba(32, 33, 36, .08);      /* contour des illustrations de nettoyage et de données (.visual-clean span, .data-mini) */
  --ink-a10: rgba(32, 33, 36, .10);      /* ombre du tableau de bord fictif (.mini-product-board) */
  --ink-a12: rgba(32, 33, 36, .12);      /* ombre des livres de l'illustration (.book-mini) */
  --ink-a14: rgba(32, 33, 36, .14);      /* ombre des couvertures en vedette (.featured-covers img) */
  --blue-a08: rgba(49, 95, 140, .08);    /* ombre d'une carte de parcours ouverte (.path-card[open]) */
  --blue-a18: rgba(49, 95, 140, .18);    /* contour du panneau de ressources, des tuiles du tableau de bord illustré et des couvertures en vedette */
  --blue-a20: rgba(49, 95, 140, .2);     /* contour de l'illustration de soutien (.support-mini::before) */
  --blue-a22: rgba(49, 95, 140, .22);    /* contour du résultat d'une étape de parcours (.journey-step__output) */
  --blue-a24: rgba(49, 95, 140, .24);    /* contour des blocs de l'illustration web (.visual-web span) */
  --blue-a25: rgba(49, 95, 140, .25);    /* contour des tables de l'illustration de jointure (.visual-join span) */
  --teal-a10: rgba(0, 124, 137, .1);     /* halo sarcelle de l'illustration produit (.product-visual) */
  --teal-a16: rgba(0, 124, 137, .16);    /* bloc sarcelle de l'illustration web (.visual-web span:nth-child(4)) */
  --teal-a18: rgba(0, 124, 137, .18);    /* table surlignée de l'illustration de jointure et tuile sarcelle du tableau de bord illustré */
  --red-a035: rgba(227, 5, 19, .035);    /* rouge Université Laval à 3,5 % : survol des liens du rail de la page d'accueil (.home-rail-link) */
  --red-a08: rgba(227, 5, 19, .08);      /* halo de l'illustration IA (.ai-mini::before) */
  --red-a10: rgba(227, 5, 19, .1);       /* fond des icônes d'étape de parcours (.journey-step__icon) */
  --red-a16: rgba(227, 5, 19, .16);      /* tuile rouge du tableau de bord illustré (.visual-dashboard span:nth-child(1)) */
  --red-a18: rgba(227, 5, 19, .18);      /* diagonale de l'illustration d'éthique (.visual-ethics span:nth-child(1)) */
  --yellow-a18: rgba(255, 193, 3, .18);  /* halo jaune de l'illustration produit (.product-visual) */
  --yellow-a30: rgba(255, 193, 3, .3);   /* bloc jaune de l'illustration web (.visual-web span:nth-child(3)) */

  /* ===== Arrondis ===== */
  --radius: 8px;
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  overflow-x: hidden;
}

body {
  font-family: Helvetica, Arial, sans-serif;
  color: var(--ink);
  line-height: 1.6;
  background: var(--surface);
  overflow-x: hidden;
}

main,
.content,
#quarto-content,
.page-columns,
.column-body {
  min-width: 0;
}

.navbar-brand {
  min-width: 0;
  max-width: min(34rem, calc(100vw - 24rem));
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.navbar .dropdown-menu .dropdown-item {
  color: var(--ink);
}
.navbar .dropdown-menu .dropdown-item:hover,
.navbar .dropdown-menu .dropdown-item:focus {
  color: var(--ink);
  background-color: var(--soft);
}

h1, h2, h3 { color: var(--heading); letter-spacing: 0; }
h1 { margin-top: 1rem; }
h2 { margin-top: 2.2rem; border-bottom: 2px solid var(--line); padding-bottom: .25rem; }
a { color: var(--purple); }

.portal-hero {
  border-left: 6px solid var(--purple);
  background: linear-gradient(90deg, var(--hero-start) 0%, var(--surface) 55%, var(--hero-end) 100%);
  padding: 1.4rem 1.6rem;
  margin: 1rem 0 1.5rem;
}
.portal-hero h1 { margin: .2rem 0 .6rem; color: var(--ink); }
.hero-lead { font-size: 1.12rem; max-width: 70ch; color: var(--muted); margin-bottom: 0; }
.eyebrow, .card-kicker { text-transform: uppercase; letter-spacing: .08em; color: var(--purple); font-size: .78rem; margin: 0 0 .35rem; font-weight: 700; }

.module-banner {
  display: grid;
  gap: .25rem;
  border-left: 6px solid var(--purple);
  background: linear-gradient(90deg, var(--hero-start) 0%, var(--surface) 60%, var(--hero-end) 100%);
  color: var(--ink);
  border-radius: var(--radius);
  padding: 1rem 1.2rem;
  margin: .75rem 0 1.2rem;
}

.module-banner-number {
  margin: 0;
  color: var(--purple);
  font-size: .86rem;
  font-weight: 700;
  letter-spacing: .08em;
  text-transform: uppercase;
}

.module-banner-subtitle {
  margin: 0;
  color: var(--muted);
  font-size: 1.02rem;
  line-height: 1.35;
}

.quick-panel {
  background: var(--note-bg);
  border: 1px solid var(--note-border);
  border-radius: var(--radius);
  padding: 1.2rem;
  margin: 1.2rem 0;
}
.quick-panel h2 { border-bottom: 0; margin-top: 0; }

.portal-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(230px, 1fr));
  gap: 1rem;
  margin: 1rem 0 1.5rem;
}
.module-grid { grid-template-columns: repeat(auto-fit, minmax(250px, 1fr)); }
.portal-card {
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface);
  padding: 1rem;
  min-height: 9rem;
  box-shadow: 0 1px 2px var(--black-a04);
}
.portal-card h3 { margin-top: 0; color: var(--ink); }
.portal-card p:last-child { margin-bottom: 0; }

.portal-button {
  display: inline-block;
  background: var(--purple);
  color: var(--on-color) !important;
  border-radius: 6px;
  padding: .45rem .7rem;
  margin: .25rem .35rem .25rem 0;
  text-decoration: none;
  font-weight: 700;
}
.portal-button.secondary { background: var(--blue); }
.portal-button:hover { filter: brightness(.95); text-decoration: none; }

.content-badge {
  display: inline-block;
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: .12rem .45rem;
  margin: .15rem .2rem .15rem 0;
  font-size: .78rem;
  color: var(--muted);
  background: var(--soft);
}

.resource-link-grid,
.catalog-grid,
.package-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 1rem;
  margin: 1rem 0 1.5rem;
}

.catalog-grid > p,
.package-grid > p {
  display: contents;
}

.resource-link-card,
.dataset-row,
.dataset-card,
.package-card {
  display: grid;
  grid-template-columns: 48px minmax(0, 1fr);
  gap: .85rem;
  align-items: center;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface);
  color: var(--ink);
  padding: 1rem;
  min-height: 7.25rem;
  text-decoration: none;
  box-shadow: 0 1px 2px var(--black-a04);
}

.resource-link-card:hover,
.resource-link-card:focus,
.dataset-row:hover,
.dataset-row:focus,
.dataset-card:hover,
.dataset-card:focus,
.package-card:hover,
.package-card:focus {
  border-color: var(--purple);
  color: var(--ink);
  text-decoration: none;
  transform: translateY(-1px);
}

.dataset-card,
.package-card {
  box-shadow: 0 8px 22px var(--ink-a05);
}

.dataset-card {
  align-items: start;
  min-height: 8.25rem;
}

.resource-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 44px;
  height: 44px;
  border-radius: 8px;
  background: var(--link-plan-bg);
  color: var(--purple);
  font-size: 1.35rem;
}

.resource-title,
.package-name {
  display: block;
  color: var(--ink);
  font-weight: 700;
  line-height: 1.2;
}

.dataset-module {
  display: block;
  margin-bottom: .2rem;
  color: var(--muted);
  font-size: .78rem;
  font-weight: 700;
  letter-spacing: 0;
  text-transform: uppercase;
}

.resource-text,
.package-role {
  display: block;
  color: var(--muted);
  font-size: .92rem;
  line-height: 1.35;
  margin-top: .2rem;
}

.package-source {
  display: block;
  margin-top: .45rem;
  color: var(--blue);
  font-size: .78rem;
  font-weight: 700;
  letter-spacing: 0;
  text-transform: uppercase;
}

.dataset-download-wrap {
  margin: .75rem 0 1rem;
}

.dataset-download {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 2.35rem;
  padding: .5rem .75rem;
  border: 1px solid var(--purple);
  border-radius: 7px;
  background: var(--purple);
  color: var(--on-color) !important;
  font-weight: 700;
  line-height: 1.1;
  text-decoration: none;
}

.dataset-download:hover,
.dataset-download:focus {
  filter: brightness(.95);
  text-decoration: none;
}

.tag-list {
  display: flex;
  flex-wrap: wrap;
  gap: .45rem;
  margin: .75rem 0 1.25rem;
}

.tag-list p {
  display: flex;
  flex-wrap: wrap;
  gap: .45rem;
  margin: 0;
}

.tag-list a {
  display: inline-block;
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: .24rem .58rem;
  background: var(--soft);
  color: var(--ink);
  text-decoration: none;
  font-size: .88rem;
}

.tag-list a:hover,
.tag-list a:focus {
  border-color: var(--purple);
  color: var(--purple);
  text-decoration: none;
}

.module-quick-facts {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(210px, 1fr));
  gap: .8rem;
  margin: 1.1rem 0 1.6rem;
}

.module-quick-facts.three-facts {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.module-readiness {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 1rem;
  margin: 1.25rem 0 1.75rem;
}

.module-readiness-card {
  min-width: 0;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--soft);
  padding: 1rem 1.1rem;
}

.module-readiness-card h3 {
  margin-top: 0;
  margin-bottom: .45rem;
  color: var(--ink);
  font-size: 1.02rem;
}

.module-readiness-card p,
.module-readiness-card ul {
  margin-bottom: 0;
}

.module-readiness-card ul {
  padding-left: 1.15rem;
}

.module-fact {
  display: grid;
  align-items: center;
  min-height: 4.35rem;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface);
  padding: .75rem;
}

.module-fact p {
  display: grid;
  grid-template-columns: 38px minmax(0, 1fr);
  gap: .65rem;
  align-items: center;
  min-width: 0;
  margin: 0;
}

.module-fact > span:last-child,
.module-fact p > span:last-child {
  min-width: 0;
}

.module-fact .resource-icon {
  width: 38px;
  height: 38px;
  font-size: 1.1rem;
}

.fact-label,
.fact-value {
  display: block;
  line-height: 1.25;
}

.fact-label {
  color: var(--muted);
  font-size: .78rem;
  font-weight: 700;
  letter-spacing: 0;
  text-transform: uppercase;
}

.fact-value {
  margin-top: .2rem;
  color: var(--ink);
  font-size: .95rem;
  font-weight: 700;
  overflow-wrap: normal;
  word-break: normal;
}

.adventure-brief,
.completed-work {
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface);
  box-shadow: 0 8px 22px var(--ink-a05);
  padding: 1rem 1.1rem;
  margin: 1.2rem 0 1.5rem;
}

.adventure-brief {
  border-left: 5px solid var(--teal);
  background: linear-gradient(90deg, var(--brief-start) 0%, var(--surface) 70%);
}

.completed-work {
  border-left: 5px solid var(--blue);
  background: var(--completed-work-bg);
}

.adventure-brief-title,
.completed-work-title {
  margin: 0 0 .75rem;
  color: var(--ink);
  font-size: 1.05rem;
  font-weight: 700;
  line-height: 1.25;
}

.adventure-brief-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(210px, 1fr));
  gap: .75rem;
}

.adventure-brief-item {
  display: grid;
  gap: .15rem;
  min-width: 0;
}

.adventure-brief-label {
  color: var(--purple);
  font-size: .76rem;
  font-weight: 700;
  letter-spacing: .06em;
  line-height: 1.2;
  text-transform: uppercase;
}

.adventure-brief-value {
  color: var(--ink);
  line-height: 1.35;
  overflow-wrap: anywhere;
}

.completed-work ul {
  margin-bottom: 0;
}

.module-product-showcase {
  display: grid;
  grid-template-columns: minmax(0, 1.05fr) minmax(280px, .95fr);
  gap: 1rem;
  align-items: stretch;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface);
  margin: 1rem 0 1.6rem;
  overflow: hidden;
}

.product-copy {
  padding: 1rem 1.15rem;
}

.showcase-kicker {
  margin: 0 0 .35rem;
  color: var(--purple);
  font-size: .78rem;
  font-weight: 700;
  letter-spacing: .08em;
  text-transform: uppercase;
}

.product-copy h3 {
  margin: 0 0 .55rem;
  color: var(--ink);
}

.product-copy p:last-child {
  margin-bottom: 0;
}

.product-visual {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 13rem;
  background:
    linear-gradient(135deg, var(--yellow-a18), var(--teal-a10)),
    var(--product-visual-bg);
  padding: 1rem;
}

.mini-product-board {
  width: min(100%, 23rem);
  border: 1px solid var(--mockup-border);
  border-radius: var(--radius);
  background: var(--surface);
  box-shadow: 0 12px 26px var(--ink-a10);
  overflow: hidden;
}

.mini-product-toolbar {
  display: grid;
  grid-template-columns: .55rem .55rem .55rem minmax(0, 1fr);
  gap: .35rem;
  align-items: center;
  min-height: 2.35rem;
  padding: .55rem .7rem;
  background: var(--mockup-toolbar);
  border-bottom: 1px solid var(--mockup-divider);
}

.mini-product-toolbar span {
  width: .55rem;
  height: .55rem;
  border-radius: 50%;
  background: var(--purple);
}

.mini-product-toolbar span:nth-child(2) { background: var(--ulaval-yellow); }
.mini-product-toolbar span:nth-child(3) { background: var(--teal); }

.mini-product-toolbar strong {
  min-width: 0;
  color: var(--ink);
  font-size: .82rem;
  line-height: 1.15;
  overflow-wrap: anywhere;
}

.mini-product-bars {
  display: grid;
  gap: .55rem;
  padding: .85rem .8rem .35rem;
}

.mini-bar-row {
  display: grid;
  grid-template-columns: minmax(6.5rem, .9fr) minmax(5rem, 1.1fr);
  gap: .7rem;
  align-items: center;
  color: var(--muted);
  font-size: .78rem;
  line-height: 1.2;
}

.mini-bar {
  display: block;
  height: .55rem;
  border-radius: 999px;
  background: var(--mockup-bar);
  overflow: hidden;
}

.mini-bar::after {
  content: "";
  display: block;
  width: var(--bar-width);
  height: 100%;
  border-radius: inherit;
  background: var(--blue);
}

.mini-product-checks {
  display: flex;
  flex-wrap: wrap;
  gap: .4rem;
  padding: .75rem .8rem .9rem;
}

.mini-product-checks span {
  display: inline-flex;
  align-items: center;
  gap: .25rem;
  border: 1px solid var(--sage-line);
  border-radius: 999px;
  padding: .2rem .5rem;
  background: var(--sage-bg);
  color: var(--ink);
  font-size: .76rem;
  line-height: 1.15;
}

.mini-product-checks i {
  color: var(--sage-ink);
}

.path-grid {
  display: grid;
  gap: .85rem;
  margin: 1rem 0 1.6rem;
}

.interactive-path {
  grid-template-columns: 1fr;
}

.path-card {
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface);
  box-shadow: 0 1px 2px var(--black-a04);
  overflow: hidden;
}

.path-card[open] {
  border-color: var(--path-open-border);
  box-shadow: 0 10px 24px var(--blue-a08);
}

.ai-feedback-card {
  border-left: 5px solid var(--teal);
}

.ai-feedback-card .path-number {
  background: var(--teal);
}

.ai-feedback-card .summary-resource-link {
  background: var(--link-summary-bg);
}

.path-card summary {
  display: grid;
  grid-template-columns: 2.15rem minmax(10rem, 1.1fr) minmax(12rem, 2fr) minmax(8rem, auto) minmax(5.5rem, auto);
  gap: .7rem;
  align-items: center;
  padding: .85rem 1rem;
  cursor: pointer;
  list-style: none;
}

.path-card summary::-webkit-details-marker {
  display: none;
}

.path-number {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 2rem;
  height: 2rem;
  border-radius: 50%;
  background: var(--purple);
  color: var(--on-color);
  font-weight: 700;
  line-height: 1;
}

.path-title {
  color: var(--ink);
  font-weight: 700;
  line-height: 1.2;
}

.path-preview {
  color: var(--muted);
  font-size: .92rem;
  line-height: 1.3;
}

.path-resource {
  display: flex;
  flex-wrap: wrap;
  gap: .35rem;
  justify-content: flex-end;
}

.path-toggle {
  color: var(--blue);
  font-size: .82rem;
  font-weight: 700;
  text-align: right;
}

.path-card[open] .closed-label,
.path-card:not([open]) .open-label {
  display: none;
}

.summary-resource-link,
.path-note {
  display: inline-flex;
  align-items: center;
  min-height: 1.75rem;
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: .2rem .55rem;
  background: var(--soft);
  color: var(--ink);
  font-size: .8rem;
  font-weight: 700;
  line-height: 1.1;
  text-decoration: none;
  white-space: nowrap;
}

.summary-resource-link:hover,
.summary-resource-link:focus {
  border-color: var(--purple);
  color: var(--purple);
  text-decoration: none;
}

.plan-link { background: var(--link-plan-bg); }
.adventure-link { background: var(--link-adventure-bg); }
.exercise-link { background: var(--link-exercise-bg); }
.challenge-link { background: var(--link-challenge-bg); }
.data-link { background: var(--link-data-bg); }
.package-link { background: var(--link-challenge-bg); }

.step-detail {
  border-top: 1px solid var(--line);
  background: var(--step-detail-bg);
  padding: .9rem 1rem 1rem 4rem;
}

.step-detail p {
  margin: .35rem 0;
}

.plan-section-detail {
  padding: 1rem 1.1rem 1.1rem 4rem;
}

.plan-section-copy {
  display: grid;
  gap: .55rem;
  max-width: 78ch;
}

.plan-section-copy h3,
.plan-section-copy h4,
.plan-section-copy h5 {
  margin: .15rem 0 .25rem;
  border-bottom: 0;
  padding-bottom: 0;
  color: var(--ink);
}

.plan-section-copy h3 {
  font-size: 1.05rem;
}

.plan-section-copy h4 {
  font-size: .98rem;
}

.plan-section-copy p,
.plan-section-copy ul,
.plan-section-copy ol {
  margin-top: 0;
  margin-bottom: .45rem;
}

.plan-section-copy li > p {
  margin-bottom: .25rem;
}

.plan-section-copy code {
  overflow-wrap: anywhere;
}

.plan-section-copy blockquote {
  margin: .35rem 0;
  background: var(--note-bg);
  border-left: 4px solid var(--ulaval-yellow);
  border-radius: 0 var(--radius) var(--radius) 0;
  padding: .65rem .8rem;
}

.step-label {
  display: inline-block;
  min-width: 5.5rem;
  color: var(--muted);
  font-size: .8rem;
  font-weight: 700;
  letter-spacing: 0;
  text-transform: uppercase;
}

.ae-box,
.challenge-box {
  border-left: 4px solid var(--ulaval-yellow);
  background: var(--note-bg);
  border-radius: 0 var(--radius) var(--radius) 0;
  padding: .75rem .9rem;
  margin-top: .8rem;
}

.ae-title {
  margin: 0;
  color: var(--ink);
  font-weight: 700;
}

.resource-list {
  display: grid;
  gap: .7rem;
  margin: 1rem 0 1.6rem;
}

.resource-row {
  display: grid;
  grid-template-columns: 44px minmax(0, 1fr);
  gap: .75rem;
  align-items: center;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface);
  color: var(--ink);
  padding: .8rem;
  text-decoration: none;
}

.resource-row:hover,
.resource-row:focus {
  border-color: var(--purple);
  color: var(--ink);
  text-decoration: none;
  transform: translateY(-1px);
}

.resource-row-title,
.resource-row-text {
  display: block;
}

.resource-row-title {
  color: var(--ink);
  font-weight: 700;
  line-height: 1.2;
}

.resource-row-text {
  margin-top: .15rem;
  color: var(--muted);
  font-size: .9rem;
  line-height: 1.35;
}

.module-resource-panel {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 1rem;
  margin: 1rem 0 1.6rem;
}

.module-resource-section {
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface);
  padding: 1rem;
}

.module-resource-section h3 {
  margin: 0 0 .75rem;
  color: var(--ink);
}

.module-chip-list {
  display: flex;
  flex-wrap: wrap;
  gap: .45rem;
}

.module-resource-chip {
  display: inline-flex;
  align-items: center;
  gap: .4rem;
  min-height: 2rem;
  max-width: 100%;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: var(--soft);
  color: var(--ink);
  padding: .28rem .58rem .28rem .36rem;
  font-size: .88rem;
  font-weight: 700;
  line-height: 1.15;
  text-decoration: none;
}

.module-resource-chip:hover,
.module-resource-chip:focus {
  border-color: var(--purple);
  color: var(--purple);
  text-decoration: none;
}

.module-resource-chip span:last-child {
  min-width: 0;
  overflow-wrap: anywhere;
}

.chip-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex: 0 0 auto;
  width: 1.45rem;
  height: 1.45rem;
  border-radius: 50%;
  background: var(--surface);
  color: var(--purple);
  font-size: .86rem;
}

.closing-panel {
  display: grid;
  grid-template-columns: 44px minmax(0, 1fr);
  gap: .9rem;
  align-items: start;
  border: 1px solid var(--sage-line);
  border-radius: var(--radius);
  background: var(--sage-pale);
  padding: 1rem;
  margin: 1rem 0 1.6rem;
}

.closing-panel h3 {
  margin: 0 0 .45rem;
  color: var(--ink);
}

.closing-panel p {
  margin-top: 0;
}

.closing-panel ul {
  margin-bottom: 0;
}

.resource-page {
  display: grid;
  gap: 2rem;
}

body.page-resource #title-block-header {
  display: none !important;
}

.resource-hero {
  display: grid;
  grid-template-columns: minmax(0, 1.3fr) minmax(260px, .7fr);
  gap: 1.25rem;
  align-items: stretch;
  border-left: 6px solid var(--purple);
  border-radius: var(--radius);
  background: linear-gradient(90deg, var(--hero-start) 0%, var(--surface) 58%, var(--hero-end) 100%);
  padding: 1.35rem;
  margin: 1rem 0 .2rem;
}

.resource-hero h1 {
  margin: .15rem 0 .55rem;
  color: var(--ink);
}

.resource-hero p {
  max-width: 76ch;
}

.resource-actions {
  display: flex;
  flex-wrap: wrap;
  gap: .45rem;
  margin-top: 1rem;
}

.home-action {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 2.35rem;
  border: 1px solid var(--purple);
  border-radius: 7px;
  background: var(--purple);
  color: var(--ink);
  padding: .45rem .75rem;
  font-weight: 700;
  line-height: 1.1;
  text-decoration: none;
}

.home-action:hover,
.home-action:focus {
  border-color: var(--purple);
  color: var(--purple);
  text-decoration: none;
}

.home-action--primary {
  border-color: var(--purple);
  background: var(--purple);
  color: var(--on-color) !important;
}

.home-action--primary:hover,
.home-action--primary:focus {
  color: var(--on-color) !important;
  filter: brightness(.95);
}

.resource-panel {
  display: grid;
  gap: .65rem;
  align-content: center;
  border: 1px solid var(--blue-a18);
  border-radius: var(--radius);
  background: var(--white-a72);
  padding: .85rem;
}

.resource-panel div {
  display: grid;
  grid-template-columns: max-content minmax(0, 1fr);
  gap: .55rem;
  align-items: center;
}

.resource-panel span {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 2.25rem;
  height: 2.25rem;
  padding-inline: .55rem;
  border-radius: 999px;
  background: var(--purple);
  color: var(--on-color);
  font-weight: 700;
  white-space: nowrap;
}

.resource-panel p {
  margin: 0;
  color: var(--ink);
  font-weight: 700;
  line-height: 1.25;
}

.resource-section {
  display: grid;
  gap: .95rem;
}

.resource-section__header h2 {
  margin-top: 0;
}

.resource-section__header p {
  max-width: 76ch;
  margin-bottom: 0;
  color: var(--muted);
}

.resource-hub-grid,
.principle-grid,
.course-flow,
.role-grid,
.reading-map,
.dataset-showcase-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(245px, 1fr));
  gap: 1rem;
}

.resource-hub-card,
.principle-card,
.flow-card,
.role-card,
.resource-compact,
.reading-map article {
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface);
  padding: 1rem;
  box-shadow: 0 8px 22px var(--ink-a05);
}

.resource-hub-card h3,
.principle-card h3,
.flow-card h3,
.role-card h3,
.resource-compact h3,
.reading-map h3 {
  margin: 0 0 .45rem;
  color: var(--ink);
}

.resource-hub-card p,
.principle-card p,
.flow-card p,
.role-card p,
.resource-compact p,
.reading-map p {
  margin-top: 0;
  color: var(--muted);
}

.resource-hub-card p:last-child,
.principle-card p:last-child,
.flow-card p:last-child,
.role-card p:last-child,
.resource-compact p:last-child,
.reading-map p:last-child {
  margin-bottom: 0;
}

.resource-link-list {
  display: grid;
  gap: .55rem;
  margin-top: .85rem;
}

.resource-link-list a {
  display: grid;
  gap: .1rem;
  border: 1px solid var(--line);
  border-radius: 7px;
  background: var(--soft);
  color: var(--ink);
  padding: .65rem .7rem;
  text-decoration: none;
}

.resource-link-list a:hover,
.resource-link-list a:focus {
  border-color: var(--purple);
  color: var(--ink);
  text-decoration: none;
}

.resource-link-list span:first-child {
  font-weight: 700;
}

.resource-link-list span:last-child {
  color: var(--muted);
  font-size: .88rem;
  line-height: 1.3;
}

.resource-split {
  grid-template-columns: minmax(0, 1fr) minmax(260px, .85fr);
  align-items: start;
}

.resource-compact-list {
  display: grid;
  gap: .85rem;
}

.book-list {
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
}

.resource-compact a {
  font-weight: 700;
}

.flow-number {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 2rem;
  height: 2rem;
  border-radius: 50%;
  background: var(--purple);
  color: var(--on-color);
  font-weight: 700;
  margin-bottom: .65rem;
}

.start-progress-panel {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.start-progress-panel div {
  min-width: 0;
}

.journey-map,
.module-arc-grid,
.phase-track {
  display: grid;
  gap: 1rem;
}

.journey-map {
  grid-template-columns: repeat(6, minmax(150px, 1fr));
}

.journey-step {
  position: relative;
  display: grid;
  grid-template-rows: auto auto auto 1fr auto;
  gap: .55rem;
  min-height: 16rem;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface);
  padding: 1rem;
  box-shadow: 0 8px 22px var(--ink-a05);
}

.journey-step::after {
  content: "";
  position: absolute;
  top: 2.15rem;
  right: -.58rem;
  width: .9rem;
  height: .9rem;
  border-top: 2px solid var(--purple);
  border-right: 2px solid var(--purple);
  background: var(--surface);
  transform: rotate(45deg);
  z-index: 1;
}

.journey-step:last-child::after {
  display: none;
}

.journey-step__number,
.module-arc-card__stage,
.phase-card > span {
  color: var(--purple);
  font-size: .76rem;
  font-weight: 700;
  letter-spacing: .08em;
  text-transform: uppercase;
}

.journey-step__icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 2.4rem;
  height: 2.4rem;
  border-radius: 50%;
  background: var(--red-a10);
  color: var(--purple);
  font-size: 1.15rem;
}

.journey-step h3,
.phase-card h3 {
  margin: 0;
  color: var(--ink);
}

.journey-step p,
.phase-card p {
  margin: 0;
  color: var(--muted);
  font-size: .94rem;
  line-height: 1.4;
}

.journey-step__output {
  align-self: end;
  display: inline-flex;
  width: fit-content;
  border: 1px solid var(--blue-a22);
  border-radius: 999px;
  background: var(--soft);
  color: var(--blue);
  padding: .2rem .55rem;
  font-size: .78rem;
  font-weight: 700;
  line-height: 1.2;
}

.start-principle-card {
  border-top: 4px solid var(--purple);
}

.module-arc-grid {
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
}

.module-arc-card {
  display: grid;
  grid-template-columns: 2.65rem minmax(0, 1fr);
  gap: .75rem;
  min-height: 12.5rem;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface);
  color: var(--ink);
  padding: 1rem;
  text-decoration: none;
  box-shadow: 0 8px 22px var(--ink-a05);
}

.module-arc-card:hover,
.module-arc-card:focus {
  border-color: var(--purple);
  color: var(--ink);
  text-decoration: none;
  transform: translateY(-1px);
}

.module-arc-card__number {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 2.35rem;
  height: 2.35rem;
  border-radius: 50%;
  background: var(--purple);
  color: var(--on-color);
  font-weight: 700;
  line-height: 1;
}

.module-arc-card__body {
  display: grid;
  gap: .35rem;
  min-width: 0;
}

.module-arc-card__title {
  color: var(--ink);
  font-size: 1.02rem;
  font-weight: 700;
  line-height: 1.2;
}

.module-arc-card__text {
  color: var(--muted);
  font-size: .92rem;
  line-height: 1.35;
}

.module-arc-card__product {
  align-self: end;
  border-left: 3px solid var(--ulaval-yellow);
  color: var(--ink);
  font-size: .86rem;
  font-weight: 700;
  line-height: 1.25;
  margin-top: .25rem;
  padding-left: .55rem;
}

.phase-track {
  grid-template-columns: repeat(4, minmax(180px, 1fr));
}

.phase-card {
  display: grid;
  gap: .45rem;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: linear-gradient(180deg, var(--surface) 0%, var(--phase-card-end) 100%);
  padding: 1rem;
  box-shadow: 0 8px 22px var(--ink-a05);
}

.clean-steps {
  margin-bottom: 0;
}

.compact-hub {
  grid-template-columns: repeat(auto-fit, minmax(230px, 1fr));
}

.path-note {
  color: var(--blue);
}

.dataset-card h2,
.package-card h2 {
  margin: 0 0 .4rem;
  border-bottom: 0;
  padding-bottom: 0;
  font-size: 1.05rem;
}

.dataset-meta,
.dataset-actions,
.package-actions {
  display: flex;
  flex-wrap: wrap;
  gap: .45rem;
  align-items: center;
  margin-top: .7rem;
}

.dataset-meta span,
.package-actions span {
  display: inline-flex;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: var(--soft);
  color: var(--muted);
  padding: .18rem .5rem;
  font-size: .78rem;
  font-weight: 700;
  line-height: 1.1;
}

.dataset-card .dataset-download,
.package-card .dataset-download {
  margin-top: .4rem;
}

.dt-container,
.dataTables_wrapper {
  margin: .8rem 0 1rem;
}

.home-page {
  --home-bg: var(--surface);
  --home-bg-deep: var(--surface);
  --home-text: var(--home-ink);
  --home-muted: var(--home-ink-muted);
  --home-line: var(--home-ink-a18);
  display: block;
  gap: 0;
  width: 100vw;
  margin-inline: calc(50% - 50vw);
  color: var(--home-text);
  background: var(--home-bg);
}

body.page-home {
  background: var(--surface);
}

body.page-home #title-block-header {
  display: none !important;
}

body.page-home #quarto-document-content {
  margin-top: 0 !important;
  margin-bottom: 0 !important;
  padding-top: 0 !important;
}

body.page-home #quarto-content {
  grid-template-rows: [content-top] auto [content-bottom] 0 [page-bottom] !important;
}

.home-hero {
  position: relative;
  display: block;
  grid-template-columns: none;
  gap: 0;
  align-items: normal;
  min-height: calc(100svh - 62px);
  margin: 0;
  overflow: hidden;
  background: var(--surface);
}

.home-hero__inner {
  display: grid;
  grid-template-columns: minmax(0, .92fr) minmax(500px, 1.08fr);
  grid-template-rows: minmax(0, 1fr) auto;
  column-gap: clamp(3rem, 5vw, 6rem);
  align-items: center;
  width: min(92vw, 1560px);
  min-height: calc(100svh - 62px);
  margin-inline: auto;
  padding: clamp(2.8rem, 6vh, 5.5rem) 0 1.5rem;
}

.home-hero-copy {
  display: block;
  align-self: center;
  align-content: normal;
  border: 0;
  border-radius: 0;
  background: none;
  padding: 1rem 0 1.5rem;
}

.home-title {
  display: grid;
  gap: .7rem;
  max-width: 11ch;
  margin: 0;
  color: var(--home-text);
  font-size: clamp(3.2rem, 4.3vw, 5.3rem);
  font-weight: 760;
  letter-spacing: -.045em;
  line-height: 1.02;
}

.home-course-code {
  color: var(--home-text);
  font-size: clamp(1.55rem, 2.15vw, 2.45rem);
  font-weight: 520;
  letter-spacing: .015em;
  line-height: 1;
}

.home-lead {
  max-width: 38rem;
  margin: 1.8rem 0 0;
  color: var(--home-muted);
  font-size: clamp(1.04rem, 1.35vw, 1.34rem);
  line-height: 1.6;
}

.home-actions {
  display: flex;
  flex-wrap: wrap;
  gap: .9rem;
  margin-top: 2.15rem;
}

body.page-home .home-action {
  display: inline-flex;
  gap: 1.8rem;
  justify-content: space-between;
  min-width: min(18.25rem, 100%);
  min-height: 4.15rem;
  border: 1px solid var(--home-ink-a78);
  border-radius: 0;
  background: transparent;
  color: var(--home-text);
  padding: .95rem 1.3rem;
  font-size: 1rem;
  font-weight: 700;
  transition: background-color .2s ease, border-color .2s ease, color .2s ease, transform .2s ease;
}

body.page-home .home-action svg,
.home-rail-link svg {
  flex: 0 0 auto;
  width: 1.45rem;
  height: 1.45rem;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.8;
  stroke-linecap: round;
  stroke-linejoin: round;
}

body.page-home .home-action--primary {
  border-color: var(--purple);
  background: var(--purple);
  color: var(--on-color) !important;
}

body.page-home .home-action--secondary {
  border-color: var(--home-ink-a78);
  color: var(--home-text) !important;
}

body.page-home .home-action:hover,
body.page-home .home-action:focus-visible {
  border-color: var(--purple);
  color: var(--purple) !important;
  text-decoration: none;
  transform: translateY(-2px);
}

body.page-home .home-action--primary:hover,
body.page-home .home-action--primary:focus-visible {
  border-color: var(--home-text);
  background: var(--home-text);
  color: var(--on-color) !important;
  filter: none;
}

.home-visual {
  position: relative;
  display: grid;
  grid-template-columns: 1fr;
  gap: 0;
  place-items: center;
  align-self: center;
  min-height: 0;
  min-width: 0;
  border: 0;
  border-radius: 0;
  background: none;
  padding: 0 0 0 1rem;
  overflow: visible;
}

.home-visual::before {
  content: "";
  position: absolute;
  top: 3%;
  bottom: 4%;
  left: calc(clamp(3rem, 5vw, 6rem) / -2);
  width: 2px;
  background: var(--purple);
}

.home-visual::after {
  content: "";
  position: absolute;
  top: 49%;
  left: calc(clamp(3rem, 5vw, 6rem) / -2 - 6px);
  width: 14px;
  height: 14px;
  border: 2px solid var(--purple);
  border-radius: 50%;
  background: var(--home-bg);
}

.home-visual img {
  display: block;
  width: min(100%, 760px);
  height: auto;
}

.home-rail {
  grid-column: 1 / -1;
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  width: 100%;
  border-top: 1px solid var(--home-line);
}

.home-rail-link {
  position: relative;
  display: flex;
  gap: 1rem;
  align-items: center;
  justify-content: space-between;
  min-width: 0;
  border-right: 1px solid var(--home-line);
  color: var(--home-text);
  padding: 1.15rem clamp(1rem, 2vw, 2rem) .95rem;
  font-size: 1rem;
  text-decoration: none;
  transition: color .2s ease, background-color .2s ease;
}

.home-rail-link:last-child {
  border-right: 0;
  padding-right: 5rem;
}

.home-rail-link:last-child::after {
  right: 5rem;
}

.home-rail-link::after {
  content: "";
  position: absolute;
  right: clamp(1rem, 2vw, 2rem);
  bottom: .55rem;
  left: clamp(1rem, 2vw, 2rem);
  height: 2px;
  background: var(--purple);
  transform: scaleX(.86);
  transform-origin: left;
  transition: transform .2s ease, background-color .2s ease;
}

.home-rail-link:hover,
.home-rail-link:focus-visible {
  background: var(--red-a035);
  color: var(--purple);
  text-decoration: none;
}

.home-rail-link:hover::after,
.home-rail-link:focus-visible::after {
  background: var(--purple);
  transform: scaleX(1);
}

@media (max-width: 1100px) {
  .home-hero__inner {
    grid-template-columns: minmax(0, .86fr) minmax(430px, 1.14fr);
    column-gap: 3rem;
    width: min(94vw, 1000px);
  }

  .home-title {
    font-size: clamp(2.7rem, 5vw, 4rem);
  }

  .home-visual::before {
    left: -1.5rem;
  }

  .home-visual::after {
    left: calc(-1.5rem - 6px);
  }
}

@media (max-width: 860px) {
  .home-hero,
  .home-hero__inner {
    min-height: auto;
  }

  .home-hero__inner {
    grid-template-columns: 1fr;
    grid-template-rows: auto auto auto;
    gap: 2.4rem;
    width: min(90vw, 46rem);
    padding: 3.5rem 0 1rem;
  }

  .home-hero-copy {
    padding: 0;
  }

  .home-title {
    max-width: 12ch;
    font-size: clamp(3rem, 8vw, 4.7rem);
  }

  .home-visual {
    padding: 0;
  }

  .home-visual::before,
  .home-visual::after {
    display: none;
  }

  .home-rail {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .home-rail-link:nth-child(2) {
    border-right: 0;
  }

  .home-rail-link:nth-child(-n + 2) {
    border-bottom: 1px solid var(--home-line);
  }
}

.module-overview-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 1rem;
}

.module-overview-card {
  display: grid;
  grid-template-rows: auto auto auto 1fr;
  gap: .65rem;
  min-height: 18rem;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface);
  color: var(--ink);
  padding: 1rem;
  text-decoration: none;
  box-shadow: 0 8px 22px var(--ink-a05);
}

.module-overview-card:hover,
.module-overview-card:focus {
  border-color: var(--purple);
  color: var(--ink);
  text-decoration: none;
  transform: translateY(-1px);
}

.module-overview-number {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 2.35rem;
  height: 2.35rem;
  border-radius: 50%;
  background: var(--purple);
  color: var(--on-color);
  font-weight: 700;
  line-height: 1;
}

.module-overview-title {
  color: var(--ink);
  font-size: 1.08rem;
  font-weight: 700;
  line-height: 1.2;
}

.module-overview-text {
  color: var(--muted);
  font-size: .94rem;
  line-height: 1.35;
}

.module-visual {
  position: relative;
  display: block;
  min-height: 7rem;
  margin-top: .2rem;
  border-radius: var(--radius);
  background: linear-gradient(135deg, var(--visual-panel-start), var(--visual-panel-end));
  overflow: hidden;
}

.visual-dots span,
.visual-scatterline span {
  position: absolute;
  width: .7rem;
  height: .7rem;
  border-radius: 50%;
  background: var(--purple);
}

.visual-dots span:nth-child(1) { left: 18%; top: 58%; }
.visual-dots span:nth-child(2) { left: 30%; top: 40%; background: var(--blue); }
.visual-dots span:nth-child(3) { left: 48%; top: 50%; background: var(--teal); }
.visual-dots span:nth-child(4) { left: 66%; top: 28%; background: var(--ulaval-yellow); }
.visual-dots span:nth-child(5) { left: 78%; top: 38%; }

.visual-git::before,
.visual-git::after {
  content: "";
  position: absolute;
  height: 3px;
  background: var(--blue);
  left: 20%;
  right: 20%;
  top: 50%;
}

.visual-git::after {
  width: 32%;
  right: auto;
  top: 36%;
  transform: rotate(-22deg);
  transform-origin: left center;
}

.visual-git span {
  position: absolute;
  width: 1rem;
  height: 1rem;
  border-radius: 50%;
  background: var(--purple);
}

.visual-git span:nth-child(1) { left: 17%; top: 43%; }
.visual-git span:nth-child(2) { left: 43%; top: 43%; background: var(--teal); }
.visual-git span:nth-child(3) { right: 17%; top: 43%; background: var(--blue); }
.visual-git span:nth-child(4) { left: 55%; top: 18%; background: var(--ulaval-yellow); }

.visual-bars {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: .45rem;
  align-items: end;
  padding: .8rem;
}

.visual-bars span {
  display: block;
  border-radius: 6px 6px 0 0;
  background: var(--blue);
}

.visual-bars span:nth-child(1) { height: 35%; background: var(--teal); }
.visual-bars span:nth-child(2) { height: 72%; }
.visual-bars span:nth-child(3) { height: 52%; background: var(--purple); }
.visual-bars span:nth-child(4) { height: 88%; background: var(--ulaval-yellow); }

.visual-clean {
  display: grid;
  gap: .55rem;
  align-content: center;
  padding: 1rem;
}

.visual-clean span {
  display: block;
  height: 1.1rem;
  border-radius: 999px;
  background: linear-gradient(90deg, var(--purple) 0 18%, var(--surface) 18% 24%, var(--blue) 24% 58%, var(--surface) 58% 64%, var(--teal) 64% 100%);
  border: 1px solid var(--ink-a08);
}

.visual-clean span:nth-child(2) { opacity: .8; transform: translateX(1rem); }
.visual-clean span:nth-child(3) { opacity: .65; transform: translateX(.35rem); }

.visual-scatterline::before {
  content: "";
  position: absolute;
  left: 16%;
  right: 12%;
  top: 58%;
  height: 3px;
  background: var(--teal);
  transform: rotate(-18deg);
  transform-origin: left center;
}

.visual-scatterline span:nth-child(1) { left: 18%; top: 60%; }
.visual-scatterline span:nth-child(2) { left: 34%; top: 48%; background: var(--blue); }
.visual-scatterline span:nth-child(3) { left: 48%; top: 55%; background: var(--ulaval-yellow); }
.visual-scatterline span:nth-child(4) { left: 64%; top: 34%; background: var(--teal); }
.visual-scatterline span:nth-child(5) { left: 80%; top: 30%; }

.visual-join {
  display: grid;
  grid-template-columns: 1fr .5fr 1fr;
  gap: .45rem;
  align-items: center;
  padding: 1rem;
}

.visual-join span:nth-child(1),
.visual-join span:nth-child(3) {
  height: 4.6rem;
  border: 1px solid var(--blue-a25);
  border-radius: 7px;
  background: repeating-linear-gradient(to bottom, var(--surface), var(--surface) .7rem, var(--visual-fill) .7rem, var(--visual-fill) 1.4rem);
}

.visual-join span:nth-child(2) {
  height: 3px;
  background: var(--purple);
}

.visual-join span:nth-child(4) {
  position: absolute;
  left: 44%;
  top: 31%;
  width: 12%;
  height: 38%;
  border-radius: 999px;
  background: var(--teal-a18);
}

.visual-ethics {
  display: grid;
  grid-template-columns: 1fr .65fr;
  gap: .8rem;
  align-items: end;
  padding: 1rem;
}

.visual-ethics span:nth-child(1) {
  height: 4.5rem;
  border-left: 2px solid var(--visual-stroke);
  border-bottom: 2px solid var(--visual-stroke);
  background: linear-gradient(135deg, transparent 45%, var(--red-a18) 45% 55%, transparent 55%);
}

.visual-ethics span:nth-child(2) {
  height: 4.8rem;
  clip-path: polygon(50% 0, 90% 18%, 82% 76%, 50% 100%, 18% 76%, 10% 18%);
  background: var(--blue);
}

.visual-ethics span:nth-child(3) {
  display: none;
}

.visual-web span {
  position: absolute;
  border-radius: 7px;
  background: var(--surface);
  border: 1px solid var(--blue-a24);
}

.visual-web span:nth-child(1) { left: 12%; top: 16%; width: 76%; height: 1.4rem; background: var(--mockup-toolbar); }
.visual-web span:nth-child(2) { left: 18%; top: 44%; width: 22%; height: 2.4rem; }
.visual-web span:nth-child(3) { left: 42%; top: 44%; width: 22%; height: 2.4rem; background: var(--yellow-a30); }
.visual-web span:nth-child(4) { left: 66%; top: 44%; width: 16%; height: 2.4rem; background: var(--teal-a16); }

.visual-predict::before {
  content: "";
  position: absolute;
  inset: 1rem;
  border-left: 2px solid var(--visual-stroke);
  border-bottom: 2px solid var(--visual-stroke);
}

.visual-predict span {
  position: absolute;
  width: .75rem;
  height: .75rem;
  border-radius: 50%;
  background: var(--blue);
}

.visual-predict span:nth-child(1) { left: 24%; top: 58%; }
.visual-predict span:nth-child(2) { left: 42%; top: 44%; background: var(--teal); }
.visual-predict span:nth-child(3) { left: 60%; top: 36%; background: var(--purple); }
.visual-predict span:nth-child(4) { left: 76%; top: 28%; background: var(--ulaval-yellow); }

.visual-dashboard {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: .5rem;
  padding: .85rem;
}

.visual-dashboard span {
  border-radius: 7px;
  background: var(--surface);
  border: 1px solid var(--blue-a18);
}

.visual-dashboard span:nth-child(1) { background: linear-gradient(135deg, var(--red-a16), var(--surface)); }
.visual-dashboard span:nth-child(2) { background: linear-gradient(135deg, var(--teal-a18), var(--surface)); }
.visual-dashboard span:nth-child(3) { grid-column: 1 / -1; background: repeating-linear-gradient(to right, var(--surface), var(--surface) 1.2rem, var(--visual-fill) 1.2rem, var(--visual-fill) 2.4rem); }

.workflow-figure {
  margin: .2rem 0 1rem;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface);
  padding: .8rem;
  box-shadow: 0 8px 22px var(--ink-a05);
}

.workflow-figure img {
  display: block;
  width: 100%;
  height: auto;
}

.featured-covers {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: .7rem;
  align-items: end;
  justify-items: center;
  border: 1px solid var(--blue-a18);
  border-radius: var(--radius);
  background: var(--white-a72);
  padding: .85rem;
}

.featured-covers img {
  width: 100%;
  max-width: 8rem;
  aspect-ratio: 2 / 3;
  object-fit: cover;
  border-radius: 6px;
  box-shadow: 0 10px 22px var(--ink-a14);
}

.reading-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
  gap: 1rem;
}

.reading-card {
  display: grid;
  grid-template-columns: 112px minmax(0, 1fr);
  gap: 1rem;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface);
  padding: 1rem;
  box-shadow: 0 8px 22px var(--ink-a05);
}

.reading-cover-frame {
  display: flex;
  align-items: center;
  justify-content: center;
  align-self: start;
  min-height: 9.5rem;
  border-radius: 7px;
  background: var(--cover-frame-bg);
  overflow: hidden;
}

.reading-cover-frame img {
  width: 100%;
  height: 100%;
  aspect-ratio: 2 / 3;
  object-fit: cover;
}

.reading-cover-frame--contain {
  background: var(--surface);
}

.reading-cover-frame--contain img {
  height: auto;
  aspect-ratio: auto;
  object-fit: contain;
}

.reading-cover-placeholder {
  background: linear-gradient(135deg, var(--blue), var(--teal));
  color: var(--on-color);
  font-weight: 700;
  text-align: center;
  line-height: 1.15;
  padding: .7rem;
}

.reading-cover-placeholder--guide {
  background: linear-gradient(135deg, var(--purple), var(--blue));
}

.reading-cover-placeholder--quarto {
  background: linear-gradient(135deg, var(--cover-quarto), var(--teal));
}

.reading-cover-placeholder--github {
  background: linear-gradient(135deg, var(--cover-github), var(--blue));
}

.reading-card h3 {
  margin: .15rem 0 .45rem;
  color: var(--ink);
}

.reading-card p {
  color: var(--muted);
}

.reading-source {
  margin: 0;
  color: var(--purple) !important;
  font-size: .78rem;
  font-weight: 700;
  letter-spacing: .06em;
  text-transform: uppercase;
}

.reading-actions a {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 2.1rem;
  border: 1px solid var(--purple);
  border-radius: 7px;
  background: var(--purple);
  color: var(--on-color) !important;
  padding: .35rem .65rem;
  font-weight: 700;
  text-decoration: none;
}

.reading-actions a:hover,
.reading-actions a:focus {
  filter: brightness(.95);
  text-decoration: none;
}

.resource-hub-card--visual {
  display: grid;
  gap: .7rem;
}

.resource-mini-visual {
  min-height: 5.5rem;
  border-radius: var(--radius);
  background: linear-gradient(135deg, var(--visual-panel-start), var(--visual-panel-end));
  position: relative;
  overflow: hidden;
}

.book-mini::before,
.book-mini::after {
  content: "";
  position: absolute;
  top: 18%;
  width: 24%;
  height: 64%;
  border-radius: 5px;
  background: var(--blue);
  box-shadow: 0 8px 18px var(--ink-a12);
}

.book-mini::before { left: 22%; background: var(--purple); }
.book-mini::after { left: 50%; background: var(--teal); }

.package-mini::before {
  content: "";
  position: absolute;
  left: 50%;
  top: 50%;
  width: 4.2rem;
  height: 4.2rem;
  transform: translate(-50%, -50%);
  clip-path: polygon(25% 6%, 75% 6%, 100% 50%, 75% 94%, 25% 94%, 0 50%);
  background: var(--blue);
}

.data-mini {
  display: grid;
  gap: .35rem;
  align-content: center;
  padding: .75rem;
}

.data-mini::before,
.data-mini::after {
  content: "";
  display: block;
  height: 1rem;
  border-radius: 999px;
  background: linear-gradient(90deg, var(--teal) 0 35%, var(--surface) 35% 42%, var(--blue) 42% 100%);
  border: 1px solid var(--ink-a08);
}

.support-mini::before {
  content: "";
  position: absolute;
  left: 18%;
  right: 18%;
  top: 20%;
  bottom: 20%;
  border-radius: 6px;
  background: repeating-linear-gradient(to bottom, var(--surface), var(--surface) .7rem, var(--visual-fill) .7rem, var(--visual-fill) 1.4rem);
  border: 1px solid var(--blue-a20);
}

.ai-mini::before {
  content: "";
  position: absolute;
  left: 20%;
  right: 20%;
  top: 22%;
  bottom: 22%;
  border-radius: 999px;
  border: 3px solid var(--purple);
  box-shadow: 0 0 0 12px var(--red-a08);
}

.toolkit-mini::before,
.toolkit-mini::after {
  content: "";
  position: absolute;
  left: 18%;
  right: 18%;
  height: .9rem;
  border-radius: 999px;
  background: var(--blue);
}

.toolkit-mini::before { top: 32%; }
.toolkit-mini::after { top: 55%; background: var(--ulaval-yellow); }

.package-card {
  grid-template-columns: 64px minmax(0, 1fr);
  align-items: start;
}

.package-logo {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 58px;
  height: 58px;
}

.package-logo img {
  display: block;
  width: 58px;
  height: 58px;
  object-fit: contain;
}

.package-logo--fallback {
  clip-path: polygon(25% 6%, 75% 6%, 100% 50%, 75% 94%, 25% 94%, 0 50%);
  background: linear-gradient(135deg, var(--blue), var(--teal));
  color: var(--on-color);
  font-size: .9rem;
  font-weight: 700;
  letter-spacing: .02em;
}

pre, code { border-radius: 4px; }
blockquote { border-left: 4px solid var(--ulaval-yellow); padding-left: 1rem; color: var(--muted); }
.callout { border-radius: var(--radius); }

.reveal { font-size: 30px; }
.reveal h1 { font-size: 1.7em; color: var(--purple); }
.reveal h2 { font-size: 1.4em; color: var(--purple); }
.reveal h3 { font-size: 1.2em; color: var(--slide-subheading); }
.reveal p, .reveal li { font-size: 0.7em; line-height: 1.25em; }
.reveal table { font-size: 0.65em; border-collapse: collapse; }
.reveal table th { background: var(--ulaval-yellow); color: var(--slide-table-head); }
.reveal table td, .reveal table th { border: 1px solid var(--line); padding: 4px 6px; }
.reveal pre code { font-size: 0.6em; line-height: 1.3em; }
.mermaid { font-size: 0.65em; }

@media (max-width: 1100px) and (min-width: 701px) {
  .journey-map {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
  .journey-step::after {
    display: none;
  }
  .phase-track {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 700px) {
  .navbar-brand {
    max-width: calc(100vw - 10rem);
    font-size: .95rem;
  }

  .navbar .quarto-navbar-tools {
    flex-shrink: 0;
  }

  h1 {
    line-height: 1.15;
    overflow-wrap: break-word;
  }

  .portal-hero { padding: 1rem; }
  .portal-grid,
  .module-grid,
  .resource-link-grid,
  .catalog-grid,
  .package-grid,
  .home-hero,
  .home-visual,
  .module-overview-grid,
  .reading-grid,
  .resource-hero,
  .resource-split,
  .resource-hub-grid,
  .principle-grid,
  .course-flow,
  .role-grid,
  .journey-map,
  .module-arc-grid,
  .phase-track,
  .reading-map,
  .book-list,
  .module-product-showcase,
  .module-resource-panel,
  .module-quick-facts,
  .module-readiness {
    grid-template-columns: 1fr;
  }
  .start-progress-panel {
    grid-template-columns: 1fr;
  }
  .journey-step {
    min-height: auto;
  }
  .journey-step::after {
    top: auto;
    right: 50%;
    bottom: -.62rem;
    transform: translateX(50%) rotate(135deg);
  }
  .home-hero__inner {
    gap: 1.7rem;
    width: min(90vw, 34rem);
    padding: 2.35rem 0 .8rem;
  }
  .home-title {
    gap: .55rem;
    max-width: 11ch;
    font-size: clamp(2.65rem, 12.5vw, 3.65rem);
    line-height: 1.03;
  }
  .home-course-code {
    font-size: 1.45rem;
  }
  .home-lead {
    margin-top: 1.35rem;
    font-size: 1.02rem;
    line-height: 1.55;
  }
  .home-actions {
    display: grid;
    gap: .75rem;
    margin-top: 1.55rem;
  }
  body.page-home .home-action {
    width: 100%;
    min-width: 0;
    min-height: 3.7rem;
  }
  .home-visual {
    min-height: 0;
  }
  .home-visual img {
    justify-self: start;
    width: calc(100% - 2.4rem);
  }
  .home-rail {
    grid-template-columns: 1fr;
  }
  .home-rail-link,
  .home-rail-link:nth-child(2) {
    border-right: 0;
    border-bottom: 1px solid var(--home-line);
    padding: 1.05rem 4.5rem 1.05rem .9rem;
  }
  .home-rail-link:last-child {
    border-bottom: 0;
  }
  .home-rail-link::after {
    right: 4.5rem;
    left: .9rem;
  }
  .featured-covers {
    grid-template-columns: repeat(3, 1fr);
  }
  .reading-card {
    grid-template-columns: 92px minmax(0, 1fr);
  }
  .path-card summary {
    grid-template-columns: 2.15rem minmax(0, 1fr);
  }
  .module-quick-facts.three-facts {
    grid-template-columns: 1fr;
  }
  .module-fact {
    min-height: auto;
  }
  .path-preview,
  .path-resource,
  .path-toggle {
    grid-column: 2;
    justify-content: flex-start;
    text-align: left;
  }
  .step-detail {
    padding-left: 1rem;
  }
  .plan-section-detail {
    padding: 1rem;
  }
  .step-label {
    display: block;
    margin-bottom: .05rem;
  }
  .portal-button { display: block; width: fit-content; }
}

/* Feedback routines: accessible requests, navigation and a compact tracking table. */
.feedback-nav {
  display: flex;
  flex-wrap: wrap;
  gap: .65rem 1.1rem;
  padding: .85rem 1rem;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--sage-pale);
}
.feedback-nav a {
  text-underline-offset: .2em;
}
.feedback-request {
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface);
  padding: .8rem 1rem;
  margin: .2rem 0;
  min-width: 0;
}
.feedback-request summary {
  cursor: pointer;
  color: var(--ink);
}
.feedback-request[open] summary {
  margin-bottom: .8rem;
}
.feedback-request blockquote {
  margin: 0;
  padding: .2rem 0 .2rem 1rem;
  border-left: 3px solid var(--sage-border);
  color: var(--ink);
  overflow-wrap: anywhere;
}
.feedback-request blockquote p:last-child {
  margin-bottom: 0;
}
.feedback-table-wrap {
  overflow-x: auto;
}
.feedback-table {
  width: 100%;
  border-collapse: collapse;
}
.feedback-table caption {
  caption-side: top;
  color: var(--muted);
  padding-bottom: .6rem;
}
.feedback-table th,
.feedback-table td {
  padding: .8rem;
  border-bottom: 1px solid var(--line);
  vertical-align: top;
  text-align: left;
}
.feedback-table th {
  font-weight: 500;
}
.feedback-table thead {
  background: var(--sage-pale);
}
.feedback-nav a:focus-visible,
.feedback-request summary:focus-visible,
.feedback-table-wrap:focus-visible {
  outline: 3px solid var(--sage-focus);
  outline-offset: 4px;
}
@media print {
  .feedback-request > blockquote {
    display: block !important;
  }
}

/* Bloc « Dernière modification » déplacé en bas de page (date-modification-bas-page.html) */
#quarto-document-content > .quarto-title-meta {
  margin-top: 2.5rem;
  padding-top: 1rem;
  border-top: 1px solid var(--line);
  color: var(--muted);
  font-size: .85rem;
}

/* ============================================================
   AJOUTS PROPRES À STT-4300 (livre de notes Quarto)
   Palette alignée sur le thème commun : les anciennes variables --accent,
   --accent-clair, --fond-clair et --fond-fonce sont remplacées par --purple,
   --soft et --surface.
   ============================================================ */

/* Couleurs propres aux livres Quarto (légende des blocs de type théorème et boîte de notation) */
:root {
  --env-definition: #3454d1;     /* bande gauche des définitions (.env-definition) */
  --env-definition-bg: #eef1fc;  /* fond des définitions (.env-definition) */
  --env-propriete: #c9694f;      /* bande gauche des propriétés (.env-propriete), terracotta */
  --env-propriete-bg: #fbf1ee;   /* fond des propriétés (.env-propriete) */
  --env-remarque: #6b7280;       /* bande gauche des remarques (.env-remarque), gris neutre */
  --env-remarque-bg: #f2f3f5;    /* fond des remarques (.env-remarque) */
  --env-exemple-bg: #f5f0fa;     /* fond des exemples (.env-exemple) ; leur bande gauche est --purple */
  --env-theo: #4ebf90;           /* bande gauche des théorèmes (.env-theo), vert menthe */
  --env-theo-bg: #f0fdf9;        /* fond des théorèmes (.env-theo) */
  --env-logit: #e6a817;          /* bande gauche des blocs logit et log (.env-logit, .env-log), jaune ambré */
  --env-logit-bg: #fdf6e3;       /* fond des blocs logit et log (.env-logit, .env-log) */
  --notation-bg: #f0f4f8;        /* fond de la boîte de notation repliable (details.notation) */
  --solution-bg: #f0f7f1;        /* fond de la boîte de solution repliable (details.solution) */
  --solution-border: #4a9d6e;    /* bande gauche de la boîte de solution (details.solution) */
  --solution-ink: #2c7a4b;       /* titre de la boîte de solution (details.solution summary) */
}

/* ============================================================
   NAVIGATION : SIDEBAR ET TABLE DES MATIÈRES
   ============================================================ */
/* Lien actuellement sélectionné dans la sidebar de navigation (page active) */
.sidebar-item-container .sidebar-link.active,
.sidebar-item-container .active {
  color: var(--purple);
  font-weight: 600;
}

/* Lien survolé dans la sidebar de navigation */
.sidebar-item-container:hover .sidebar-link,
.sidebar-link:hover {
  color: var(--purple);
  background-color: var(--soft);
}

/* Table des matières (à droite) : entrée active et survol */
.sidebar nav[role=doc-toc] ul > li > a.active,
.sidebar nav[role=doc-toc] ul > li > ul > li > a.active {
  font-weight: bold;
  color: var(--purple) !important;
  border-left-color: var(--purple) !important;
}

.sidebar nav[role=doc-toc] ul > li > a:hover,
.sidebar nav[role=doc-toc] ul > li > ul > li > a:hover {
  color: var(--purple) !important;
  border-left-color: var(--purple) !important;
  background-color: var(--soft);
  display: block;
  width: 100%;
  box-sizing: border-box;
}

/* ============================================================
   BLOC DE TITRE (page de garde / en-tête de chapitre)
   ============================================================ */
.quarto-title-block .quarto-title-meta {
  font-size: 1.2em;
}

/* ============================================================
   ENVIRONNEMENTS DE TYPE THÉORÈME
   (définition, propriété, remarque, exemple, théorème, logit)
   ============================================================ */
.env-definition,
.env-propriete,
.env-remarque,
.env-exemple,
.env-theo,
.env-logit,
.env-log {
  margin: 1.5em 0;
  padding: 0.9em 1.2em;
  border-left: 4px solid;   /* couleur définie individuellement ci-dessous */
  border-radius: 4px;
}

.env-definition { border-left-color: var(--env-definition); background-color: var(--env-definition-bg); } /* bleu */
.env-propriete  { border-left-color: var(--env-propriete); background-color: var(--env-propriete-bg); } /* terracotta */
.env-remarque   { border-left-color: var(--env-remarque); background-color: var(--env-remarque-bg); } /* gris neutre */
.env-exemple    { border-left-color: var(--purple); background-color: var(--env-exemple-bg); } /* violet */
.env-theo       { border-left-color: var(--env-theo); background-color: var(--env-theo-bg); } /* vert menthe */
.env-logit      { border-left-color: var(--env-logit); background-color: var(--env-logit-bg); } /* jaune ambré */
.env-log        { border-left-color: var(--env-logit); background-color: var(--env-logit-bg); } /* jaune ambré */


/* Retire la marge du haut sur le premier paragraphe à l'intérieur d'un bloc,
   pour que le texte colle au titre du bloc plutôt qu'au cadre */
.env-definition p:first-child,
.env-propriete p:first-child,
.env-remarque p:first-child,
.env-exemple p:first-child {
  margin-top: 0;
}

/* Titre en gras affiché en haut de chaque bloc d'environnement (ex. "Définition 1.2") */
.env-titre {
  font-weight: bold;
  display: block;
  font-size: 1.1em;
  margin-bottom: 0.3em;
}

/* ============================================================
   BOÎTE DE NOTATION REPLIABLE (élément <details class="notation">)
   ============================================================ */
details.notation {
  background-color: var(--notation-bg);
  border-left: 4px solid var(--blue);
  border-radius: 4px;
  padding: 0.6em 1em;
  margin: 1em 0;
  font-size: 0.95em;
}

details.notation summary {
  cursor: pointer;
  font-weight: 600;
  color: var(--blue);
  list-style: none;   /* retire le marqueur natif (triangle) du navigateur */
  outline: none;
}

/* Retire spécifiquement la flèche par défaut de Chrome/Safari,
   pour la remplacer par notre propre flèche (::after ci-dessous) */
details.notation summary::-webkit-details-marker {
  display: none;
}

/* Étiquette affichée avant le texte du résumé */
details.notation summary::before {
  content: "💡 Élément de notation:";
}

/* Flèche personnalisée, alignée à droite, qui pivote à l'ouverture */
details.notation summary::after {
  content: " ▸";
  float: right;
  transition: transform 0.2s ease;
}

details.notation[open] summary::after {
  transform: rotate(90deg);
}

/* Espacement du contenu une fois la boîte dépliée */
details.notation p {
  margin: 0.5em 0 0 0;
}

/* ============================================================
   BOÎTE DE SOLUTION REPLIABLE (élément <details class="solution">)
   ============================================================ */
details.solution {
  background-color: var(--solution-bg);
  border-left: 4px solid var(--solution-border);
  border-radius: 4px;
  padding: 0.6em 1em;
  margin: 1em 0;
  font-size: 0.95em;
}

details.solution summary {
  cursor: pointer;
  font-weight: 600;
  color: var(--solution-ink);
  list-style: none;   /* retire le marqueur natif (triangle) du navigateur */
  outline: none;
}

details.solution summary::-webkit-details-marker {
  display: none;
}

/* Icône affichée avant le texte du résumé (qui contient déjà "Solution") */
details.solution summary::before {
  content: "✅ ";
}

/* Flèche personnalisée, alignée à droite, qui pivote à l'ouverture */
details.solution summary::after {
  content: " ▸";
  float: right;
  transition: transform 0.2s ease;
}

details.solution[open] summary::after {
  transform: rotate(90deg);
}

/* Espacement du contenu une fois la boîte dépliée */
details.solution p {
  margin: 0.5em 0 0 0;
}

/* ============================================================
   RÉFÉRENCES BIBLIOGRAPHIQUES (section générée par Quarto/Pandoc)
   ============================================================ */
#refs {
  margin-top: 3em;
  padding-top: 1.5em;
  border-top: 1px solid var(--purple);
}

/* Titre "Références" ajouté manuellement au-dessus de la liste,
   car Quarto ne génère pas de titre de section pour #refs */
#refs::before {
  content: "Références";
  display: block;
  font-size: 1.5em;
  font-weight: bold;
  margin-bottom: 1em;
}

/* ============================================================
   FORMULES MATHÉMATIQUES (MathJax)
   ============================================================ */
/* Empêche les formules rendues en CHTML de se couper sur plusieurs lignes */
mjx-container[jax="CHTML"] {
  white-space: nowrap;
}

#TOC > ul > li > a {
  font-weight: bold;
}

#TOC ul ul a {
  font-weight: normal;
}

#TOC ul ul {
  padding-left: 2.2em;
}