/* Moteur de recherche moderne (style pastilles Opodo), carte SVG, visites et recherches mémorisées — Affection.org */
.rech-page { max-width: 1200px; margin: 12px auto 36px; padding: 0 12px; }
.rech-tete { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: center; gap: 12px; margin-bottom: 14px; }
.rech-tete h1 { margin: 0; font-size: 1.65rem; color: var(--violet); }
.rech-sous { margin: 4px 0 0; color: var(--gris); font-size: .95rem; }
.rech-liens-rapides { display: flex; flex-wrap: wrap; gap: 8px; }
.rech-lien-outil { display: inline-flex; align-items: center; padding: 6px 12px; border: 1px solid var(--bord); border-radius: 999px; background: #fff; color: var(--violet); text-decoration: none; font-size: .9rem; font-weight: 500; }
.rech-lien-outil:hover { background: #F2F3FF; }

/* Barre de filtres principaux */
.rech-barre { background: #fff; border: 1px solid var(--bord); border-radius: 14px; padding: 14px; box-shadow: 0 4px 16px rgba(95, 41, 125, .06); display: grid; grid-template-columns: repeat(auto-fit, minmax(190px, 1fr)); gap: 12px; align-items: end; }
.rech-champ-ville { grid-column: span 2; min-width: 0; }
@media (max-width: 760px) { .rech-champ-ville { grid-column: 1 / -1; } }
.rech-champ { display: flex; flex-direction: column; gap: 4px; }
.rech-champ > label, .rech-champ-titre { font-size: .82rem; font-weight: 700; color: var(--violet); text-transform: uppercase; letter-spacing: .02em; }
.rech-champ select, .rech-champ input[type="text"], .rech-champ input[type="number"] { padding: 8px 10px; border: 1px solid #c9bcd3; border-radius: 8px; font-size: .95rem; background: #fff; color: #302a39; width: 100%; box-sizing: border-box; }
.rech-age-ligne { display: flex; align-items: center; gap: 6px; }
.rech-age-ligne input { width: 70px !important; text-align: center; }
.rech-actions-barre { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; justify-content: flex-end; }
.rech-actions-barre .btn { min-height: 40px; text-transform: none; font-weight: 600; border-radius: 10px; }

/* Sélecteur Pays + Autocomplétion Ville */
.ville-sel { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
@media (max-width: 640px) { .ville-sel { grid-template-columns: 1fr; } }
.ville-sel-wrap { position: relative; }
.ville-sel-badge { display: inline-flex; align-items: center; gap: 6px; margin-top: 6px; padding: 4px 10px; border-radius: 999px; background: #F2F3FF; border: 1px solid var(--bord); font-size: .85rem; color: var(--violet); font-weight: 500; }
.ville-sel-badge button { border: 0; background: transparent; color: var(--violet); font-size: 1.05rem; line-height: 1; cursor: pointer; padding: 0 2px; }
.ville-sel-liste { position: absolute; left: 0; right: 0; top: 100%; z-index: 40; margin: 4px 0 0; padding: 4px; list-style: none; background: #fff; border: 1px solid var(--bord); border-radius: 10px; box-shadow: 0 8px 24px rgba(0, 0, 0, .14); max-height: 260px; overflow-y: auto; }
.ville-sel-opt { padding: 8px 10px; border-radius: 6px; cursor: pointer; display: flex; justify-content: space-between; gap: 8px; font-size: .92rem; }
.ville-sel-opt:hover, .ville-sel-opt[aria-selected="true"] { background: #F2F3FF; color: var(--violet); }
.ville-sel-sub { color: var(--gris); font-size: .82rem; }

/* Pastilles actives style Opodo */
.rech-pastilles { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; margin: 12px 0; min-height: 10px; }
.rech-pastille { display: inline-flex; align-items: center; gap: 6px; padding: 5px 12px; border-radius: 999px; background: #f4ecf9; border: 1px solid #d5bce8; color: var(--violet); font-size: .88rem; font-weight: 500; }
.rech-pastille button { border: 0; background: transparent; color: var(--violet); font-weight: 700; cursor: pointer; font-size: 1rem; line-height: 1; padding: 0 2px; border-radius: 50%; }
.rech-pastille button:hover { background: #e2cef2; }
.rech-reset { border: 0; background: transparent; color: #a00020; font-size: .86rem; font-weight: 600; cursor: pointer; text-decoration: underline; padding: 4px 6px; }

/* Barre d'outils (compteur, tri, vue grille/liste/carte, sauvegarder) */
.rech-outils { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: center; gap: 10px; padding: 10px 0; border-bottom: 1px solid #ece3f3; margin-bottom: 14px; }
.rech-total { font-weight: 700; color: var(--violet); font-size: 1rem; }
.rech-outils-droite { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; }
.rech-outils-droite select { padding: 6px 10px; border: 1px solid #c9bcd3; border-radius: 8px; font-size: .9rem; background: #fff; }
.rech-vues { display: inline-flex; border: 1px solid var(--bord); border-radius: 8px; overflow: hidden; }
.rech-vues button { border: 0; background: #fff; padding: 6px 11px; font-size: .88rem; color: #4a3f55; cursor: pointer; }
.rech-vues button[aria-pressed="true"] { background: var(--violet); color: #fff; font-weight: 600; }
.rech-sauver-btn { padding: 6px 12px; border: 1px solid var(--rose); background: #fff; color: #b01868; border-radius: 8px; font-weight: 600; font-size: .88rem; cursor: pointer; }
.rech-sauver-btn:hover { background: #fff0f8; }

.rech-etat { margin: 8px 0; color: var(--gris); font-size: .95rem; }

/* Grille et Liste de résultats */
.rech-grille { display: grid; grid-template-columns: repeat(auto-fill, minmax(210px, 1fr)); gap: 14px; }
.rech-liste { display: flex; flex-direction: column; gap: 12px; }
.rech-carte { position: relative; border: 1px solid var(--bord); border-radius: 12px; overflow: hidden; background: #fff; display: flex; flex-direction: column; transition: transform .12s ease, box-shadow .12s ease; }
.rech-carte:hover { transform: translateY(-2px); box-shadow: 0 6px 18px rgba(95, 41, 125, .11); }
.rech-carte.sexe-f { background: #FFF8F0; border-color: #F6CFA0; }
.rech-carte.sexe-m { background: #F2F7FF; border-color: #B4D2FA; }
.rech-liste .rech-carte { flex-direction: row; align-items: stretch; }
.rech-liste .rech-carte-media { width: 150px; height: auto; min-height: 150px; flex: none; }
.rech-carte-media { position: relative; height: 225px; background: #faf7fc; overflow: hidden; }
.rech-carte-media img { width: 100%; height: 100%; object-fit: cover; display: block; }
.rech-carte-sans-photo { display: flex; align-items: center; justify-content: center; height: 100%; color: #a79ab3; font-size: 2.5rem; }
.rech-carte .en-ligne { position: absolute; top: 8px; right: 8px; width: 14px; height: 14px; border-radius: 50%; background: #2fbf4a; border: 2px solid #fff; box-shadow: 0 0 0 1px rgba(0,0,0,.2); }
.rech-dist { position: absolute; bottom: 8px; left: 8px; padding: 2px 8px; border-radius: 999px; background: rgba(30, 18, 42, .78); color: #fff; font-size: .78rem; font-weight: 600; }
.rech-carte-corps { padding: 10px 12px; display: flex; flex-direction: column; gap: 4px; flex: 1; }
.rech-carte-nom { font-weight: 700; font-size: 1.05rem; text-decoration: none; color: var(--violet); }
.rech-carte.sexe-f .rech-carte-nom { color: #9c176f; }
.rech-carte.sexe-m .rech-carte-nom { color: #0e2b75; }
.rech-carte-meta { font-size: .86rem; color: #4b4254; }
.rech-carte-extrait { font-size: .84rem; color: #5b5163; display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; margin-top: 2px; }
.rech-carte-actions { margin-top: auto; padding-top: 8px; display: flex; gap: 6px; }
.rech-carte-actions a { flex: 1; text-align: center; padding: 6px 8px; border-radius: 8px; font-size: .84rem; font-weight: 600; text-decoration: none; border: 1px solid var(--bord); color: var(--violet); background: #fff; }
.rech-carte-actions a.rech-ecrire { background: var(--violet); color: #fff; border-color: var(--violet); }

/* Etat vide et suggestions opt-in */
.rech-vide { background: #fff; border: 1px solid var(--bord); border-radius: 14px; padding: 28px 20px; text-align: center; margin: 16px 0; }
.rech-vide h2 { margin: 0 0 10px; font-size: 1.25rem; color: var(--violet); }
.rech-suggestions { display: flex; flex-wrap: wrap; justify-content: center; gap: 10px; margin-top: 16px; }
.rech-suggestions button { padding: 8px 14px; border-radius: 999px; border: 1px solid var(--violet); background: #F2F3FF; color: var(--violet); font-weight: 600; cursor: pointer; }
.rech-suggestions button:hover { background: var(--violet); color: #fff; }

.rech-pagination { text-align: center; margin: 22px 0; }

/* Carte du monde SVG */
.rech-carte-geo { position: relative; border: 1px solid var(--bord); border-radius: 14px; background: #eef5fc; overflow: hidden; margin-bottom: 18px; }
.rech-carte-barre { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: center; gap: 8px; padding: 8px 12px; background: #fff; border-bottom: 1px solid var(--bord); }
.rech-carte-zoom { display: flex; gap: 6px; flex-wrap: wrap; }
.rech-carte-zoom button { border: 1px solid var(--bord); background: #fff; color: var(--violet); border-radius: 6px; padding: 4px 10px; font-weight: 600; font-size: .85rem; cursor: pointer; }
.rech-carte-svg { display: block; width: 100%; height: 460px; cursor: grab; touch-action: none; user-select: none; }
.rech-carte-svg:active { cursor: grabbing; }
.rech-carte-pays { fill: #f7f4fb; stroke: #b8a6cc; stroke-width: .6; vector-effect: non-scaling-stroke; }
.rech-carte-pays:hover { fill: #ebe2f6; }
.rech-pin { cursor: pointer; }
.rech-pin circle { stroke: #fff; stroke-width: 1.8; vector-effect: non-scaling-stroke; }
.rech-pin-texte { font-size: 11px; font-weight: 700; fill: #fff; text-anchor: middle; dominant-baseline: central; pointer-events: none; }
.rech-carte-popup { position: absolute; right: 12px; bottom: 12px; width: min(320px, calc(100% - 24px)); background: #fff; border: 1px solid var(--violet); border-radius: 12px; padding: 12px; box-shadow: 0 8px 28px rgba(0, 0, 0, .18); z-index: 15; }
.rech-carte-popup-fermer { float: right; border: 0; background: transparent; font-size: 1.2rem; cursor: pointer; color: var(--gris); line-height: 1; }
.rech-carte-popup-liste { max-height: 240px; overflow-y: auto; display: flex; flex-direction: column; gap: 8px; margin-top: 8px; }
.rech-carte-mini { display: flex; gap: 10px; align-items: center; padding: 6px; border: 1px solid #eee4f5; border-radius: 8px; text-decoration: none; color: inherit; }
.rech-carte-mini img { width: 48px; height: 48px; border-radius: 6px; object-fit: cover; }

/* Modale filtres avancés & sauvegarde */
.rech-modal { position: fixed; inset: 0; background: rgba(24, 14, 34, .55); z-index: 1100; display: flex; align-items: center; justify-content: center; padding: 16px; }
.rech-modal[hidden] { display: none; }
.rech-modal-panneau { background: #fff; border-radius: 14px; max-width: 780px; width: 100%; max-height: 90vh; overflow-y: auto; padding: 20px; box-shadow: 0 12px 40px rgba(0,0,0,.25); }
.rech-modal-tete { display: flex; justify-content: space-between; align-items: center; border-bottom: 1px solid #eee; padding-bottom: 10px; margin-bottom: 14px; }
.rech-modal-tete h2 { margin: 0; font-size: 1.25rem; color: var(--violet); }
.rech-modal-fermer { border: 0; background: transparent; font-size: 1.5rem; cursor: pointer; color: var(--gris); }
.rech-modal-grille { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 14px; }
.rech-cases { display: flex; flex-wrap: wrap; gap: 6px 12px; }
.rech-cases label { display: inline-flex; align-items: center; gap: 5px; font-weight: normal; font-size: .9rem; cursor: pointer; }
.rech-modal-pied { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: center; gap: 10px; border-top: 1px solid #eee; padding-top: 14px; margin-top: 16px; }

/* Mes recherches & Visites */
.rech-memo-carte { border: 1px solid var(--bord); border-radius: 12px; background: #fff; padding: 14px 16px; margin-bottom: 12px; display: flex; flex-wrap: wrap; justify-content: space-between; align-items: center; gap: 12px; }
.rech-memo-titre { font-weight: 700; font-size: 1.05rem; color: var(--violet); }
.rech-memo-meta { font-size: .88rem; color: var(--gris); margin-top: 4px; }
.visites-tabs { display: flex; gap: 8px; margin: 12px 0 16px; flex-wrap: wrap; }
.visites-tabs button[aria-pressed="true"] { background: var(--violet); color: #fff; border-color: var(--violet); }
.visites-compteur { background: #F2F3FF; border: 1px solid var(--bord); border-radius: 10px; padding: 10px 14px; margin-bottom: 12px; font-weight: 600; color: var(--violet); }

/* Photo de profil (1-clic) & Suppression volontaire */
.photo-profil-carte { border: 1px solid var(--bord); border-radius: 14px; background: #fff; padding: 18px; margin-bottom: 18px; display: flex; flex-wrap: wrap; gap: 20px; align-items: center; }
.photo-profil-apercu { width: 160px; height: 160px; border-radius: 12px; object-fit: cover; border: 2px solid var(--bord); background: #faf7fc; }
.photo-profil-vide { width: 160px; height: 160px; border-radius: 12px; border: 2px dashed var(--bord); display: flex; align-items: center; justify-content: center; text-align: center; padding: 12px; color: var(--gris); font-size: .9rem; }
.photo-upload-zone { flex: 1; min-width: 240px; }
.photo-grille-albums { display: grid; grid-template-columns: repeat(auto-fill, minmax(140px, 1fr)); gap: 12px; margin-top: 12px; }
.photo-item-album { border: 1px solid var(--bord); border-radius: 10px; padding: 8px; text-align: center; background: #fff; display: flex; flex-direction: column; gap: 6px; }
.photo-item-album img { width: 100%; height: 120px; object-fit: cover; border-radius: 6px; }
.annonce-alerte-cadre { border: 1px solid #f0b6c2; background: #fff4f6; color: #6f0018; border-radius: 10px; padding: 12px 14px; margin-bottom: 14px; }
.annonce-liens-haut { display: flex; flex-wrap: wrap; gap: 8px; margin: 8px 0 14px; align-items: center; }
.annonce-liens-haut a { display: inline-flex; align-items: center; gap: 6px; padding: 5px 11px; border: 1px solid var(--bord); border-radius: 999px; background: #fff; text-decoration: none; color: var(--violet); font-size: .88rem; font-weight: 500; }
.annonce-liens-haut a:hover { background: #F2F3FF; }
.annonce-liens-haut a.lien-danger { color: #a00020; border-color: #ebc2cb; }
