/* Bayān 10.5 — Interface aérée / divulgation progressive
   Mise en page uniquement : aucune fonction ni donnée n'est supprimée. */
:root{
  --airy-max:1280px;
  --airy-radius:20px;
  --airy-gap:clamp(16px,2vw,28px);
  --airy-pad:clamp(18px,2.2vw,30px);
}

/* Respiration générale */
body{scroll-padding-top:88px}
main{min-width:0}
.panel,.analysis-card,.method-card,.result-card,.breakdown-card,.table-card,
.search-panel,.reader-head,.word-profile,.occurrence-navigator{
  border-radius:var(--airy-radius)!important;
}
.panel,.analysis-card,.method-card,.breakdown-card,.table-card{box-shadow:0 10px 34px rgba(16,42,37,.055)!important}
.view{min-width:0}
.view:not(.embedded-view){padding-top:clamp(18px,3vw,42px);padding-bottom:clamp(34px,5vw,72px)}
.view:not(.embedded-view)>*,#compareView>*{max-width:var(--airy-max);margin-left:auto;margin-right:auto}

/* Barre de commandes calme */
.airy-focus-toggle{
  display:inline-flex;align-items:center;gap:8px;min-height:42px;padding:8px 12px;
  border:1px solid var(--line,#d7dfdb);border-radius:13px;background:var(--card,#fff);
  color:var(--ink,#142d27);font:750 12px/1 system-ui,-apple-system,"Segoe UI",sans-serif;
  cursor:pointer;white-space:nowrap;box-shadow:0 6px 18px rgba(16,42,37,.06)
}
.airy-focus-toggle .airy-focus-dot{width:8px;height:8px;border-radius:999px;background:var(--muted,#71817b)}
.airy-focus-toggle[aria-pressed="true"]{background:var(--ink,#142d27);color:#fff;border-color:transparent}
.airy-focus-toggle[aria-pressed="true"] .airy-focus-dot{background:#f0c47e}
.airy-focus-toggle small{font-size:10px;font-weight:650;opacity:.72}

/* Panneaux repliables communs */
.airy-disclosure{
  margin:16px 0 22px;border:1px solid var(--line,#d7dfdb);border-radius:17px;
  background:color-mix(in srgb,var(--card,#fff) 94%,transparent);overflow:hidden;
  box-shadow:0 7px 24px rgba(16,42,37,.045)
}
.airy-disclosure>summary{
  list-style:none;display:flex;align-items:center;justify-content:space-between;gap:18px;
  min-height:58px;padding:13px 16px;cursor:pointer;user-select:none;color:var(--ink,#142d27)
}
.airy-disclosure>summary::-webkit-details-marker{display:none}
.airy-summary-copy{display:flex;align-items:center;gap:11px;min-width:0}
.airy-summary-icon{display:grid;place-items:center;flex:0 0 34px;width:34px;height:34px;border-radius:11px;background:color-mix(in srgb,var(--green,#255d50) 10%,transparent);color:var(--green,#255d50);font-weight:900}
.airy-summary-copy strong,.airy-summary-copy small{display:block}
.airy-summary-copy strong{font-size:14px}
.airy-summary-copy small{margin-top:3px;color:var(--muted,#6e7c77);font-size:11px;font-weight:550}
.airy-chevron{font-size:18px;color:var(--muted,#6e7c77);transition:transform .2s ease}
.airy-disclosure[open] .airy-chevron{transform:rotate(180deg)}
.airy-disclosure-body{padding:4px 16px 18px;border-top:1px solid color-mix(in srgb,var(--line,#d7dfdb) 70%,transparent)}
.airy-disclosure-body>*:first-child{margin-top:16px}
.airy-disclosure-body>*:last-child{margin-bottom:0}

/* Recherche principale : l'entrée reste au premier plan */
#compareView .hero{margin-bottom:26px}
#compareView .search-panel{padding:var(--airy-pad)!important}
#compareView .input-row{gap:12px}
#compareView .query-field{font-size:13px}
#compareView .airy-disclosure .filters-grid{margin-top:0}
#compareView .airy-disclosure .checks{margin-top:16px}

/* Mīzān : recherche simple par défaut */
#searchView .hero{margin-bottom:clamp(20px,3vw,36px)}
#searchView .search-panel{padding:var(--airy-pad)!important}
#searchView .search-box{max-width:980px;margin-left:auto;margin-right:auto}
#searchView .search-context-row{max-width:980px;margin-left:auto;margin-right:auto}
#searchView .verse-similarity-search,#searchView .v89-options,#searchView .airy-disclosure{max-width:980px;margin-left:auto;margin-right:auto}
#searchView .filters-row{gap:16px!important;padding-top:2px}
#searchView .search-control-group{gap:14px!important}

/* Analyses : 4 familles au lieu de 9 cartes visibles à la fois */
.analytics-header,.analytics-controls{max-width:var(--airy-max);margin-left:auto;margin-right:auto}
.analytics-controls{padding:16px!important;gap:12px!important;border-radius:17px!important}
.analytics-grid.airy-grouped{display:block!important;max-width:var(--airy-max);margin:22px auto 0!important}
.airy-analysis-group{margin:14px 0 18px}
.airy-analysis-group>.airy-disclosure-body{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:18px;padding:18px}
.airy-analysis-group>.airy-disclosure-body>.analysis-card{margin:0!important;min-width:0}
.airy-analysis-group>.airy-disclosure-body>.analysis-card.wide{grid-column:1/-1}
.analysis-card{padding:clamp(18px,2vw,26px)!important}
.analysis-card-heading{gap:14px!important;margin-bottom:14px}
.analysis-note{line-height:1.55}

/* Lecture / calcul / méthode */
.surah-reader-shell,.reading-launcher,.calculator-shell,.method-grid,.source-note{max-width:var(--airy-max);margin-left:auto!important;margin-right:auto!important}
.method-grid{gap:20px!important}
.method-card{padding:clamp(20px,2vw,28px)!important}

/* Torah et Évangiles */
body .search-form.panel,body .reader-head.panel{padding:var(--airy-pad)!important}
body .search-form .airy-disclosure{margin-bottom:0}
body .grid.two{gap:20px!important}
body .grid.two>.panel{padding:var(--airy-pad)!important}

/* Research Lab / Research OS : onglets moins tassés */
.v100-os{max-width:var(--airy-max)!important;margin:28px auto!important;border-radius:22px!important}
.v100-shell{padding:clamp(16px,2.2vw,30px)!important}
.v100-tabs{display:flex!important;grid-template-columns:none!important;gap:6px!important;overflow-x:auto;scrollbar-width:thin;padding:6px!important}
.v100-tabs button{flex:0 0 auto;min-width:132px;padding:11px 14px!important}
.v100-panel{padding-top:28px!important}
.v100-result-card{padding:18px!important;margin:12px 0!important}
.v100-assistant-grid,.v100-hyp-layout,.v100-ms-grid{gap:22px!important}
.research-lab-v90,.research-lab-shell{max-width:var(--airy-max);margin-left:auto!important;margin-right:auto!important}

/* Focus : retire les explications longues, jamais les commandes */
body.bayaan-focus-mode .hero-script,
body.bayaan-focus-mode .hero-ornament,
body.bayaan-focus-mode footer,
body.bayaan-focus-mode .sources-note,
body.bayaan-focus-mode .analysis-warning,
body.bayaan-focus-mode .search-context-row,
body.bayaan-focus-mode .analysis-note,
body.bayaan-focus-mode .method-hero p,
body.bayaan-focus-mode .hero-copy>p:not(.eyebrow),
body.bayaan-focus-mode #compareView .hero p:not(.eyebrow){display:none!important}
body.bayaan-focus-mode .hero{min-height:auto!important;padding-top:24px!important;padding-bottom:24px!important}
body.bayaan-focus-mode .page-header{padding-top:16px!important;padding-bottom:16px!important}
body.bayaan-focus-mode .view:not(.embedded-view){padding-top:16px}

/* Les actions secondaires restent accessibles sans dominer */
.secondary-button,.secondary-btn,.ghost-btn,.text-button{box-shadow:none!important}
.result-actions,.v100-result-card footer{gap:7px!important}

/* Largeurs de lecture raisonnables */
.prose,.method-card p,.source-note p,.analysis-note,.hero-copy p{max-width:78ch}

@media(max-width:900px){
  .view:not(.embedded-view){padding-top:14px;padding-bottom:42px}
  .airy-focus-toggle small{display:none}
  .airy-analysis-group>.airy-disclosure-body{grid-template-columns:1fr}
  .airy-analysis-group>.airy-disclosure-body>.analysis-card.wide{grid-column:auto}
  .airy-disclosure>summary{min-height:54px;padding:11px 13px}
  .airy-summary-copy small{display:none}
  .v100-tabs button{min-width:118px}
}
@media(max-width:620px){
  :root{--airy-pad:16px;--airy-radius:17px}
  .airy-focus-toggle{min-height:40px;padding:7px 10px}
  .airy-summary-icon{width:30px;height:30px;flex-basis:30px}
  .airy-disclosure-body{padding:2px 12px 14px}
  .airy-analysis-group>.airy-disclosure-body{padding:12px;gap:12px}
  #searchView .search-panel,#compareView .search-panel{padding:15px!important}
}

/* Compatibilité avec l'ancien bouton mobile de filtres de Mīzān : le nouveau panneau le remplace. */
.airy-disclosure #v7AdvancedToggle,#v7AdvancedToggle:has(+ .airy-disclosure){display:none!important}
@media(max-width:760px){
  #searchView .search-panel .airy-disclosure[open] .filters-row{display:grid!important}
}
/* Mīzān masque historiquement .topbar-tools sur tablette/mobile ; garder Focus disponible sans réafficher le statut. */
@media(max-width:1240px){
  .topbar-tools:has(.airy-focus-toggle){display:flex!important;position:fixed;right:12px;top:72px;z-index:57;width:auto!important;min-width:0!important;max-width:none!important;overflow:visible!important;background:transparent!important}
  .topbar-tools:has(.airy-focus-toggle) .data-status{display:none!important}
  .topbar-tools:has(.airy-focus-toggle) .airy-focus-toggle{box-shadow:0 9px 28px rgba(16,42,37,.16)}
}
@media(max-width:560px){
  .topbar-tools:has(.airy-focus-toggle){top:68px;right:8px}
  .topbar-tools:has(.airy-focus-toggle) .airy-focus-toggle{min-height:36px;padding:6px 9px;font-size:11px}
}
