/* ==========================================================================
   FORMATION IA PROS — Modèle 2 « Signal »
   Direction : studio tech premium. Marine profond, indigo électrique,
   surfaces nettes, hairlines précises. Titres Space Grotesk, texte Inter,
   code JetBrains Mono.
   Dark mode : toutes les couleurs passent par les variables --aw-*.
   Pour activer le thème sombre plus tard : ajouter le scheme « slate »
   dans mkdocs.yml (voir design/README.md), le bloc est déjà prêt.
   ========================================================================== */

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

/* --------------------------------------------------------------------------
   1. Tokens — thème clair
   -------------------------------------------------------------------------- */
:root {
  /* Palette */
  --aw-bg:            #F5F6F8;   /* gris atelier très clair */
  --aw-surface:       #FFFFFF;   /* cartes */
  --aw-soft:          #EEF1F6;   /* fonds doux */
  --aw-border:        #E1E5EC;   /* hairlines */
  --aw-ink:           #171E30;   /* texte courant */
  --aw-ink-soft:      #5C667A;   /* texte secondaire */
  --aw-heading:       #0D1424;   /* titres */
  --aw-accent:        #4640DE;   /* indigo électrique */
  --aw-accent-strong: #3730B8;   /* hover */
  --aw-accent-soft:   #EBEAFC;   /* fond indigo pâle */
  --aw-cyan:          #38BDF8;   /* pointe froide (dégradés) */
  --aw-header-bg:     #0C1226;   /* marine nuit */
  --aw-header-fg:     #EDEFF7;   /* blanc bleuté */
  --aw-code-bg:       #101731;   /* blocs de code */
  --aw-code-fg:       #D8E1FA;
  --aw-green:         #0E9F6E;   /* checklists */
  --aw-mark:          #C7C5F9;   /* surlignage */

  /* Forme */
  --aw-radius: 10px;
  --aw-shadow: 0 1px 2px rgba(13, 20, 36, .05), 0 8px 24px rgba(13, 20, 36, .06);
  --aw-font-display: "Space Grotesk", "Inter", system-ui, sans-serif;

  /* Branchement sur les variables Material */
  --md-default-bg-color:   var(--aw-bg);
  --md-default-fg-color:   var(--aw-ink);
  --md-typeset-color:      var(--aw-ink);
  --md-typeset-a-color:    var(--aw-accent);
  --md-accent-fg-color:    var(--aw-accent);
  --md-primary-fg-color:   var(--aw-header-bg);
  --md-code-bg-color:      var(--aw-soft);
  --md-code-fg-color:      var(--aw-accent-strong);
  --md-footer-bg-color:    var(--aw-header-bg);
  --md-footer-fg-color:    var(--aw-header-fg);
}

/* --------------------------------------------------------------------------
   1b. Thème sombre — prêt à l'emploi.
   Inactif tant que « slate » n'est pas déclaré dans mkdocs.yml.
   -------------------------------------------------------------------------- */
[data-md-color-scheme="slate"] {
  --aw-bg:            #0B0F1C;
  --aw-surface:       #121829;
  --aw-soft:          #1A2138;
  --aw-border:        #26304A;
  --aw-ink:           #DDE3F0;
  --aw-ink-soft:      #8B95AC;
  --aw-heading:       #F2F5FC;
  --aw-accent:        #7C78F0;
  --aw-accent-strong: #9895F5;
  --aw-accent-soft:   #1D2140;
  --aw-header-bg:     #070B16;
  --aw-header-fg:     #EDEFF7;
  --aw-code-bg:       #070B16;
  --aw-code-fg:       #D8E1FA;
  --aw-green:         #34D399;
  --aw-mark:          #3A3670;
  --aw-shadow: 0 1px 2px rgba(0, 0, 0, .4), 0 8px 24px rgba(0, 0, 0, .35);
}

/* --------------------------------------------------------------------------
   2. Base
   -------------------------------------------------------------------------- */
.md-grid { max-width: 76rem; }

body {
  background:
    radial-gradient(1000px 340px at 78% -120px, rgba(70, 64, 222, .05), transparent 60%),
    var(--aw-bg);
  background-attachment: fixed;
}

.md-typeset {
  font-size: .8rem;
  line-height: 1.72;
  color: var(--aw-ink);
}

