/* SAHTEN — Maquette OLJ : Aktiv Grotesk (UI) + Playfair Display (éditorial) */

:root {
  --bg: #ffffff;
  --bg-alt: #ffffff;
  --card: #ffffff;
  --sahten-surface-paper: #ffffff;
  --text: #000000;
  --text-secondary: #1b1b1b;
  --text-muted: #8a8a8a;
  /* Rubrique À table / OLJ — vert sauge papier */
  --accent: #94c2ae;
  --color-accent: #94c2ae;
  --color-liban: #94c2ae;
  --sahten-sage: #94c2ae;
  --sahten-badge-green: #94c2ae;
  --sahten-sage-highlight: var(--sahten-badge-green);
  --sahten-sage-strip-fallback: #94c2ae;
  --sahten-accent-press: #7aab93;
  --border: #eae8e4;
  --atable-ink: #141414;
  --atable-ink-muted: #6b6b6b;
  /* Aktiv Grotesk Trial (CDN) + nom licence « Aktiv Grotesk » si @font-face OLJ ; repli DM Sans */
  --font-ui: "Aktiv Grotesk Trial", "Aktiv Grotesk", "DM Sans", -apple-system, BlinkMacSystemFont, sans-serif;
  --font-display: "Playfair Display", Georgia, "Times New Roman", serif;
  --font-body: "Playfair Display", Georgia, "Times New Roman", serif;
  --backdrop-blur-window: 12px;
  --backdrop-blur-mid: 20px;
  --backdrop-blur-full: 24px;
  --backdrop-overlay: rgba(43, 43, 43, 0.08);
  --radius-sm: 8px;
  --radius-md: 12px;
  --radius-lg: 16px;
  /* Élévation type produit (léger contour + diffuse large) */
  --shadow-soft: 0 0 0 1px rgba(0, 0, 0, 0.04), 0 12px 48px rgba(0, 0, 0, 0.07), 0 4px 16px rgba(0, 0, 0, 0.04);
  --surface-app: #fafafa;
  --surface-panel: #ffffff;
  --ring-focus-neutral: rgba(0, 0, 0, 0.14);
  --ring-focus-glow: rgba(0, 0, 0, 0.06);

  /* Accueil : échelle fixe (maquette OLJ À table), pas de clamp */
  --welcome-body-size: 14px;
  --welcome-body-lh: 1.42;
  --welcome-serif: 15px;
  --welcome-serif-lh: 1.45;
  --welcome-lede-size: 14px;
  --welcome-lede-lh: 1.5;
  --welcome-caps: 10px;
  --welcome-caps-lh: 1.2;
  --welcome-caps-tracking: 0.12em;
  /* Pastilles vertes (corps + header) : même logique — hauteur = ligne du label, +3px à gauche et à droite du texte */
  --welcome-pill-fs: 13px;
  --welcome-pill-lh: 1;
  --welcome-pill-pad-x: 3px;
  --welcome-pill-pad-y: 1px;
  --welcome-example-fs: 13px;
  --welcome-example-lh: 1.4;
  --welcome-example-radius: 10px;
  --footer-field-bg: #ffffff;
  --footer-field-border: rgba(0, 0, 0, 0.09);
  --footer-field-radius: 10px;
  --welcome-mascot-header: 30px;
  --welcome-mascot-inline: 28px;
}

* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

.sahten-backdrop {
  position: fixed;
  inset: 0;
  z-index: 9990;
  opacity: 0;
  background: var(--backdrop-overlay);
  transition: opacity 0.2s;
  pointer-events: none;
  backdrop-filter: blur(var(--backdrop-blur-window));
}
.sahten-backdrop.visible {
  opacity: 1;
  pointer-events: auto;
}
.sahten-backdrop[data-size="mid"].visible {
  backdrop-filter: blur(var(--backdrop-blur-mid));
}
.sahten-backdrop[data-size="full"].visible {
  backdrop-filter: blur(var(--backdrop-blur-full));
}
.sahten-backdrop:not(.visible) {
  pointer-events: none;
}

.sahten-widget-container {
  position: fixed;
  background: var(--surface-panel);
  box-shadow: var(--shadow-soft);
  display: flex;
  flex-direction: column;
  z-index: 9999;
  font-family: var(--font-ui);
  border: 1px solid rgba(0, 0, 0, 0.06);
  border-radius: var(--radius-md);
  overflow: hidden;
  -webkit-font-smoothing: antialiased;
  opacity: 0;
  transform: translateY(8px);
  transition: opacity 0.25s, transform 0.25s;
  pointer-events: none;
}
.sahten-widget-container[data-state="open"] {
  opacity: 1;
  transform: translateY(0);
  pointer-events: auto;
}

