/* ===========================================================
   AGENCE MOMAËL — Ambiance de fond (même design que la page Applications)
   Deux calques décoratifs, aucun clic, aucun texte :
   1) body::after  = le grand cercle fin en haut à droite (anneau + deux halos), comme le hero de applications.php.
   2) body::before = lueurs douces. Jour : voile chaud or/violet, tous écrans. Nuit : ordinateur seulement (≥ 960 px, souris).
   Déploiement progressif : uniquement quand <html data-themeable> (réglage admin « theme_modes »).
   La page de commande garde son propre fond sur ordinateur (.oa), on n'y ajoute que le cercle.
   =========================================================== */

/* ---- Le cercle (nuit par défaut, jour ci-dessous) ---- */
html[data-themeable] body::after {
  --rg-line: rgba(232,184,75,.20); --rg-a: rgba(232,184,75,.035); --rg-b: rgba(139,111,240,.04);
  content: ""; position: absolute; top: 84px; right: 0; width: min(560px, 100%); height: 380px; z-index: -1; pointer-events: none;
  background:
    radial-gradient(circle at calc(100% - 100px) 40px, transparent 229px, var(--rg-line) 229.5px, var(--rg-line) 230.5px, transparent 231px),
    radial-gradient(circle at calc(100% - 100px) 40px, var(--rg-a) 0 265px, transparent 266px),
    radial-gradient(circle at calc(100% - 100px) 40px, var(--rg-b) 0 305px, transparent 306px);
  -webkit-mask-image: linear-gradient(180deg, #000 0%, #000 70%, transparent 100%); mask-image: linear-gradient(180deg, #000 0%, #000 70%, transparent 100%);
}
html[data-themeable][data-theme="light"] body::after { --rg-line: rgba(212,163,62,.26); --rg-a: rgba(212,163,62,.04); --rg-b: rgba(108,67,216,.03); }

/* ---- Jour : voile chaud (or en haut à droite, violet léger plus bas), sur tous les écrans ---- */
html[data-themeable][data-theme="light"] body:not(:has(main.oa))::before {
  content: ""; position: fixed; inset: 0; z-index: -1; pointer-events: none;
  background:
    radial-gradient(ellipse 60% 46% at 80% 6%, rgba(212,163,62,.16), transparent 70%),
    radial-gradient(ellipse 56% 44% at 64% 62%, rgba(108,67,216,.07), transparent 72%),
    linear-gradient(130deg, #ffffff 0%, #faf9ff 52%, #f8f6ef 100%);
}

/* ---- Ordinateur : lueurs + fine trame de points (nuit et jour) ---- */
@media (min-width: 960px) and (hover: hover) and (pointer: fine) {
  html[data-themeable] body:not(:has(main.oa))::before {
    content: ""; position: fixed; inset: 0; z-index: -1; pointer-events: none;
    background:
      radial-gradient(900px 520px at 12% -6%, rgba(232,184,75,.16), transparent 62%),
      radial-gradient(820px 560px at 96% 8%, rgba(118,96,255,.17), transparent 60%),
      radial-gradient(700px 480px at 60% 108%, rgba(232,184,75,.08), transparent 65%),
      radial-gradient(rgba(255,255,255,.07) 1px, transparent 1.4px) 0 0 / 26px 26px;
    -webkit-mask-image: linear-gradient(180deg, #000 0%, #000 55%, rgba(0,0,0,.35) 100%);
            mask-image: linear-gradient(180deg, #000 0%, #000 55%, rgba(0,0,0,.35) 100%);
  }
  html[data-themeable][data-theme="light"] body:not(:has(main.oa))::before {
    background:
      radial-gradient(ellipse 60% 46% at 80% 6%, rgba(212,163,62,.16), transparent 70%),
      radial-gradient(ellipse 56% 44% at 64% 62%, rgba(108,67,216,.07), transparent 72%),
      radial-gradient(rgba(20,18,43,.07) 1px, transparent 1.4px) 0 0 / 26px 26px,
      linear-gradient(130deg, #ffffff 0%, #faf9ff 52%, #f8f6ef 100%);
    -webkit-mask-image: none; mask-image: none;
  }
}

/* Menu latéral fermé : son ombre débordait sur le bord gauche de l'écran (bande grise visible en mode jour) */
html[data-themeable] .ph-side-menu:not(.open) { box-shadow: none; }
@media (max-width: 640px) { html[data-themeable] body::after { --rg-line: rgba(232,184,75,.14); } html[data-themeable][data-theme="light"] body::after { --rg-line: rgba(212,163,62,.18); } }
