/* GFA v2.6.6 — final dynamic colours for Agent/Caissier/Gestionnaire auth pages.
   IMPORTANT: loaded after the historical theme files so no CORIS blue can win.
   Mapping validated by APITA:
   - Primary: strong branding / left panel start
   - Secondary: auth action colour (Welcome, Login button, links, focus)
   - Accent: decorative details
*/
html.gfa-auth-role-view{
  --gfa-auth-action:var(--gfa-secondary,#17613a);
}

/* Left branding block: keep the validated primary -> secondary identity. */
html.gfa-auth-role-view .cbi-auth-trust{
  background:linear-gradient(150deg,var(--gfa-primary,#a90b0b) 0%,var(--gfa-secondary,#17613a) 100%)!important;
}

/* Secondary colour is the action colour on interior login pages. */
html.gfa-auth-role-view .cbi-auth-header h1,
html.gfa-auth-role-view .cbi-auth-header h2,
html.gfa-auth-role-view .cbi-auth-header h3,
html.gfa-auth-role-view .cbi-auth-title{
  color:var(--gfa-auth-action)!important;
}

html.gfa-auth-role-view .cbi-btn-primary,
html.gfa-auth-role-view button.cbi-btn-primary,
html.gfa-auth-role-view .cbi-auth-form button[type="submit"]{
  background:var(--gfa-auth-action)!important;
  background-color:var(--gfa-auth-action)!important;
  border-color:var(--gfa-auth-action)!important;
  color:#fff!important;
  box-shadow:0 8px 18px color-mix(in srgb,var(--gfa-auth-action) 22%,transparent)!important;
}
html.gfa-auth-role-view .cbi-btn-primary:hover,
html.gfa-auth-role-view .cbi-btn-primary:focus,
html.gfa-auth-role-view .cbi-auth-form button[type="submit"]:hover,
html.gfa-auth-role-view .cbi-auth-form button[type="submit"]:focus{
  filter:brightness(.92)!important;
  background:var(--gfa-auth-action)!important;
  border-color:var(--gfa-auth-action)!important;
}

html.gfa-auth-role-view .cbi-auth-link,
html.gfa-auth-role-view .cbi-auth-link:visited,
html.gfa-auth-role-view .cbi-auth-footer-links a,
html.gfa-auth-role-view .cbi-auth-footer-links a:visited,
html.gfa-auth-role-view .cbi-auth-back,
html.gfa-auth-role-view .cbi-auth-back:visited,
html.gfa-auth-role-view a[href*="connexion"]{
  color:var(--gfa-auth-action)!important;
}
html.gfa-auth-role-view .cbi-auth-link:hover,
html.gfa-auth-role-view .cbi-auth-footer-links a:hover,
html.gfa-auth-role-view .cbi-auth-back:hover,
html.gfa-auth-role-view a[href*="connexion"]:hover{
  color:var(--gfa-auth-action)!important;
  filter:brightness(.82);
}

/* Inputs: neutral by default, secondary only when the user interacts. */
html.gfa-auth-role-view .cbi-auth-form input:focus,
html.gfa-auth-role-view .cbi-auth-form .form-control:focus,
html.gfa-auth-role-view .cbi-auth-form .form-control:focus-within{
  border-color:var(--gfa-auth-action)!important;
  box-shadow:0 0 0 3px color-mix(in srgb,var(--gfa-auth-action) 13%,transparent)!important;
  outline:none!important;
}

/* Common icon/link colours inside the auth form — removes remaining hard-coded blue. */
html.gfa-auth-role-view .cbi-auth-form a,
html.gfa-auth-role-view .cbi-auth-form button:not(.cbi-btn-primary).link,
html.gfa-auth-role-view .cbi-auth-footer-links{
  color:var(--gfa-auth-action)!important;
}
