/* Documents longs de /ressources/ : harmonisation avec la charte V4 (tâche R, phase B2, 16/10/2026).
   Pages concernées : guides/copilot-m365/, conformite/ai-act.html, conformite/copilot-donnees.html (guides/openwebui-ollama/ dépublié le 17/10/2026).
   Règles de la charte : projets/01-assistant-ngage/branding/refonte-v4-2026-10/DESIGN.md.

   Ces quatre documents gardent leur navigation propre (barre du haut, ancres, menu latéral) et leur feuille de style
   intégrée, dont les variables portent déjà les couleurs V4 (--slate = bleu du logo, --orange = orange V4).
   Ce fichier, chargé APRÈS la feuille intégrée, apporte ce qui les rapproche du site :
     1. les polices auto-hébergées : Source Sans 3, Source Code Pro, et les icônes Material Symbols réduites aux
        74 icônes utilisées (9 Ko, /fonts/) : plus aucun appel à Google Fonts ;
     2. la barre du haut, l'en-tête du document et le menu latéral dans le bleu du logo, sans halo orange ;
     3. quelques composants communs aux quatre documents (étapes numérotées, cartes, blocs de prompt, tableaux) ;
     4. le menu latéral en tiroir sur téléphone (ouvert et fermé par documents-v4.js) ;
     5. la place du pied V4 à côté du menu latéral, et la mention commune qui le précède.
   Le pied V4 lui-même (et la bannière de cookies V4) est stylé par /ressources/pied-v4.css, chargé après ce fichier.
   Pourquoi pas v4.css : ses règles générales (body, h1 à h3, p, img, .section, .intro…) casseraient la mise en page de
   ces documents. */

/* ===== 1. Polices et jetons de la charte ===== */
@font-face { font-family: "Source Sans 3"; src: url("/fonts/SourceSans3-Regular.woff2") format("woff2"); font-weight: 400; font-style: normal; font-display: swap; }
@font-face { font-family: "Source Sans 3"; src: url("/fonts/SourceSans3-Bold.woff2") format("woff2"); font-weight: 700; font-style: normal; font-display: swap; }
@font-face { font-family: "Source Sans 3"; src: url("/fonts/SourceSans3-It.woff2") format("woff2"); font-weight: 400; font-style: italic; font-display: swap; }
@font-face { font-family: "Source Sans 3"; src: url("/fonts/SourceSans3-BoldIt.woff2") format("woff2"); font-weight: 700; font-style: italic; font-display: swap; }
@font-face { font-family: "Source Code Pro"; src: url("/fonts/SourceCodePro-Regular.woff2") format("woff2"); font-weight: 400; font-style: normal; font-display: swap; }
/* Icônes : instance fixe (taille 24, graisse 400, contour) limitée aux icônes des quatre documents.
   Une icône ajoutée à un document doit être ajoutée au fichier (voir task-R-report.md, phase B2). */
@font-face { font-family: "Material Symbols Outlined"; src: url("/fonts/MaterialSymbolsOutlined-ressources.woff2") format("woff2"); font-weight: 400; font-style: normal; font-display: block; }
/* Base de la classe d'icône (fournie avant par Google) : :where() lui donne une spécificité nulle, pour que les
   tailles et couleurs de la feuille intégrée l'emportent comme avant. */
:where(.material-symbols-outlined) { font-family: "Material Symbols Outlined"; font-weight: normal; font-style: normal; font-size: 24px; line-height: 1; letter-spacing: normal; text-transform: none; display: inline-block; white-space: nowrap; word-wrap: normal; direction: ltr; -webkit-font-feature-settings: "liga"; font-feature-settings: "liga"; -webkit-font-smoothing: antialiased; }

:root {
  --ngage-bleu: #265170; --ngage-ciel: #C4DAEB; --ngage-encre: #0F1E2C; --ngage-texte: #34465A;
  --ngage-blanc: #FFFFFF; --ngage-brume: #E4ECF3; --ngage-voile: #EAF0F6; --ngage-citation: #F3F7FA;
  --ngage-ia: #4F5F70; --ngage-pointille: #9DB0C2; --ngage-ponctuation: #F18925;
  --ngage-police: "Source Sans 3", Arial, sans-serif;
  --ngage-voix-ia: "Source Code Pro", Consolas, Menlo, monospace;
  --ngage-arrondi: 6px;
  color-scheme: light;
}
.point { color: var(--ngage-ponctuation); }
/* Une ancre (menu latéral, tiroir, liens de parties) amène son titre SOUS la barre fixe du haut, pas derrière */
html { scroll-padding-top: calc(var(--header-height) + 16px); }
code { font-family: var(--ngage-voix-ia); }
a:focus-visible, button:focus-visible, summary:focus-visible { outline: 2px solid var(--ngage-bleu); outline-offset: 3px; }