.sahten-drag-handle {
  display: none;
  height: 22px;
  width: 100%;
  background: #f4f4f4;
  cursor: grab;
  flex-shrink: 0;
  border-bottom: 1px solid var(--border);
}
.sahten-drag-handle::before {
  content: "";
  display: block;
  width: 40px;
  height: 4px;
  margin: 8px auto 0;
  background: rgba(0, 0, 0, 0.1);
  border-radius: 99px;
}
@media (max-width: 480px) {
  .sahten-drag-handle {
    display: block;
  }
  .sahten-widget-container {
    left: 0;
    right: 0;
    bottom: 0;
    width: 100%;
    max-height: min(92dvh, 100%);
    border-radius: 14px 14px 0 0;
    border: 1px solid var(--border);
    border-bottom: none;
    box-shadow: 0 -6px 28px rgba(0, 0, 0, 0.1);
  }
  .sahten-size-btn {
    display: none;
  }
  .sahten-header {
    padding: 6px 10px;
    min-height: 44px;
    column-gap: 8px;
  }
  .sahten-brand {
    gap: 5px;
  }
  .sahten-model-select {
    height: 30px;
    font-size: 9px;
    min-width: 44px;
    padding: 0 6px;
  }
  .sahten-size-btn,
  .sahten-close-btn {
    width: 30px;
    min-width: 30px;
    height: 30px;
    min-height: 30px;
  }
  .sahten-close-btn {
    width: 34px;
    min-width: 34px;
    padding: 0;
    margin-left: 2px;
  }
  .sahten-close-btn svg {
    width: 15px;
    height: 15px;
  }
  .sahten-size-btn svg {
    width: 13px;
    height: 13px;
  }
  .sahten-logo-mascot {
    height: 28px;
    width: 28px;
  }
  .sahten-body {
    padding: 8px 12px 6px;
    gap: 6px;
  }
  .welcome-line {
    font-size: 14px;
    line-height: 1.4;
    margin-bottom: 0;
    letter-spacing: 0.012em;
  }
  .welcome-stanza > .welcome-line:first-child {
    margin-bottom: 3px;
  }
  .welcome-line--logo {
    margin-top: 0.05em;
    margin-bottom: 0.3em;
  }
  .welcome-line--lede {
    margin-top: 0;
    font-size: 13px;
    line-height: 1.42;
  }
  .welcome-pill {
    font-size: 11px;
    padding: 1px var(--welcome-pill-pad-x);
  }
  .welcome-examples--reference {
    margin-top: 10px;
    padding-top: 8px;
  }
  .welcome-examples--minimal {
    margin-top: 0.75rem;
  }
  .welcome-examples--reference .welcome-examples-list {
    gap: 7px;
  }
  .welcome-examples--reference .welcome-example-prompt {
    min-height: 44px;
    padding: 12px 14px;
    font-size: 13px;
    line-height: 1.45;
  }
  .welcome-olj-logomark {
    max-width: min(9rem, 52vw);
    height: 1.05em;
  }
  .welcome-examples--minimal .welcome-example-prompt {
    padding: 0.28rem 0;
    font-size: 14px;
  }
  .msg.msg-user {
    gap: 2px;
  }
  .msg.msg-user::before {
    font-size: 8px;
    font-weight: 700;
    letter-spacing: 0.06em;
    opacity: 0.85;
  }
  .msg-user-bubble {
    max-width: 88%;
    padding: 8px 12px;
    border-radius: 16px 16px 4px 16px;
    background: var(--surface-panel);
    border: 1px solid rgba(0, 0, 0, 0.07);
    box-shadow: 0 1px 2px rgba(0, 0, 0, 0.03);
  }
  .msg-bot {
    gap: 0.35rem;
  }
  .sahten-narrative,
  .sahten-block {
    font-size: 14px;
    line-height: 1.4;
  }
  .sahten-footer {
    padding: 8px 12px calc(10px + env(safe-area-inset-bottom, 0px));
  }
  .input-wrapper {
    min-height: 38px;
    padding: 3px 38px 3px 8px;
  }
  .sahten-input {
    font-size: 14px;
    min-height: 32px;
  }
  .send-btn {
    width: 28px;
    height: 28px;
    right: 4px;
    border-radius: 7px;
  }
  .send-btn svg {
    width: 13px;
    height: 13px;
  }
}
@media (min-width: 481px) {
  .sahten-widget-container[data-size="window"] {
    bottom: 24px;
    right: 24px;
    width: 392px;
    height: min(620px, calc(100vh - 48px));
    max-height: calc(100vh - 48px);
    border-radius: var(--radius-md);
  }
  .sahten-widget-container[data-size="mid"] {
    inset: 0;
    margin: auto;
    width: min(50vw, 640px);
    max-width: calc(100vw - 32px);
    height: min(65vh, 580px);
    max-height: calc(100vh - 32px);
    border-radius: var(--radius-lg);
  }
  .sahten-widget-container[data-size="full"] {
    inset: 0;
    width: 100vw;
    height: 100vh;
    border-radius: 0;
    border: none;
  }
  .welcome-examples--reference .welcome-examples-list {
    gap: 8px;
  }
}

.sahten-header {
  padding: 6px 12px;
  min-height: 44px;
  display: grid;
  grid-template-columns: max-content minmax(0, 1fr);
  align-items: center;
  column-gap: 10px;
  flex-shrink: 0;
  border-bottom: 1px solid rgba(0, 0, 0, 0.06);
  background: var(--surface-panel);
}

.sahten-brand {
  display: flex;
  align-items: center;
  gap: 6px;
  flex-shrink: 0;
  width: max-content;
  max-width: none;
  justify-self: start;
}
.sahten-logo-mascot {
  height: var(--welcome-mascot-header);
  width: var(--welcome-mascot-header);
  flex-shrink: 0;
  object-fit: contain;
  display: block;
}
.sahten-logo {
  height: 20px;
  width: auto;
  max-width: 90px;
  object-fit: contain;
}
.sahten-brand-text {
  display: flex;
  flex-direction: column;
  gap: 1px;
}
.sahten-title {
  font-family: var(--font-ui);
  font-size: 14px;
  font-weight: 700;
  color: var(--text);
  line-height: 1.2;
  letter-spacing: -0.01em;
}
/* Header : « Sahteïn » — editorial serif italic */
.sahten-title.sahten-title--brand {
  display: inline-flex;
  align-items: center;
  box-sizing: border-box;
  padding: 0;
  border-radius: 0;
  background: transparent;
  font-family: var(--font-display);
  font-weight: 700;
  font-style: italic;
  font-size: 18px;
  color: var(--atable-ink);
  letter-spacing: -0.02em;
  line-height: 1.15;
  flex-shrink: 0;
  white-space: nowrap;
}
.sahten-subtitle {
  font-family: var(--font-body);
  font-size: 10px;
  font-style: italic;
  letter-spacing: 0.05em;
  color: var(--accent);
  line-height: 1;
}