::selection { background: var(--aw-mark); color: var(--aw-heading); }

:focus-visible {
  outline: 2px solid var(--aw-accent);
  outline-offset: 2px;
  border-radius: 3px;
}

/* --------------------------------------------------------------------------
   3. Header — marine nuit, barre de dégradé indigo → cyan
   -------------------------------------------------------------------------- */
.md-header {
  background: var(--aw-header-bg);
  color: var(--aw-header-fg);
}
.md-header::after {
  content: "";
  position: absolute;
  left: 0; right: 0; bottom: 0;
  height: 2px;
  background: linear-gradient(90deg, var(--aw-accent), var(--aw-cyan));
  opacity: .9;
}
.md-header__title {
  font-family: var(--aw-font-display);
  font-weight: 600;
  letter-spacing: .01em;
}
.md-header__button { color: var(--aw-header-fg); opacity: .8; }
.md-header__button:hover { opacity: 1; }

/* Recherche : pastille façon ⌘K */
.md-search__form {
  background: rgba(237, 239, 247, .07);
  border: 1px solid rgba(237, 239, 247, .16);
  border-radius: 999px;
  transition: background .2s ease, border-color .2s ease;
}
.md-search__form:hover { background: rgba(237, 239, 247, .13); }
.md-search__input { color: var(--aw-header-fg); }
.md-search__input::placeholder { color: rgba(237, 239, 247, .5); }

/* --------------------------------------------------------------------------
   4. Navigation latérale — libellés small-caps façon sommaire de cours
   -------------------------------------------------------------------------- */
.md-nav--primary .md-nav__title {
  font-size: .62rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .14em;
  color: var(--aw-ink-soft);
}
.md-nav--primary .md-nav__item > .md-nav__link {
  color: var(--aw-ink-soft);
  border-radius: 7px;
  transition: color .15s ease, background .15s ease;
}
.md-nav--primary .md-nav__item > .md-nav__link:hover {
  color: var(--aw-heading);
  background: var(--aw-soft);
}
.md-nav--primary .md-nav__link--active,
.md-nav--primary .md-nav__item--active > .md-nav__link {
  color: var(--aw-accent-strong) !important;
  font-weight: 600;
  background: var(--aw-accent-soft);
}

/* Table des matières (colonne de droite) */
.md-sidebar--secondary .md-nav__title {
  font-size: .62rem;
  text-transform: uppercase;
  letter-spacing: .14em;
  color: var(--aw-ink-soft);
}
.md-nav--secondary .md-nav__link { color: var(--aw-ink-soft); transition: color .15s ease; }
.md-nav--secondary .md-nav__link:hover { color: var(--aw-accent-strong); }
.md-nav--secondary .md-nav__link--active,
.md-nav--secondary .md-nav__item--active > .md-nav__link {
  color: var(--aw-accent-strong);
  font-weight: 600;
  box-shadow: inset 2px 0 0 var(--aw-accent);
}

/* --------------------------------------------------------------------------
   5. Typographie du contenu
   -------------------------------------------------------------------------- */
.md-typeset h1,
.md-typeset h2,
.md-typeset h3,
.md-typeset h4 {
  font-family: var(--aw-font-display);
  color: var(--aw-heading);
  letter-spacing: -.015em;
}
.md-typeset h1 {
  font-size: 1.85rem;
  font-weight: 700;
  margin: 0 0 .6rem;
}
.md-typeset h2 {
  font-size: 1.28rem;
  font-weight: 600;
  margin: 2.6rem 0 .9rem;
  padding-bottom: .4rem;
  border-bottom: 1px solid var(--aw-border);
}
.md-typeset h3 {
  font-size: 1.02rem;
  font-weight: 600;
  margin: 1.9rem 0 .6rem;
  padding-left: .7rem;
  box-shadow: inset 3px 0 0 var(--aw-accent);
}
.md-typeset h4 {
  font-size: .72rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .1em;
  color: var(--aw-ink-soft);
  margin: 1.6rem 0 .5rem;
}

