/* Vitrine ERP Suisse — reprend les tokens du système de design ERP (sobre, dense, contrasté).
   Aucune police distante, aucune animation, aucun script. */

:root {
  --fond: #f4f5f7;
  --surface: #ffffff;
  --texte: #1b1f24;
  --texte-secondaire: #4b5563;
  --bordure: #dde1e6;
  --bordure-forte: #6b7380;
  --primaire: #1d4ea0;
  --primaire-survol: #163d7d;
  --focus: #b54708;
  --avertissement: #7a4a00;
  --avertissement-fond: #fff6e0;
  --succes: #17643a;
  --succes-fond: #edf7f0;
  --info-fond: #eef3fb;
  --police: system-ui, -apple-system, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
  --e1: 4px;
  --e2: 8px;
  --e3: 12px;
  --e4: 16px;
  --e5: 24px;
  --e6: 40px;
  --rayon: 4px;
  --largeur: 1180px;
}

*, *::before, *::after { box-sizing: border-box; }
html { font-size: 15px; }
body {
  margin: 0;
  font-family: var(--police);
  color: var(--texte);
  background: var(--fond);
  line-height: 1.55;
}
a { color: var(--primaire); text-underline-offset: 3px; }
a:hover { color: var(--primaire-survol); }
:focus-visible { outline: 2px solid var(--focus); outline-offset: 2px; }
img { max-width: 100%; height: auto; }
h1, h2, h3 { line-height: 1.2; margin: 0 0 var(--e3); }
h1 { font-size: clamp(1.8rem, 4vw, 2.6rem); letter-spacing: -0.02em; }
h2 { font-size: 1.35rem; margin-top: var(--e6); }
h3 { font-size: 1.05rem; }
p { margin: 0 0 var(--e3); }
ul, ol { margin: 0 0 var(--e3); padding-left: 1.3rem; }
li + li { margin-top: var(--e1); }
code, pre { font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; }
code { background: var(--info-fond); padding: 1px 4px; border-radius: 3px; font-size: 0.92em; }
pre { background: #1b1f24; color: #f4f5f7; padding: var(--e4); border-radius: var(--rayon); overflow-x: auto; }
pre code { background: none; padding: 0; color: inherit; }

.evitement { position: absolute; left: -9999px; top: 0; background: var(--surface); padding: var(--e2) var(--e3); z-index: 10; }
.evitement:focus { left: var(--e3); top: var(--e3); }

.entete { background: var(--surface); border-bottom: 1px solid var(--bordure); position: sticky; top: 0; z-index: 5; }
.entete__int {
  max-width: var(--largeur); margin: 0 auto; padding: var(--e3) var(--e4);
  display: flex; align-items: center; justify-content: space-between; gap: var(--e4); flex-wrap: wrap;
}
.marque { font-weight: 700; font-size: 1.05rem; color: var(--texte); text-decoration: none; }
.marque__mention { font-weight: 500; font-size: 0.75rem; color: var(--texte-secondaire); border: 1px solid var(--bordure); border-radius: 999px; padding: 1px 8px; margin-left: 6px; vertical-align: middle; }
.entete nav { display: flex; flex-wrap: wrap; gap: var(--e1) var(--e4); }
.entete nav a { color: var(--texte-secondaire); text-decoration: none; font-size: 0.92rem; padding: var(--e1) 0; }
.entete nav a:hover { color: var(--primaire); text-decoration: underline; }

.bandeau-dev {
  margin: 0; padding: var(--e2) var(--e4);
  background: var(--avertissement-fond); color: var(--avertissement);
  border-bottom: 1px solid #e8d5a8; text-align: center; font-size: 0.82rem;
}

main { max-width: var(--largeur); margin: 0 auto; padding: var(--e6) var(--e4); }
section + section { margin-top: var(--e6); }
.lead { font-size: 1.12rem; color: var(--texte-secondaire); max-width: 62ch; }
.muette { color: var(--texte-secondaire); font-size: 0.9rem; }

.heros { display: grid; grid-template-columns: 1.05fr 1fr; gap: var(--e6); align-items: center; }
.heros__actions { display: flex; flex-wrap: wrap; gap: var(--e3); margin-top: var(--e5); }
.bouton {
  display: inline-block; background: var(--primaire); color: #fff; text-decoration: none;
  padding: 10px 16px; border-radius: var(--rayon); font-weight: 600; font-size: 0.95rem;
}
.bouton:hover { background: var(--primaire-survol); color: #fff; }
.bouton--secondaire { background: var(--surface); color: var(--primaire); border: 1px solid var(--bordure-forte); }
.bouton--secondaire:hover { background: var(--info-fond); color: var(--primaire-survol); }

figure { margin: 0; }
figure img { border: 1px solid var(--bordure); border-radius: var(--rayon); box-shadow: 0 1px 2px rgb(0 0 0 / 0.05); }
figcaption { color: var(--texte-secondaire); font-size: 0.82rem; margin-top: var(--e2); }

.grille { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: var(--e4); }
.grille--deux { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.carte { background: var(--surface); border: 1px solid var(--bordure); border-radius: var(--rayon); padding: var(--e4); }
.carte h3 { margin-bottom: var(--e2); }
.carte p { margin: 0; color: var(--texte-secondaire); font-size: 0.92rem; }
.carte__lien { display: inline-block; margin-top: var(--e3); font-size: 0.9rem; font-weight: 600; }

.encart { background: var(--surface); border: 1px solid var(--bordure); border-left: 3px solid var(--primaire); border-radius: var(--rayon); padding: var(--e4); }
.encart--avertissement { border-left-color: var(--avertissement); background: var(--avertissement-fond); }
.encart--succes { border-left-color: var(--succes); background: var(--succes-fond); }
.encart p:last-child, .encart ul:last-child { margin-bottom: 0; }

table { border-collapse: collapse; width: 100%; background: var(--surface); font-size: 0.9rem; }
th, td { border: 1px solid var(--bordure); padding: var(--e2) var(--e3); text-align: left; vertical-align: top; }
th { background: var(--fond); font-weight: 600; }
.tableau-defilant { overflow-x: auto; }

.liste-propre { list-style: none; padding: 0; }
.liste-propre li { padding-left: 1.4rem; position: relative; }
.liste-propre li::before { content: '—'; position: absolute; left: 0; color: var(--texte-secondaire); }

.etapes { counter-reset: etape; list-style: none; padding: 0; }
.etapes li { counter-increment: etape; position: relative; padding-left: 2.4rem; margin-bottom: var(--e3); }
.etapes li::before {
  content: counter(etape); position: absolute; left: 0; top: 0;
  width: 1.7rem; height: 1.7rem; border-radius: 50%; background: var(--primaire); color: #fff;
  display: grid; place-items: center; font-size: 0.8rem; font-weight: 700;
}

.pied { border-top: 1px solid var(--bordure); background: var(--surface); margin-top: var(--e6); }
.pied__int { max-width: var(--largeur); margin: 0 auto; padding: var(--e5) var(--e4); color: var(--texte-secondaire); font-size: 0.85rem; }
.pied p { margin: 0 0 var(--e2); }

/* Documentation générée */
.doc { background: var(--surface); border: 1px solid var(--bordure); border-radius: var(--rayon); padding: var(--e5); max-width: 900px; }
.doc h1 { font-size: 1.7rem; }
.doc h2 { font-size: 1.25rem; margin-top: var(--e5); padding-top: var(--e3); border-top: 1px solid var(--bordure); }
.doc h3 { font-size: 1.05rem; margin-top: var(--e4); }
.doc table { display: block; overflow-x: auto; }
.doc pre { font-size: 0.85rem; }
.doc blockquote { margin: var(--e3) 0; padding-left: var(--e4); border-left: 3px solid var(--bordure); color: var(--texte-secondaire); }
.doc .sommaire { background: var(--fond); border: 1px solid var(--bordure); border-radius: var(--rayon); padding: var(--e4); }
.doc .sommaire ul { columns: 2; column-gap: var(--e5); }
.doc .retour { font-size: 0.9rem; margin-bottom: var(--e4); }

/* Flyers imprimables */
.flyer {
  background: var(--surface); border: 1px solid var(--bordure); border-radius: var(--rayon);
  padding: var(--e6); margin: 0 0 var(--e5); max-width: 210mm;
}
.flyer h2 { margin-top: 0; font-size: 1.6rem; }
.flyer .accroche { font-size: 1.05rem; color: var(--texte-secondaire); }
.flyer figure { margin-top: var(--e4); }
.flyer .pied-flyer { border-top: 1px solid var(--bordure); margin-top: var(--e5); padding-top: var(--e3); font-size: 0.78rem; color: var(--texte-secondaire); }

@media (max-width: 900px) {
  .heros { grid-template-columns: 1fr; gap: var(--e5); }
  .grille, .grille--deux { grid-template-columns: 1fr 1fr; }
  .doc .sommaire ul { columns: 1; }
}
@media (max-width: 600px) {
  html { font-size: 14px; }
  .entete__int { align-items: flex-start; }
  .entete nav { gap: var(--e1) var(--e3); }
  .grille, .grille--deux { grid-template-columns: 1fr; }
  main { padding: var(--e5) var(--e3); }
  .flyer { padding: var(--e5); }
}

@media print {
  .entete, .bandeau-dev, .pied, .heros__actions, .bouton, .retour, .sommaire, .pas-imprimer { display: none !important; }
  body { background: #fff; }
  main { max-width: none; padding: 0; }
  .flyer { border: 0; border-radius: 0; padding: 12mm; margin: 0; max-width: none; page-break-after: always; }
  .flyer:last-of-type { page-break-after: auto; }
  a { color: inherit; text-decoration: none; }
}