.sahten-controls {
  display: flex;
  gap: 4px;
  align-items: center;
  flex-shrink: 0;
  justify-self: end;
  justify-content: flex-end;
  flex-wrap: nowrap;
  min-width: 0;
  max-width: 100%;
  overflow-x: auto;
  scrollbar-width: thin;
  -webkit-overflow-scrolling: touch;
}
.sahten-controls::-webkit-scrollbar {
  height: 3px;
}
.sahten-controls::-webkit-scrollbar-thumb {
  background: rgba(0, 0, 0, 0.15);
  border-radius: 2px;
}

.sahten-model-select {
  height: 32px;
  padding: 0 8px;
  font-family: var(--font-ui);
  font-size: 10px;
  font-weight: 600;
  color: #737373;
  background: rgba(0, 0, 0, 0.03);
  border: 1px solid rgba(0, 0, 0, 0.07);
  border-radius: 8px;
  cursor: pointer;
  appearance: none;
  -webkit-appearance: none;
  margin-right: 0;
  min-width: 48px;
  text-align: center;
  transition: border-color 0.15s ease, color 0.15s ease, background-color 0.15s ease, box-shadow 0.15s ease;
  line-height: 1;
}
.sahten-model-select:hover {
  border-color: rgba(0, 0, 0, 0.11);
  color: var(--text);
  background: rgba(0, 0, 0, 0.04);
}
.sahten-model-select:focus {
  outline: none;
  border-color: var(--ring-focus-neutral);
  box-shadow: 0 0 0 2px var(--ring-focus-glow);
}

.sahten-size-btn,
.sahten-close-btn {
  box-sizing: border-box;
  min-width: 32px;
  min-height: 32px;
  width: 32px;
  height: 32px;
  border: none;
  background: transparent;
  color: #737373;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 8px;
  flex-shrink: 0;
}
.sahten-size-btn:hover,
.sahten-close-btn:hover {
  color: var(--text);
  background: rgba(0, 0, 0, 0.055);
}
.sahten-size-btn.active {
  color: var(--text);
  background: rgba(0, 0, 0, 0.07);
  box-shadow: inset 0 0 0 1px rgba(0, 0, 0, 0.06);
}
.sahten-size-btn svg {
  width: 14px;
  height: 14px;
}
/* Fermeture : padding symétrique pour centrer la croix */
.sahten-close-btn {
  margin-left: 4px;
  padding: 0;
  border-left: 1px solid var(--border);
  border-radius: 6px;
  min-width: 36px;
  width: 36px;
  color: #555;
}
.sahten-close-btn svg {
  width: 16px;
  height: 16px;
  flex-shrink: 0;
  stroke-width: 2;
  display: block;
  margin: auto;
}

.sahten-body {
  flex: 1;
  overflow-y: auto;
  scroll-behavior: smooth;
  padding: 14px 16px 12px;
  display: flex;
  flex-direction: column;
  gap: 8px;
  min-height: 0;
  background: var(--surface-app);
}
.sahten-body::-webkit-scrollbar {
  width: 5px;
}
.sahten-body::-webkit-scrollbar-thumb {
  background: rgba(0, 0, 0, 0.12);
  border-radius: 3px;
}

.msg-bot {
  width: 100%;
  padding-top: 0;
  display: flex;
  flex-direction: column;
  align-items: stretch;
  gap: 0.65rem;
}
.msg-bot:has(.welcome-editorial) {
  gap: 0;
  align-items: flex-start;
}
/* Corps bot : texte continu, léger relief typographique (pas d’encadré) */
.sahten-narrative {
  font-family: "Playfair Display", Georgia, "Times New Roman", serif;
  font-size: var(--welcome-body-size);
  font-weight: 400;
  font-style: normal;
  line-height: var(--welcome-body-lh);
  color: #1c1c1c;
  letter-spacing: 0.012em;
  -webkit-font-smoothing: antialiased;
}
.sahten-narrative p {
  margin-bottom: 10px;
}
.sahten-narrative p:last-child {
  margin-bottom: 0;
}
.sahten-narrative strong {
  font-weight: 600;
}
.sahten-narrative em {
  font-style: italic;
}

/* Semantic narrative blocks */
.sahten-narrative .sn-hook {
  font-weight: 600;
  color: #111;
}
.sahten-narrative .sn-cta {
  color: #2a6452;
  font-style: italic;
}
.sahten-narrative .sn-followup {
  font-family: "DM Sans", -apple-system, sans-serif;
  font-size: 12.5px;
  font-style: normal;
  color: #888;
  border-top: 1px solid rgba(0,0,0,0.07);
  padding-top: 8px;
  margin-top: 4px;
  line-height: 1.5;
}
.sahten-narrative .sn-closing {
  font-weight: 600;
  color: #2a6452;
  margin-top: 2px;
}

/* Blocs API : même rendu que la narrative (flux texte, pas de carte) */
.sahten-block {
  background: transparent;
  border: none;
  border-radius: 0;
  padding: 0;
  margin: 0;
  font-family: var(--font-body);
  font-size: var(--welcome-body-size);
  font-weight: 400;
  line-height: var(--welcome-body-lh);
  color: #1c1c1c;
  letter-spacing: 0.012em;
  -webkit-font-smoothing: antialiased;
}
.sahten-block p {
  margin: 0 0 0.55em 0;
}
.sahten-block p:last-child {
  margin-bottom: 0;
}
.sahten-block strong {
  font-weight: 600;
}
.sahten-block em {
  font-style: italic;
}
.sahten-block-cta {
  margin-top: 0.15em;
}
.sahten-block-cta a {
  color: var(--text);
  font-family: var(--font-ui);
  font-size: 14px;
  font-weight: 600;
  letter-spacing: 0.02em;
  text-decoration: underline;
  text-underline-offset: 3px;
  text-decoration-color: rgba(0, 0, 0, 0.35);
  transition: text-decoration-color 0.15s ease, color 0.15s ease;
}
.sahten-block-cta a:hover {
  text-decoration-color: var(--text);
}

