/* Bayān 10.17 — menus déroulants soignés + thèmes immersifs.
   Aucun des thèmes historiques n'est modifié typographiquement. */

/* --------------------------------------------------------------------------
   1. Listes déroulantes : chevron vectoriel, alignement constant et zone sûre
   -------------------------------------------------------------------------- */
html[data-bayaan-theme] select:not([multiple]){
  -webkit-appearance:none!important;
  appearance:none!important;
  min-height:42px;
  padding-inline-start:12px!important;
  padding-inline-end:44px!important;
  color:var(--bayaan-text)!important;
  background-color:var(--bayaan-field,var(--bayaan-surface))!important;
  background-image:
    linear-gradient(45deg,transparent 50%,var(--bayaan-select-arrow,var(--bayaan-text)) 50%),
    linear-gradient(135deg,var(--bayaan-select-arrow,var(--bayaan-text)) 50%,transparent 50%),
    linear-gradient(var(--bayaan-border),var(--bayaan-border))!important;
  background-position:
    calc(100% - 18px) calc(50% - 2px),
    calc(100% - 12px) calc(50% - 2px),
    calc(100% - 34px) 50%!important;
  background-size:6px 6px,6px 6px,1px 22px!important;
  background-repeat:no-repeat!important;
  border-color:var(--bayaan-border)!important;
  border-radius:12px!important;
  box-shadow:0 1px 0 color-mix(in srgb,var(--bayaan-text) 4%,transparent)!important;
  cursor:pointer!important;
  text-overflow:ellipsis;
}
html[data-bayaan-theme] select:not([multiple]):hover{
  border-color:var(--bayaan-border-strong)!important;
}
html[data-bayaan-theme] select:not([multiple]):focus{
  outline:none!important;
  border-color:var(--bayaan-focus)!important;
  box-shadow:0 0 0 3px color-mix(in srgb,var(--bayaan-focus) 20%,transparent)!important;
}
html[data-bayaan-theme] select:not([multiple]):disabled{cursor:not-allowed!important;opacity:.58!important}
html[data-bayaan-theme] select option{background:var(--bayaan-surface)!important;color:var(--bayaan-text)!important}

/* Les petits selects des lecteurs restent compacts sans écraser le chevron. */
html[data-bayaan-theme] :is(.audio-dock,.husary-player,.french-reader-player) select:not([multiple]){
  min-height:36px!important;padding-inline-end:38px!important;
  background-position:calc(100% - 16px) calc(50% - 2px),calc(100% - 10px) calc(50% - 2px),calc(100% - 30px) 50%!important;
}

/* --------------------------------------------------------------------------
   2. Chevrons des menus repliables : dessin CSS, plus de caractère “⌄” bancal
   -------------------------------------------------------------------------- */
.airy-chevron,
.v7-study-chevron{
  position:relative!important;
  display:inline-grid!important;
  place-items:center!important;
  flex:0 0 30px!important;
  width:30px!important;height:30px!important;
  font-size:0!important;
  color:var(--bayaan-emphasis,var(--bayaan-text))!important;
}
.airy-chevron::after,
.v7-study-chevron::after{
  content:""!important;
  width:8px!important;height:8px!important;
  border-right:2px solid currentColor!important;
  border-bottom:2px solid currentColor!important;
  transform:translateY(-2px) rotate(45deg)!important;
  transform-origin:center!important;
  transition:transform .18s ease!important;
}
.airy-disclosure[open] .airy-chevron::after,
.v7-study-corpus[open] .v7-study-chevron::after{
  transform:translateY(2px) rotate(225deg)!important;
}

.bayaan-mobile-tabs-toggle::after,
.docs-mobile-toc summary::after,
.v7-advanced-toggle .v88-filter-toggle-main::after{
  content:""!important;
  flex:0 0 auto!important;
  width:9px!important;height:9px!important;
  margin:0 5px 4px 8px!important;
  border-right:2px solid var(--bayaan-emphasis,var(--bayaan-text))!important;
  border-bottom:2px solid var(--bayaan-emphasis,var(--bayaan-text))!important;
  color:transparent!important;
  font-size:0!important;
  transform:rotate(45deg)!important;
  transform-origin:center!important;
  transition:transform .18s ease!important;
}
.bayaan-mobile-tabs-toggle[aria-expanded="true"]::after,
.docs-mobile-toc[open] summary::after,
.search-panel.v7-filters-open .v7-advanced-toggle .v88-filter-toggle-main::after{
  transform:rotate(225deg)!important;
  margin-bottom:-3px!important;
}

