/* ============================================================
   Aide et kit imprimable (poste help_print)
   ============================================================
   1. Centre d'aide /aide.php (écran)
   2. Barre d'outils des imprimés (écran seulement)
   3. Feuilles imprimables : guide commerce, guide membre (A4), vitrine (A5 / A6)
   4. @page et impression
   Noir sur blanc à l'impression, compréhensible sans couleur. Jetons --ide-* uniquement
   (docs/DESIGN.md §1 règle 7). Aucune largeur fixe sur du texte (allemand +35 %).
   ============================================================ */

/* ---------- 1. Centre d'aide ---------- */
.ide-help { padding-top: var(--ide-space-5); padding-bottom: var(--ide-space-7); font-size: var(--ide-fs-comfort); }
.ide-help h1 { display: flex; align-items: center; gap: var(--ide-space-3); flex-wrap: wrap; }
/* Pictogramme du titre dans un disque abricot (encre dessus, 7,3:1) */
.ide-help h1 > .ide-icon { width: 3rem; height: 3rem; padding: .6rem; border-radius: 50%; background: var(--ide-accent); color: var(--ide-ink); }
.ide-help__lead { font-size: var(--ide-fs-lg); color: var(--ide-muted); margin-bottom: var(--ide-space-5); }
.ide-help__section {
  margin-top: var(--ide-space-7);
  padding-top: var(--ide-space-5);
  border-top: 2px solid var(--ide-line);
  scroll-margin-top: var(--ide-space-4);
}
.ide-help__section h2 { display: flex; align-items: center; gap: var(--ide-space-2); flex-wrap: wrap; }
.ide-help__section h2 .ide-icon { width: 2.5rem; height: 2.5rem; padding: .5rem; border-radius: 50%; color: var(--ide-primary); background: var(--ide-accent-soft); }
.ide-help__section h3 { font-size: var(--ide-fs-lg); margin-top: var(--ide-space-5); }
.ide-help__section .ide-gestures { margin-bottom: var(--ide-space-4); }

.ide-help__key {
  display: flex; gap: var(--ide-space-3); align-items: flex-start;
  padding: var(--ide-space-4) var(--ide-space-5);
  background: var(--ide-primary-soft);
  border-radius: var(--ide-radius-lg);
}
.ide-help__key > .ide-icon { flex: none; width: 2.25rem; height: 2.25rem; padding: .45rem; border-radius: 50%; color: var(--ide-primary); background: var(--ide-surface); }

.ide-help__faq {
  border: 1px solid var(--ide-line);
  border-radius: var(--ide-radius-lg);
  background: var(--ide-surface);
  box-shadow: var(--ide-shadow-sm);
  margin-bottom: var(--ide-space-2);
}
.ide-help__faq summary {
  display: flex; align-items: center; gap: var(--ide-space-2);
  min-height: var(--ide-touch);
  padding: var(--ide-space-2) var(--ide-space-4);
  font-weight: 600;
  cursor: pointer;
  list-style: none;
}
.ide-help__faq summary::-webkit-details-marker { display: none; }
/* Chevron dans une pastille ronde (sapin sur fond doux, 8,1:1) */
.ide-help__chevron {
  flex: none; box-sizing: content-box; padding: .3em; border-radius: 50%;
  color: var(--ide-primary); background: var(--ide-primary-soft);
  transition: transform var(--ide-dur-fast) var(--ide-ease); transform: rotate(-90deg);
}
.ide-help__faq[open] .ide-help__chevron { transform: none; }
.ide-help__faq p { margin: 0; padding: 0 var(--ide-space-4) var(--ide-space-4) calc(var(--ide-space-4) + 1.85em + var(--ide-space-2)); }
/* Réponse en liste de cas : un cas par ligne, pictogramme de l'état sur sa couleur (comme l'écran du commerce) */
.ide-help__faq p:has(+ .ide-help__cases) { padding-bottom: var(--ide-space-2); }
.ide-help__cases {
  list-style: none; margin: 0;
  padding: 0 var(--ide-space-4) var(--ide-space-4) calc(var(--ide-space-4) + 1.85em + var(--ide-space-2));
}
.ide-help__case { display: flex; gap: var(--ide-space-3); align-items: flex-start; padding: var(--ide-space-2) 0; }
.ide-help__case + .ide-help__case { border-top: 1px solid var(--ide-line); }
.ide-help__case-icon {
  flex: none; box-sizing: content-box;
  padding: .3em; border-radius: var(--ide-radius-pill);
  background: var(--ide-error); color: var(--ide-on-status);
}
.ide-help__case--invalid .ide-help__case-icon,
.ide-help__case--unknown .ide-help__case-icon { background: var(--ide-stop); }
.ide-help__case--refused .ide-help__case-icon { background: var(--ide-refused); color: var(--ide-on-refused); }
.ide-help__case > span { padding-top: .3em; }

