/* Bayān 10.13 — quatre thèmes spéciaux inspirés des références visuelles.
   Les thèmes Actuel / Sombre / Pastel / Luxe conservent leur typographie existante. */

html[data-bayaan-theme="amber"]{
  color-scheme:light;
  --bayaan-bg:#fbf2df;--bayaan-surface:#fffaf0;--bayaan-surface-2:#f4e2c5;--bayaan-surface-3:#e8c893;--bayaan-field:#fffdf8;
  --bayaan-text:#2a160d;--bayaan-muted:#6e5342;--bayaan-border:#b9916a;--bayaan-border-strong:#8a6040;
  --bayaan-accent:#8d3d0b;--bayaan-accent-2:#5d2508;--bayaan-link:#78300b;--bayaan-gold:#e9a52a;--bayaan-emphasis:#9b560e;
  --bayaan-action-bg:#7f3008;--bayaan-action-text:#fff9ef;--bayaan-action-hover:#a64f0d;--bayaan-focus:#e59d1d;--bayaan-selection:#f6d99c;
  --bayaan-shadow:0 18px 52px rgba(92,49,18,.16);
  --bayaan-nav-bg:#fff7e8;--bayaan-nav-text:#29160d;--bayaan-nav-muted:#755b49;--bayaan-nav-border:#b99069;--bayaan-nav-active-bg:#efaa32;--bayaan-nav-active-text:#2b1607;
  --bayaan-hero-a:#fff8e9;--bayaan-hero-b:#f4ca84;--bayaan-hero-text:#2a160d;--bayaan-hero-muted:#684b37;
  --bayaan-highlight-bg:#f2b842;--bayaan-highlight-text:#241305;--bayaan-highlight-border:#95520a;
  --bayaan-info-bg:#f4e6d2;--bayaan-info-text:#5b3f2f;--bayaan-success-bg:#e8ead8;--bayaan-success-text:#3e4d2c;--bayaan-warning-bg:#f7dfaf;--bayaan-warning-text:#633a07;--bayaan-danger-bg:#f1d7cf;--bayaan-danger-text:#702c21;
}
html[data-bayaan-theme="nautical"]{
  color-scheme:light;
  --bayaan-bg:#f3f8f9;--bayaan-surface:#ffffff;--bayaan-surface-2:#e5f0f2;--bayaan-surface-3:#d3e6e9;--bayaan-field:#ffffff;
  --bayaan-text:#101c20;--bayaan-muted:#556b71;--bayaan-border:#90aeb4;--bayaan-border-strong:#5f858d;
  --bayaan-accent:#159ba3;--bayaan-accent-2:#0b6970;--bayaan-link:#087983;--bayaan-gold:#486d78;--bayaan-emphasis:#0f7680;
  --bayaan-action-bg:#101719;--bayaan-action-text:#ffffff;--bayaan-action-hover:#253237;--bayaan-focus:#159ba3;--bayaan-selection:#cdebed;
  --bayaan-shadow:0 20px 55px rgba(23,62,71,.12);
  --bayaan-nav-bg:#ffffff;--bayaan-nav-text:#101c20;--bayaan-nav-muted:#5b7076;--bayaan-nav-border:#9bb5ba;--bayaan-nav-active-bg:#159ba3;--bayaan-nav-active-text:#071f22;
  --bayaan-hero-a:#fbfdfe;--bayaan-hero-b:#dcecef;--bayaan-hero-text:#111c20;--bayaan-hero-muted:#5a7076;
  --bayaan-highlight-bg:#73d9de;--bayaan-highlight-text:#09282c;--bayaan-highlight-border:#147780;
  --bayaan-info-bg:#e1f1f4;--bayaan-info-text:#174c55;--bayaan-success-bg:#e5f1ed;--bayaan-success-text:#295746;--bayaan-warning-bg:#f5ebd5;--bayaan-warning-text:#624c1c;--bayaan-danger-bg:#f2e1e3;--bayaan-danger-text:#6d3239;
}
html[data-bayaan-theme="solaria"]{
  color-scheme:light;
  --bayaan-bg:#f7f6e9;--bayaan-surface:#fffef7;--bayaan-surface-2:#edf0d9;--bayaan-surface-3:#dce2bd;--bayaan-field:#ffffff;
  --bayaan-text:#20231e;--bayaan-muted:#626a5b;--bayaan-border:#a8af8f;--bayaan-border-strong:#777e64;
  --bayaan-accent:#ffd51d;--bayaan-accent-2:#20231e;--bayaan-link:#3c5a4d;--bayaan-gold:#a67300;--bayaan-emphasis:#806000;
  --bayaan-action-bg:#20231e;--bayaan-action-text:#ffffff;--bayaan-action-hover:#343832;--bayaan-focus:#ffd51d;--bayaan-selection:#fff0a1;
  --bayaan-shadow:0 18px 50px rgba(54,61,43,.12);
  --bayaan-nav-bg:#fffef8;--bayaan-nav-text:#20231e;--bayaan-nav-muted:#626a5b;--bayaan-nav-border:#aeb398;--bayaan-nav-active-bg:#ffd51d;--bayaan-nav-active-text:#1d211c;
  --bayaan-hero-a:#f8f8ec;--bayaan-hero-b:#e6edd4;--bayaan-hero-text:#20231e;--bayaan-hero-muted:#606959;
  --bayaan-highlight-bg:#ffd51d;--bayaan-highlight-text:#1b1e19;--bayaan-highlight-border:#806800;
  --bayaan-info-bg:#e3edf0;--bayaan-info-text:#344d54;--bayaan-success-bg:#e6edd9;--bayaan-success-text:#3d5335;--bayaan-warning-bg:#fff0aa;--bayaan-warning-text:#604d00;--bayaan-danger-bg:#f2dfdc;--bayaan-danger-text:#70342d;
}
html[data-bayaan-theme="bordeaux"]{
  color-scheme:light;
  --bayaan-bg:#f8f1eb;--bayaan-surface:#fffaf6;--bayaan-surface-2:#f2e6dd;--bayaan-surface-3:#ebd7ca;--bayaan-field:#fffdfb;
  --bayaan-text:#3e1018;--bayaan-muted:#7b4a53;--bayaan-border:#c9aa9d;--bayaan-border-strong:#aa6b63;
  --bayaan-accent:#a51f38;--bayaan-accent-2:#7f162a;--bayaan-link:#8f1830;--bayaan-gold:#c5a15a;--bayaan-emphasis:#aa7a20;
  --bayaan-action-bg:#9f1e35;--bayaan-action-text:#fffaf5;--bayaan-action-hover:#bb2942;--bayaan-focus:#d2ad62;--bayaan-selection:#f4dcc0;
  --bayaan-shadow:0 18px 48px rgba(86,24,35,.12);
  --bayaan-nav-bg:#fffaf6;--bayaan-nav-text:#48131d;--bayaan-nav-muted:#84525b;--bayaan-nav-border:#d4b2a7;--bayaan-nav-active-bg:#a51f38;--bayaan-nav-active-text:#fffaf6;
  --bayaan-hero-a:#fffaf6;--bayaan-hero-b:#f2dfd3;--bayaan-hero-text:#43121b;--bayaan-hero-muted:#7a4d56;
  --bayaan-highlight-bg:#e7c57a;--bayaan-highlight-text:#38130c;--bayaan-highlight-border:#b2872f;
  --bayaan-info-bg:#f6ece8;--bayaan-info-text:#5e3440;--bayaan-success-bg:#edf3e7;--bayaan-success-text:#35523a;--bayaan-warning-bg:#f9eed6;--bayaan-warning-text:#745315;--bayaan-danger-bg:#f7e1e0;--bayaan-danger-text:#7e2432;
}

