/* Ask Morning : direction artistique noir et jaune, touches de rouge, par-dessus LibreChat
   (variables de client/src/style.css). Jaune #FFD500 et noir du logo « m, » ; rouge Morning #ff5955. */

@font-face {
  font-family: 'Space Grotesk';
  font-style: normal;
  font-weight: 300 700;
  font-display: swap;
  src: url(space-grotesk-latin.woff2) format('woff2');
}

:root {
  --m-yellow: #ffd500;
  --m-yellow-hover: #f0c800;
  --m-yellow-soft: #fff4b3;
  --m-black: #0b0b0b;
  --m-red: #ff5955;
}

html {
  --brand-purple: var(--m-red);
  --presentation: #fafaf7;
  --text-primary: var(--m-black);
  --text-secondary: #3d3d3a;
  --text-secondary-alt: #5c5c57;
  --text-tertiary: #6b6b66;
  --ring-primary: var(--m-black);
  --header-primary: #fafaf7;
  --header-hover: #f1f0ea;
  --header-button-hover: #f1f0ea;
  --surface-active: var(--m-yellow);
  --surface-active-alt: var(--m-yellow-soft);
  --surface-hover: var(--m-yellow-soft);
  --surface-hover-alt: #ffeb80;
  --surface-primary: #fafaf7;
  --surface-primary-alt: #f1f0ea;
  --surface-primary-contrast: #f1f0ea;
  --surface-secondary: #f4f3ee;
  --surface-secondary-alt: #e6e4dc;
  --surface-tertiary: #ecebe4;
  --surface-tertiary-alt: #ffffff;
  --surface-dialog: #ffffff;
  --surface-submit: var(--m-yellow);
  --surface-submit-hover: var(--m-yellow-hover);
  --surface-chat: #ffffff;
  --border-light: #e6e4dc;
  --border-medium-alt: #d6d4ca;
  --border-medium: #d6d4ca;
  --border-heavy: var(--m-black);
  --border-xheavy: var(--m-black);
  /* Composants shadcn (HSL sans hsl()) */
  --background: 60 23% 97%;
  --foreground: 0 0% 4%;
  --card: 0 0% 100%;
  --card-foreground: 0 0% 4%;
  --primary: 0 0% 4%;
  --primary-foreground: 50 100% 50%;
  --secondary: 50 17% 94%;
  --secondary-foreground: 0 0% 4%;
  --muted: 50 17% 94%;
  --muted-foreground: 60 2% 40%;
  --accent: 51 100% 85%;
  --accent-foreground: 0 0% 4%;
  --border: 50 14% 88%;
  --input: 50 14% 88%;
  --ring: 0 0% 4%;
}

html.dark {
  --brand-purple: var(--m-red);
  --presentation: #111111;
  --text-primary: #f5f4ef;
  --text-secondary: #d4d3cc;
  --text-secondary-alt: #a3a29b;
  --text-tertiary: #8a8983;
  --header-primary: #111111;
  --header-hover: #1f1f1f;
  --header-button-hover: #1f1f1f;
  --surface-active: #3a3305;
  --surface-active-alt: #2a2507;
  --surface-hover: #242424;
  --surface-hover-alt: #2e2e2e;
  --surface-primary: #111111;
  --surface-primary-alt: #000000;
  --surface-primary-contrast: #000000;
  --surface-secondary: #1a1a1a;
  --surface-secondary-alt: #1a1a1a;
  --surface-tertiary: #242424;
  --surface-tertiary-alt: #242424;
  --surface-dialog: #161616;
  --surface-submit: var(--m-yellow);
  --surface-submit-hover: var(--m-yellow-hover);
  --surface-chat: #1a1a1a;
  --border-light: #262626;
  --border-medium-alt: #333333;
  --border-medium: #333333;
  --border-heavy: #5c5c57;
  --border-xheavy: var(--m-yellow);
  --background: 0 0% 7%;
  --foreground: 50 14% 95%;
  --card: 0 0% 9%;
  --card-foreground: 50 14% 95%;
  --primary: 50 100% 50%;
  --primary-foreground: 0 0% 4%;
  --secondary: 0 0% 14%;
  --secondary-foreground: 50 14% 95%;
  --muted: 0 0% 14%;
  --muted-foreground: 60 2% 60%;
  --accent: 0 0% 14%;
  --accent-foreground: 50 14% 95%;
  --border: 0 0% 15%;
  --input: 0 0% 15%;
  --ring: 50 100% 50%;
}

html,
body,
button,
input,
select,
textarea,
.font-sans {
  font-family: 'Space Grotesk', system-ui, sans-serif;
}

h1,
h2,
h3,
.text-2xl,
.text-3xl {
  letter-spacing: -0.02em;
}

/* Boutons d'action jaunes : texte noir (LibreChat met du blanc sur la couleur « submit »). */
.bg-surface-submit,
.bg-surface-submit:hover {
  color: var(--m-black) !important;
}

/* Bouton d'envoi : rond jaune, flèche noire (LibreChat le peint avec la couleur du texte). */
#send-button {
  background-color: var(--m-yellow);
  color: var(--m-black);
}
#send-button svg {
  color: var(--m-black);
}
#send-button:hover:not(:disabled) {
  background-color: var(--m-yellow-hover);
}
#send-button:disabled {
  opacity: 0.35;
}

/* Conversation sélectionnée en clair : jaune plein, texte noir. */
html:not(.dark) .bg-surface-active {
  color: var(--m-black);
}

/* Zone de saisie : filet noir d'1 px, la signature Morning. */
html:not(.dark) .rounded-t-3xl.border:has(textarea) {
  border-color: var(--m-black);
}
html.dark .rounded-t-3xl.border:has(textarea:focus) {
  border-color: var(--m-yellow);
}

/* Touches de rouge : liens, curseur, focus clavier, citations. */
.markdown a,
.prose a {
  color: var(--m-red);
  text-decoration-color: var(--m-red);
}
textarea,
input {
  caret-color: var(--m-red);
}
:focus-visible {
  outline-color: var(--m-red);
}
.markdown blockquote,
.prose blockquote {
  border-left-color: var(--m-red);
}
::selection {
  background: var(--m-yellow);
  color: var(--m-black);
}

/* Code en ligne surligné jaune pâle. */
html:not(.dark) .markdown :not(pre) > code,
html:not(.dark) .prose :not(pre) > code {
  background: var(--m-yellow-soft);
  color: var(--m-black);
}

/* Pages de connexion : fond et liens codés en dur (bg-white, text-green-600) dans AuthLayout/Login. */
.min-h-screen.bg-white,
.w-authPageWidth.bg-white {
  background-color: var(--surface-primary);
}
.min-h-screen .text-green-600 {
  color: var(--m-red);
}
.min-h-screen .text-green-600:hover {
  color: #c11814;
}

/* Logo « m, » jaune de la page de connexion : carré de 72 px (LibreChat le cale dans 40 px). */
.mt-6.h-10:has(> img[src^='assets/logo.svg']) {
  height: 72px;
}
.mt-6.h-10 > img[src^='assets/logo.svg'] {
  width: 72px;
  height: 72px;
  margin: 0 auto;
  border-radius: 12px;
}