.md-typeset p { margin: 0 0 1.1rem; }
.md-typeset strong { color: var(--aw-heading); }
.md-typeset hr {
  border: none;
  height: 1px;
  margin: 2.6rem 0;
  background: linear-gradient(90deg, transparent, var(--aw-border) 20%, var(--aw-border) 80%, transparent);
}
.md-typeset kbd {
  background: var(--aw-surface);
  border: 1px solid var(--aw-border);
  border-bottom-width: 2px;
  border-radius: 6px;
  color: var(--aw-ink);
  box-shadow: none;
}
.md-typeset mark { background: var(--aw-mark); color: var(--aw-heading); }

/* Listes : puces carrées indigo, signature du modèle */
.md-typeset ul li::marker { color: var(--aw-accent); }
.md-typeset ul li, .md-typeset ol li { margin-bottom: .35rem; }

/* Ancres : dégager le header fixe */
.md-typeset [id] { scroll-margin-top: 4.5rem; }

/* --------------------------------------------------------------------------
   6. Liens — internes pleins, externes marqués ↗
   -------------------------------------------------------------------------- */
.md-typeset a {
  color: var(--aw-accent);
  text-decoration: none;
  border-bottom: 1px solid transparent;
  transition: color .15s ease, border-color .15s ease;
}
.md-typeset a:hover {
  color: var(--aw-accent-strong);
  border-bottom-color: var(--aw-accent-strong);
}
.md-typeset a[href^="http"]::after {
  content: "↗";
  font-size: .68em;
  margin-left: .18em;
  vertical-align: super;
  opacity: .55;
}
/* Pas de flèche sur le bouton deck */
.md-typeset p > strong > a[href*="slides/"]::after { content: none; }

/* --------------------------------------------------------------------------
   7. Bouton « Voir le deck » — pastille indigo, flèche animée
   -------------------------------------------------------------------------- */