/* Accueil — échelle unique (--welcome-*) : corps, logos, pastilles, exemples */
.welcome-editorial {
  margin: 0;
  padding: 0;
  max-width: 100%;
  text-align: left;
  border: none;
}

/* ─── Welcome Editorial — journal × Cursor ───────────────────── */

/* Titre principal : grande serif, serré, éditorial */
.welcome-headline {
  font-family: var(--font-display);
  font-size: 20px;
  font-weight: 700;
  font-style: italic;
  line-height: 1.18;
  letter-spacing: -0.025em;
  color: var(--atable-ink);
  margin: 0 0 12px;
}

/* Corps de texte : lisible, aéré */
.welcome-body {
  font-family: var(--font-ui);
  font-size: 13.5px;
  font-weight: 400;
  line-height: 1.6;
  color: var(--atable-ink);
  margin: 0 0 8px;
  letter-spacing: 0.005em;
}

/* Deuxième phrase (sub) */
.welcome-sub {
  font-family: var(--font-display);
  font-size: 14px;
  font-weight: 400;
  line-height: 1.48;
  color: var(--atable-ink);
  margin: 0 0 10px;
}

/* Note d'humilité : petit, italique, séparé en haut */
.welcome-note {
  font-family: var(--font-ui);
  font-size: 12px;
  font-style: italic;
  line-height: 1.55;
  color: var(--text-muted);
  margin: 0;
  padding-top: 8px;
  border-top: 1px solid rgba(0,0,0,0.06);
}

/* Lead : première phrase */
.welcome-lead {
  font-family: var(--font-display);
  font-size: 15px;
  font-weight: 400;
  line-height: 1.52;
  color: var(--atable-ink);
  margin: 0 0 10px;
  letter-spacing: 0.005em;
}
.welcome-editorial--mockup,
.welcome-editorial--stanza {
  -webkit-font-smoothing: antialiased;
  display: flex;
  flex-direction: column;
  gap: 0;
}
/* À table : peu d’éléments UI, une colonne de lecture */
.welcome-editorial--atable {
  gap: 0;
}
.welcome-stanza {
  max-width: 100%;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 6px;
}
.welcome-line {
  font-family: var(--font-display);
  font-size: var(--welcome-serif);
  font-weight: 400;
  font-style: normal;
  line-height: var(--welcome-serif-lh);
  color: var(--atable-ink);
  margin: 0;
  text-align: left;
  letter-spacing: 0.01em;
}
.welcome-stanza > .welcome-line:first-child {
  margin-bottom: 4px;
}
.welcome-line--verse {
  margin-bottom: 0.08em;
  color: var(--atable-ink);
}
.welcome-line--logo {
  margin-top: 0.06em;
  margin-bottom: 0.28em;
}
.welcome-line--lede {
  color: var(--atable-ink);
  font-size: var(--welcome-lede-size);
  line-height: 1.42;
  margin-top: 0;
}
.welcome-stanza .welcome-line--lede + .welcome-line--lede {
  margin-top: 0.35rem;
}
.welcome-line--humility {
  font-style: italic;
  font-size: 12.5px;
  line-height: 1.5;
  color: var(--text-muted);
  opacity: 0.8;
  border-top: 1px solid rgba(0,0,0,0.05);
  padding-top: 6px;
  margin-top: 2px;
}
.welcome-em-accent {
  font-style: italic;
  font-weight: 500;
  color: var(--atable-ink);
  text-decoration: none;
  box-shadow: inset 0 -1px 0 0 color-mix(in srgb, var(--sahten-badge-green) 65%, transparent);
}
.welcome-olj-mark {
  font-family: var(--font-display);
  font-style: italic;
  font-weight: 500;
  color: var(--atable-ink);
  letter-spacing: 0.01em;
}
/* Logo OLJ inline dans la ligne d’accueil */
.welcome-olj-logomark {
  display: inline-block;
  height: 1.18em;
  width: auto;
  max-width: min(10.5rem, 48vw);
  margin-left: 0.22em;
  vertical-align: -0.24em;
  object-fit: contain;
  object-position: left center;
}
/* Pastille unique : même taille, même padding (3px H, léger V) pour Sahten et tables libanaises */
.welcome-pill,
.welcome-highlight,
.welcome-tag {
  display: inline;
  box-decoration-break: clone;
  -webkit-box-decoration-break: clone;
  font-family: var(--font-ui);
  font-weight: 700;
  font-size: var(--welcome-pill-fs);
  line-height: var(--welcome-pill-lh);
  font-style: normal;
  letter-spacing: 0.03em;
  background: var(--sahten-badge-green);
  color: #ffffff;
  padding: var(--welcome-pill-pad-y) var(--welcome-pill-pad-x);
  border-radius: 1px;
  margin: 0 0.02em;
  vertical-align: baseline;
  position: relative;
  top: -0.06em;
}
.welcome-line--last {
  margin-bottom: 0;
  margin-top: 0.08em;
}
.welcome-line--compact {
  margin: 0;
  hyphens: auto;
  -webkit-hyphens: auto;
  line-height: 1.42;
}
.welcome-intro {
  display: flex;
  flex-direction: column;
  gap: 0.6rem;
}
.welcome-intro .welcome-mockup-line {
  font-family: "Playfair Display", Georgia, "Times New Roman", serif;
  font-size: var(--welcome-body-size);
  font-weight: 400;
  font-style: normal;
  line-height: var(--welcome-body-lh);
  color: #1c1c1c;
  margin: 0;
  text-align: left;
  letter-spacing: 0.015em;
}
.welcome-mockup-line--lead {
  line-height: var(--welcome-body-lh);
}
.welcome-olj-logotype {
  display: block;
  height: auto;
  width: auto;
  max-width: 100%;
  max-height: 26px;
  object-fit: contain;
  object-position: left center;
  opacity: 0.95;
}
.welcome-examples {
  margin-top: 0;
  padding: 0;
  border-top: none;
  background: transparent;
}
.welcome-examples--minimal {
  margin-top: 1rem;
  padding-top: 0;
  border-top: none;
}
.welcome-examples--reference {
  margin-top: 14px;
  padding-top: 12px;
  border-top: 1px solid rgba(0, 0, 0, 0.07);
}
.welcome-examples--reference .welcome-examples-label {
  font-family: var(--font-ui);
  font-size: 10px;
  font-weight: 600;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: #6b6b6b;
  line-height: 1.25;
  margin: 0 0 2px 0;
}
.welcome-examples--editorial {
  margin-top: 0.4rem;
  padding-top: 0.45rem;
  border-top: 1px solid rgba(0, 0, 0, 0.06);
}
.welcome-examples-head {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 0.25rem 0.75rem;
  margin-bottom: 8px;
}
.welcome-examples-label {
  font-family: var(--font-display);
  font-size: var(--welcome-lede-size);
  font-weight: 400;
  letter-spacing: normal;
  text-transform: none;
  color: var(--atable-ink-muted);
  line-height: var(--welcome-lede-lh);
  margin: 0 0 6px 0;
  font-style: normal;
}
.welcome-examples-tip {
  font-family: var(--font-ui);
  font-size: 10px;
  font-weight: 500;
  color: var(--text-muted);
  letter-spacing: 0.01em;
  line-height: 1.2;
}
.welcome-examples-list {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin: 0;
  padding: 0;
}
.welcome-examples-list--compact {
  gap: 0.28rem;
}
.welcome-examples-list li {
  margin: 0;
  padding: 0;
}
.welcome-example-prompt {
  display: block;
  width: 100%;
  margin: 0;
  padding: 9px 12px;
  border: 1px solid rgba(0,0,0,0.07);
  border-radius: var(--welcome-example-radius);
  background: #ffffff;
  font-family: var(--font-ui);
  font-size: var(--welcome-example-fs);
  font-weight: 500;
  line-height: var(--welcome-example-lh);
  color: var(--atable-ink);
  letter-spacing: -0.01em;
  text-align: left;
  text-decoration: none;
  cursor: pointer;
  transition: border-color 0.15s, background-color 0.15s;
  -webkit-font-smoothing: antialiased;
  box-shadow: 0 1px 2px rgba(0,0,0,0.03);
}

