/* « Chercher dans le guide » (recherche.js, 30-11-2026, demande d'Harlem : « un champ de recherche avec un système
   d'auto-complétion, même si l'orthographe n'est pas exacte »). Sert aux deux guides.
   Dans le fil, toujours à l'écran, juste avant l'interrupteur clair / sombre. Sur ordinateur : le champ lui-même.
   Sur téléphone : une loupe, qui ouvre le champ en haut de l'écran, sur toute la largeur.
   Rien à l'impression (le PDF ne change pas). Les mots trouvés : surlignés ET en gras (jamais la couleur seule). */
.cherche-guide{display:none}
@media screen{
  .js .cherche-guide{display:flex;align-items:center;position:relative;margin-left:auto;flex:none}
  .avec-recherche .fil #theme{margin-left:10px}
  .cg-cache{position:absolute;width:1px;height:1px;overflow:hidden;clip:rect(0 0 0 0);white-space:nowrap}
  .cg-loupe{display:none;align-items:center;justify-content:center;width:44px;height:40px;padding:0;border:0;border-radius:999px;background:var(--puce);color:var(--encre);cursor:pointer}
  .cg-loupe svg{width:19px;height:19px}
  .cg-zone{display:flex;align-items:center;gap:8px;width:250px;height:40px;padding:0 10px 0 13px;border-radius:999px;background:var(--puce);transition:width .2s ease}
  .cg-zone:focus-within{width:340px;box-shadow:0 0 0 2px var(--bleu)}
  .cg-icone{flex:none;width:17px;height:17px;color:var(--doux)}
  .cg-champ{flex:1;min-width:0;height:100%;padding:0;border:0;background:transparent;color:var(--encre);font:inherit;font-size:15px;outline:none;-webkit-appearance:none;appearance:none}
  .cg-champ::placeholder{color:var(--doux);opacity:1}
  .cg-champ::-webkit-search-cancel-button{display:none}
  .cg-touche{flex:none;min-width:22px;padding:1px 6px;border:1px solid var(--trait);border-radius:6px;font:600 12px/1.4 inherit;color:var(--doux);text-align:center}
  .cg-zone:focus-within .cg-touche{display:none}
  .cg-fermer{display:none;flex:none;min-height:40px;padding:0 4px 0 8px;border:0;background:none;color:var(--encre);font:inherit;font-size:15px;font-weight:700;cursor:pointer}
  .cg-panneau{position:absolute;top:calc(100% + 8px);right:0;z-index:30;width:min(460px,calc(100vw - 24px));max-height:min(520px,70vh);overflow:auto;
    padding:6px;border:1px solid var(--trait);border-radius:16px;background:var(--carte);box-shadow:0 12px 32px rgba(14,20,48,.16)}
  .cg-panneau[hidden]{display:none}
  .cg-dit{margin:0;padding:8px 10px 6px;font-size:13.5px;line-height:1.5;color:var(--doux)}
  .cg-dit:empty{display:none}
  .cg-exemple{display:inline-block;margin:3px 2px 0 0;padding:5px 11px;border:0;border-radius:999px;background:var(--puce);color:var(--encre);font:inherit;font-size:14px;font-weight:600;cursor:pointer}
  .cg-exemple:hover{background:var(--trait)}
  .cg-liste{list-style:none;margin:0;padding:0}
  .cg-ligne{display:grid;gap:3px;padding:10px 12px;border-radius:12px;cursor:pointer}
  .cg-ligne[aria-selected=true]{background:var(--puce)}
  .cg-haut{display:flex;align-items:baseline;gap:9px}
  .cg-num{flex:none;display:inline-flex;align-items:center;justify-content:center;min-width:24px;height:24px;padding:0 6px;border-radius:999px;background:var(--encre);color:var(--fond);font-size:13px;font-weight:700;transform:translateY(-1px)}
  .cg-titre{font-size:16px;font-weight:700;line-height:1.3;color:var(--encre)}
  .cg-guide{font-size:12.5px;font-weight:600;color:var(--doux)}
  .cg-phrase{font-size:14px;line-height:1.4;color:var(--doux)}
  .cg-ligne mark{padding:0 2px;border-radius:3px;background:rgba(255,106,26,.24);color:var(--encre);font-weight:700}
  :root[data-theme=sombre] .cg-ligne mark{background:rgba(255,140,80,.3)}
  :root[data-theme=sombre] .cg-panneau{box-shadow:0 12px 32px rgba(0,0,0,.45)}
  /* l'étape choisie : son titre s'allume un instant, à l'arrivée */
  .etape.trouvee h2,.coince.trouvee h2{animation:cg-trouvee 2.4s ease-out}
  @keyframes cg-trouvee{0%,35%{background:rgba(255,106,26,.26);box-shadow:0 0 0 6px rgba(255,106,26,.26)}100%{background:transparent;box-shadow:0 0 0 6px transparent}}
}
@media screen and (prefers-reduced-motion:reduce){.cg-zone{transition:none}.etape.trouvee h2,.coince.trouvee h2{animation:none;text-decoration:underline;text-decoration-thickness:3px}}
/* Téléphone, tablette et petit ordinateur (jusqu'à 1150 px : au-delà, le champ entier tient à côté des 14 numéros) : la loupe
   seule ; touchée, le champ s'ouvre en haut de l'écran, sur toute la largeur. */