.md-typeset p > strong > a[href*="slides/"] {
  display: inline-flex;
  align-items: center;
  gap: .5rem;
  padding: .62rem 1.25rem;
  margin: .3rem 0 1.4rem;
  background: linear-gradient(120deg, var(--aw-accent), #5B57E8);
  color: #FFFFFF !important;
  font-weight: 600;
  font-size: .78rem;
  letter-spacing: .02em;
  border: none;
  border-radius: 999px;
  box-shadow: 0 2px 10px rgba(70, 64, 222, .3);
  transition: transform .18s ease, box-shadow .18s ease, filter .18s ease;
}
.md-typeset p > strong > a[href*="slides/"]::after {
  content: "→";
  font-weight: 400;
  transition: transform .18s ease;
}
.md-typeset p > strong > a[href*="slides/"]:hover {
  transform: translateY(-1px);
  filter: brightness(1.06);
  border-bottom: none;
  box-shadow: 0 6px 18px rgba(70, 64, 222, .4);
}
.md-typeset p > strong > a[href*="slides/"]:hover::after { transform: translateX(3px); }

/* Bouton « Exporter en Markdown » (injecté par assets/export-md.js) */
.aw-export-md {
  display: inline-flex;
  align-items: center;
  gap: .4rem;
  margin: 0 0 1.4rem .6rem;
  padding: .62rem 1.1rem;
  background: var(--aw-surface);
  color: var(--aw-accent) !important;
  font-size: .74rem;
  font-weight: 600;
  letter-spacing: .02em;
  border: 1px solid var(--aw-border);
  border-radius: 999px;
  transition: border-color .18s ease, background .18s ease, color .18s ease;
}
.aw-export-md::before { content: "↓"; }
.aw-export-md:hover {
  background: var(--aw-accent-soft);
  border-color: var(--aw-accent);
  color: var(--aw-accent-strong) !important;
  text-decoration: none;
}

/* --------------------------------------------------------------------------
   8. Hero de la page d'accueil — panneau marine, grille technique, glow
   -------------------------------------------------------------------------- */
.aw-hero {
  position: relative;
  margin: 1.2rem 0 2.8rem;
  padding: 3.2rem 3.4rem 2.8rem;
  background:
    radial-gradient(600px 260px at 88% -30%, rgba(56, 189, 248, .22), transparent 60%),
    radial-gradient(700px 340px at 8% 110%, rgba(70, 64, 222, .35), transparent 60%),
    linear-gradient(115deg, #0C1226 0%, #141B3D 55%, #1B2260 100%);
  border-radius: 14px;
  box-shadow: 0 12px 40px rgba(12, 18, 38, .28);
  overflow: hidden;
}
.aw-hero::before {
  content: "";
  position: absolute;
  inset: 0;
  background-image:
    linear-gradient(rgba(237, 239, 247, .05) 1px, transparent 1px),
    linear-gradient(90deg, rgba(237, 239, 247, .05) 1px, transparent 1px);
  background-size: 44px 44px;
  mask-image: radial-gradient(70% 90% at 70% 20%, #000 30%, transparent 100%);
  pointer-events: none;
}
.aw-hero .aw-hero__kicker {
  display: inline-block;
  font-size: .62rem;
  font-weight: 700;
  letter-spacing: .2em;
  text-transform: uppercase;
  color: #9ECFFF;
  margin-bottom: 1.1rem;
}
.aw-hero h1,
.aw-hero .aw-hero__title {
  font-family: var(--aw-font-display);
  font-size: 2.4rem;
  font-weight: 700;
  line-height: 1.12;
  letter-spacing: -.02em;
  color: #FFFFFF;
  margin: 0 0 .9rem;
  border: none;
  max-width: 22ch;
}
.aw-hero .aw-hero__lead {
  font-size: .92rem;
  line-height: 1.7;
  color: rgba(237, 239, 247, .75);
  max-width: 56ch;
  margin-bottom: 1.7rem;
}
.aw-hero .aw-hero__meta {
  display: flex;
  flex-wrap: wrap;
  gap: .5rem;
  margin-bottom: 1.9rem;
}
.aw-hero .aw-hero__meta span {
  font-size: .66rem;
  font-weight: 600;
  letter-spacing: .05em;
  color: rgba(237, 239, 247, .85);
  background: rgba(237, 239, 247, .08);
  border: 1px solid rgba(237, 239, 247, .18);
  border-radius: 999px;
  padding: .32rem .85rem;
  backdrop-filter: blur(4px);
}
.aw-hero .aw-hero__cta,
.aw-hero a.aw-hero__cta {
  display: inline-block;
  padding: .68rem 1.5rem;
  background: #FFFFFF;
  color: var(--aw-header-bg) !important;
  font-weight: 700;
  font-size: .8rem;
  border: none;
  border-radius: 999px;
  box-shadow: 0 4px 16px rgba(0, 0, 0, .25);
  transition: transform .18s ease, box-shadow .18s ease;
}
.aw-hero a.aw-hero__cta:hover {
  transform: translateY(-1px);
  box-shadow: 0 8px 24px rgba(0, 0, 0, .32);
  text-decoration: none;
}

/* --------------------------------------------------------------------------
   9. Blockquotes pédagogiques — carte à liseré indigo
   -------------------------------------------------------------------------- */
.md-typeset blockquote {
  background: var(--aw-surface);
  border: 1px solid var(--aw-border);
  border-left: 3px solid var(--aw-accent);
  border-radius: 0 var(--aw-radius) var(--aw-radius) 0;
  padding: 1rem 1.3rem;
  margin: 1.4rem 0;
  color: var(--aw-ink);
  box-shadow: var(--aw-shadow);
}
.md-typeset blockquote > :first-child { margin-top: 0; }
.md-typeset blockquote > :last-child { margin-bottom: 0; }
.md-typeset blockquote strong:first-child { color: var(--aw-accent-strong); }

/* Le badge deck est injecté dans un blockquote : on neutralise le cadre,
   il ne reste que le bouton. */
.md-typeset blockquote:has(> p > strong > a[href*="slides/"]) {
  background: transparent;
  border: none;
  box-shadow: none;
  padding: 0;
  margin: .3rem 0 1.4rem;
}

/* --------------------------------------------------------------------------
   10. Admonitions & détails
   -------------------------------------------------------------------------- */
.md-typeset .admonition {
  background: var(--aw-surface);
  border: 1px solid var(--aw-border);
  border-left-width: 3px;
  border-radius: var(--aw-radius);
  box-shadow: var(--aw-shadow);
  margin: 1.4rem 0;
}
.md-typeset .admonition-title {
  font-family: var(--aw-font-display);
  font-weight: 600;
  font-size: .82rem;
  background: transparent;
  border-bottom: 1px solid var(--aw-border);
}
.md-typeset details {
  background: var(--aw-surface);
  border: 1px solid var(--aw-border);
  border-radius: var(--aw-radius);
  box-shadow: var(--aw-shadow);
}
.md-typeset details summary {
  font-weight: 600;
  color: var(--aw-heading);
  border-radius: var(--aw-radius);
}

/* --------------------------------------------------------------------------
   11. Onglets (pymdownx.tabbed)
   -------------------------------------------------------------------------- */
.md-typeset .tabbed-set {
  border-radius: var(--aw-radius);
  box-shadow: var(--aw-shadow);
  border: 1px solid var(--aw-border);
  background: var(--aw-surface);
}
.md-typeset .tabbed-labels {
  border-bottom: 1px solid var(--aw-border);
  background: var(--aw-soft);
  border-radius: var(--aw-radius) var(--aw-radius) 0 0;
}
.md-typeset .tabbed-set > label {
  font-weight: 600;
  color: var(--aw-ink-soft);
  border-bottom: 2px solid transparent;
  transition: color .15s ease, border-color .15s ease;
}
.md-typeset .tabbed-set > label:hover { color: var(--aw-accent-strong); }
.md-typeset .tabbed-set > input:checked + label {
  color: var(--aw-accent-strong);
  border-bottom-color: var(--aw-accent);
}

/* --------------------------------------------------------------------------
   12. Tableaux
   -------------------------------------------------------------------------- */
.md-typeset table:not([class]) {
  background: var(--aw-surface);
  border: 1px solid var(--aw-border);
  border-radius: var(--aw-radius);
  overflow: hidden;
  box-shadow: var(--aw-shadow);
  font-size: .74rem;
}
.md-typeset table:not([class]) th {
  background: var(--aw-header-bg);
  color: var(--aw-header-fg);
  font-weight: 600;
  letter-spacing: .05em;
  text-transform: uppercase;
  font-size: .62rem;
  border-bottom: none;
  padding: .7rem .9rem;
}
.md-typeset table:not([class]) td {
  border-top: 1px solid var(--aw-border);
  padding: .6rem .9rem;
}
.md-typeset table:not([class]) tr:hover td { background: var(--aw-accent-soft); }

/* --------------------------------------------------------------------------
   13. Code
   -------------------------------------------------------------------------- */
.md-typeset code {
  background: var(--aw-soft);
  border: 1px solid var(--aw-border);
  color: var(--aw-accent-strong);
  border-radius: 5px;
  padding: .1em .38em;
  font-size: .86em;
}
.md-typeset pre {
  border-radius: var(--aw-radius);
  box-shadow: var(--aw-shadow);
}
.md-typeset pre > code {
  background: var(--aw-code-bg);
  color: var(--aw-code-fg);
  border: 1px solid rgba(216, 225, 250, .08);
  border-radius: var(--aw-radius);
  padding: 1.1rem 1.2rem;
  font-size: .72rem;
  line-height: 1.7;
}
.md-typeset .highlight .filename {
  background: var(--aw-soft);
  border: 1px solid var(--aw-border);
  border-bottom: none;
  border-radius: var(--aw-radius) var(--aw-radius) 0 0;
  color: var(--aw-ink-soft);
  font-size: .64rem;
  font-weight: 600;
  letter-spacing: .05em;
  padding: .4rem 1rem;
}

/* --------------------------------------------------------------------------
   14. Checklists
   -------------------------------------------------------------------------- */
.md-typeset .task-list-item { padding: .12rem 0; }
.md-typeset .task-list-control .task-list-indicator::before {
  background-color: var(--aw-surface);
  border: 2px solid var(--aw-border);
  border-radius: 6px;
  transition: border-color .15s ease, background-color .15s ease;
}
.md-typeset .task-list-control:hover .task-list-indicator::before {
  border-color: var(--aw-green);
}
.md-typeset .task-list-control [type="checkbox"]:checked + .task-list-indicator::before {
  background-color: var(--aw-green);
  border-color: var(--aw-green);
}
.md-typeset .task-list-control [type="checkbox"]:checked + .task-list-indicator::after {
  color: #fff;
}

/* --------------------------------------------------------------------------
   15. Footer
   -------------------------------------------------------------------------- */
.md-footer {
  background: var(--aw-header-bg);
  color: var(--aw-header-fg);
}
.md-footer-meta { background: rgba(0, 0, 0, .3); }
.md-copyright { color: rgba(237, 239, 247, .55); }

/* --------------------------------------------------------------------------
   16. Page Support : cartes + copilote support IA
   -------------------------------------------------------------------------- */
.aw-support-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1rem;
  margin: 1.4rem 0 2.2rem;
}
.aw-support-card {
  background: var(--aw-surface);
  border: 1px solid var(--aw-border);
  border-radius: var(--aw-radius);
  box-shadow: var(--aw-shadow);
  padding: 1.2rem 1.3rem;
  display: flex;
  flex-direction: column;
  transition: transform .18s ease, box-shadow .18s ease, border-color .18s ease;
}
.aw-support-card:hover {
  transform: translateY(-2px);
  border-color: var(--aw-accent);
  box-shadow: 0 6px 20px rgba(13, 20, 36, .1);
}
.aw-support-card__title {
  font-family: var(--aw-font-display);
  font-weight: 600;
  font-size: .85rem;
  color: var(--aw-heading);
  margin: 0 0 .4rem !important;
}
.aw-support-card__text {
  font-size: .72rem;
  line-height: 1.6;
  color: var(--aw-ink-soft);
  margin: 0 0 .9rem !important;
  flex: 1;
}
.aw-support-card__link {
  font-size: .74rem;
  font-weight: 600;
  color: var(--aw-accent) !important;
}

/* --------------------------------------------------------------------------
    16b. Page plateforme : étiquettes, prix et boutons d'offre
   -------------------------------------------------------------------------- */
.aw-offer__tag {
  font-size: .66rem;
  font-weight: 700;
  letter-spacing: .08em;
  text-transform: uppercase;
  color: var(--aw-accent);
  background: var(--aw-accent-soft);
  border-radius: 999px;
  padding: .18rem .6rem;
  margin: 0 0 .7rem !important;
  align-self: flex-start;
}
.aw-offer__tag--bootcamp {
  color: var(--aw-green);
  background: rgba(14, 159, 110, .12);
}
.aw-offer__price {
  font-family: var(--aw-font-display);
  font-weight: 700;
  font-size: 1.25rem;
  color: var(--aw-heading);
  margin: 0 0 .4rem !important;
}
.aw-offer-action {
  pointer-events: auto;
  text-decoration: none;
}

/* Conteneur du chat : intégré (page Support) ou panneau flottant */
.aw-chat {
  background: var(--aw-surface);
  border: 1px solid var(--aw-border);
  border-radius: 12px;
  box-shadow: var(--aw-shadow);
  display: flex;
  flex-direction: column;
  overflow: hidden;
}
.aw-chat--inline { height: 34rem; margin: 1rem 0 2rem; }

.aw-chat-bubble {
  position: fixed;
  right: 1.4rem;
  bottom: 1.4rem;
  z-index: 99;
  width: 52px;
  height: 52px;
  border: none;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--aw-accent), #5B57E8);
  color: #fff;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 6px 20px rgba(70, 64, 222, .4);
  transition: transform .18s ease, box-shadow .18s ease;
}
.aw-chat-bubble:hover { transform: translateY(-2px) scale(1.05); }

.aw-chat--panel {
  position: fixed;
  right: 1.4rem;
  bottom: 5.4rem;
  z-index: 99;
  width: 24rem;
  max-width: calc(100vw - 2rem);
  height: 32rem;
  max-height: calc(100vh - 8rem);
  opacity: 0;
  transform: translateY(12px);
  pointer-events: none;
  transition: opacity .2s ease, transform .2s ease;
}
body.aw-chat-open .aw-chat--panel {
  opacity: 1;
  transform: none;
  pointer-events: auto;
}

.aw-chat__head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: .8rem;
  padding: .8rem 1rem;
  background: var(--aw-header-bg);
  color: var(--aw-header-fg);
}
.aw-chat__title {
  margin: 0;
  font-family: var(--aw-font-display);
  font-weight: 600;
  font-size: .78rem;
}
.aw-chat__sub { margin: 0; font-size: .6rem; opacity: .65; }
.aw-chat__actions { display: flex; align-items: center; gap: .4rem; }
.aw-chat__copy {
  background: rgba(237, 239, 247, .1);
  border: 1px solid rgba(237, 239, 247, .2);
  color: var(--aw-header-fg);
  font-size: .58rem;
  font-weight: 600;
  padding: .3rem .6rem;
  border-radius: 999px;
  cursor: pointer;
  transition: background .15s ease;
}
.aw-chat__copy:hover { background: rgba(237, 239, 247, .2); }
.aw-chat__close {
  background: none;
  border: none;
  color: var(--aw-header-fg);
  font-size: 1rem;
  cursor: pointer;
  opacity: .7;
  padding: 0 .2rem;
}
.aw-chat__close:hover { opacity: 1; }