/* Suggestions dans welcome-prompts (nouveau format éditorial) */
.welcome-prompts .welcome-example-prompt {
  border: none;
  border-radius: 0;
  background: transparent;
  box-shadow: none;
  padding: 6px 0;
  font-family: var(--font-display);
  font-size: 13.5px;
  font-weight: 400;
  font-style: italic;
  color: var(--atable-ink-muted);
  border-bottom: 1px solid rgba(0,0,0,0.05);
  letter-spacing: 0;
  display: flex;
  align-items: center;
  gap: 8px;
}
.welcome-prompts .welcome-example-prompt::before {
  content: '→';
  font-style: normal;
  font-family: var(--font-ui);
  font-size: 11px;
  color: var(--sahten-sage, #94c2ae);
  flex-shrink: 0;
}
.welcome-prompts .welcome-example-prompt:last-child {
  border-bottom: none;
}
.welcome-prompts .welcome-example-prompt:hover {
  color: var(--atable-ink);
  background: transparent;
}
.welcome-examples--reference .welcome-examples-list {
  gap: 8px;
  margin-top: 10px;
  padding-top: 0;
  border-top: none;
}
.welcome-examples--reference .welcome-example-prompt {
  min-height: 0;
  padding: 9px 12px;
  margin: 0;
  border: 1px solid rgba(0,0,0,0.07);
  border-radius: var(--radius-sm);
  background: var(--surface-panel);
  box-shadow: 0 1px 2px rgba(0,0,0,0.03);
  font-family: var(--font-ui);
  font-size: 13px;
  font-weight: 500;
  font-style: normal;
  line-height: 1.45;
  color: var(--atable-ink);
  letter-spacing: -0.01em;
  text-align: left;
  transition:
    border-color 0.15s ease,
    background-color 0.15s ease,
    box-shadow 0.15s ease;
  -webkit-tap-highlight-color: transparent;
}
.welcome-examples--minimal .welcome-example-prompt {
  padding: 0.35rem 0;
  border: none;
  border-radius: 0;
  background: transparent;
  font-family: var(--font-display);
  font-weight: 400;
  color: var(--atable-ink-muted);
  text-decoration: underline;
  text-decoration-color: color-mix(in srgb, var(--sahten-badge-green) 45%, #ccc);
  text-underline-offset: 3px;
}
.welcome-examples--minimal .welcome-example-prompt:hover {
  border-color: transparent;
  background: transparent;
  color: var(--atable-ink);
  text-decoration-color: var(--sahten-badge-green);
}
.welcome-examples-list--compact .welcome-example-prompt {
  padding: 0.3rem 0.4rem;
  font-size: 13px;
  line-height: 1.4;
  border-radius: 5px;
}
.welcome-example-prompt:hover {
  border-color: color-mix(in srgb, var(--sahten-badge-green) 55%, var(--border));
  background: color-mix(in srgb, var(--sahten-badge-green) 6%, #fff);
}
.welcome-examples--reference .welcome-example-prompt:hover {
  border-color: rgba(0,0,0,0.14);
  background: rgba(0,0,0,0.02);
  color: var(--atable-ink);
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.06);
}
.welcome-examples--reference .welcome-example-prompt:active {
  border-color: rgba(0, 0, 0, 0.12);
  background: #fafafa;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.05);
}
.welcome-examples--reference .welcome-example-prompt:focus-visible {
  outline: none;
  border-color: rgba(0, 0, 0, 0.2);
  box-shadow: 0 0 0 2px rgba(0, 0, 0, 0.08);
}
.welcome-example-prompt:focus-visible {
  outline: 2px solid var(--sahten-badge-green);
  outline-offset: 2px;
}
/* Variantes héritées (anciens écrans) */
.welcome-kicker {
  font-family: var(--font-display);
  font-size: 1.3rem;
  font-weight: 600;
  color: var(--text);
  margin: 0 0 12px 0;
  letter-spacing: -0.02em;
  line-height: 1.2;
}
.welcome-lede {
  font-family: var(--font-body);
  font-size: 14px;
  line-height: 1.65;
  color: var(--text-secondary);
  margin: 0 0 14px 0;
  text-align: left;
  text-wrap: balance;
}
.welcome-lede--cta {
  margin-top: 0;
  margin-bottom: 0;
  font-size: 13px;
  line-height: 1.5;
  color: var(--text-muted);
}
.welcome-olj-band {
  margin: 0 auto 14px;
  padding: 11px 20px;
  display: flex;
  align-items: center;
  justify-content: center;
  width: fit-content;
  max-width: 100%;
  background: linear-gradient(180deg, #fff 0%, #faf9f7 100%);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  box-shadow: 0 1px 0 rgba(0, 0, 0, 0.03), 0 6px 18px rgba(0, 0, 0, 0.05);
}
.welcome-olj-img {
  display: block;
  height: 26px;
  width: auto;
  max-width: min(200px, 100%);
  object-fit: contain;
  object-position: center;
}
.welcome-lede em {
  font-style: italic;
  font-weight: 600;
  color: var(--text);
}
.welcome-pull {
  margin: 18px 0 0 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 11px;
  border: none;
  align-self: stretch;
  text-align: left;
}
.welcome-pull-line {
  font-family: var(--font-body);
  font-size: 13px;
  font-style: italic;
  line-height: 1.45;
  color: var(--text-muted);
  margin: 0;
}

.msg.msg-user {
  align-self: flex-end;
  width: 100%;
  max-width: 100%;
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 4px;
  font-family: var(--font-ui);
  font-size: 13px;
  line-height: 1.5;
  color: var(--text-secondary);
}
.msg-user-bubble {
  display: block;
  width: fit-content;
  max-width: 100%;
  padding: 10px 14px;
  border-radius: 14px 14px 4px 14px;
  background: var(--surface-panel);
  border: 1px solid rgba(0, 0, 0, 0.07);
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.03);
  color: var(--text-secondary);
  text-align: left;
  word-wrap: break-word;
  overflow-wrap: anywhere;
}
.msg.msg-user::before {
  content: "Vous";
  font-family: var(--font-ui);
  font-size: 10px;
  font-weight: 600;
  font-style: normal;
  letter-spacing: 0.1em;
  color: #8e8e8e;
  text-transform: uppercase;
}

.sahten-recipe-grid {
  margin-top: 14px;
  padding-top: 14px;
  border-top: 1px solid rgba(0, 0, 0, 0.06);
}
.recipe-card {
  padding: 6px 0;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  margin-bottom: 10px;
  background: #fff;
}
.recipe-card:last-child {
  margin-bottom: 0;
}
.recipe-card-link-wrapper {
  display: flex;
  gap: 14px;
  text-decoration: none;
  color: inherit;
  padding: 10px;
  transition: border-color 0.2s;
  border-radius: var(--radius-sm);
}
.recipe-card:hover {
  border-color: rgba(0, 0, 0, 0.14);
}
.recipe-card-link-wrapper:hover {
  opacity: 0.95;
}
.recipe-image {
  width: 92px;
  height: 92px;
  min-width: 92px;
  flex-shrink: 0;
  background: var(--border);
  background-size: cover;
  background-position: center;
  border-radius: 8px;
}
.recipe-image.no-image {
  background: linear-gradient(135deg, rgba(0, 0, 0, 0.06) 0%, rgba(0, 0, 0, 0.02) 100%);
  display: flex;
  align-items: center;
  justify-content: center;
}
.recipe-image.no-image::after {
  content: "📖";
  font-size: 24px;
  opacity: 0.4;
}
.recipe-content {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 4px;
}
.recipe-category {
  font-family: var(--font-ui);
  font-size: 10px;
  text-transform: uppercase;
  color: var(--text-muted);
  font-weight: 600;
  letter-spacing: 0.04em;
}
.recipe-title {
  font-family: var(--font-display);
  font-size: 21px;
  font-weight: 500;
  color: var(--text);
  margin: 0;
  line-height: 1.15;
}
.recipe-meta {
  font-family: var(--font-ui);
  font-size: 11px;
  color: var(--text-muted);
}
.recipe-citation {
  font-family: var(--font-ui);
  font-size: 11px;
  color: var(--text-secondary);
  opacity: 0.9;
  line-height: 1.45;
}

.sahten-olj-cta {
  margin-top: 16px;
  padding: 14px 18px;
  background: #fff;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
}
.olj-cta-link {
  font-family: var(--font-display);
  font-size: 15px;
  font-weight: 600;
  color: var(--text);
  text-decoration: underline;
  text-underline-offset: 3px;
  text-decoration-color: rgba(0, 0, 0, 0.35);
}
.olj-cta-link:hover {
  text-decoration-color: var(--text);
}
.olj-cta-reason {
  font-family: var(--font-ui);
  font-size: 12px;
  color: var(--text-muted);
  margin: 6px 0 0;
  line-height: 1.4;
}

.sahten-restaurant-grid {
  margin-top: 16px;
  padding-top: 16px;
  border-top: 1px solid rgba(0, 0, 0, 0.06);
}
.restaurant-card {
  padding: 8px 0;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  margin-bottom: 8px;
}
.restaurant-card:last-child {
  margin-bottom: 0;
}
.restaurant-card-link-wrapper {
  display: flex;
  gap: 12px;
  text-decoration: none;
  color: inherit;
  padding: 10px;
  transition: border-color 0.2s;
  border-radius: var(--radius-sm);
}
.restaurant-card:hover {
  border-color: rgba(0, 0, 0, 0.14);
}
.restaurant-card-link-wrapper:hover {
  opacity: 0.95;
}
.restaurant-image {
  width: 72px;
  height: 72px;
  min-width: 72px;
  flex-shrink: 0;
  background: var(--border);
  background-size: cover;
  background-position: center;
  border-radius: 8px;
}
.restaurant-image.no-image {
  background: linear-gradient(135deg, rgba(0, 0, 0, 0.06) 0%, rgba(0, 0, 0, 0.02) 100%);
  display: flex;
  align-items: center;
  justify-content: center;
}
.restaurant-image.no-image::after {
  content: "📍";
  font-size: 24px;
  opacity: 0.4;
}
.restaurant-content {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 4px;
}
.restaurant-badge {
  font-family: var(--font-ui);
  font-size: 10px;
  text-transform: uppercase;
  color: var(--text-muted);
  font-weight: 600;
}
.restaurant-title {
  font-family: var(--font-display);
  font-size: 14px;
  font-weight: 600;
  color: var(--text);
  margin: 0;
  line-height: 1.35;
}
.restaurant-locality {
  font-family: var(--font-ui);
  font-size: 11px;
  color: var(--text-muted);
}
.restaurant-desc {
  font-family: var(--font-ui);
  font-size: 11px;
  color: var(--text-secondary);
  line-height: 1.4;
  margin: 0;
  max-height: 2.8em;
  overflow: hidden;
  text-overflow: ellipsis;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
}
.restaurant-cta {
  font-family: var(--font-ui);
  font-size: 11px;
  color: var(--accent);
  font-weight: 600;
}
.sahten-map {
  margin-top: 12px;
  width: 100%;
  min-height: 180px;
  height: 200px;
  border: 1px solid var(--border);
  border-radius: 12px;
  overflow: hidden;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.06);
}
.sahten-map-marker {
  background: none !important;
  border: none !important;
}
.sahten-marker-pin {
  width: 24px;
  height: 36px;
  background: var(--accent);
  border-radius: 50% 50% 50% 0;
  transform: rotate(-45deg);
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.15);
}

