/* Guide client BDM64 — site web.
   Couleurs tirées de docs/CHARTE_GRAPHIQUE.md (Gruvbox), posées sur fond clair. */
@font-face { font-family: "Montserrat"; font-style: normal; font-weight: 100 900;
  font-display: swap; src: url("polices/Montserrat-variable.woff2") format("woff2"); }
@font-face { font-family: "Montserrat"; font-style: italic; font-weight: 100 900;
  font-display: swap; src: url("polices/Montserrat-Italic-variable.woff2") format("woff2"); }

:root {
  --ecran: #1D2021;      /* C_SCREEN */
  --bandeau: #3C3836;    /* C_BAR */
  --bank: #427B58;       /* C_BLOCK : titres */
  --accent: #FABD2F;     /* C_ACCENT : bordures */
  --accent-fonce: #B57614;
  --orange: #FE8019;     /* C_SW2 */
  --blanc: #FBF1C7;      /* C_SW1 */
  --rouge: #9D0006;      /* C_SOFT_BACK */
  --vert: #79740E;       /* C_SOFT_GO, foncé pour fond clair */
  --bleu: #076678;
  --texte: #282828;
  --discret: #665C54;
  --fond: #FFFDF6;
  --fond-doux: #F6F0DE;
  --trait: #E2D7B8;
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0; background: var(--fond); color: var(--texte);
  font-family: "Montserrat", system-ui, sans-serif; font-size: 17px; line-height: 1.6;
  overflow-wrap: break-word;
}
a { color: var(--bleu); }
a:hover { color: var(--bank); }

/* En-tête : rappel de l'écran de la machine */
.entete {
  display: flex; align-items: center; justify-content: space-between; gap: 12px;
  padding: 10px 16px; background: var(--ecran); border-bottom: 4px solid var(--accent);
}
.marque { display: flex; align-items: center; gap: 10px; color: #EBDBB2; text-decoration: none;
  font-weight: 600; }
.marque:hover { color: var(--blanc); }
.marque-bloc { background: var(--bank); color: #EBDBB2; padding: 2px 8px; border-radius: 6px;
  font-weight: 800; letter-spacing: .04em; }
