/* Thème KER pour Documenso (signature.ker.fr) — gabarit KER du 02/11/2026.
   Injecté par nginx (sub_filter), ne modifie pas l'application.
   Nuit #1D203F · Ambre #D49A2C (filets uniquement) · Fond #FBFBFD · Surface #EEF0F5
   Filet #D5D9E2 · Texte secondaire #565B70. Polices auto-hébergées, 400/500 seulement. */

@font-face{font-family:"IBM Plex Sans";font-style:normal;font-weight:400;font-display:swap;src:url(/ker-theme/fonts/ibm-plex-sans-latin-400.woff2) format("woff2")}
@font-face{font-family:"IBM Plex Sans";font-style:normal;font-weight:500 700;font-display:swap;src:url(/ker-theme/fonts/ibm-plex-sans-latin-500.woff2) format("woff2")}
@font-face{font-family:"Schibsted Grotesk";font-style:normal;font-weight:400 900;font-display:swap;src:url(/ker-theme/fonts/schibsted-grotesk-latin.woff2) format("woff2")}

:root, :root.dark-mode-disabled, .dark-mode-disabled{
  --font-sans:"IBM Plex Sans" !important;
  --background:240 33.3% 98.8% !important;          /* #FBFBFD */
  --foreground:234.7 37% 18% !important;            /* #1D203F */
  --muted:222.9 25.9% 94.7% !important;             /* #EEF0F5 */
  --muted-foreground:228.5 13.1% 38.8% !important;  /* #565B70 */
  --popover:240 33.3% 98.8% !important;
  --popover-foreground:234.7 37% 18% !important;
  --card:240 33.3% 98.8% !important;
  --card-border:221.5 18.3% 86.1% !important;
  --card-foreground:234.7 37% 18% !important;
  --field-card:222.9 25.9% 94.7% !important;
  --field-card-border:39.3 66.1% 50.2% !important;  /* filet ambre autour du champ à signer */
  --field-card-foreground:234.7 37% 18% !important;
  --widget:222.9 25.9% 94.7% !important;
  --widget-foreground:234.7 37% 18% !important;
  --border:221.5 18.3% 86.1% !important;            /* #D5D9E2 */
  --field-border:221.5 18.3% 86.1% !important;
  --input:221.5 18.3% 86.1% !important;
  --primary:234.7 37% 18% !important;               /* boutons principaux : nuit */
  --primary-foreground:240 33.3% 98.8% !important;
  --secondary:222.9 25.9% 94.7% !important;
  --secondary-foreground:234.7 37% 18% !important;
  --accent:222.9 25.9% 94.7% !important;
  --accent-foreground:234.7 37% 18% !important;
  --destructive:234.7 37% 18% !important;           /* mono-accent : pas de rouge */
  --destructive-foreground:240 33.3% 98.8% !important;
  --ring:234.7 37% 18% !important;
  --warning:39.3 66.1% 50.2% !important;
  --radius:.5rem !important;                        /* 8 px max sur le web */
  --documenso:#1D203F !important;
}

