/* =====================================================================
   White-label Jeremy Bouznah pour Vikunja — injecté via proxy (nginx sub_filter)
   Aucune modification du binaire Vikunja. Réversible (retirer l'injection).
   Charte JB : fond clair, accent unique champagne, Manrope + Cormorant.
   ===================================================================== */

/* Polices JB (chargées depuis Google Fonts) */
@import url('https://fonts.googleapis.com/css2?family=Manrope:wght@400;500;600;700;800&family=Cormorant+Garamond:wght@500;600&display=swap');

:root {
  /* Accent champagne — décale toute la gamme "primary/link" de Vikunja (ex-bleu 217°) */
  --primary-hsl: 38deg, 52%, 44%;
  --primary: hsla(38deg, 52%, 44%, 1);
  --primary-light: hsla(38deg, 52%, 94%, 1);
  --primary-dark: hsla(38deg, 58%, 30%, 1);
  --primary-dark-l: 30%;
  --primary-s: 52%;
  --primary-invert: #ffffff;

  --link: hsla(38deg, 55%, 42%, 1);
  --link-l: 42%;
  --link-h: 38deg;
  --link-hover: hsla(38deg, 58%, 36%, 1);
  --link-visited: hsla(38deg, 45%, 40%, 1);
  --link-dark: hsla(38deg, 58%, 34%, 1);
  --link-dark-l: 34%;
  --link-focus-border: hsla(38deg, 55%, 42%, 1);

  --input-focus-border-color: hsla(38deg, 55%, 45%, 1);
  --input-focus-box-shadow-color: hsla(38deg, 55%, 45%, .25);
  --table-row-active-background-color: hsla(38deg, 52%, 44%, 1);

  /* Typos de marque */
  --family-primary: 'Manrope', -apple-system, BlinkMacSystemFont, system-ui, sans-serif;
}

/* Corps en Manrope, titres en Cormorant */
body, .input, .button, .textarea, .select select {
  font-family: 'Manrope', -apple-system, system-ui, sans-serif !important;
}
h1, h2, h3, .title, .login .image-title, .card-title {
  font-family: 'Cormorant Garamond', Georgia, serif !important;
  letter-spacing: -0.01em;
}

/* Boutons primaires : champagne + texte encre (lisibilité) */
.button.is-primary {
  background-color: hsla(38deg, 52%, 46%, 1) !important;
  border-color: hsla(38deg, 52%, 46%, 1) !important;
  color: #111111 !important;
}
.button.is-primary:hover,
.button.is-primary:focus {
  background-color: hsla(38deg, 58%, 38%, 1) !important;
  border-color: hsla(38deg, 58%, 38%, 1) !important;
  color: #ffffff !important;
}

/* ============ LOGO : remplacer le lama + wordmark "Vikunja" par le logo JB ============ */
/* Le logo natif est parfois un <div class="logo"><svg>, parfois un <svg class="logo"> :
   on masque le SVG natif dans tous les cas, puis on pose le logo JB sur son conteneur. */
svg.logo,
.logo > svg,
.logo svg,
img.logo {
  display: none !important;
}

/* Cas 1 : le conteneur porte lui-même la classe .logo (page de login) */
div.logo,
a.logo {
  background-image: url('/jb/logo.svg');
  background-repeat: no-repeat;
  background-position: left center;
  background-size: contain;
  width: 190px;
  height: 48px;
}

/* Cas 2 : c'est le <svg class="logo"> qui est visible → on cible son parent direct */
:where(div, a):has(> svg.logo) {
  background-image: url('/jb/logo.svg');
  background-repeat: no-repeat;
  background-position: left center;
  background-size: contain;
  width: 190px;
  height: 48px;
}

/* ============ Page de login : remplacer la photo de lamas par un aplat JB ============ */
.login .image,
section.image {
  background-image:
    linear-gradient(160deg, #fafaf8 0%, #f2ece0 55%, #e9dcc4 100%) !important;
  position: relative;
}
.login .image .image-title,
section.image .image-title {
  color: #111111 !important;
  font-weight: 600;
}

/* ============ Masquer les décorations lama (watermark, loader mascotte) ============ */
/* Watermark lama en fond des pages non authentifiées / hors-ligne */
.no-auth-wrapper,
.offline {
  background-image: none !important;
}
[class*="llama" i],
.llama-loader,
.loader-container svg,
.hero-image .llama,
img[src*="llama" i],
svg[class*="llama" i] {
  display: none !important;
}

/* Loader générique : recolorer en champagne plutôt que lama */
.loader-container,
.loader {
  color: hsla(38deg, 55%, 44%, 1) !important;
}

/* Liens / accents divers */
a { color: hsla(38deg, 55%, 40%, 1); }
a:hover { color: hsla(38deg, 58%, 34%, 1); }