/* --------------------------------------------------------------------------
   3. Thème Informatique 70 — terminal à phosphore, ambre et vert circuit
   -------------------------------------------------------------------------- */
html[data-bayaan-theme="retro70"]{
  color-scheme:dark;
  --bayaan-bg:#10120b;--bayaan-surface:#171a10;--bayaan-surface-2:#202514;--bayaan-surface-3:#2b3218;--bayaan-field:#0c0f09;
  --bayaan-text:#f3d77b;--bayaan-muted:#b4aa73;--bayaan-border:#5b6334;--bayaan-border-strong:#89904c;
  --bayaan-accent:#f0a41a;--bayaan-accent-2:#95c75b;--bayaan-link:#b9e278;--bayaan-gold:#f0a41a;--bayaan-emphasis:#f6bd43;
  --bayaan-action-bg:#f0a41a;--bayaan-action-text:#18160a;--bayaan-action-hover:#ffc553;--bayaan-focus:#b8e66d;--bayaan-selection:#514516;
  --bayaan-shadow:0 18px 48px rgba(0,0,0,.44);
  --bayaan-nav-bg:#13170d;--bayaan-nav-text:#f3d77b;--bayaan-nav-muted:#a6a06d;--bayaan-nav-border:#596233;--bayaan-nav-active-bg:#f0a41a;--bayaan-nav-active-text:#17150a;
  --bayaan-hero-a:#11150c;--bayaan-hero-b:#202713;--bayaan-hero-text:#f4dc89;--bayaan-hero-muted:#b9af79;
  --bayaan-highlight-bg:#d69518;--bayaan-highlight-text:#141208;--bayaan-highlight-border:#ffca53;
  --bayaan-info-bg:#202918;--bayaan-info-text:#c6d99b;--bayaan-success-bg:#1f321a;--bayaan-success-text:#c2e990;--bayaan-warning-bg:#3b2b10;--bayaan-warning-text:#ffd675;--bayaan-danger-bg:#351916;--bayaan-danger-text:#ffaaa0;
  --bayaan-selected-bg:#f0a41a;--bayaan-selected-text:#18160a;--bayaan-select-arrow:#f3d77b;
}
html[data-bayaan-theme="retro70"] body{
  font-family:"IBM Plex Mono","Courier New",Courier,monospace!important;
  background-color:#10120b!important;
  background-image:
    repeating-linear-gradient(0deg,rgba(243,215,123,.028) 0,rgba(243,215,123,.028) 1px,transparent 1px,transparent 4px),
    radial-gradient(circle at 76% 5%,rgba(149,199,91,.10),transparent 33%),
    linear-gradient(180deg,#11140c,#0b0d08)!important;
}
html[data-bayaan-theme="retro70"] :is(h1,h2,h3,h4,.brand strong,.result-ref,.verse-ref){
  font-family:"IBM Plex Mono","Courier New",Courier,monospace!important;
  letter-spacing:-.03em!important;
}
html[data-bayaan-theme="retro70"] :is(.panel,.card,.verse-card,.result-card,.analysis-card,.hero-card){
  box-shadow:inset 0 0 0 1px rgba(149,199,91,.035),0 14px 34px rgba(0,0,0,.32)!important;
}

/* --------------------------------------------------------------------------
   4. Thème Désert — sable, argile, ocre et ombre de dune
   -------------------------------------------------------------------------- */
html[data-bayaan-theme="desert"]{
  color-scheme:light;
  --bayaan-bg:#ead6b4;--bayaan-surface:#fff5e4;--bayaan-surface-2:#f3dfbf;--bayaan-surface-3:#e4c18f;--bayaan-field:#fffaf1;
  --bayaan-text:#352318;--bayaan-muted:#725846;--bayaan-border:#bd956b;--bayaan-border-strong:#8f6545;
  --bayaan-accent:#b85d2f;--bayaan-accent-2:#794126;--bayaan-link:#7b4930;--bayaan-gold:#c78b2c;--bayaan-emphasis:#9a5d20;
  --bayaan-action-bg:#6f3c26;--bayaan-action-text:#fff8eb;--bayaan-action-hover:#8c4b2d;--bayaan-focus:#bf6c2f;--bayaan-selection:#f2c878;
  --bayaan-shadow:0 20px 55px rgba(92,56,31,.16);
  --bayaan-nav-bg:#f7e8cf;--bayaan-nav-text:#352318;--bayaan-nav-muted:#725846;--bayaan-nav-border:#bb9065;--bayaan-nav-active-bg:#a94f27;--bayaan-nav-active-text:#fff8ec;
  --bayaan-hero-a:#f8e8ce;--bayaan-hero-b:#dca86f;--bayaan-hero-text:#352318;--bayaan-hero-muted:#6c5140;
  --bayaan-highlight-bg:#eab34d;--bayaan-highlight-text:#2b1b10;--bayaan-highlight-border:#8d5322;
  --bayaan-info-bg:#efe0c7;--bayaan-info-text:#604632;--bayaan-success-bg:#dfe2c5;--bayaan-success-text:#465132;--bayaan-warning-bg:#f5d28b;--bayaan-warning-text:#603c0b;--bayaan-danger-bg:#eac7b7;--bayaan-danger-text:#6d3325;
  --bayaan-selected-bg:#7b4329;--bayaan-selected-text:#fff8ec;--bayaan-select-arrow:#5c3a26;
}
html[data-bayaan-theme="desert"] body{
  font-family:Palatino,"Palatino Linotype","Book Antiqua",Georgia,serif!important;
  background-color:#ead6b4!important;
  background-image:
    radial-gradient(130% 58% at 82% 102%,rgba(142,75,36,.24) 0 27%,transparent 28%),
    radial-gradient(110% 54% at 22% 98%,rgba(211,158,89,.36) 0 34%,transparent 35%),
    linear-gradient(180deg,#f7ead4 0%,#ead6b4 48%,#dfbd8e 100%)!important;
  background-attachment:fixed!important;
}
html[data-bayaan-theme="desert"] :is(h1,h2,h3,h4,.brand strong){font-family:Georgia,"Times New Roman",serif!important;letter-spacing:-.02em}

/* --------------------------------------------------------------------------
   5. Thème Évangile — parchemin, encre, bordeaux et lettres araméennes
   -------------------------------------------------------------------------- */
html[data-bayaan-theme="gospel"]{
  color-scheme:light;
  --bayaan-bg:#efe6d5;--bayaan-surface:#fffaf1;--bayaan-surface-2:#f1e4cf;--bayaan-surface-3:#ddc6a2;--bayaan-field:#fffdf8;
  --bayaan-text:#261d19;--bayaan-muted:#6d5a4f;--bayaan-border:#bba78b;--bayaan-border-strong:#897159;
  --bayaan-accent:#6d2a3f;--bayaan-accent-2:#243b5c;--bayaan-link:#3f5575;--bayaan-gold:#b68a49;--bayaan-emphasis:#8f6532;
  --bayaan-action-bg:#243b5c;--bayaan-action-text:#fff9ee;--bayaan-action-hover:#365477;--bayaan-focus:#a87534;--bayaan-selection:#e7c982;
  --bayaan-shadow:0 18px 54px rgba(55,38,25,.14);
  --bayaan-nav-bg:#fff9ee;--bayaan-nav-text:#261d19;--bayaan-nav-muted:#6b594e;--bayaan-nav-border:#b8a58b;--bayaan-nav-active-bg:#6d2a3f;--bayaan-nav-active-text:#fff7ec;
  --bayaan-hero-a:#fff9ed;--bayaan-hero-b:#e8d7bc;--bayaan-hero-text:#261d19;--bayaan-hero-muted:#68564b;
  --bayaan-highlight-bg:#e3bc69;--bayaan-highlight-text:#241912;--bayaan-highlight-border:#815c29;
  --bayaan-info-bg:#e8e5df;--bayaan-info-text:#3e4d60;--bayaan-success-bg:#e2eadf;--bayaan-success-text:#425b40;--bayaan-warning-bg:#f3dfb6;--bayaan-warning-text:#624a1a;--bayaan-danger-bg:#ead4d6;--bayaan-danger-text:#6d3541;
  --bayaan-selected-bg:#6d2a3f;--bayaan-selected-text:#fff8ef;--bayaan-select-arrow:#4c3c31;
}
html[data-bayaan-theme="gospel"] body{
  font-family:"Iowan Old Style","Palatino Linotype",Palatino,Georgia,serif!important;
  background-color:#efe6d5!important;
  background-image:
    linear-gradient(rgba(247,239,224,.83),rgba(239,230,213,.90)),
    url("./assets/theme-gospel-aramaic.svg")!important;
  background-repeat:no-repeat,no-repeat!important;
  background-size:cover,min(1180px,120vw) auto!important;
  background-position:center,88% 90px!important;
  background-attachment:fixed,fixed!important;
}
html[data-bayaan-theme="gospel"] :is(h1,h2,h3,h4,.brand strong,.result-ref,.verse-ref){
  font-family:"Iowan Old Style","Baskerville","Palatino Linotype",Georgia,serif!important;
  font-weight:650!important;letter-spacing:-.022em!important;
}
html[data-bayaan-theme="gospel"] :is(.hero,.hero-card,.docs-hero){
  background-image:
    linear-gradient(110deg,color-mix(in srgb,var(--bayaan-surface) 96%,transparent),color-mix(in srgb,var(--bayaan-surface-2) 82%,transparent)),
    url("./assets/theme-gospel-aramaic.svg")!important;
  background-size:cover,720px auto!important;
  background-position:center,110% 28%!important;
  background-repeat:no-repeat!important;
}

/* Préserve les polices des scripts religieux dans les 3 nouveaux thèmes. */
:is(html[data-bayaan-theme="retro70"],html[data-bayaan-theme="desert"],html[data-bayaan-theme="gospel"]) :is(.arabic,.arabic-verse,[lang="ar"]){font-family:"Amiri Quran","Amiri","Noto Naskh Arabic",serif!important}
:is(html[data-bayaan-theme="retro70"],html[data-bayaan-theme="desert"],html[data-bayaan-theme="gospel"]) :is(.hebrew,[lang="he"]){font-family:"Times New Roman","Noto Serif Hebrew",serif!important}
:is(html[data-bayaan-theme="retro70"],html[data-bayaan-theme="desert"],html[data-bayaan-theme="gospel"]) :is(.syr,.syriac,[lang="syr"]){font-family:"Segoe UI Historic","Noto Sans Syriac",serif!important}

/* Swatches du sélecteur de thèmes. */
.theme-swatch.retro70{background:linear-gradient(135deg,#11140c 0 48%,#f0a41a 48% 73%,#95c75b 73%)!important}
.theme-swatch.desert{background:linear-gradient(135deg,#f7ead4 0 42%,#d59b59 42% 72%,#8d4d2c 72%)!important}
.theme-swatch.gospel{background:linear-gradient(135deg,#fff8ea 0 42%,#6d2a3f 42% 69%,#243b5c 69% 84%,#b68a49 84%)!important}

@media(max-width:700px){
  html[data-bayaan-theme] select:not([multiple]){padding-inline-end:42px!important;background-position:calc(100% - 17px) calc(50% - 2px),calc(100% - 11px) calc(50% - 2px),calc(100% - 32px) 50%!important}
  html[data-bayaan-theme="gospel"] body{background-size:cover,920px auto!important;background-position:center,72% 110px!important}
  html[data-bayaan-theme="gospel"] :is(.hero,.hero-card,.docs-hero){background-size:cover,560px auto!important;background-position:center,72% 35%!important}
}
