/* Les onglets de la recherche foncière (src/onglets.js) : une barre pour les quatre fenêtres,
   et une même composition dessous (Henri, 29/09/2026 : « rends l'ensemble des onglets homogène
   avec recherche à gauche et résultat à droite et sidebar paramétrable en largeur »). */
.og-barre { gap: 8px; min-height: 48px; padding-top: calc(env(safe-area-inset-top) + 6px); padding-bottom: 6px; background: var(--fond); }
.og-barre .bouton { flex: none; height: var(--h-bouton); padding: 0 12px; border-radius: var(--r-bouton); background: transparent; font-size: var(--t-14); }
.og-barre .bouton:hover { background: var(--survol); }
.og-onglets { display: flex; align-items: center; gap: 2px; min-width: 0; padding: 2px; border-radius: var(--r-moyen); background: var(--survol); box-shadow: inset 0 0 0 1px var(--filet); }
.og-onglets button { height: 32px; padding: 0 14px; border: 0; border-radius: var(--r-bouton); background: none; color: var(--encre-3); font: inherit; font-size: var(--t-13); font-weight: 500; white-space: nowrap; cursor: pointer; }
.og-onglets button:hover { color: var(--encre); }
.og-onglets button[aria-selected="true"] { background: var(--actif); color: var(--encre); box-shadow: 0 0 0 1px var(--filet-2); }
.og-onglets button:focus-visible { outline: 2px solid var(--accent); outline-offset: -2px; }
.og-droite { display: flex; align-items: center; gap: 6px; margin-left: auto; }
.og-court { display: none; }

/* Même composition au bureau : les filtres à gauche, 320 px d'origine (la poignée de
   src/fenetres.js les élargit), la carte et les résultats à droite */
@media (min-width: 900px) {
  .pg:is(.fc, .pm, .rf) > .pg-appli { grid-template-columns: 320px minmax(0, 1fr); }
}

@media (max-width: 899px) {
  .og-barre .bouton { height: 44px; }
  .og-onglets button { height: 34px; }
}
/* Au téléphone, les quatre onglets tiennent sur 390 px avec des noms courts (Réf., Parc) */
@media (max-width: 560px) {
  .og-barre { gap: 6px; padding-left: 8px; padding-right: 8px; }
  .og-barre .bouton { padding: 0 9px; font-size: var(--t-13); }
  .og-onglets { flex: 1; }
  .og-onglets button { flex: 1 1 auto; min-width: 0; padding: 0 6px; font-size: var(--t-13); }
  .og-long { display: none; }
  .og-court { display: inline; }
}

/* Le menu déroulant des onglets (08/10/2026) : caché au bureau ; au téléphone, il remplace la rangée.
   Préfixe :is(html, html[data-theme]) :is(.page-app, body) : instrument.css pose fond et retour à la ligne sur tous les segments, à poids (0,4,1). */
.og-choix { display: none; }
.og-desc { display: none; }
/* Les deux recherches de parcelles (par hauteur, par propriétaire) séparées des autres données (Henri, 23/10/2026) */
.og-sep { display: none; }
:is(html, html[data-theme]) :is(.page-app, body) .og-barre.og-ouvert .og-sep { display: block; height: 1px; margin: 4px 10px; background: var(--i-trait, var(--filet-2, var(--filet))); }
@media (max-width: 699px) {
  .og-barre { position: relative; }
  :is(html, html[data-theme]) :is(.page-app, body) .og-choix { display: inline-flex; flex: 1 1 auto; min-width: 0; align-items: center; justify-content: space-between; gap: 8px; height: 44px; padding: 0 12px; border: 0; border-radius: var(--r-moyen); background: var(--i-seg, var(--survol)); color: var(--i-encre, var(--encre)); font: inherit; font-size: var(--t-15); font-weight: 600; cursor: pointer; }
  .og-choix span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
  .og-choix svg { flex: none; width: 14px; height: 14px; transition: transform .15s; }
  .og-barre.og-ouvert .og-choix svg { transform: rotate(180deg); }
  .og-choix:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
  /* la rangée devient la liste du menu, sous la barre */
  :is(html, html[data-theme]) :is(.page-app, body) .og-barre .og-onglets { display: none; }
  :is(html, html[data-theme]) :is(.page-app, body) .og-barre.og-ouvert .og-onglets { display: flex; flex-direction: column; align-items: stretch; gap: 2px; position: absolute; z-index: 30; top: calc(100% + 4px); left: 8px; right: 8px; padding: 6px; border-radius: var(--r-panneau); background: var(--i-panneau, var(--fond)); box-shadow: 0 0 0 1px var(--i-trait, var(--filet-2)), 0 16px 40px rgba(0, 0, 0, .45); }
  :is(html, html[data-theme]) :is(.page-app, body) .og-barre.og-ouvert .og-onglets > button { display: grid; justify-items: start; gap: 2px; width: 100%; height: auto; min-height: 56px; padding: 8px 12px; border-radius: var(--r-moyen); background: none; box-shadow: none; text-align: left; white-space: normal; font-size: var(--t-15); color: var(--i-encre, var(--encre)); }
  :is(html, html[data-theme]) :is(.page-app, body) .og-barre.og-ouvert .og-onglets > button[aria-selected="true"] { background: var(--i-seg, var(--survol)); }
  :is(html, html[data-theme]) :is(.page-app, body) .og-barre.og-ouvert .og-long { display: inline; font-weight: 600; }
  :is(html, html[data-theme]) :is(.page-app, body) .og-barre.og-ouvert .og-court { display: none; }
  :is(html, html[data-theme]) :is(.page-app, body) .og-barre.og-ouvert .og-desc { display: block; white-space: normal; font-size: var(--t-13); font-weight: 400; line-height: 1.35; color: var(--i-encre-3, var(--encre-3)); }
}

/* Plus compacte au bureau (Henri, 09/10/2026 : « optimise en plus compacte ») : barre de 40 px,
   onglets de 26 px serrés, boutons Fermer / Exporter à leur hauteur. Préfixe
   :is(html, html[data-theme]) :is(.page-app, body) .pg : instrument.css pose ses segments à (0,5,1). */
@media (min-width: 900px) and (pointer: fine) {
  :is(html, html[data-theme]) :is(.page-app, body) .pg .og-barre { min-height: 40px; gap: 6px; padding-top: calc(env(safe-area-inset-top) + 4px); padding-bottom: 4px; }
  :is(html, html[data-theme]) :is(.page-app, body) .pg .og-barre .bouton { height: 28px; min-height: 0; padding: 0 10px; font-size: var(--t-13); }
  :is(html, html[data-theme]) :is(.page-app, body) .pg .og-barre .og-onglets { gap: 0; padding: 2px; border-radius: var(--r-bouton); }
  :is(html, html[data-theme]) :is(.page-app, body) .pg .og-barre .og-onglets > button { height: 24px; min-height: 0 !important; padding: 0 10px; border-radius: var(--r-pastille); font-size: var(--t-13); }
}
