/* ============================================================
 * Shortcode [prp_search] (1.23.0)
 *
 * Champ de recherche autonome utilisable dans le header, footer, sidebar.
 * Pas de contrainte de largeur ni de marge : le container parent (Elementor)
 * gère le dimensionnement.
 *
 * Style minimaliste, neutre (couleurs reprises sur le thème via inherit
 * autant que possible). L'admin peut surcharger via du CSS Elementor s'il
 * souhaite un look plus distinctif.
 * ============================================================ */

.prp-search {
    position: relative;
    display: flex;
    align-items: center;
    background: #fff;
    border: 1px solid #e2e8f0;
    border-radius: 6px;
    padding: 0 10px 0 36px;
    transition: border-color 0.2s ease, box-shadow 0.2s ease;
    width: 100%;
    box-sizing: border-box;
}

.prp-search:focus-within {
    border-color: #94a3b8;
    box-shadow: 0 0 0 2px rgba(148, 163, 184, 0.15);
}

.prp-search__icon {
    position: absolute;
    left: 11px;
    top: 50%;
    transform: translateY(-50%);
    color: #94a3b8;
    pointer-events: none;
    display: flex;
    align-items: center;
    justify-content: center;
}

.prp-search__input {
    flex: 1;
    border: none !important;          /* Reset le border posé par Elementor sur les inputs */
    background: transparent !important;
    outline: none;
    padding: 9px 8px 9px 0 !important; /* !important pour passer outre les règles Elementor */
    font-size: 0.95rem;
    color: inherit;
    font-family: inherit;
    min-width: 0;
    box-shadow: none !important;       /* Reset shadow Elementor sur input:focus */
    border-radius: 0 !important;       /* Reset border-radius Elementor */
    line-height: 1.4;
    height: auto;
}

.prp-search__input:focus {
    border: none !important;
    box-shadow: none !important;
    outline: none !important;
}

.prp-search__input::placeholder {
    color: #94a3b8;
    opacity: 1;
}

.prp-search__clear {
    flex: 0 0 auto;
    width: 22px;
    height: 22px;
    border: none;
    background: transparent;
    color: #94a3b8;
    cursor: pointer;
    padding: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    transition: background 0.15s ease, color 0.15s ease;
}

.prp-search__clear:hover,
.prp-search__clear:focus-visible {
    background: #f1f5f9;
    color: #475569;
    outline: none;
}

.prp-search__clear[hidden] {
    display: none;
}

/* Suppression du bouton "X" natif des inputs search Webkit/Edge,
   on utilise notre propre bouton clear pour la cohérence cross-browser. */
.prp-search__input::-webkit-search-cancel-button {
    -webkit-appearance: none;
    appearance: none;
}