.ide-help__contact {
  display: flex; gap: var(--ide-space-4); align-items: flex-start;
  margin-top: var(--ide-space-5);
  padding: var(--ide-space-4);
  background: var(--ide-surface-2);
  border-radius: var(--ide-radius-xl);
}
.ide-help__contact > .ide-icon { flex: none; width: 2.75rem; height: 2.75rem; padding: .6rem; border-radius: 50%; color: var(--ide-primary); background: var(--ide-surface); }
.ide-help__contact h3 { margin: 0 0 var(--ide-space-1); font-size: var(--ide-fs-lg); }
.ide-help__contact p { margin: 0; }
.ide-help__contact p + p { margin-top: var(--ide-space-2); }

/* ---------- 2. Barre d'outils des imprimés (écran) ---------- */
.ide-printbar {
  display: flex; flex-wrap: wrap; align-items: center; gap: var(--ide-space-3);
  padding-top: var(--ide-space-4); padding-bottom: var(--ide-space-4);
  font-size: var(--ide-fs-comfort);
}
.ide-printbar__tip { flex-basis: 100%; margin: 0; color: var(--ide-muted); }
.ide-printbar__formats { display: flex; flex-wrap: wrap; align-items: center; gap: var(--ide-space-2); }

/* ---------- 3. Feuilles imprimables ---------- */
.ide-sheet {
  box-sizing: border-box;
  position: relative;
  width: calc(100% - 2 * var(--ide-gutter));
  max-width: 210mm;
  margin: 0 auto var(--ide-space-7);
  padding: 16mm 14mm 12mm;
  background: var(--ide-surface);
  color: var(--ide-ink);
  border: 1px solid var(--ide-line);
  border-radius: var(--ide-radius-lg);
  font-size: 12pt;
  line-height: 1.45;
}
.ide-sheet--a5 { max-width: 148mm; padding: 12mm 10mm 10mm; }
.ide-sheet--a6 { max-width: 105mm; padding: 9mm 7mm 7mm; }

/* Trame guillochée légère (identité des imprimés) : bandeau du haut seulement, jamais sous un QR. */
.ide-sheet__band {
  position: absolute; top: 0; left: 0; right: 0; height: 7mm;
  border-radius: var(--ide-radius-lg) var(--ide-radius-lg) 0 0;
  background:
    repeating-radial-gradient(circle at 0 100%, transparent 0 2px, var(--ide-line) 2px 3px),
    repeating-radial-gradient(circle at 100% 100%, transparent 0 2px, var(--ide-line) 2px 3px);
  background-blend-mode: multiply;
  -webkit-print-color-adjust: exact; print-color-adjust: exact;
}

.ide-sheet__brand, .ide-sticker__brand {
  display: flex; align-items: center; gap: var(--ide-space-2);
  margin: 0 0 4mm; font-size: 14pt;
}
.ide-sheet .ide-brand__mark { width: auto; height: 9mm; -webkit-print-color-adjust: exact; print-color-adjust: exact; }
/* Mot-symbole « idemployee » (Bricolage 800 minuscule) à la taille de la ligne de marque */
.ide-sheet .ide-brand__name { font-size: 1.25em; }
.ide-sheet__title { font-size: 22pt; line-height: 1.15; margin: 0 0 2mm; }
.ide-sheet__lead { font-size: 13pt; color: var(--ide-muted); margin: 0 0 6mm; }
.ide-sheet__h { font-size: 15pt; margin: 0 0 3mm; }
.ide-sheet h2 { display: flex; align-items: center; gap: var(--ide-space-2); font-size: 14pt; margin: 0 0 3mm; }
.ide-sheet p { margin: 0 0 2mm; }