.aw-chat__msgs {
  flex: 1;
  overflow-y: auto;
  padding: 1rem;
  display: flex;
  flex-direction: column;
  gap: .7rem;
  background: var(--aw-bg);
}
.aw-chat__msg { max-width: 88%; }
.aw-chat__msg--user { align-self: flex-end; }
.aw-chat__msg--assistant { align-self: flex-start; }
.aw-chat__msg .aw-chat__bubble {
  padding: .55rem .85rem;
  border-radius: 12px;
  font-size: .74rem;
  line-height: 1.6;
}
.aw-chat__msg--user .aw-chat__bubble {
  background: linear-gradient(135deg, var(--aw-accent), #5B57E8);
  color: #fff;
  border-bottom-right-radius: 4px;
}
.aw-chat__msg--assistant .aw-chat__bubble {
  background: var(--aw-surface);
  border: 1px solid var(--aw-border);
  color: var(--aw-ink);
  border-bottom-left-radius: 4px;
  box-shadow: var(--aw-shadow);
}
.aw-chat__msg .aw-chat__bubble p { margin: 0 0 .5rem; }
.aw-chat__msg .aw-chat__bubble p:last-child { margin-bottom: 0; }
.aw-chat__msg .aw-chat__bubble ul, .aw-chat__msg .aw-chat__bubble ol { margin: .3rem 0 .5rem; padding-left: 1.1rem; }
.aw-chat__msg .aw-chat__bubble code {
  background: var(--aw-soft);
  border: 1px solid var(--aw-border);
  color: var(--aw-accent-strong);
  border-radius: 4px;
  padding: 0 .3em;
  font-size: .9em;
}
.aw-chat__msg .aw-chat__bubble pre {
  background: var(--aw-code-bg);
  border-radius: 8px;
  padding: .7rem .8rem;
  overflow-x: auto;
  margin: .4rem 0;
}
.aw-chat__msg .aw-chat__bubble pre code {
  background: none;
  border: none;
  color: var(--aw-code-fg);
  padding: 0;
  font-size: .68rem;
  line-height: 1.6;
}
.aw-chat__msg--user .aw-chat__bubble code {
  background: rgba(255, 255, 255, .18);
  border-color: transparent;
  color: #fff;
}
.aw-chat__sources {
  font-size: .6rem;
  color: var(--aw-ink-soft);
  margin: .25rem 0 0 .2rem;
}
.aw-chat__sources a { color: var(--aw-accent) !important; }

.aw-chat__typing { display: flex; gap: .3rem; align-items: center; }
.aw-chat__typing span {
  width: 6px; height: 6px;
  border-radius: 50%;
  background: var(--aw-ink-soft);
  animation: aw-chat-dot 1.2s infinite ease-in-out;
}
.aw-chat__typing span:nth-child(2) { animation-delay: .15s; }
.aw-chat__typing span:nth-child(3) { animation-delay: .3s; }
@keyframes aw-chat-dot {
  0%, 60%, 100% { transform: none; opacity: .4; }
  30% { transform: translateY(-4px); opacity: 1; }
}

.aw-chat__form {
  display: flex;
  gap: .5rem;
  padding: .7rem;
  border-top: 1px solid var(--aw-border);
  background: var(--aw-surface);
}
.aw-chat__input {
  flex: 1;
  border: 1px solid var(--aw-border);
  border-radius: 999px;
  padding: .5rem .9rem;
  font-size: .72rem;
  background: var(--aw-bg);
  color: var(--aw-ink);
  outline: none;
  transition: border-color .15s ease;
}
.aw-chat__input:focus { border-color: var(--aw-accent); }
.aw-chat__send {
  width: 36px;
  height: 36px;
  border: none;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--aw-accent), #5B57E8);
  color: #fff;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: transform .15s ease, filter .15s ease;
}
.aw-chat__send:hover { transform: scale(1.06); filter: brightness(1.08); }