@media (max-width: 480px) {
  .sahten-restaurant-grid {
    margin-top: 10px;
    padding-top: 10px;
  }
  .restaurant-card {
    padding: 8px 0;
    margin-bottom: 8px;
  }
  .restaurant-card-link-wrapper {
    gap: 12px;
    padding: 10px;
  }
  .restaurant-image {
    width: 72px;
    height: 72px;
    min-width: 72px;
  }
  .restaurant-title {
    font-size: 13px;
  }
  .restaurant-desc {
    font-size: 11px;
  }
  .sahten-map {
    min-height: 140px;
    height: 160px;
    margin-top: 8px;
  }
}

@media (max-width: 480px) {
  .recipe-card {
    padding: 8px 0;
    margin-bottom: 8px;
  }
  .recipe-card-link-wrapper {
    gap: 12px;
    padding: 10px;
  }
  .recipe-image {
    width: 72px;
    height: 72px;
    min-width: 72px;
  }
  .recipe-title {
    font-size: 18px;
    line-height: 1.2;
  }
}

/* Compositeur : bandeau neutre, champ comme surface posée (produit) */
.sahten-footer {
  padding: 10px 16px 12px;
  flex-shrink: 0;
  background: var(--surface-app);
  border-top: 1px solid rgba(0, 0, 0, 0.06);
  border-bottom: none;
}
.input-wrapper {
  display: flex;
  align-items: stretch;
  position: relative;
  min-height: 40px;
  padding: 4px 40px 4px 10px;
  background: var(--footer-field-bg);
  border: 1px solid var(--footer-field-border);
  border-radius: var(--footer-field-radius);
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.02);
  transition: border-color 0.18s ease, box-shadow 0.18s ease;
}
.input-wrapper:focus-within {
  border-color: rgba(148, 194, 174, 0.5);
  box-shadow: 0 0 0 3px rgba(148, 194, 174, 0.12), 0 1px 2px rgba(0, 0, 0, 0.03);
}
.sahten-input {
  width: 100%;
  padding: 8px 6px 8px 0;
  border: none;
  background: transparent;
  font-family: "Playfair Display", Georgia, "Times New Roman", serif;
  font-size: var(--welcome-body-size);
  font-weight: 400;
  color: var(--text);
  resize: none;
  border-radius: 0;
  min-height: 36px;
  max-height: 200px;
  overflow-y: auto;
  overflow-x: hidden;
  scrollbar-width: none;
  -ms-overflow-style: none;
  line-height: 1.45;
}
.sahten-input::-webkit-scrollbar {
  width: 0;
  height: 0;
  display: none;
}
.sahten-input:focus {
  outline: none;
}
.sahten-input::placeholder {
  font-family: "Playfair Display", Georgia, "Times New Roman", serif;
  font-style: italic;
  font-weight: 400;
  font-size: var(--welcome-body-size);
  color: var(--text-muted);
  opacity: 1;
}
.send-btn {
  position: absolute;
  right: 5px;
  top: 50%;
  transform: translateY(-50%);
  width: 30px;
  height: 30px;
  border: none;
  background: var(--sahten-sage, #94c2ae);
  color: #ffffff;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 8px;
  transition: background 0.18s ease, transform 0.14s ease, box-shadow 0.18s ease;
  box-shadow: 0 1px 3px rgba(148, 194, 174, 0.4);
}
.send-btn:hover {
  background: #7aab93;
  box-shadow: 0 2px 8px rgba(148, 194, 174, 0.5);
}
.send-btn:active {
  transform: translateY(-50%) scale(0.96);
}
.send-btn:focus-visible {
  outline: 2px solid rgba(0, 0, 0, 0.35);
  outline-offset: 2px;
}
.send-btn:disabled {
  opacity: 0.5;
  cursor: not-allowed;
  transform: translateY(-50%);
}
.send-btn svg {
  width: 14px;
  height: 14px;
}

/* Lanceur : icône + bulle alignés au centre (plus compact) */
.sahten-trigger-wrap {
  position: fixed;
  bottom: 20px;
  right: 20px;
  z-index: 9998;
  display: flex;
  flex-direction: row-reverse;
  align-items: center;
  gap: 8px;
  max-width: min(calc(100vw - 32px), 300px);
  cursor: pointer;
  -webkit-tap-highlight-color: transparent;
}

.sahten-trigger-bubble {
  position: relative;
  max-width: min(176px, 56vw);
  margin: 0;
  padding: 6px 12px;
  background: var(--surface-panel);
  border: 1px solid rgba(0, 0, 0, 0.07);
  border-radius: 999px;
  box-shadow: 0 1px 8px rgba(0, 0, 0, 0.05), 0 0 0 1px rgba(0, 0, 0, 0.02);
  font-family: var(--font-ui);
  font-size: 11px;
  font-weight: 600;
  line-height: 1.25;
  letter-spacing: -0.01em;
  color: var(--text);
  pointer-events: auto;
  text-align: center;
  user-select: none;
  transition: border-color 0.15s ease, box-shadow 0.15s ease;
}
.sahten-trigger-wrap:hover .sahten-trigger-bubble {
  border-color: rgba(0, 0, 0, 0.12);
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.07);
}
/* Queue vers le logo, centrée sur la hauteur de la bulle */
.sahten-trigger-bubble::after {
  content: "";
  position: absolute;
  right: -5px;
  top: 50%;
  transform: translateY(-50%);
  width: 0;
  height: 0;
  border-top: 5px solid transparent;
  border-bottom: 5px solid transparent;
  border-left: 5px solid #ffffff;
  filter: drop-shadow(1px 0 0 rgba(0, 0, 0, 0.06));
}