.entete-version { color: #A89984; font-size: 14px; white-space: nowrap; }

.mise-en-page { max-width: 1180px; margin: 0 auto; padding: 0 16px; }
.contenu { max-width: 46rem; min-width: 0; padding: 8px 0 48px; }

/* Sommaire : <details> au téléphone, colonne à gauche sur grand écran */
.sommaire-lateral { display: none; }
.sommaire-mobile { margin: 16px 0 0; border: 2px solid var(--trait); border-radius: 6px;
  background: var(--fond-doux); }
.sommaire-mobile summary { cursor: pointer; padding: 10px 14px; font-weight: 700; color: var(--bank); }
.sommaire-mobile ol, .sommaire-lateral ol { margin: 0; padding: 0 14px 12px 14px; list-style: none; }
.sommaire-mobile li, .sommaire-lateral li { padding: 3px 0; }
.sommaire-mobile a, .sommaire-lateral a { color: var(--texte); text-decoration: none; }
.sommaire-mobile a:hover, .sommaire-lateral a:hover { text-decoration: underline; }
a[aria-current="page"] { font-weight: 700; color: var(--bank) !important;
  box-shadow: inset 3px 0 0 var(--accent); padding-left: 8px; }
.sommaire-accueil-lien { margin: 0; padding: 0 14px 4px; }

@media (min-width: 1000px) {
  .mise-en-page { display: grid; grid-template-columns: 260px minmax(0, 1fr); gap: 48px; }
  .sommaire-mobile { display: none; }
  .sommaire-lateral { display: block; position: sticky; top: 0; align-self: start;
    max-height: 100vh; overflow-y: auto; padding: 24px 0; font-size: 15px; }
  .sommaire-lateral ol { padding: 0; }
  .sommaire-titre { font-weight: 700; margin: 0 0 8px; }
  .sommaire-titre a { color: var(--bank); }
}

/* Titres */
h1, h2, h3 { line-height: 1.25; }
h1 { color: var(--bank); font-size: 2rem; font-weight: 800; margin: 28px 0 16px; }
h2 { color: var(--texte); font-size: 1.4rem; font-weight: 700; margin: 40px 0 12px;
  padding-left: 12px; border-left: 5px solid var(--accent); }
h3 { color: var(--bank); font-size: 1.12rem; font-weight: 700; margin: 28px 0 8px; }
code { font-family: ui-monospace, "DejaVu Sans Mono", monospace; font-size: .9em;
  background: var(--fond-doux); border: 1px solid var(--trait); border-radius: 4px; padding: 0 4px; }

/* Captures d'écran */
figure { margin: 24px 0; max-width: 480px; }
figure img, .contenu img { display: block; width: 100%; max-width: 480px; height: auto;
  border-radius: 6px; border: 2px solid var(--bandeau); background: var(--ecran); }
figcaption { margin-top: 6px; font-size: 14px; color: var(--discret); font-style: italic; }
.image-absente { display: flex; align-items: center; justify-content: center; width: 100%;
  max-width: 480px; aspect-ratio: 3 / 2; border: 2px dashed var(--discret); border-radius: 6px;
  color: var(--discret); background: var(--fond-doux); font-size: 14px; text-align: center; padding: 8px; }

/* Tableaux : défilement interne si besoin, jamais la page */
.tableau { overflow-x: auto; margin: 16px 0; }
table { border-collapse: collapse; width: 100%; font-size: 15px; }
th, td { text-align: left; vertical-align: top; padding: 7px 10px; border-bottom: 1px solid var(--trait); }
th { background: var(--bandeau); color: #EBDBB2; font-weight: 600; }
tbody tr:nth-child(even) td { background: var(--fond-doux); }

/* Molettes : pastille de couleur devant **Blanc** et **Orange** */
.molette { white-space: nowrap; }
.pastille { display: inline-block; width: .72em; height: .72em; border-radius: 50%;
  margin-right: .3em; vertical-align: .02em; }
.molette-blanc .pastille { background: #fff; border: 2px solid var(--texte); }
.molette-orange .pastille { background: var(--orange); border: 2px solid #AF3A03; }

/* Encadrés */
.encadre { position: relative; margin: 20px 0; padding: 12px 16px; border-radius: 6px;
  border-left: 6px solid var(--discret); background: var(--fond-doux); }
.encadre > p { margin: .4em 0; }
.encadre.attention { border-left-color: var(--rouge); background: #FBE9E5; }
.encadre.attention > p:first-of-type strong:first-child { color: var(--rouge); }
.encadre.conseil { border-left-color: var(--vert); background: #F1F1DA; }
.encadre.conseil > p:first-of-type strong:first-child { color: var(--vert); }
.encadre.option { border-left-color: var(--accent); background: #FDF3D3; }
.encadre.revoir {
  border: 3px dashed var(--orange); border-left-width: 10px; padding-top: 34px;
  background: repeating-linear-gradient(-45deg, #FFF1D6 0 12px, #FFE5B8 12px 24px);
}
.encadre-badge { position: absolute; top: 0; left: 0; background: var(--orange); color: var(--ecran);
  font-weight: 800; font-size: 13px; text-transform: uppercase; letter-spacing: .05em;
  padding: 3px 10px; border-bottom-right-radius: 6px; }
.bandeau-brouillon { margin: 16px 0 0; padding: 8px 12px; border-radius: 6px; font-weight: 600;
  background: var(--orange); color: var(--ecran); }

/* Précédent / suivant */
.pages { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; margin-top: 48px;
  padding-top: 16px; border-top: 2px solid var(--trait); }
.pages a { display: block; padding: 10px 14px; border: 2px solid var(--trait); border-radius: 6px;
  text-decoration: none; color: var(--texte); font-weight: 600; }
.pages a:hover { border-color: var(--accent); }
.pages a span { display: block; font-size: 13px; font-weight: 500; color: var(--discret); }
.pages .suiv { text-align: right; }

/* Accueil */
.chapeau { font-size: 1.1rem; }
.raccourcis { display: grid; gap: 12px; margin: 24px 0; }
@media (min-width: 640px) { .raccourcis { grid-template-columns: repeat(3, 1fr); } }
.carte { display: block; padding: 14px 16px; border: 2px solid var(--trait); border-radius: 6px;
  text-decoration: none; color: var(--texte); background: #fff; }
.carte:hover { border-color: var(--accent); }
.carte strong { display: block; color: var(--bank); }
.carte span { font-size: 14px; color: var(--discret); }
.carte-principale { border-color: var(--accent); background: #FFF8E1; }
.sommaire-accueil { padding-left: 0; list-style: none; }
.sommaire-accueil li { padding: 10px 0; border-bottom: 1px solid var(--trait); }
.sommaire-accueil a { font-weight: 700; }
.sommaire-accueil p { margin: 4px 0 0; font-size: 15px; color: var(--discret); }
.marque-brouillon { background: var(--orange); color: var(--ecran); font-size: 12px; font-weight: 700;
  border-radius: 4px; padding: 1px 6px; margin-left: 6px; text-transform: uppercase; }

.pied { border-top: 2px solid var(--trait); padding: 12px 16px; font-size: 14px; color: var(--discret);
  text-align: center; }

@media (max-width: 480px) {
  body { font-size: 16px; }
  h1 { font-size: 1.6rem; }
  .entete-version { display: none; }
  .pages { grid-template-columns: 1fr; }
  .pages .suiv { text-align: left; }
}

@media print {
  .entete, .sommaire-mobile, .sommaire-lateral, .pages, .pied { display: none; }
  .mise-en-page { display: block; }
}

/* Blocs préformatés (arborescence de clé USB…) : défilement interne */
pre { overflow-x: auto; max-width: 100%; background: var(--fond-doux); border: 1px solid var(--trait);
  border-radius: 6px; padding: 10px 12px; font-size: 14px; line-height: 1.45; }
pre code { background: none; border: 0; padding: 0; }
code { overflow-wrap: anywhere; }