/* --------------------------------------------------------------------------
    16c. Bouton de déconnexion (basic auth)
    -------------------------------------------------------------------------- */
.aw-logout {
  background: none;
  border: none;
  cursor: pointer;
  color: var(--aw-header-fg);
  opacity: .7;
  padding: .3rem;
  margin-left: .3rem;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  transition: opacity .15s ease;
}
.aw-logout:hover { opacity: 1; }

/* --------------------------------------------------------------------------
    17. Responsive
    -------------------------------------------------------------------------- */
@media screen and (max-width: 76.1875em) {
  .md-typeset h1 { font-size: 1.55rem; }
  .aw-hero { padding: 2.2rem 1.8rem 1.9rem; }
  .aw-hero h1, .aw-hero .aw-hero__title { font-size: 1.75rem; }
  .aw-export-md { margin-left: 0; margin-top: .4rem; }
}
@media screen and (max-width: 44.9375em) {
  .md-typeset { font-size: .76rem; }
  .aw-hero { padding: 1.7rem 1.3rem 1.5rem; border-radius: 12px; }
  .aw-hero h1, .aw-hero .aw-hero__title { font-size: 1.45rem; }
  .md-typeset p > strong > a[href*="slides/"] { width: 100%; justify-content: center; }
  .aw-export-md { width: 100%; justify-content: center; margin: .4rem 0 1.2rem; }
  .aw-support-grid { grid-template-columns: 1fr; }
  .aw-chat--inline { height: 28rem; }
  .aw-chat--panel { right: 0; bottom: 0; width: 100vw; max-width: 100vw; height: 80vh; max-height: 80vh; border-radius: 14px 14px 0 0; }
  .aw-chat-bubble { right: 1rem; bottom: 1rem; }
}