/* Les 2 gestes, numérotés, gros pictogrammes */
.ide-sheet__gestures {
  display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 60mm), 1fr)); gap: 5mm;
  list-style: none; margin: 0 0 6mm; padding: 0; counter-reset: ide-sheet-step;
}
.ide-sheet__gestures li {
  counter-increment: ide-sheet-step;
  display: flex; align-items: center; gap: 4mm;
  padding: 4mm;
  border: 2px solid var(--ide-ink);
  border-radius: var(--ide-radius-lg);
  font-size: 13pt; font-weight: 600;
}
.ide-sheet__gestures li::before {
  content: counter(ide-sheet-step);
  flex: none;
  display: inline-flex; align-items: center; justify-content: center;
  width: 10mm; height: 10mm;
  /* Pastille abricot, chiffre encre (7,3:1) ; le contour encre la garde lisible en noir et blanc */
  background: var(--ide-accent); color: var(--ide-ink);
  border: 2px solid var(--ide-ink); border-radius: var(--ide-radius-pill);
  font-family: var(--ide-font-num); font-size: 16pt; font-weight: 800;
  -webkit-print-color-adjust: exact; print-color-adjust: exact;
}
.ide-sheet__gestures .ide-icon { flex: none; color: var(--ide-ink); }

.ide-sheet__cols { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 75mm), 1fr)); gap: 4mm; margin-bottom: 4mm; }
.ide-sheet__box {
  padding: 4mm;
  border: 1px solid var(--ide-line-strong);
  border-radius: var(--ide-radius-lg);
  margin-bottom: 4mm;
  break-inside: avoid;
}
.ide-sheet__cols .ide-sheet__box { margin-bottom: 0; }
.ide-sheet__box--strong { border: 2px solid var(--ide-ink); }
.ide-sheet__box > :last-child { margin-bottom: 0; }

.ide-sheet__list, .ide-sheet__states { list-style: none; margin: 0; padding: 0; }
.ide-sheet__list li { display: flex; gap: var(--ide-space-2); align-items: flex-start; margin-bottom: 1.5mm; }
.ide-sheet__list .ide-icon { flex: none; margin-top: .1em; }
.ide-sheet__warn { display: flex; gap: var(--ide-space-2); align-items: flex-start; }
.ide-sheet__warn .ide-icon { flex: none; margin-top: .1em; }

/* Guide informatique : étapes numérotées, valeurs techniques (DNS, adresses) en chasse fixe */
.ide-sheet__steps { margin: 0; padding-left: 6mm; }
.ide-sheet__steps > li { margin-bottom: 2mm; }
.ide-sheet__steps > li::marker { font-weight: 800; }
.ide-sheet__steps > li:last-child { margin-bottom: 0; }
.ide-sheet__steps .ide-sheet__list { margin-top: 1mm; }
.ide-sheet__steps .ide-sheet__warn { margin: 1mm 0 0; }
.ide-sheet__code { font-family: var(--ide-font-mono); font-size: .92em; color: var(--ide-ink); overflow-wrap: anywhere; }

.ide-sheet__states li {
  display: grid; grid-template-columns: auto minmax(0, 12em) minmax(0, 1fr); gap: 3mm; align-items: center;
  padding: 1.5mm 0; border-bottom: 1px solid var(--ide-line);
}
.ide-sheet__states li:last-child { border-bottom: 0; }
.ide-sheet__states strong { text-transform: uppercase; }
/* Téléphone étroit (consultation à l'écran) : icône à gauche, état puis explication empilés */
@media screen and (max-width: 30em) {
  .ide-sheet__states li { grid-template-columns: auto minmax(0, 1fr); }
  .ide-sheet__states li > :first-child { grid-row: span 2; }
  .ide-sheet__states li > :not(:first-child) { grid-column: 2; }
}

.ide-sheet__foot { display: flex; gap: var(--ide-space-2); align-items: flex-start; margin: 3mm 0 0; color: var(--ide-muted); }
.ide-sheet__foot .ide-icon { flex: none; margin-top: .1em; }
.ide-sheet__foot > span { min-width: 0; overflow-wrap: anywhere; } /* adresse longue (téléphone étroit) : jamais de défilement horizontal */
.ide-sheet__foot + .ide-sheet__foot { margin-top: 1mm; }

/* Guide membre : contact à remplir à la main + QR vers l'aide */
.ide-sheet__end { display: flex; flex-wrap: wrap; gap: 6mm; align-items: flex-end; justify-content: space-between; margin-top: 2mm; }
.ide-sheet__contact { flex: 1 1 80mm; }
.ide-sheet__fill { min-height: 9mm; border-bottom: 1px solid var(--ide-ink); margin: 0 0 3mm; }
.ide-sheet__qr { width: 38mm; max-width: 38mm; flex: none; }   /* ≥ 35 mm (HERITAGE M26), zone de silence incluse dans le SVG */