@media screen and (max-width:1150px){
  .js .cherche-guide .cg-loupe{display:inline-flex}
  .cg-zone{display:none}
  .cherche-guide.ouverte .cg-zone{display:flex;position:fixed;top:0;left:0;right:0;z-index:40;width:auto;height:60px;padding:0 14px 0 16px;
    border-radius:0;background:var(--fond);border-bottom:1px solid var(--trait)}
  .cherche-guide.ouverte .cg-zone:focus-within{width:auto;box-shadow:none}
  .cg-champ{font-size:17px}   /* 16 px au moins : l'iPhone ne zoome pas sur le champ */
  .cg-touche{display:none}
  .cherche-guide.ouverte .cg-fermer{display:block}
  .cherche-guide.ouverte .cg-panneau{position:fixed;top:60px;left:0;right:0;width:auto;max-height:calc(100vh - 60px);
    border:0;border-bottom:1px solid var(--trait);border-radius:0 0 16px 16px;padding:6px 8px 10px}
  .cg-loupe{width:40px;height:34px}
}
@media screen and (min-width:801px) and (max-width:1150px){
  /* tablette, petit ordinateur : la liste reste à la largeur d'une lecture, au milieu */
  .cherche-guide.ouverte .cg-panneau{left:max(0px,calc(50% - 340px));right:max(0px,calc(50% - 340px));border:1px solid var(--trait);border-top:0}
}
@media screen and (max-width:900px){
  /* guide des commerciaux : la loupe à droite de « Étape 5 sur 15 », au-dessus de l'interrupteur
     (02-12-2026 : huit numéros par ligne et 900 px, comme le fil de guide/guide.css) */
  .commerciaux:not(.admins) .fil .cherche-guide{grid-column:9;grid-row:1;justify-self:end;margin-left:8px}
  .commerciaux:not(.admins) .fil .fil-ou{grid-column:1 / 9}
}
/* Guide des admins sur téléphone (30-11-2026) : ses 10 numéros et l'interrupteur dépassaient DÉJÀ de l'écran (446 px de large
   sur un écran de 375 : la page glissait de côté, l'interrupteur était caché). Avec la loupe : les numéros sur deux lignes de
   cinq, la loupe et l'interrupteur à droite, l'une au-dessus de l'autre. Tout se voit et se touche sans glisser. */
@media screen and (max-width:800px){
  /* (02-12-2026) 11 parties : six numéros par ligne (6 + 5), la loupe et l'interrupteur dans la 7e colonne. */
  .admins .fil{display:grid;grid-template-columns:repeat(6,minmax(0,1fr)) auto;align-items:center;gap:2px 2px;padding:6px 10px}
  .admins .fil a{min-width:0;padding:6px 0}
  .admins .fil .cherche-guide{grid-column:7;grid-row:1;justify-self:end;margin-left:8px}
  .admins .fil #theme{grid-column:7;grid-row:2;margin-left:8px;background:var(--puce)}
  html:not(.js) .admins .fil{grid-template-columns:repeat(6,minmax(0,1fr))}
}
/* la ligne « Tu cherches quelque chose ? » de « Si ça coince » : seulement là où le champ existe (écran, avec le programme) */
html:not(.js) .cg-aide{display:none}
@media print{.cherche-guide,.cg-aide{display:none!important}}