/* ===== 2. Barre du haut : bleu du logo, logo V4 blanc, sans ombre ===== */
.site-header { background: var(--ngage-bleu); box-shadow: none; border-bottom: 1px solid rgba(255, 255, 255, .18); }
.site-header .logo-text { display: flex; align-items: center; flex: none; color: var(--ngage-blanc); } /* l'ancien logo texte était orange */
.site-header .logo-text img { display: block; height: 30px; width: auto; }
.site-header .header-sep { color: rgba(255, 255, 255, .3); }
.site-header .header-title { flex: 1 1 auto; min-width: 0; color: var(--ngage-blanc); font-weight: 700; } /* le titre prend la place libre : badge, liens et retour vont à droite */
.site-header .header-badge { flex: none; margin-left: 1rem; background: transparent; color: var(--ngage-ciel); border: 1px solid rgba(255, 255, 255, .35); border-radius: var(--ngage-arrondi); font-size: .78rem; font-weight: 700; }
/* Liens vers les grandes parties du document (guides) : soulignement qui glisse, comme le menu du site */
.site-header .entete-sections { display: flex; gap: 18px; margin-left: 1.2rem; flex-shrink: 0; }
.site-header .entete-sections a { color: var(--ngage-blanc); text-decoration: none; font-size: .9rem; white-space: nowrap; padding: 4px 0; background: linear-gradient(currentColor, currentColor) 0 100% / 0 2px no-repeat; transition: background-size .25s ease; }
.site-header .entete-sections a:hover { background-size: 100% 2px; }
.site-header .back-link { flex: none; color: var(--ngage-blanc); border: 1.5px solid rgba(255, 255, 255, .5); border-radius: var(--ngage-arrondi); font-weight: 700; padding: .35rem .9rem; margin-left: .9rem; text-decoration: none; white-space: nowrap; font-size: .85rem; }
.site-header .back-link:hover { background: rgba(255, 255, 255, .1); border-color: var(--ngage-blanc); color: var(--ngage-blanc); }
.site-header :focus-visible { outline-color: var(--ngage-blanc); }
/* Sous 1180 px, les liens de parties laissent la place au titre : le menu latéral les porte tous */
@media (max-width: 1180px) { .site-header .entete-sections { display: none; } }

/* ===== En-tête du document : aplat bleu, sans dégradé ni halo orange ===== */
.hero { background: var(--ngage-bleu); }
.hero::before, .hero::after { content: none; display: none; }
.hero .hero-eyebrow, .hero .eyebrow { color: var(--ngage-ciel); font-family: var(--ngage-police); font-size: 1rem; font-weight: 700; text-transform: none; letter-spacing: 0; }
.hero h1 { color: var(--ngage-blanc); font-family: var(--ngage-police); font-weight: 700; letter-spacing: -0.02em; line-height: 1.08; }
.hero h1 span { color: var(--ngage-ciel); }
.hero h1 .point { color: var(--ngage-ponctuation); }
.hero .hero-subtitle, .hero p { color: var(--ngage-ciel); }
.hero .hero-disclaimer { color: var(--ngage-ciel); opacity: .85; }
.hero-card { background: rgba(255, 255, 255, .08); border-color: rgba(255, 255, 255, .2); border-radius: var(--ngage-arrondi); }
.hero-card:hover { background: rgba(255, 255, 255, .12); border-color: rgba(255, 255, 255, .45); }
.hero-card .material-symbols-outlined { color: var(--ngage-ciel); }
.hero-card h3 { color: var(--ngage-blanc); }
.hero-card p { color: var(--ngage-ciel); }
.hero .verified { color: var(--ngage-ciel); background: transparent; border-color: rgba(255, 255, 255, .3); border-radius: var(--ngage-arrondi); }
.hero .verified .material-symbols-outlined { color: var(--ngage-ciel); }

