/* Recherche générale (bouton du haut + fenêtre Ctrl/⌘ K) — voir assets/js/recherche-globale.js */

/* barre de recherche : une ligne sobre, juste sous le menu */
.rg-barre { margin: 0 0 .9rem; }
.rg-declencheur {
    display: flex; align-items: center; gap: .6rem; width: 100%; height: 38px; padding: 0 .5rem 0 .85rem;
    border: 1px solid rgba(15, 43, 54, 0.14); border-radius: 10px; background: #fff; color: #7a8890;
    font: inherit; font-size: .88rem; text-align: left; cursor: text; transition: border-color .15s, box-shadow .15s;
}
.rg-declencheur:hover { border-color: rgba(15, 43, 54, 0.3); }
.rg-declencheur:focus-visible { outline: 0; border-color: #0d3a48; box-shadow: 0 0 0 3px rgba(13, 58, 72, 0.15); }
.rg-declencheur svg { width: 16px; height: 16px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; flex-shrink: 0; }
.rg-declencheur-t { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.rg-declencheur kbd { font: inherit; font-size: .7rem; font-weight: 600; padding: .12rem .45rem; border-radius: 6px; background: #f1f4f6; color: #66757d; }
@media (max-width: 780px) { .rg-declencheur kbd { display: none; } }

/* fenêtre */
.rg-voile { position: fixed; inset: 0; z-index: 2200; background: rgba(8, 28, 36, 0.38); -webkit-backdrop-filter: blur(5px); backdrop-filter: blur(5px); opacity: 0; transition: opacity .18s; }
.rg-voile.is-ouvert { opacity: 1; }
.rg-fenetre {
    position: fixed; z-index: 2201; left: 50%; top: 9vh; width: min(680px, calc(100vw - 24px)); max-height: min(78vh, 640px); display: flex; flex-direction: column;
    background: rgba(255, 255, 255, 0.97); -webkit-backdrop-filter: saturate(180%) blur(24px); backdrop-filter: saturate(180%) blur(24px);
    border: 1px solid rgba(255, 255, 255, 0.6); border-radius: 22px; box-shadow: 0 34px 80px -20px rgba(4, 25, 32, 0.6), 0 0 0 1px rgba(15, 43, 54, 0.06);
    transform: translate(-50%, -10px) scale(.985); opacity: 0; transition: opacity .18s, transform .18s; color: #0f2b36;
}
.rg-fenetre.is-ouvert { opacity: 1; transform: translate(-50%, 0) scale(1); }
.rg-fenetre[hidden], .rg-voile[hidden] { display: none; }
html.rg-ouverte { overflow: hidden; }

.rg-champ { display: flex; align-items: center; gap: .7rem; padding: .95rem 1.1rem; border-bottom: 1px solid rgba(15, 43, 54, 0.09); }
.rg-champ > svg { width: 22px; height: 22px; fill: none; stroke: #66757d; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; flex-shrink: 0; }
.rg-input { flex: 1; min-width: 0; border: 0 !important; outline: 0 !important; box-shadow: none !important; background: transparent !important; font: inherit; font-size: 1.18rem; font-weight: 500; color: #0f2b36; padding: .15rem 0 !important; -webkit-appearance: none; appearance: none; }
.rg-input::placeholder { color: #8a979e; font-weight: 400; }
.rg-input::-webkit-search-cancel-button { display: none; }
.rg-fermer { border: 0; background: #eef1f3; color: #44545c; font: inherit; font-size: .76rem; font-weight: 600; padding: .35rem .75rem; border-radius: 999px; cursor: pointer; }
.rg-fermer:hover { background: #e2e8eb; }

.rg-liste { overflow-y: auto; padding: .4rem .5rem .6rem; overscroll-behavior: contain; }
.rg-groupe + .rg-groupe { margin-top: .3rem; }
.rg-groupe-t { padding: .55rem .7rem .3rem; font-size: .68rem; font-weight: 700; letter-spacing: .07em; text-transform: uppercase; color: #7a8890; }
.rg-item { display: flex; align-items: center; gap: .8rem; padding: .55rem .7rem; border-radius: 13px; color: inherit; text-decoration: none !important; cursor: pointer; }
.rg-item.is-actif { background: #e8f0f3; }
.rg-ico { width: 34px; height: 34px; border-radius: 10px; display: inline-flex; align-items: center; justify-content: center; flex-shrink: 0; background: #eef1f3; color: #44545c; }
.rg-ico svg { width: 18px; height: 18px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.rg-ico-compte { background: #e3f1f5; color: #0d3a48; }
.rg-ico-contact { background: #fdf0e3; color: #b25e09; }
.rg-ico-page { background: #eceaf8; color: #4a3aa7; }
.rg-texte { display: flex; flex-direction: column; min-width: 0; flex: 1; }
.rg-titre { font-size: .95rem; font-weight: 600; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.rg-sous { font-size: .78rem; color: #66757d; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.rg-item mark { background: rgba(245, 165, 36, 0.32); color: inherit; border-radius: 3px; padding: 0 1px; }
.rg-etape { flex-shrink: 0; font-size: .7rem; font-weight: 700; padding: .15rem .5rem; border-radius: 999px; background: #eef1f3; color: #44545c; }
.rg-etape-gagne { background: #e3f6ec; color: #0b7a3e; }
.rg-etape-perdu { background: #fbe8e8; color: #b42318; }
.rg-etape-cours { background: #fdf0e3; color: #b25e09; }
.rg-tout .rg-titre { font-weight: 600; color: #0d3a48; }
.rg-fleche { color: #0d3a48; font-weight: 700; }
.rg-vide { padding: 1.6rem 1rem; text-align: center; color: #66757d; font-size: .9rem; display: flex; align-items: center; justify-content: center; gap: .6rem; }
.rg-vide-bas { padding: .8rem 1rem; font-size: .8rem; }
.rg-attente { width: 14px; height: 14px; border-radius: 50%; border: 2px solid #c7d0d6; border-top-color: #0d3a48; animation: rg-tourne .7s linear infinite; }
@keyframes rg-tourne { to { transform: rotate(360deg); } }

.rg-pied { display: flex; gap: 1.1rem; padding: .6rem 1.1rem; border-top: 1px solid rgba(15, 43, 54, 0.09); font-size: .72rem; color: #7a8890; }
.rg-pied kbd { font: inherit; font-size: .68rem; font-weight: 600; padding: .05rem .35rem; margin-right: .2rem; border-radius: 5px; background: #eef1f3; color: #44545c; }

@media (max-width: 700px) {
    .rg-fenetre { top: 0; left: 0; width: 100vw; max-height: 100dvh; height: 100dvh; border-radius: 0; transform: translateY(-8px); }
    .rg-fenetre.is-ouvert { transform: none; }
    .rg-champ { padding-top: calc(.8rem + env(safe-area-inset-top, 0px)); }
    .rg-input { font-size: 1.05rem; }
    .rg-pied { display: none; }
    .rg-liste { flex: 1; padding-bottom: calc(1rem + env(safe-area-inset-bottom, 0px)); }
}
@media (prefers-reduced-motion: reduce) { .rg-voile, .rg-fenetre { transition: none; } .rg-attente { animation: none; } }