.sahten-trigger {
  position: relative;
  flex-shrink: 0;
  width: auto;
  height: auto;
  min-width: 40px;
  min-height: 40px;
  padding: 0;
  border-radius: 0;
  background: transparent;
  color: inherit;
  border: none;
  cursor: pointer;
  box-shadow: none;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: visible;
  -webkit-tap-highlight-color: transparent;
}
.sahten-trigger:focus-visible {
  outline: 2px solid var(--text);
  outline-offset: 4px;
  border-radius: 4px;
}

.sahten-trigger-logo {
  display: block;
  width: 44px;
  height: 44px;
  object-fit: contain;
  pointer-events: none;
  filter: drop-shadow(0 1px 4px rgba(0, 0, 0, 0.08));
}

/* Annonce ouverture (lecteurs d'écran) — hors écran visuellement */
.sahten-sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

@media (max-width: 480px) {
  .sahten-trigger-wrap {
    bottom: calc(12px + env(safe-area-inset-bottom, 0px));
    right: max(12px, env(safe-area-inset-right, 0px));
    gap: 6px;
  }
  .sahten-trigger-bubble {
    font-size: 10.5px;
    padding: 5px 10px;
    max-width: min(152px, 52vw);
    box-shadow: 0 1px 6px rgba(0, 0, 0, 0.06);
  }
  .sahten-trigger-logo {
    width: 40px;
    height: 40px;
  }
}

