/* ============================================================
   #/recherche — DEMANDE AU FANTÔME (vues/recherche.js) — 07/10/2026
   ============================================================ */
.loupe-bouton {
  flex: none; width: 44px; height: 44px; border-radius: var(--r-m, 14px); display: grid; place-items: center; cursor: pointer;
  background: var(--surface); border: 1px solid var(--bord); font-size: 19px; line-height: 1;
  transition: transform 260ms cubic-bezier(.3,1.5,.5,1), border-color .2s, box-shadow .2s;
}
.loupe-bouton:hover { transform: translateY(-2px) rotate(-8deg); }
.loupe-bouton.actif { border-color: #2E8BE0; box-shadow: 0 0 0 3px rgba(46,139,224,.18); }

.recherche { padding-bottom: 40px; }
.rch-tete { display: flex; gap: 14px; align-items: center; margin: 4px 0 16px; }
.rch-tete h2 { margin: 0 0 4px; font-size: 22px; }
.rch-tete p { margin: 0; color: var(--texte-2); font-size: 14px; line-height: 1.45; }
.rch-fantome.liy-fantome, .rch-avatar.liy-fantome { position: static; width: auto; height: auto; pointer-events: none; flex: none; }
.rch-fantome .fa-svg { animation: fa-flotte 3.2s ease-in-out infinite; filter: drop-shadow(0 0 12px rgba(255,255,255,.6)) drop-shadow(0 8px 14px rgba(0,0,0,.18)); }

.rch-form { display: flex; gap: 8px; position: sticky; top: 0; z-index: 2; padding: 6px 0; background: var(--fond); }
.rch-form input { flex: 1; min-width: 0; border-radius: 999px; padding: 14px 18px; font: inherit; font-size: 16px;
  border: 1.5px solid var(--bord); background: var(--surface); color: var(--texte); transition: border-color .2s, box-shadow .25s; }
.rch-form input:focus { outline: none; border-color: #2E8BE0; box-shadow: 0 0 0 5px rgba(46,139,224,.15), 0 10px 30px rgba(46,139,224,.15); }
.rch-form button { width: 52px; border: 0; border-radius: 50%; cursor: pointer; color: #fff; font-size: 18px;
  background: linear-gradient(135deg, #2E8BE0, #8B5CF6); box-shadow: 0 8px 20px rgba(46,139,224,.35); transition: transform .2s; }
.rch-form button:hover { transform: scale(1.06) rotate(-10deg); }

.rch-suggestions { display: flex; flex-wrap: wrap; gap: 8px; margin: 12px 0 6px; transition: opacity .3s, max-height .4s; max-height: 300px; overflow: hidden; }
.rch-suggestions.cache { opacity: 0; max-height: 0; margin: 0; }
.rch-suggestions button { border: 1px solid var(--bord); background: var(--surface); color: var(--texte-2); border-radius: 999px; padding: 8px 12px;
  font: 500 13px 'Poppins', system-ui, sans-serif; cursor: pointer; animation: saas-entre .5s cubic-bezier(.2,.8,.2,1) backwards; animation-delay: calc(var(--k) * 60ms);
  transition: transform .2s, border-color .2s, color .2s; }
.rch-suggestions button:hover { transform: translateY(-2px); border-color: #2E8BE0; color: var(--texte); }

.rch-fil { display: grid; gap: 14px; margin-top: 14px; }
.rch-q { display: flex; justify-content: flex-end; }
.rch-q span { max-width: 85%; padding: 10px 14px; border-radius: 18px 18px 4px 18px; color: #fff; font-size: 15px; line-height: 1.45;
  background: linear-gradient(135deg, #2E8BE0, #5A6CF0); animation: saas-entre .4s cubic-bezier(.2,.8,.2,1) backwards; }
.rch-r { display: flex; gap: 8px; align-items: flex-start; }
.rch-avatar { margin-top: 2px; }
.rch-bulle { flex: 1; min-width: 0; padding: 12px 14px; border-radius: 4px 18px 18px 18px; background: var(--surface); border: 1px solid var(--bord);
  font-size: 15px; line-height: 1.55; color: var(--texte); animation: saas-entre .4s cubic-bezier(.2,.8,.2,1) backwards; }
.rch-bulle.arrive > * { animation: saas-entre .5s cubic-bezier(.2,.8,.2,1) backwards; }
.rch-bulle.arrive > *:nth-child(2) { animation-delay: .08s; }
.rch-bulle.arrive > *:nth-child(3) { animation-delay: .16s; }
.rch-bulle.arrive > *:nth-child(n+4) { animation-delay: .24s; }
.rch-bulle p { margin: 0 0 8px; }
.rch-bulle ol, .rch-bulle ul { margin: 0 0 8px; padding-left: 20px; }
.rch-bulle li { margin: 3px 0; }
.rch-bulle code { font-family: 'JetBrains Mono', ui-monospace, monospace; font-size: 13px; background: var(--surface-2); padding: 1px 6px; border-radius: 6px; }
.rch-reflexion { display: flex; align-items: center; gap: 5px; color: var(--texte-3); font-size: 14px; }
.rch-reflexion i { width: 7px; height: 7px; border-radius: 50%; background: #2E8BE0; animation: rch-point 1s ease-in-out infinite; }
.rch-reflexion i:nth-child(2) { animation-delay: .15s; background: #1FBF74; }
.rch-reflexion i:nth-child(3) { animation-delay: .3s; background: #F2762F; }
@keyframes rch-point { 50% { transform: translateY(-6px); opacity: .5; } }
.rch-st { font-size: 12px; font-weight: 700; letter-spacing: .04em; text-transform: uppercase; color: var(--texte-3); margin: 10px 0 6px; }
.rch-sources { display: grid; gap: 6px; }
.rch-sources a { display: grid; gap: 1px; padding: 8px 10px; border-radius: 12px; background: var(--surface-2); text-decoration: none; color: var(--texte);
  border: 1px solid transparent; transition: border-color .2s, transform .2s; animation: saas-entre .45s backwards; animation-delay: calc(.2s + var(--k) * 60ms); }
.rch-sources a:hover { border-color: #2E8BE0; transform: translateX(3px); }
.rch-sources b { font-size: 12px; color: #2E8BE0; }
.rch-sources span { font-size: 13px; color: var(--texte-2); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.rch-lecons { display: grid; gap: 6px; }
.rch-lecon { display: grid; gap: 2px; text-align: left; padding: 10px 12px; border-radius: 12px; cursor: pointer; font: inherit;
  background: color-mix(in srgb, var(--c) 10%, var(--surface)); border: 1px solid color-mix(in srgb, var(--c) 35%, var(--bord)); color: var(--texte);
  border-left: 4px solid var(--c); animation: saas-entre .45s backwards; animation-delay: calc(.25s + var(--k) * 60ms); transition: transform .2s; }
.rch-lecon:hover { transform: translateX(4px); }
.rch-lecon b { font-size: 14px; }
.rch-lecon small { color: var(--texte-3); font-size: 12px; }
.rch-note { font-size: 13px; color: var(--texte-3); margin: 8px 0 0 !important; }

/* --- LE PETIT ÉCRAN : une fenêtre de tableur miniature --- */
.ecran-ia { margin: 10px 0; border-radius: 14px; overflow: hidden; border: 1px solid #C9D3DD; background: #fff; color: #1E2328;
  box-shadow: 0 14px 34px rgba(0,0,0,.14); animation: ei-entre .6s cubic-bezier(.2,.8,.2,1) backwards; }
@keyframes ei-entre { from { opacity: 0; transform: perspective(700px) rotateX(18deg) translateY(16px) scale(.96); } }
.ei-barre { display: flex; align-items: center; gap: 6px; padding: 8px 10px; background: #107C41; color: #fff; font-size: 12.5px; }
.ei-barre b { margin-left: 6px; font-weight: 600; }
.ei-pt { width: 9px; height: 9px; border-radius: 50%; background: rgba(255,255,255,.55); }
.ei-fx { display: flex; align-items: center; gap: 8px; padding: 6px 10px; border-bottom: 1px solid #DDE3E8; font-size: 13px; background: #F7F9FA; }
.ei-nom { min-width: 34px; padding: 2px 6px; border: 1px solid #C9D3DD; border-radius: 4px; background: #fff; font-weight: 600; text-align: center; }
.ei-fx i { color: #6B7680; font-style: italic; font-family: Georgia, serif; }
.ei-formule { font-family: 'JetBrains Mono', ui-monospace, monospace; font-size: 13px; color: #0B5CAD; background: none !important; }
.ei-formule:not(.fini)::after { content: '|'; animation: ei-curseur .8s steps(1) infinite; color: #1E2328; }
@keyframes ei-curseur { 50% { opacity: 0; } }
.ei-grille-zone { position: relative; overflow-x: auto; padding-top: 26px; }
.ei-grille { border-collapse: collapse; width: 100%; font-size: 13px; }
.ei-grille th { background: #F1F4F6; color: #6B7680; font-weight: 600; font-size: 11.5px; padding: 3px 6px; border: 1px solid #DDE3E8; }
.ei-grille td { padding: 6px 8px; border: 1px solid #E3E8EC; white-space: nowrap; animation: ei-cellule .35s backwards; animation-delay: var(--d); }
@keyframes ei-cellule { from { opacity: 0; transform: translateY(4px); } }
.ei-grille td.ei-tete { font-weight: 700; background: #EAF4EE; }
.ei-grille td.ei-source { background: #FFF4E5; box-shadow: inset 0 0 0 2px #F2762F; }
.ei-grille td.ei-cible { background: #E6F0FB; box-shadow: inset 0 0 0 2px #2E8BE0; font-weight: 700; color: #0B5CAD; }
.ecran-ia.ei-trace .ei-cible { animation: ei-pulse 1s ease-in-out 1.2s 2; }
@keyframes ei-pulse { 50% { background: #CFE3F8; } }
.ei-fleches { position: absolute; left: 0; top: 0; pointer-events: none; overflow: visible; }
.ei-fleche { fill: none; stroke: #F2762F; stroke-width: 2.5; stroke-linecap: round; stroke-dasharray: var(--L); stroke-dashoffset: var(--L);
  animation: ei-trace .7s ease-out forwards; animation-delay: calc(var(--k) * 350ms); filter: drop-shadow(0 2px 3px rgba(242,118,47,.35)); }
@keyframes ei-trace { to { stroke-dashoffset: 0; } }
.ei-note { padding: 8px 10px; font-size: 13px; background: #FFFBEA; border-top: 1px solid #F1E6B8; color: #5B4A00; }

/* --- LE SITE : la barre « Demande au fantôme » sous le titre --- */
.rch-site { display: flex; gap: 8px; max-width: 560px; margin: 22px auto 0; padding: 6px; border-radius: 999px;
  background: var(--surface, #fff); border: 1.5px solid var(--bord); box-shadow: 0 14px 40px rgba(46,139,224,.12); transition: box-shadow .25s, border-color .25s; }
.rch-site:focus-within { border-color: #2E8BE0; box-shadow: 0 0 0 5px rgba(46,139,224,.14), 0 18px 46px rgba(46,139,224,.2); }
.rch-site .rch-site-g { flex: none; display: grid; place-items: center; width: 44px; }
.rch-site input { flex: 1; min-width: 0; border: 0; background: none; font: inherit; font-size: 16px; color: var(--texte); outline: none; }
.rch-site button { border: 0; border-radius: 999px; padding: 10px 18px; cursor: pointer; color: #fff; font: 700 14px 'Poppins', system-ui, sans-serif;
  background: linear-gradient(135deg, #2E8BE0, #8B5CF6); }

/* --- LA REPONSE QUI S'ECRIT (vues/recherche.js, devoiler) --- */
.rch-mot { opacity: 0; animation: rch-mot .38s ease-out forwards; }
@keyframes rch-mot { from { opacity: 0; filter: blur(3px); } to { opacity: 1; filter: none; } }
.rch-apres { animation: saas-entre .6s cubic-bezier(.2,.8,.2,1) backwards; }
.rch-apres .rch-sources a, .rch-apres .rch-lecon, .rch-sources.rch-apres a, .rch-lecons.rch-apres .rch-lecon { animation: none; }
.rch-apres .ecran-ia { animation: none; }
@media (prefers-reduced-motion: reduce) { .rch-mot { opacity: 1; animation: none; } .rch-apres { animation: none; } }

/* ============================================================
   LES PETITS ÉCRANS DE CHAQUE LOGICIEL (vues/recherche.js)
   ============================================================ */
@keyframes ei-monte { from { opacity: 0; transform: translateY(8px); } }
/* le ruban : les onglets, et la commande a toucher (elle pulse, un doigt la montre) */
.ei-ruban { background: #F3F2F1; border-bottom: 1px solid #E1DFDD; padding: 6px 8px 8px; }
.ei-onglets { display: flex; gap: 12px; font-size: 11.5px; color: #605E5C; overflow: hidden; white-space: nowrap; }
.ei-onglets span.actif { color: #1E2328; font-weight: 700; box-shadow: inset 0 -2px 0 currentColor; padding-bottom: 3px; }
.ei-commandes { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 8px; }
.ei-commandes span { position: relative; font-size: 12px; padding: 5px 9px; border-radius: 6px; background: #fff; border: 1px solid #E1DFDD; color: #323130;
  animation: ei-monte .4s backwards; animation-delay: var(--d); }
.ei-commandes span.cible { border-color: #F2762F; box-shadow: 0 0 0 3px rgba(242,118,47,.25); font-weight: 700; animation: ei-monte .4s backwards, ei-appel 1.1s ease-in-out .9s 3; }
@keyframes ei-appel { 50% { box-shadow: 0 0 0 7px rgba(242,118,47,.12); } }
.ei-doigt { position: absolute; right: -6px; bottom: -16px; font-style: normal; font-size: 16px; animation: ei-doigt 1s ease-in-out .7s infinite; }
@keyframes ei-doigt { 50% { transform: translate(-3px, -4px); } }
/* WORD : la page */
.ei-page { background: #F3F2F1; padding: 10px 14px 14px; }
.ei-page p { margin: 0 0 8px; padding: 0 12px; background: #fff; font-family: Calibri, 'Segoe UI', sans-serif; font-size: 13px; line-height: 1.5; color: #1E2328;
  animation: ei-monte .45s backwards; animation-delay: var(--d); }
.ei-page p:first-child { padding-top: 12px; } .ei-page p:last-child { padding-bottom: 12px; margin: 0; }
.ei-page p.titre { font-size: 16px; font-weight: 700; color: #2B579A; }
.ei-surligne { background: linear-gradient(transparent 55%, #FFE066 55%); background-size: 0% 100%; background-repeat: no-repeat; animation: ei-marqueur .7s ease-out 1.1s forwards; color: inherit; }
@keyframes ei-marqueur { to { background-size: 100% 100%; } }
/* POWERPOINT : la diapositive */
.ei-ppt { display: flex; gap: 8px; padding: 10px; background: #E9E9E9; }
.ei-vignettes { display: grid; gap: 5px; align-content: start; }
.ei-vignettes span { width: 34px; height: 20px; background: #fff; border: 1px solid #C8C6C4; border-radius: 2px; }
.ei-vignettes span.actif { border: 2px solid #C43E1C; }
.ei-diapo { flex: 1; aspect-ratio: 16 / 9; background: #fff; border-radius: 3px; padding: 10px 12px; box-shadow: 0 4px 12px rgba(0,0,0,.12); overflow: hidden; }
.ei-diapo b { display: block; font-size: 15px; color: #C43E1C; margin-bottom: 6px; animation: ei-monte .45s .2s backwards; }
.ei-diapo ul { margin: 0; padding-left: 16px; font-size: 12px; color: #323130; }
.ei-diapo li { margin: 2px 0; animation: ei-monte .45s backwards; animation-delay: var(--d); }
/* POWER BI : le canevas, le visuel, les champs */
.ei-code { display: flex; gap: 8px; align-items: center; padding: 7px 10px; background: #F7F9FA; border-bottom: 1px solid #DDE3E8; font-size: 13px; overflow-x: auto; }
.ei-etiq { flex: none; font-size: 10.5px; font-weight: 700; text-transform: uppercase; letter-spacing: .04em; color: #6B7680; background: #E8ECEF; padding: 2px 6px; border-radius: 4px; }
.ei-code .ei-formule { white-space: pre-wrap; }
.ei-pbi { display: flex; gap: 8px; padding: 10px; background: #F3F2F1; }
.ei-canevas { flex: 1; background: #fff; border-radius: 4px; padding: 8px; min-height: 120px; box-shadow: 0 1px 3px rgba(0,0,0,.08); }
.ei-titre-visuel { font-size: 11.5px; font-weight: 700; color: #252423; margin-bottom: 4px; }
.ei-barres { display: flex; align-items: flex-end; gap: 8px; height: 100px; padding-top: 4px; }
.ei-barre-v { flex: 1; display: flex; flex-direction: column; align-items: center; justify-content: flex-end; height: 100%; gap: 3px; }
.ei-barre-v i { display: block; width: 100%; max-width: 30px; height: var(--h); border-radius: 3px 3px 0 0; transform-origin: bottom; animation: ei-pousse .7s cubic-bezier(.2,.8,.2,1) backwards; animation-delay: var(--d); }
@keyframes ei-pousse { from { transform: scaleY(0); } }
.ei-barre-v small { font-size: 9px; color: #605E5C; white-space: nowrap; overflow: hidden; max-width: 100%; }
.ei-svg { width: 100%; height: 110px; display: block; }
.ei-ligne { stroke-dasharray: 600; stroke-dashoffset: 600; animation: ei-trace 1.2s ease-out .4s forwards; }
.ei-part { transform-origin: 100px 55px; animation: ei-part .5s cubic-bezier(.3,1.4,.5,1) backwards; animation-delay: var(--d); }
@keyframes ei-part { from { transform: scale(0); opacity: 0; } }
.ei-carte-kpi { display: grid; place-items: center; height: 100px; text-align: center; animation: ei-monte .5s .3s backwards; }
.ei-carte-kpi b { font-size: 30px; color: #252423; } .ei-carte-kpi span { font-size: 11px; color: #605E5C; }
.ei-champs { width: 34%; display: grid; gap: 4px; align-content: start; font-size: 11px; color: #323130; background: #fff; border-radius: 4px; padding: 8px; }
.ei-champs b { font-size: 11px; } .ei-champs span { animation: ei-monte .4s backwards; animation-delay: var(--d); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
/* ACCESS et SQL : l'editeur, les resultats */
.ei-grille.simple td { padding: 5px 8px; }
.ei-editeur .ei-code { background: #1E1E1E; border-bottom: 0; padding: 10px; }
.ei-editeur .ei-formule { color: #9CDCFE !important; }
.ei-editeur .ei-etiq { background: #333; color: #ccc; }
.ei-resultats { padding: 8px 10px 10px; background: #fff; }
.ei-resultats .ei-etiq { display: inline-block; margin-bottom: 6px; }
/* POWER AUTOMATE et FABRIC : les etapes reliees */
.ei-flux { display: grid; justify-items: center; gap: 0; padding: 12px; background: #F5F7FB; }
.ei-etape { display: flex; gap: 10px; align-items: center; width: 100%; max-width: 300px; background: #fff; border: 1px solid #DCE3EE; border-left: 4px solid #0066FF;
  border-radius: 8px; padding: 8px 10px; font-size: 13px; color: #1E2328; box-shadow: 0 2px 6px rgba(0,0,0,.06);
  animation: ei-monte .5s cubic-bezier(.2,.8,.2,1) backwards; animation-delay: var(--d); }
.ei-etape small { display: block; font-size: 10.5px; font-weight: 700; color: #6B7680; text-transform: uppercase; letter-spacing: .03em; }
.ei-etape.declencheur { border-left-color: #F2762F; } .ei-etape.condition { border-left-color: #8B5CF6; }
.app-fabric .ei-etape { border-left-color: #117865; }
.ei-ico { font-size: 18px; }
.ei-lien { width: 2px; height: 18px; background: #9AA8BB; position: relative; transform-origin: top; animation: ei-pousse-h .3s ease-out backwards; animation-delay: var(--d); }
.ei-lien::after { content: ''; position: absolute; left: -4px; bottom: -2px; border: 5px solid transparent; border-top-color: #9AA8BB; border-bottom: 0; }
@keyframes ei-pousse-h { from { transform: scaleY(0); } }
/* la barre de recherche collee en haut couvre toute la largeur (rien ne depasse derriere elle) */
.rch-form { margin-left: -16px; margin-right: -16px; padding-left: 16px; padding-right: 16px; box-shadow: 0 8px 12px -10px rgba(0,0,0,.15); }