html,body{font-family:"IBM Plex Sans","Helvetica Neue",Arial,sans-serif !important;background:#FBFBFD;color:#1D203F;-webkit-font-smoothing:antialiased}

/* Titres : Schibsted Grotesk 500, casse de phrase */
h1,h2,h3,h4,[class*="text-2xl"],[class*="text-3xl"],[class*="text-4xl"]{font-family:"Schibsted Grotesk","Helvetica Neue",Arial,sans-serif !important;font-weight:500 !important;letter-spacing:-0.01em}

/* Graisses : 400 et 500 seulement, jamais 600/700 */
.font-semibold,.font-bold,.font-extrabold,b,strong,th{font-weight:500 !important}

/* Aucune ombre (les anneaux de focus restent visibles) */
*{--tw-shadow:0 0 #0000 !important;--tw-shadow-colored:0 0 #0000 !important;--tw-drop-shadow: !important}
[class*="drop-shadow"]{filter:none !important}

/* Fond décoratif de Documenso retiré */
img[alt="background pattern"]{display:none !important}

/* Liens et sélection */
a{text-underline-offset:3px}
::selection{background:#D5D9E2;color:#1D203F}

/* Champs de saisie : filet 1 px, focus nuit */
input,textarea,select{border-color:#D5D9E2}
input:focus-visible,textarea:focus-visible{outline:none}

/* ---------- Pages d'accès (connexion, inscription, mot de passe) ----------
   Mise en page « KER Pulse » : panneau nuit à gauche (logo blanc, filet ambre),
   formulaire à droite. 100 % CSS (pseudo-éléments) : aucun risque pour React. */
.text-documenso-700,.text-documenso,.text-primary-700{color:#1D203F !important;text-decoration:underline;text-decoration-color:#D5D9E2}
.bg-documenso,.bg-documenso-500,.bg-primary-500{background-color:#1D203F !important}
.rounded-xl{border-radius:8px !important}
.bg-neutral-100{background-color:#FBFBFD !important}

@media (min-width:1024px){
  html:has(main.min-h-screen.overflow-hidden form) main.min-h-screen{margin-left:40vw;min-height:100vh}
  /* panneau nuit + logo blanc (hauteur de capitale 28 px, zone de protection 64 px) */
  html:has(main.min-h-screen.overflow-hidden form)::before{
    content:"";position:fixed;inset:0 auto 0 0;width:40vw;z-index:20;
    background:#1D203F url(/ker-theme/ker-logo-white.svg) no-repeat 64px 64px / auto 28px;
  }
  /* surtitre + filet ambre 48 × 4 (seul ambre de la page) */
  html:has(main.min-h-screen.overflow-hidden form)::after{
    content:"SIGNATURE ÉLECTRONIQUE";position:fixed;left:64px;bottom:292px;z-index:21;
    padding-top:24px;color:#D5D9E2;font:400 14px/1 "IBM Plex Sans",Arial,sans-serif;letter-spacing:.08em;
    background:linear-gradient(#D49A2C,#D49A2C) no-repeat 0 0 / 48px 4px;
  }
  /* titre */
  html:has(main.min-h-screen.overflow-hidden form) body::before{
    content:"Vos documents,\A signés en ligne,\A en toute traçabilité.";white-space:pre;
    position:fixed;left:64px;bottom:120px;z-index:21;width:calc(40vw - 128px);
    color:#FBFBFD;font:500 39px/1.2 "Schibsted Grotesk","Helvetica Neue",Arial,sans-serif;letter-spacing:-0.01em;
  }
  /* pied d'entité */
  html:has(main.min-h-screen.overflow-hidden form) body::after{
    content:"KER | Conseil & Expertise Comptable · signature.ker.fr";position:fixed;left:64px;bottom:56px;z-index:21;
    color:#D5D9E2;font:400 13px/1.4 "IBM Plex Sans",Arial,sans-serif;
  }
}
@media (max-width:1023px){
  html:has(main.min-h-screen.overflow-hidden form) main.min-h-screen{padding-top:112px !important}
  html:has(main.min-h-screen.overflow-hidden form)::before{
    content:"";position:absolute;inset:0 0 auto 0;height:72px;z-index:20;
    background:#1D203F url(/ker-theme/ker-logo-white.svg) no-repeat 16px center / auto 20px;
  }
}

/* Inscription : panneau promotionnel de l'éditeur (témoignage, cartes communauté) retiré */
div:has(> img[src*="community-cards"]),div.xl\:flex:has(img[src*="timur"]){display:none !important}

/* ---------- Intérieur de l'application ---------- */
/* Logo : wordmark KER officiel à la place du logo de l'éditeur (hauteur 24 px) */
a:has(> img[alt="Documenso Logo"]) > svg{display:none !important}
@media (min-width:640px){
  a:has(> img[alt="Documenso Logo"])::before{content:"";display:block;width:66px;height:24px;
    background:url(/ker-theme/ker-logo.svg) no-repeat left center / auto 24px}
}
img[alt="Documenso Logo"]{content:url(/ker-theme/ker-logo.svg);width:auto !important;height:24px !important;filter:none !important}
/* En-tête : fond clair, filet 1 px, pas d'ombre */
header{background-color:#FBFBFD !important;border-bottom:1px solid #D5D9E2}
/* Onglet / élément actif : filet ambre (comme le menu de KER Pulse) */
[role="tab"][data-state="active"],[aria-current="page"]{box-shadow:inset 0 -2px 0 #D49A2C !important}
/* Badges et pastilles de statut : nuit et neutres seulement */
.bg-green-100,.bg-green-50,.bg-emerald-100,.bg-blue-100,.bg-yellow-100,.bg-orange-100,.bg-red-100{background-color:#EEF0F5 !important}
.text-green-500,.text-green-600,.text-green-700,.text-green-800,.text-emerald-600,.text-blue-600,.text-blue-700,.text-yellow-600,.text-orange-600,.text-red-500,.text-red-600,.text-red-700{color:#1D203F !important}