/* Autocollant de vitrine */
.ide-sticker { text-align: center; }
.ide-sticker__brand { justify-content: center; font-size: 18pt; }
.ide-sticker .ide-brand__mark { width: auto; height: 14mm; }
.ide-sticker__title {
  display: flex; flex-direction: column; align-items: center; gap: 2mm;
  font-size: 26pt; line-height: 1.1; margin: 0 0 4mm;
}
/* Coche dans un disque abricot (décor de marque, pas un état), contour encre lisible sans couleur */
.ide-sticker__ok {
  width: 14mm; height: 14mm; padding: 2mm; color: var(--ide-ink); background: var(--ide-accent);
  border: 3px solid var(--ide-ink); border-radius: var(--ide-radius-pill);
  -webkit-print-color-adjust: exact; print-color-adjust: exact;
}
.ide-sticker__sub { display: flex; gap: var(--ide-space-2); align-items: center; justify-content: center; flex-wrap: wrap; font-size: 13pt; margin: 0 0 5mm; }
.ide-sticker__qr { width: 50mm; max-width: 50mm; }
.ide-sticker__url { font-weight: 700; color: var(--ide-ink); overflow-wrap: normal; word-break: normal; }
.ide-sheet--a6 .ide-sticker__title { font-size: 18pt; }
.ide-sheet--a6 .ide-sticker__brand { font-size: 14pt; }
.ide-sheet--a6 .ide-brand__mark { width: auto; height: 10mm; }
.ide-sheet--a6 .ide-sticker__ok { width: 10mm; height: 10mm; }
.ide-sheet--a6 .ide-sticker__sub { font-size: 11pt; margin-bottom: 3mm; }
.ide-sheet--a6 .ide-sticker__qr { width: 40mm; max-width: 40mm; }
.ide-sheet--a6 .ide-qr__caption { font-size: 9pt; }

/* ---------- 4. @page et impression ---------- */
@page { size: A4; margin: 12mm; }
@page ide-a5 { size: A5; margin: 8mm; }
@page ide-a6 { size: A6; margin: 6mm; }
.ide-sheet--a5 { page: ide-a5; }
.ide-sheet--a6 { page: ide-a6; }

@media print {
  .ide-printbar { display: none !important; }
  .ide-sheet {
    width: auto; max-width: none; margin: 0;
    border: 0; border-radius: 0;
    padding: 9mm 0 0;
    color: var(--ide-ink);
  }
  .ide-sheet__band { border-radius: 0; }
  .ide-sheet__lead, .ide-sheet__foot, .ide-qr__caption { color: var(--ide-ink); }
  .ide-sheet__box, .ide-sheet__gestures li { break-inside: avoid; }
  .ide-sheet .ide-qr { border: 0; padding: 0; }
  .ide-help__faq { break-inside: avoid; box-shadow: none; }

  /* Guide commerce : UNE feuille A4 dans les 5 langues (l'allemand est la plus longue). Corps ≥ 10 pt. */
  .ide-sheet--a4 { font-size: 10.5pt; line-height: 1.3; padding-top: 8mm; }
  .ide-sheet--a4 .ide-sheet__brand { margin-bottom: 1.5mm; font-size: 12pt; }
  .ide-sheet--a4 .ide-brand__mark { width: auto; height: 7mm; }
  .ide-sheet--a4 .ide-sheet__title { font-size: 18pt; margin-bottom: 1mm; }
  .ide-sheet--a4 .ide-sheet__lead { font-size: 11pt; margin-bottom: 3mm; }
  .ide-sheet--a4 .ide-sheet__gestures { grid-template-columns: 1fr 1fr; gap: 3mm; margin-bottom: 3mm; }
  .ide-sheet--a4 .ide-sheet__gestures li { padding: 2.5mm 3mm; gap: 3mm; font-size: 11.5pt; }
  .ide-sheet--a4 .ide-sheet__gestures li::before { width: 8mm; height: 8mm; font-size: 14pt; }
  .ide-sheet--a4 .ide-icon--xl { width: 10mm; height: 10mm; }
  .ide-sheet--a4 h2 { font-size: 12pt; margin-bottom: 1.5mm; }
  .ide-sheet--a4 p { margin-bottom: 1mm; }
  .ide-sheet--a4 .ide-sheet__box { padding: 2.5mm 3mm; margin-bottom: 2.5mm; }
  .ide-sheet--a4 .ide-sheet__cols { gap: 3mm; margin-bottom: 2.5mm; }
  .ide-sheet--a4 .ide-sheet__cols .ide-sheet__box { margin-bottom: 0; }
  .ide-sheet--a4 .ide-sheet__list li { margin-bottom: .6mm; }
  .ide-sheet--a4 > .ide-sheet__warn { margin-bottom: 2.5mm; }
  /* Résultats possibles : grille compacte 2 colonnes (pictogramme, mot, conduite à tenir dessous) */
  .ide-sheet--a4 .ide-sheet__states { display: grid; grid-template-columns: 1fr 1fr; column-gap: 5mm; }
  .ide-sheet--a4 .ide-sheet__states li { grid-template-columns: auto minmax(0, 1fr); grid-template-rows: auto 1fr; gap: 0 2.5mm; align-items: start; padding: 1.2mm 0; border-bottom: 0; }
  .ide-sheet--a4 .ide-sheet__states li:nth-child(n+3) { border-top: 1px solid var(--ide-line); }
  .ide-sheet--a4 .ide-sheet__states li > :first-child { grid-row: span 2; width: 8mm; height: 8mm; }
  .ide-sheet--a4 .ide-sheet__states li > :not(:first-child) { grid-column: 2; }
  .ide-sheet--a4 .ide-sheet__foot { font-size: 10pt; margin-top: 2mm; max-width: none; }
  .ide-sheet--a4 .ide-sheet__foot + .ide-sheet__foot { margin-top: .5mm; }
  .ide-sheet--a4 .ide-sheet__steps > li { margin-bottom: 1.2mm; }
}