/* Pont historique : les 4 nouveaux thèmes alimentent aussi les variables propres aux anciens modules. */
html[data-bayaan-theme="amber"],html[data-bayaan-theme="nautical"],html[data-bayaan-theme="solaria"],html[data-bayaan-theme="bordeaux"]{
  --ink:var(--bayaan-text)!important;--muted:var(--bayaan-muted)!important;--line:var(--bayaan-border)!important;
  --paper:var(--bayaan-surface)!important;--card:var(--bayaan-surface)!important;--panel:var(--bayaan-surface)!important;
  --cream:var(--bayaan-bg)!important;--bg:var(--bayaan-bg)!important;--shadow:var(--bayaan-shadow)!important;
  --green:var(--bayaan-accent)!important;--green2:var(--bayaan-accent-2)!important;--forest:var(--bayaan-accent-2)!important;--forest-2:var(--bayaan-accent)!important;
  --accent:var(--bayaan-accent)!important;--accent-dark:var(--bayaan-accent-2)!important;--gold:var(--bayaan-gold)!important;
}

/* Typographies uniquement sur les 4 thèmes spéciaux. */
html[data-bayaan-theme="amber"] body{font-family:"Avenir Next",Avenir,"Helvetica Neue",Arial,sans-serif!important}
html[data-bayaan-theme="amber"] :is(h1,h2,h3,h4,.brand strong,.result-ref,.verse-ref){font-family:Baskerville,"Iowan Old Style",Georgia,serif!important;font-weight:500!important;letter-spacing:-.015em}
html[data-bayaan-theme="nautical"] body{font-family:"Helvetica Neue",Helvetica,Arial,sans-serif!important}
html[data-bayaan-theme="nautical"] :is(h1,h2,h3,h4,.brand strong){font-family:"Helvetica Neue",Helvetica,Arial,sans-serif!important;font-weight:650!important;letter-spacing:-.025em}
html[data-bayaan-theme="solaria"] body{font-family:"Avenir Next",Avenir,"Century Gothic","Helvetica Neue",sans-serif!important}
html[data-bayaan-theme="solaria"] :is(h1,h2,h3,h4,.brand strong){font-family:"Avenir Next",Avenir,"Century Gothic",sans-serif!important;font-weight:650!important;letter-spacing:-.025em}
html[data-bayaan-theme="bordeaux"] body{font-family:"Helvetica Neue",Helvetica,Arial,sans-serif!important}
html[data-bayaan-theme="bordeaux"] :is(h1,h2,h3,h4,.brand strong,.result-ref,.verse-ref){font-family:Didot,"Bodoni 72","Bodoni MT","Times New Roman",serif!important;font-weight:500!important;letter-spacing:-.015em}