/* ===== Menu latéral : fond très clair, rubrique en cours en bleu ===== */
.sidebar { background: var(--ngage-citation); border-right-color: var(--ngage-brume); }
.sidebar-group-label { color: var(--ngage-ia); font-family: var(--ngage-police); text-transform: none; letter-spacing: 0; font-size: .8rem; } /* pas de petites capitales (charte V4) */
.sidebar a { color: var(--ngage-texte); transition: background-color .15s, color .15s, border-color .15s; } /* pas « all » : la visibilité du tiroir ne doit pas glisser (le focus n'y entrait pas) */
.sidebar a:hover { background: var(--ngage-voile); color: var(--ngage-bleu); border-left-color: var(--ngage-bleu); }
.sidebar a.active { background: var(--ngage-voile); color: var(--ngage-bleu); border-left-color: var(--ngage-bleu); font-weight: 700; }

/* Bouton du sommaire : dans la barre du haut, à gauche du logo, comme le bouton « Menu » du site (avant : flottant,
   il cachait une rubrique du menu latéral). Bouton « haut de page » : en bas à droite, bleu, coins de 6 px. */
.site-header { padding-left: 64px; }
.sidebar-toggle { position: fixed; top: 10px; bottom: auto; left: 16px; z-index: 160; width: 36px; height: 36px; display: flex; align-items: center; justify-content: center; background: transparent; color: var(--ngage-blanc); border: 1.5px solid rgba(255, 255, 255, .5); border-radius: var(--ngage-arrondi); box-shadow: none; cursor: pointer; }
.sidebar-toggle:hover { background: rgba(255, 255, 255, .1); border-color: var(--ngage-blanc); color: var(--ngage-blanc); }
.sidebar-toggle:focus-visible { outline-color: var(--ngage-blanc); }
.back-top { position: fixed; top: auto; bottom: 24px; right: 24px; z-index: 120; width: 44px; height: 44px; display: flex; align-items: center; justify-content: center; background: var(--ngage-bleu); color: var(--ngage-blanc); border: none; border-radius: var(--ngage-arrondi); box-shadow: none; cursor: pointer; }
.back-top:hover { background: var(--ngage-encre); color: var(--ngage-blanc); transform: none; }
.sidebar-toggle .material-symbols-outlined, .back-top .material-symbols-outlined { font-size: 1.35rem; color: inherit; }
/* Le bouton « haut de page » s'efface quand le pied est à l'écran (il en cachait la dernière ligne sur téléphone) ;
   le logo de la barre du haut ramène aussi en haut du document. Classe posée par documents-v4.js. */
body.pied-visible .back-top { opacity: 0; pointer-events: none; }

/* ===== 3. Composants communs du corps ===== */
article.content h2, article.content h3, article.content h4, article.content strong,
.section-break h2, .faq-group-label, details.faq summary, .tl-date { color: var(--ngage-encre); }
article.content a { color: var(--ngage-bleu); }
article.content a:hover { color: var(--ngage-encre); }
.section-break h2 { border-bottom-color: var(--ngage-bleu); }
.section-break .section-icon, .section-break .number { background: var(--ngage-voile); border-color: var(--ngage-brume); border-radius: var(--ngage-arrondi); }
.section-break .section-icon .material-symbols-outlined, .section-break .number .material-symbols-outlined { color: var(--ngage-bleu); }
.section-break .section-number { color: var(--ngage-bleu); text-transform: none; letter-spacing: 0; font-size: .85rem; }
.steps li::before { background: var(--ngage-bleu); }
/* Étapes numérotées : le numéro en marge, la phrase coule normalement. Avant, chaque morceau de la phrase (texte, gras,
   code) devenait une colonne (li en flex), et la phrase débordait de l'écran du téléphone. */
.steps li { display: block; position: relative; padding-left: 2.6rem; }
.steps li::before { position: absolute; left: 0; top: 0; margin-top: 0; }
.module-card { border-radius: var(--ngage-arrondi); }
.module-card:hover { border-color: var(--ngage-bleu); box-shadow: none; }
.module-card .material-symbols-outlined { color: var(--ngage-bleu); }
.concept-card .concept-label { color: var(--ngage-bleu); text-transform: none; letter-spacing: 0; }
/* Badges de niveau : certains titres du guide Open WebUI n'ont que la classe de couleur (niveau-debutant…) sans la classe
   de forme (niveau) et s'affichaient en grand surlignage vert. Même petite étiquette pour tous. */