/* --------------------------------------------------------------------------
   18. Impression — page de cours propre, sans chrome
   -------------------------------------------------------------------------- */
@media print {
  .md-header,
  .md-sidebar,
  .md-footer,
  .md-nav,
  .md-search,
  .md-content__button,
  .aw-export-md,
  .aw-chat,
  .aw-chat-bubble,
  .md-typeset p > strong > a[href*="slides/"],
  .md-typeset .headerlink {
    display: none !important;
  }

  body { background: #fff !important; }
  .md-main__inner { margin: 0; max-width: 100%; }
  .md-content { margin: 0; }
  .md-grid { max-width: 100%; }

  .md-typeset { font-size: 11pt; color: #000; }
  .md-typeset h1, .md-typeset h2, .md-typeset h3, .md-typeset h4 { color: #000; box-shadow: none; padding-left: 0; }
  .md-typeset h2 { page-break-after: avoid; }
  .md-typeset h3, .md-typeset h4 { page-break-after: avoid; }
  .md-typeset a { color: #000; border-bottom: none; }
  .md-typeset a[href^="http"]::after {
    content: " (" attr(href) ")";
    font-size: 8.5pt;
    vertical-align: baseline;
    opacity: .7;
  }
  .md-typeset blockquote,
  .md-typeset .admonition,
  .md-typeset details,
  .md-typeset pre,
  .md-typeset table:not([class]),
  .aw-hero {
    box-shadow: none;
    border: 1px solid #bbb;
    page-break-inside: avoid;
  }
  .md-typeset pre > code {
    background: #f5f5f5;
    color: #000;
    border: 1px solid #bbb;
    white-space: pre-wrap;
    word-break: break-word;
  }
  .md-typeset code { background: #f5f5f5; color: #000; border-color: #ccc; }
  .aw-hero { background: #fff; }
  .aw-hero h1, .aw-hero .aw-hero__title, .aw-hero .aw-hero__kicker { color: #000; }
  .aw-hero .aw-hero__lead { color: #333; }
  .aw-hero .aw-hero__meta span { color: #333; border-color: #bbb; background: #f5f5f5; }
}