/* Préserve les fontes de scripts religieux. */
:is(html[data-bayaan-theme="amber"],html[data-bayaan-theme="nautical"],html[data-bayaan-theme="solaria"],html[data-bayaan-theme="bordeaux"]) :is(.arabic,.arabic-verse,[lang="ar"]){font-family:"Amiri Quran","Amiri","Noto Naskh Arabic",serif!important}
:is(html[data-bayaan-theme="amber"],html[data-bayaan-theme="nautical"],html[data-bayaan-theme="solaria"],html[data-bayaan-theme="bordeaux"]) :is(.hebrew,[lang="he"]){font-family:"Times New Roman","Noto Serif Hebrew",serif!important}
:is(html[data-bayaan-theme="amber"],html[data-bayaan-theme="nautical"],html[data-bayaan-theme="solaria"],html[data-bayaan-theme="bordeaux"]) :is(.syr,.syriac,[lang="syr"]){font-family:"Segoe UI Historic","Noto Sans Syriac",serif!important}

/* Ambiances inspirées des références. */
html[data-bayaan-theme="amber"] body{background:radial-gradient(circle at 92% 4%,rgba(240,169,48,.22),transparent 29%),linear-gradient(180deg,#fff9eb,#f9eed9)!important}
html[data-bayaan-theme="nautical"] body{background:radial-gradient(circle at 88% 2%,rgba(57,181,191,.13),transparent 31%),linear-gradient(180deg,#fbfdfe,#eef5f6)!important}
html[data-bayaan-theme="solaria"] body{background:radial-gradient(circle at 88% 3%,rgba(255,213,29,.20),transparent 30%),linear-gradient(180deg,#fffef6,#f3f5e6)!important}
html[data-bayaan-theme="bordeaux"] body{background:radial-gradient(circle at 88% 4%,rgba(197,161,90,.18),transparent 26%),radial-gradient(circle at 12% 0%,rgba(165,31,56,.12),transparent 30%),linear-gradient(180deg,#fcf7f2,#f3e7de)!important}

/* Actions & surlignage : contraste garanti. */
html[data-bayaan-theme="amber"] :is(.primary-button,.primary-btn){background:linear-gradient(135deg,#743007,#e39b24)!important;color:#fffaf1!important}
html[data-bayaan-theme="nautical"] :is(.primary-button,.primary-btn){background:#101719!important;color:#fff!important}
html[data-bayaan-theme="solaria"] :is(.primary-button,.primary-btn){background:#20231e!important;color:#fff!important}
html[data-bayaan-theme="bordeaux"] :is(.primary-button,.primary-btn){background:linear-gradient(135deg,#8f1830,#b72642)!important;color:#fffaf6!important;border-color:#8f1830!important}
html[data-bayaan-theme="amber"] :is(mark,.match,.matched-word,.highlight,.search-highlight),
html[data-bayaan-theme="nautical"] :is(mark,.match,.matched-word,.highlight,.search-highlight),
html[data-bayaan-theme="solaria"] :is(mark,.match,.matched-word,.highlight,.search-highlight),
html[data-bayaan-theme="bordeaux"] :is(mark,.match,.matched-word,.highlight,.search-highlight){background:var(--bayaan-highlight-bg)!important;color:var(--bayaan-highlight-text)!important}

/* Sélecteur des 4 nouveaux thèmes. */
.theme-panel-special-title{margin-top:7px!important;padding-top:12px!important;border-top:1px solid var(--bayaan-border)!important}
.theme-swatch.amber{background:linear-gradient(135deg,#fff8e8 0 40%,#7f3008 40% 69%,#efa72c 69%)!important}
.theme-swatch.nautical{background:linear-gradient(135deg,#ffffff 0 42%,#dcecef 42% 70%,#159ba3 70%)!important}
.theme-swatch.solaria{background:linear-gradient(135deg,#fffef7 0 40%,#dfe8ca 40% 68%,#ffd51d 68%)!important}
.theme-swatch.bordeaux{background:linear-gradient(135deg,#fff8f3 0 42%,#a51f38 42% 73%,#c5a15a 73%)!important}
.theme-panel{max-height:min(720px,calc(100vh - 24px))!important;overflow:auto!important;overscroll-behavior:contain!important}