.niveau-debutant, .niveau-intermediaire, .niveau-avance { display: inline-flex; align-items: center; font-size: .75rem; font-weight: 700; letter-spacing: 0; padding: .2rem .7rem; border-radius: var(--ngage-arrondi); margin-left: .5rem; vertical-align: middle; }
/* Prompts et commandes : la « voix de l'IA » de la charte (voile, cadre pointillé, police à chasse fixe),
   plus de bloc bleu nuit au milieu du texte */
.terminal { background: var(--ngage-voile); color: var(--ngage-encre); border: 1.5px dashed var(--ngage-pointille); border-radius: 2px; }
.terminal::before { color: var(--ngage-ia); font-family: var(--ngage-police); }
.terminal .comment { color: var(--ngage-ia); font-style: italic; }
.terminal .cmd { color: var(--ngage-bleu); }
details.faq summary:hover { background: var(--ngage-voile); }
details.faq summary::before { color: var(--ngage-bleu); }
.sidebar a.active, .sidebar a:hover { text-decoration: none; }

/* ===== 4. Téléphone : le menu latéral devient un tiroir (documents-v4.js pose « menu-ouvert » sur <body>) ===== */
@media (max-width: 900px) {
  .sidebar { display: block; position: fixed; top: var(--header-height); bottom: 0; left: 0; width: min(300px, 86vw); z-index: 150;
    transform: translateX(-100%); visibility: hidden; transition: transform .25s ease, visibility 0s linear .25s; }
  body.menu-ouvert .sidebar { transform: none; visibility: visible; transition: transform .25s ease; }
  body.menu-ouvert::after { content: ""; position: fixed; top: var(--header-height); right: 0; bottom: 0; left: 0; z-index: 140; background: rgba(15, 30, 44, .35); }
  .sidebar-toggle { display: flex; left: 12px; }
  .back-top { right: 16px; bottom: 16px; }
  .site-header { padding: 0 16px 0 58px; gap: 12px; }
  .site-header .header-title, .site-header .header-sep { display: none; }
  .site-header .logo-text { margin-right: auto; } /* sans le titre, le logo pousse le badge et le retour à droite */
  .site-header .header-badge { margin-left: 0; }
}
/* Téléphone : un tableau trop large défile dans son cadre au lieu d'élargir la page (certains n'ont pas de .table-wrap) */
@media (max-width: 900px) { article.content table { display: block; max-width: 100%; overflow-x: auto; } }
@media (max-width: 400px) { .site-header .header-badge { display: none; } }
@media (prefers-reduced-motion: reduce) { .sidebar, body.menu-ouvert .sidebar { transition: none; } }

/* ===== 6. Encart « Pour mettre en pratique » (audit SEO du 17/10/2026, I6) : en fin d'article, un lien sobre vers la page
   d'offre la plus proche. Voile de la charte, filet bleu, angles droits (charte : 6 px réservés aux boutons, badges, photos ; relecture du 17/10/2026), pas de titre de section (le menu latéral et le compte des démos
   lisent les titres h2 à h6). ===== */
.encart-offre { margin: 2.4rem 0 0; padding: 18px 22px; background: var(--ngage-voile); border-left: 3px solid var(--ngage-bleu); border-radius: 0; font-family: var(--ngage-police); }
.encart-offre p { margin: 0; color: var(--ngage-texte); font-size: 1rem; line-height: 1.55; }
.encart-offre .encart-offre-titre { margin-bottom: .3rem; font-weight: 700; color: var(--ngage-encre); }
.encart-offre a { color: var(--ngage-bleu); font-weight: 700; }

/* ===== 5. Pied de page V4 : ses règles sont dans /ressources/pied-v4.css (partagé avec le portail Claude). Ici, seulement
   ce qui tient au menu latéral fixe des documents : le pied commence à sa droite, comme le contenu. ===== */
.pied, .mention-document { margin-left: var(--sidebar-width); }
body.sidebar-collapsed .pied, body.sidebar-collapsed .mention-document { margin-left: 0; }
@media (max-width: 900px) { .pied, .mention-document { margin-left: 0; } }
@media print { .pied, .mention-document { margin-left: 0; } }
/* Mention commune juste avant le pied (décision de Nicolas, 16/10/2026) : discrète, dans le style du pied */
.mention-document p { max-width: 1120px; margin: 0 auto; padding: 28px 24px 12px; font-family: var(--ngage-police); font-size: .85rem; line-height: 1.55; color: var(--ngage-ia); }