.sahten-thinking-block {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 6px 0 4px;
}
.sahten-thinking-mascot {
  width: 40px;
  height: 40px;
  flex-shrink: 0;
  object-fit: contain;
}
.sahten-thinking-main {
  display: flex;
  flex-direction: column;
  gap: 8px;
  min-width: 0;
}
.sahten-thinking-line {
  margin: 0;
  font-family: var(--font-ui);
  font-size: 13px;
  font-weight: 600;
  color: var(--text-secondary);
  letter-spacing: 0.02em;
}

.loading-indicator {
  display: flex;
  padding: 8px 0;
}
.loading-indicator.sahten-thinking-loader {
  padding: 4px 0 10px;
}
.loading-dots {
  display: flex;
  gap: 6px;
}
.loading-dots .dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: rgba(0, 0, 0, 0.28);
  animation: sahten-pulse 1.2s ease-in-out infinite;
}
.loading-dots .dot:nth-child(2) { animation-delay: 0.2s; }
.loading-dots .dot:nth-child(3) { animation-delay: 0.4s; }

@keyframes sahten-pulse {
  0%, 60%, 100% { opacity: 0.28; transform: scale(1); }
  30% { opacity: 1; transform: scale(1.3); }
}

.feedback-container {
  margin-top: 12px;
}
.feedback-buttons {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}
.feedback-prompt {
  font-size: 12px;
  color: var(--text-muted);
}
.feedback-btn {
  padding: 4px 10px;
  font-size: 12px;
  border: 1px solid var(--border);
  background: white;
  border-radius: 6px;
  cursor: pointer;
  font-family: var(--font-ui);
}
.feedback-btn:hover {
  border-color: var(--text-muted);
}
.feedback-btn.selected {
  border-color: var(--text);
  background: rgba(0, 0, 0, 0.04);
}
.feedback-reason {
  display: flex;
  gap: 8px;
  margin-top: 8px;
}
.feedback-reason-input {
  flex: 1;
  padding: 8px 12px;
  border: 1px solid var(--border);
  border-radius: 6px;
  font-size: 13px;
}
.feedback-submit-btn {
  padding: 8px 14px;
  background: var(--text);
  border: none;
  border-radius: 6px;
  color: white;
  cursor: pointer;
  font-size: 12px;
}
.feedback-thanks {
  font-size: 12px;
  color: var(--text-muted);
}