/* ---------- Aide en bandes pleine largeur (06.10.2026, même système que la landing) ---------- */
.ide-help--bands { padding: 0; }
.ide-help__hero { text-align: center; }
.ide-help__hero h1 { justify-content: center; font-size: clamp(1.875rem, 1.2rem + 2.6vw, 3rem); margin-bottom: var(--ide-space-3); }
.ide-help__hero .ide-help__lead { margin: 0 auto var(--ide-space-6); max-width: 40rem; }
.ide-help__hero .ide-doors { max-width: 62rem; margin-inline: auto; gap: var(--ide-space-4); }
@media (min-width: 48rem) { .ide-help__hero .ide-doors { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
.ide-help--bands .ide-help__section { margin-top: 0; padding-top: clamp(3rem, 2rem + 4vw, 5.5rem); border-top: 0; }
.ide-help__inner { max-width: 50rem; }
.ide-help--bands .ide-help__section h2 { justify-content: center; text-align: center; font-size: var(--ide-fs-h2); margin-bottom: var(--ide-space-5); }
.ide-help--bands .ide-help__section h3 { margin-top: var(--ide-space-6); margin-bottom: var(--ide-space-3); }
.ide-help--bands .ide-help__section h2 + h3 { margin-top: 0; }
.ide-help--bands .ide-gestures { gap: var(--ide-space-4); margin-bottom: var(--ide-space-5); }
@media (min-width: 40rem) { .ide-help--bands .ide-gestures { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
.ide-help--bands .ide-help__faq { margin-bottom: var(--ide-space-3); }
.ide-help--bands .ide-help__contact { margin-top: var(--ide-space-6); padding: var(--ide-space-5); }
.b2b-band--brume .ide-help__contact { background: var(--ide-surface); }
.b2b-band--brume .ide-help__key { background: var(--ide-surface); }
.ide-help--bands #imprimer .ide-help__inner { max-width: 62rem; }
@media (min-width: 48rem) { .ide-help--bands #imprimer .ide-doors { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
@media (max-width: 36rem) {
  .ide-help__hero h1 { font-size: 1.75rem; }
  .ide-help--bands .ide-help__section { padding-top: 3.5rem; }
}
@media print { .ide-help--bands .ide-help__section { padding-top: var(--ide-space-4); } }
.ide-help--bands .ide-help__section h2 { flex-wrap: nowrap; }
@media (max-width: 36rem) {
  .ide-help--bands .ide-gestures { grid-template-columns: minmax(0, 1fr); }
}
