:root {
  --blue: #0A3D62;
  --blue-dark: #062b46;
  --orange: #F39C12;
  --paper: #FBFBF7;
  --ink: #102a3c;
  --muted: #5d6d78;
  --border: rgba(10, 61, 98, .15);
  --shadow: 0 24px 70px rgba(6, 43, 70, .14);
  --shell: min(1180px, calc(100% - 40px));
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body { margin: 0; background: #fbfbf7; color: var(--ink); font-family: Inter, Arial, sans-serif; font-size: 16px; line-height: 1.6; -webkit-font-smoothing: antialiased; }
a { color: inherit; }
img { display: block; max-width: 100%; }
button, a { -webkit-tap-highlight-color: transparent; }
svg { fill: none; stroke: currentColor; stroke-width: 1.5; stroke-linecap: round; stroke-linejoin: round; }
.shell { width: var(--shell); margin-inline: auto; }
.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; }
.skip-link { position: fixed; top: 12px; left: 12px; z-index: 200; transform: translateY(-160%); padding: 10px 14px; background: var(--orange); color: var(--blue-dark); font-weight: 700; text-decoration: none; }
.skip-link:focus { transform: none; }
:focus-visible { outline: 3px solid rgba(243,156,18,.58); outline-offset: 3px; }
.mono { font-family: "JetBrains Mono", monospace; letter-spacing: .08em; }

.site-header { position: fixed; top: 0; left: 0; right: 0; z-index: 100; height: 84px; width: 100%; max-width: 100vw; background: transparent; border-bottom: 1px solid transparent; overflow: hidden; transition: top .35s cubic-bezier(.4,0,.2,1), left .35s cubic-bezier(.4,0,.2,1), right .35s cubic-bezier(.4,0,.2,1), width .35s cubic-bezier(.4,0,.2,1), height .35s cubic-bezier(.4,0,.2,1), background .35s ease, border-radius .35s ease, box-shadow .35s ease; }
.site-header.scrolled { top: 12px; left: 20px; right: 20px; width: calc(100% - 40px); max-width: calc(100vw - 40px); height: 70px; border-radius: 16px; background: rgba(251,251,247,.96); backdrop-filter: blur(20px); border: 1px solid rgba(10,61,98,.1); box-shadow: 0 8px 32px rgba(6,43,70,.12), 0 2px 8px rgba(6,43,70,.06); }
.nav-wrap { height: 100%; display: flex; align-items: center; justify-content: space-between; }
.brand { display: inline-flex; align-items: center; gap: 12px; color: var(--blue); text-decoration: none; }
.brand svg { width: 37px; height: 37px; flex-shrink: 0; }
.brand img.logo-wordmark { height: 22px; width: auto; object-fit: contain; }
.main-nav { display: flex; align-items: center; gap: 26px; }
.nav-right { display: flex; align-items: center; gap: 10px; flex-shrink: 0; }
.main-nav a { font-size: .87rem; font-weight: 600; text-decoration: none; color: var(--blue); }
.main-nav a:not(.nav-cta) { position: relative; }
.main-nav a:not(.nav-cta)::after { content: ""; position: absolute; left: 0; right: 100%; bottom: -7px; height: 1px; background: var(--orange); transition: right .2s ease; }
.main-nav a:not(.nav-cta):hover::after, .main-nav a:not(.nav-cta):focus-visible::after { right: 0; }
.nav-cta { min-height: 44px; display: inline-flex; align-items: center; padding: 0 18px; background: var(--blue); color: white !important; border-radius: 3px; text-decoration: none !important; font-size: .87rem; font-weight: 600; transition: background .2s ease, transform .2s ease, box-shadow .2s ease; }
.nav-cta:hover { background: var(--blue-dark); transform: translateY(-1px); box-shadow: 0 6px 20px rgba(6,43,70,.3); }
.menu-toggle { display: none; width: 46px; height: 46px; border: 0; background: transparent; color: var(--blue); cursor: pointer; }
.menu-toggle span:not(.sr-only) { display: block; width: 23px; height: 1.5px; margin: 6px auto; background: currentColor; transition: transform .2s ease; }
.menu-toggle[aria-expanded="true"] span:first-child { transform: translateY(7.5px) rotate(45deg); }
.menu-toggle[aria-expanded="true"] span:last-child { transform: translateY(-7.5px) rotate(-45deg); }

/* Switch FR/EN (.ex-lang-switch est injecté globalement par excellia-i18n.js, pensé pour un fond sombre) — recoloré ici en bleu/blanc, sans orange */
.site-header .ex-lang-switch { border-color: rgba(10,61,98,.28) !important; background: rgba(10,61,98,.05) !important; }
.site-header .ex-lang-switch button { color: rgba(10,61,98,.6) !important; }
.site-header .ex-lang-switch button.is-active { background: var(--blue) !important; color: #fff !important; }

.btn { min-height: 52px; display: inline-flex; align-items: center; justify-content: center; gap: 16px; padding: 0 23px; border: 1px solid transparent; border-radius: 3px; font-size: .9rem; font-weight: 700; text-decoration: none; cursor: pointer; transition: transform .18s ease, box-shadow .18s ease, background .18s ease; }
.btn:hover { transform: translateY(-2px); }
.btn-primary { background: var(--orange); color: var(--blue-dark); box-shadow: 0 12px 28px rgba(243,156,18,.18); }
.btn-primary:hover { box-shadow: 0 16px 35px rgba(243,156,18,.26); }
.btn-secondary { border-color: rgba(10,61,98,.28); color: var(--blue); background: rgba(255,255,255,.45); }

.eyebrow { margin: 0 0 24px; color: var(--blue); font-family: "JetBrains Mono", monospace; font-size: .72rem; font-weight: 600; letter-spacing: .14em; text-transform: uppercase; }
.eyebrow span { margin-right: 13px; color: var(--orange); }
.eyebrow.light { color: rgba(255,255,255,.72); }

.reveal { opacity: 1; transform: none; transition: opacity .7s ease, transform .7s ease; }
.reveal.pre-reveal { opacity: 0; transform: translateY(18px); }
.reveal.pre-reveal.is-visible { opacity: 1; transform: none; }

.site-footer { padding: 66px 0 22px; background: #031d30; color: white; }
.footer-top { display: grid; grid-template-columns: 1.4fr .5fr .6fr; gap: 70px; padding-bottom: 48px; }
.brand-light { color: white; }
.footer-brand img.logo-wordmark { height: 20px; }
.footer-brand p { max-width: 360px; margin: 22px 0 0; color: rgba(255,255,255,.5); font-family: Fraunces, Georgia, serif; font-size: 1.2rem; }
.footer-links { display: grid; align-content: start; gap: 8px; }
.footer-links strong { margin-bottom: 8px; color: rgba(255,255,255,.4); font-family: "JetBrains Mono", monospace; font-size: .58rem; letter-spacing: .08em; text-transform: uppercase; }
.footer-links a, .footer-links span { color: rgba(255,255,255,.65); font-size: .76rem; text-decoration: none; }
.footer-bottom { display: flex; justify-content: space-between; gap: 20px; padding-top: 20px; border-top: 1px solid rgba(255,255,255,.1); color: rgba(255,255,255,.38); font-size: .62rem; }

@media (max-width: 780px) {
  :root { --shell: min(100% - 28px, 1180px); }
  .site-header { height: 72px; }
  .site-header.scrolled { top: 0; left: 0; right: 0; width: 100%; max-width: 100vw; height: 72px; border-radius: 0; border: none; backdrop-filter: none; background: rgba(251,251,247,.98); box-shadow: 0 1px 0 var(--border); }
  .menu-toggle { display: block; }
  .nav-backdrop { position: fixed; top: 72px; left: 0; right: 0; bottom: 0; background: rgba(6,43,70,.4); z-index: 150; opacity: 0; visibility: hidden; transition: opacity .25s ease; }
  .nav-backdrop.is-open { opacity: 1; visibility: visible; }
  .main-nav { display: flex; position: fixed; top: 72px; right: 0; bottom: 0; left: auto; width: min(300px, 84vw); flex-direction: column; align-items: stretch; gap: 0; padding: 20px 22px 24px; background: var(--paper); border: none; border-left: 1px solid var(--border); box-shadow: -18px 0 44px rgba(6,43,70,.2); transform: translateX(100%); transition: transform .3s cubic-bezier(.4,0,.2,1); z-index: 160; overflow-y: auto; }
  .main-nav.open { transform: translateX(0); }
  .main-nav a { min-height: 48px; display: flex; align-items: center; padding: 0 4px; justify-content: space-between; }
  .main-nav a:not(.nav-cta)::after { display: none; }
  .nav-cta { justify-content: center; margin-top: 18px; width: 100%; }
  .footer-top { grid-template-columns: 1fr 1fr; }
  .footer-brand { grid-column: span 2; }
}
@media (max-width: 520px) {
  .footer-top { grid-template-columns: 1fr; }
  .footer-brand { grid-column: auto; }
  .footer-bottom { display: grid; }
}

/* ── Pages secteurs (préfixe x-) ── */
.sector-page-v2 { background: #fbfbf7; color: #102a3c; }
.x-section { padding: 112px 0; }
.x-breadcrumb { position: relative; z-index: 3; display: flex; align-items: center; gap: 9px; padding-top: 112px; color: #73818a; font-family: "JetBrains Mono", monospace; font-size: .62rem; letter-spacing: .04em; text-transform: uppercase; }
.x-breadcrumb a { color: #0A3D62; text-decoration: none; }
.x-breadcrumb strong { color: #0A3D62; font-weight: 600; }
.x-breadcrumb span { color: #F39C12; }
.x-hero { position: relative; min-height: 820px; overflow: hidden; background: linear-gradient(180deg,#fdfdf9 0%,#f7f7f1 100%); }
.x-hero::before { content: ""; position: absolute; width: 760px; height: 760px; right: -345px; top: -90px; border: 1px solid rgba(10,61,98,.055); border-radius: 50%; box-shadow: 0 0 0 135px rgba(10,61,98,.022), 0 0 0 270px rgba(10,61,98,.013); }
.x-hero-grid { position: relative; z-index: 2; display: grid; grid-template-columns: 1.08fr .92fr; gap: 76px; align-items: center; padding: 46px 0 92px; }
.x-kicker { display: flex; align-items: center; gap: 18px; margin: 0 0 24px; color: #0A3D62; font-family: "JetBrains Mono", monospace; font-size: .68rem; font-weight: 600; letter-spacing: .13em; text-transform: uppercase; }
.x-kicker span { color: #F39C12; }
.x-hero h1 { max-width: 720px; margin: 0; color: #0A3D62; font-family: Fraunces, Georgia, serif; font-size: clamp(3.65rem,6.15vw,6rem); font-weight: 400; letter-spacing: -.043em; line-height: 1.01; }
.x-hero h1 em { color: #F39C12; font-weight: 300; font-style: normal; }
.x-lead { max-width: 700px; margin: 30px 0 0; color: #526875; font-size: 1.03rem; line-height: 1.8; }
.x-tags { display: flex; flex-wrap: wrap; gap: 0; margin-top: 30px; border-top: 1px solid rgba(10,61,98,.14); border-bottom: 1px solid rgba(10,61,98,.14); }
.x-tags span { padding: 10px 15px 10px 0; margin-right: 15px; color: #0A3D62; font-family: "JetBrains Mono", monospace; font-size: .58rem; letter-spacing: .04em; text-transform: uppercase; }
.x-tags span:not(:last-child)::after { content: "/"; margin-left: 15px; color: #F39C12; }
.x-actions { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 32px; }
.x-console { position: relative; padding: 26px; background: #07314e; color: #fff; border-radius: 4px; box-shadow: 0 28px 70px rgba(6,43,70,.2); }
.x-console::after { content: ""; position: absolute; inset: 9px -9px -9px 9px; z-index: -1; border: 1px solid rgba(10,61,98,.2); border-radius: inherit; }
.x-console-head { display: flex; justify-content: space-between; gap: 20px; align-items: flex-start; padding-bottom: 20px; border-bottom: 1px solid rgba(255,255,255,.13); }
.x-console-head div { display: grid; gap: 5px; }
.x-console-head span, .x-console-head small, .x-console-foot { font-family: "JetBrains Mono", monospace; font-size: .55rem; letter-spacing: .06em; text-transform: uppercase; }
.x-console-head span { color: rgba(255,255,255,.42); }
.x-console-head strong { font-size: 1.02rem; }
.x-console-head small { color: rgba(255,255,255,.48); }
.x-console-flow { margin-top: 9px; }
.x-console-flow > div { display: grid; grid-template-columns: 42px 1fr 28px; gap: 14px; align-items: center; min-height: 72px; border-bottom: 1px solid rgba(255,255,255,.1); }
.x-console-flow span { color: #F39C12; font-family: "JetBrains Mono", monospace; font-size: .6rem; }
.x-console-flow strong { font-size: .8rem; font-weight: 500; }
.x-console-flow i { position: relative; width: 24px; height: 24px; border: 1px solid rgba(255,255,255,.2); border-radius: 50%; }
.x-console-flow i::before, .x-console-flow i::after { content: ""; position: absolute; background: #F39C12; }
.x-console-flow i::before { width: 8px; height: 1px; left: 7px; top: 11px; }
.x-console-flow i::after { width: 1px; height: 8px; left: 11px; top: 7px; }
.x-console-metrics { display: grid; grid-template-columns: repeat(3,1fr); gap: 1px; margin-top: 18px; background: rgba(255,255,255,.13); border: 1px solid rgba(255,255,255,.13); }
.x-console-metrics > div { min-height: 106px; padding: 15px; background: #123d5a; }
.x-console-metrics span { display: block; color: rgba(255,255,255,.48); font-size: .58rem; line-height: 1.4; }
.x-console-metrics strong { display: block; margin-top: 12px; font-family: Fraunces, Georgia, serif; font-size: 1.72rem; font-weight: 400; }
.x-console-foot { display: flex; justify-content: space-between; gap: 18px; margin-top: 18px; color: rgba(255,255,255,.34); }
.x-console-foot b { color: rgba(255,255,255,.48); font-weight: 500; }
.x-hero-bar { position: absolute; left: 0; right: 0; bottom: 0; height: 12px; background: #0A3D62; }
.x-hero-bar span { display: block; width: 10%; height: 100%; background: #F39C12; }
.x-split-heading { display: grid; grid-template-columns: 1.1fr .52fr; gap: 90px; align-items: end; margin-bottom: 58px; }
.x-split-heading h2 { max-width: 830px; margin: 0; color: #0A3D62; font-family: Fraunces, Georgia, serif; font-size: clamp(2.6rem,4.45vw,4.35rem); font-weight: 400; letter-spacing: -.037em; line-height: 1.05; }
.x-split-heading > p { margin: 0; color: #60727d; font-size: .9rem; line-height: 1.72; }
.x-issue-list { border-top: 1px solid rgba(10,61,98,.16); }
.x-issue { display: grid; grid-template-columns: 62px .62fr 1fr 28px; gap: 28px; align-items: center; min-height: 132px; border-bottom: 1px solid rgba(10,61,98,.16); }
.x-issue > span { color: #F39C12; font-family: "JetBrains Mono", monospace; font-size: .65rem; }
.x-issue > div { display: contents; }
.x-issue h3 { margin: 0; color: #0A3D62; font-family: Fraunces, Georgia, serif; font-size: 1.48rem; font-weight: 500; }
.x-issue p { margin: 0; color: #60727d; font-size: .84rem; line-height: 1.65; }
.x-issue svg { width: 24px; color: #0A3D62; transition: transform .2s ease; }
.x-issue:hover svg { transform: translateX(5px); }
.x-system { position: relative; overflow: hidden; padding: 112px 0; background: #0A3D62; color: #fff; }
.x-system::before { content: ""; position: absolute; width: 560px; height: 560px; right: -285px; top: -285px; border: 1px solid rgba(255,255,255,.055); border-radius: 50%; box-shadow: 0 0 0 110px rgba(255,255,255,.02); }
.x-system-grid { position: relative; display: grid; grid-template-columns: .82fr 1.18fr; gap: 100px; align-items: start; }
.x-system-intro { position: sticky; top: 130px; }
.x-system-intro h2 { margin: 0; color: #fff; font-family: Fraunces, Georgia, serif; font-size: clamp(2.8rem,4.8vw,4.6rem); font-weight: 400; letter-spacing: -.04em; line-height: 1.04; }
.x-system-intro > p:not(.eyebrow) { max-width: 520px; margin: 28px 0 0; color: rgba(255,255,255,.58); font-size: .9rem; line-height: 1.72; }
.x-module-list { border-top: 1px solid rgba(255,255,255,.16); }
.x-module { display: grid; grid-template-columns: 58px 1fr; gap: 22px; min-height: 152px; padding: 30px 0; border-bottom: 1px solid rgba(255,255,255,.16); }
.x-module > span { color: #F39C12; font-family: "JetBrains Mono", monospace; font-size: .64rem; }
.x-module h3 { margin: 0 0 10px; color: #fff; font-family: Fraunces, Georgia, serif; font-size: 1.62rem; font-weight: 400; }
.x-module p { max-width: 650px; margin: 0; color: rgba(255,255,255,.61); font-size: .82rem; line-height: 1.65; }
.x-controls { background: #fbfbf7; }
.x-control-grid { display: grid; grid-template-columns: 1fr 1fr; column-gap: 70px; border-top: 1px solid rgba(10,61,98,.16); }
.x-control { display: grid; grid-template-columns: 52px 1fr; gap: 18px; min-height: 155px; padding: 26px 0; border-bottom: 1px solid rgba(10,61,98,.16); }
.x-control > span { color: #F39C12; font-family: "JetBrains Mono", monospace; font-size: .62rem; }
.x-control h3 { margin: 0 0 9px; color: #0A3D62; font-size: .91rem; }
.x-control p { margin: 0; color: #60727d; font-size: .8rem; line-height: 1.62; }
.x-usecases { background: #f0f1ec; }
.x-usecase-grid { display: grid; grid-template-columns: repeat(3,1fr); gap: 1px; background: rgba(10,61,98,.14); border: 1px solid rgba(10,61,98,.14); }
.x-usecase { min-height: 330px; display: flex; flex-direction: column; padding: 30px; background: #fbfbf7; }
.x-usecase-label { color: #F39C12; font-family: "JetBrains Mono", monospace; font-size: .58rem; letter-spacing: .06em; }
.x-usecase h3 { margin: 40px 0 14px; color: #0A3D62; font-family: Fraunces, Georgia, serif; font-size: 1.55rem; font-weight: 400; line-height: 1.18; }
.x-usecase p { margin: 0; color: #60727d; font-size: .81rem; line-height: 1.64; }
.x-usecase ul { margin: auto 0 0; padding: 26px 0 0; list-style: none; }
.x-usecase li { padding: 8px 0; border-top: 1px solid rgba(10,61,98,.14); color: #0A3D62; font-size: .72rem; }
.x-usecase li::before { content: "→"; margin-right: 9px; color: #F39C12; }
.x-journey { padding: 112px 0; background: #fbfbf7; }
.x-journey-grid { display: grid; grid-template-columns: repeat(4,1fr); gap: 1px; background: rgba(10,61,98,.14); border: 1px solid rgba(10,61,98,.14); }
.x-journey-grid article { min-height: 300px; display: flex; flex-direction: column; padding: 28px; background: #fff; }
.x-journey-grid span { color: #F39C12; font-family: "JetBrains Mono", monospace; font-size: .62rem; }
.x-journey-grid h3 { margin: 78px 0 12px; color: #0A3D62; font-family: Fraunces, Georgia, serif; font-size: 1.75rem; font-weight: 400; }
.x-journey-grid p { margin: 0; color: #60727d; font-size: .78rem; line-height: 1.62; }
.x-journey-grid b { margin-top: auto; color: #0A3D62; font-family: "JetBrains Mono", monospace; font-size: .58rem; font-weight: 600; }
.x-cta { position: relative; overflow: hidden; padding: 104px 0; background: #07314e; color: #fff; }
.x-cta::before { content: ""; position: absolute; width: 620px; height: 620px; left: -320px; bottom: -330px; border: 1px solid rgba(255,255,255,.055); border-radius: 50%; box-shadow: 0 0 0 115px rgba(255,255,255,.02); }
.x-cta-grid { position: relative; display: grid; grid-template-columns: 1fr auto; gap: 68px; align-items: center; }
.x-cta h2 { max-width: 850px; margin: 0; color: #fff; font-family: Fraunces, Georgia, serif; font-size: clamp(2.7rem,4.8vw,4.7rem); font-weight: 400; letter-spacing: -.04em; line-height: 1.04; }
.x-cta p:not(.eyebrow) { max-width: 780px; margin: 24px 0 0; color: rgba(255,255,255,.6); font-size: .9rem; line-height: 1.72; }
.x-cta .btn { white-space: nowrap; }
.x-other { padding: 86px 0; background: #f0f1ec; }
.x-other-grid { display: grid; grid-template-columns: repeat(3,1fr); border-top: 1px solid rgba(10,61,98,.16); }
.x-other-grid a { display: grid; grid-template-columns: 44px 1fr 24px; gap: 16px; align-items: center; min-height: 118px; padding: 18px 0; border-bottom: 1px solid rgba(10,61,98,.16); color: #0A3D62; text-decoration: none; }
.x-other-grid a:not(:last-child) { margin-right: 28px; }
.x-other-grid span { color: #F39C12; font-family: "JetBrains Mono", monospace; font-size: .6rem; }
.x-other-grid strong { font-family: Fraunces, Georgia, serif; font-size: 1.25rem; font-weight: 400; }
.x-other-grid svg { width: 22px; transition: transform .2s ease; }
.x-other-grid a:hover svg { transform: translateX(4px); }

@media (max-width: 1020px) {
  .x-hero-grid, .x-system-grid, .x-cta-grid { grid-template-columns: 1fr; }
  .x-system-intro { position: static; }
  .x-console { max-width: 720px; }
  .x-split-heading { grid-template-columns: 1fr; gap: 22px; }
  .x-usecase-grid { grid-template-columns: 1fr; }
  .x-usecase { min-height: auto; }
  .x-journey-grid { grid-template-columns: repeat(2,1fr); }
  .x-other-grid { grid-template-columns: 1fr; }
  .x-other-grid a:not(:last-child) { margin-right: 0; }
  .x-cta .btn { justify-self: start; }
  .x-control-grid { column-gap: 30px; }
}
@media (max-width: 780px) {
  .x-section, .x-system, .x-journey { padding: 82px 0; }
  .x-breadcrumb { padding-top: 96px; }
  .x-hero-grid { padding: 34px 0 74px; gap: 52px; }
  .x-hero h1 { font-size: clamp(3.1rem,14vw,4.9rem); }
  .x-console { padding: 18px; }
  .x-console-head { display: grid; }
  .x-console-metrics { grid-template-columns: 1fr; }
  .x-split-heading { margin-bottom: 42px; }
  .x-issue { grid-template-columns: 44px 1fr 24px; gap: 14px; padding: 24px 0; }
  .x-issue > div { display: block; }
  .x-issue p { margin-top: 9px; }
  .x-control-grid { grid-template-columns: 1fr; }
  .x-journey-grid { grid-template-columns: 1fr; }
  .x-other-grid { grid-template-columns: 1fr; }
  .x-cta { padding: 82px 0; }
}
@media (max-width: 520px) {
  .x-actions .btn, .x-cta .btn { width: 100%; }
  .x-tags span { width: 100%; margin-right: 0; }
  .x-tags span:not(:last-child)::after { display: none; }
  .x-console-foot { display: grid; }
  .x-issue h3 { font-size: 1.3rem; }
  .x-module { grid-template-columns: 40px 1fr; }
  .x-control { grid-template-columns: 40px 1fr; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .01ms !important; transition-duration: .01ms !important; }
  .reveal { opacity: 1; transform: none; }
}

/* ── Chat bubble & panel ── */
#ex-chat-bubble { position: fixed; bottom: 28px; right: 28px; z-index: 9999; width: 64px; height: 64px; border-radius: 50%; background: #0a3d62; border: 2.5px solid #f39c12; box-shadow: 0 6px 28px rgba(10,61,98,0.35); cursor: pointer; display: flex; align-items: center; justify-content: center; transition: transform 0.2s, box-shadow 0.2s; outline: none; padding: 0; }
#ex-chat-bubble:hover { transform: scale(1.07) translateY(-2px); box-shadow: 0 10px 36px rgba(10,61,98,0.45); }
#ex-chat-bubble img { width: 38px; height: 38px; object-fit: contain; }
#ex-chat-bubble .ex-notif { position: absolute; top: 2px; right: 2px; width: 13px; height: 13px; background: #12b76a; border-radius: 50%; border: 2px solid #fff; display: none; }

/* ── Carte de bienvenue agent ── */
#ex-welcome-card { position: fixed; bottom: 108px; right: 28px; z-index: 9997; width: 320px; opacity: 0; transform: translateY(14px) scale(0.96); transition: opacity 0.35s ease, transform 0.35s ease; pointer-events: none; }
#ex-welcome-card.ex-wc-visible { opacity: 1; transform: translateY(0) scale(1); pointer-events: auto; }
.ex-wc-inner { background: #fff; border-radius: 20px; padding: 22px 22px 20px; box-shadow: 0 12px 48px rgba(10,61,98,0.16), 0 2px 10px rgba(0,0,0,0.07); position: relative; }
.ex-wc-close { position: absolute; top: 14px; right: 14px; background: none; border: none; cursor: pointer; color: #b0bec5; font-size: 16px; line-height: 1; padding: 3px 6px; border-radius: 4px; transition: color 0.15s; }
.ex-wc-close:hover { color: #0a3d62; }
.ex-wc-agent-row { display: flex; align-items: center; gap: 8px; padding-bottom: 14px; border-bottom: 1px solid #eef1f4; margin-bottom: 18px; }
.ex-wc-agent-avatar { width: 32px; height: 32px; border-radius: 50%; background: #0a3d62; display: flex; align-items: center; justify-content: center; flex-shrink: 0; overflow: hidden; }
.ex-wc-agent-avatar img { width: 20px; height: 20px; object-fit: contain; }
.ex-wc-agent-name { font-family: 'Inter', system-ui, sans-serif; font-size: 12.5px; font-weight: 700; color: #0a3d62; }
.ex-wc-agent-status { font-size: 11.5px; color: #12b76a; font-weight: 600; display: flex; align-items: center; gap: 5px; margin-left: 2px; }
.ex-wc-agent-status::before { content: ''; width: 7px; height: 7px; background: #12b76a; border-radius: 50%; display: inline-block; flex-shrink: 0; }
.ex-wc-greeting { font-family: 'Inter', system-ui, sans-serif; font-size: 28px; font-weight: 800; color: #0a3d62; line-height: 1.1; margin-bottom: 6px; letter-spacing: -0.5px; }
.ex-wc-subtitle { font-family: 'Inter', system-ui, sans-serif; font-size: 15px; color: #5a7184; line-height: 1.4; margin-bottom: 20px; }
.ex-wc-cta { display: block; width: 100%; padding: 14px 20px; background: #f39c12; color: #fff; border: none; border-radius: 12px; font-family: 'Inter', system-ui, sans-serif; font-size: 15px; font-weight: 700; cursor: pointer; text-align: center; transition: background 0.15s, transform 0.15s; letter-spacing: 0.01em; }
.ex-wc-cta:hover { background: #e67e22; transform: translateY(-1px); }
.ex-wc-arrow { width: 0; height: 0; border-left: 9px solid transparent; border-right: 9px solid transparent; border-top: 9px solid #fff; margin-left: auto; margin-right: 28px; filter: drop-shadow(0 2px 2px rgba(0,0,0,0.06)); }

#ex-chat-panel { position: fixed; bottom: 100px; right: 28px; z-index: 9998; width: 370px; max-height: 560px; background: #fff; border-radius: 16px; box-shadow: 0 20px 60px rgba(10,61,98,0.22), 0 4px 16px rgba(10,61,98,0.12); display: flex; flex-direction: column; overflow: hidden; transform: scale(0.92) translateY(16px); opacity: 0; pointer-events: none; transition: transform 0.25s cubic-bezier(.34,1.56,.64,1), opacity 0.2s ease; border: 1px solid rgba(10,61,98,0.08); }
#ex-chat-panel.open { transform: scale(1) translateY(0); opacity: 1; pointer-events: all; }

.ex-chat-header { background: var(--blue); padding: 16px 18px; display: flex; align-items: center; gap: 12px; flex-shrink: 0; }
.ex-chat-avatar { width: 38px; height: 38px; border-radius: 50%; background: rgba(255,255,255,0.1); border: 2px solid var(--orange); display: flex; align-items: center; justify-content: center; flex-shrink: 0; }
.ex-chat-avatar svg { width: 20px; height: 20px; fill: var(--orange); }
.ex-chat-header-info { flex: 1; }
.ex-chat-header-name { font-family: Fraunces, Georgia, serif; font-size: 15px; font-weight: 600; color: #fff; line-height: 1.2; }
.ex-chat-header-status { font-family: "JetBrains Mono", monospace; font-size: 10px; color: rgba(255,255,255,0.5); letter-spacing: 0.1em; text-transform: uppercase; margin-top: 2px; display: flex; align-items: center; gap: 5px; }
.ex-status-dot { width: 6px; height: 6px; background: #12b76a; border-radius: 50%; display: inline-block; }
.ex-chat-close { background: rgba(255,255,255,0.08); border: none; cursor: pointer; color: rgba(255,255,255,0.6); width: 30px; height: 30px; border-radius: 8px; font-size: 16px; display: flex; align-items: center; justify-content: center; transition: background 0.15s, color 0.15s; }
.ex-chat-close:hover { background: rgba(255,255,255,0.15); color: #fff; }

.ex-chat-messages { flex: 1; overflow-y: auto; padding: 16px 16px 8px; display: flex; flex-direction: column; gap: 10px; background: #f8f9fb; scroll-behavior: smooth; }
.ex-chat-messages::-webkit-scrollbar { width: 4px; }
.ex-chat-messages::-webkit-scrollbar-track { background: transparent; }
.ex-chat-messages::-webkit-scrollbar-thumb { background: rgba(10,61,98,0.15); border-radius: 4px; }

.ex-msg { display: flex; gap: 8px; align-items: flex-end; animation: ex-msg-in 0.2s ease; }
@keyframes ex-msg-in { from { opacity: 0; transform: translateY(6px); } to { opacity: 1; transform: translateY(0); } }
.ex-msg.user { flex-direction: row-reverse; }
.ex-msg-avatar { width: 28px; height: 28px; border-radius: 50%; background: #f0f4f8; display: flex; align-items: center; justify-content: center; flex-shrink: 0; font-size: 12px; }
.ex-msg.user .ex-msg-avatar { background: var(--orange); }
.ex-msg-bubble { max-width: 78%; padding: 10px 14px; border-radius: 14px; font-size: 13.5px; line-height: 1.55; color: #1a2e3b; background: #fff; box-shadow: 0 1px 4px rgba(10,61,98,0.08); border: 1px solid rgba(10,61,98,0.06); white-space: pre-wrap; word-break: break-word; }
.ex-msg.user .ex-msg-bubble { background: var(--blue); color: #fff; border-color: transparent; box-shadow: 0 2px 8px rgba(10,61,98,0.2); }

.ex-typing .ex-msg-bubble { display: flex; align-items: center; gap: 4px; padding: 12px 16px; }
.ex-typing-dot { width: 7px; height: 7px; background: var(--orange); border-radius: 50%; animation: ex-bounce 1.2s infinite; }
.ex-typing-dot:nth-child(2) { animation-delay: 0.2s; }
.ex-typing-dot:nth-child(3) { animation-delay: 0.4s; }
@keyframes ex-bounce { 0%, 60%, 100% { transform: translateY(0); opacity: 0.5; } 30% { transform: translateY(-6px); opacity: 1; } }

.ex-quick-replies { display: flex; flex-wrap: wrap; gap: 6px; padding: 0 16px 10px; background: #f8f9fb; }
.ex-qr-btn { background: #fff; border: 1px solid rgba(10,61,98,0.15); color: var(--blue); font-size: 12px; font-family: Inter, Arial, sans-serif; font-weight: 500; padding: 6px 12px; border-radius: 20px; cursor: pointer; transition: all 0.15s; white-space: nowrap; }
.ex-qr-btn:hover { background: var(--blue); color: #fff; border-color: var(--blue); }

.ex-chat-input-area { padding: 12px 14px; background: #fff; border-top: 1px solid rgba(10,61,98,0.07); display: flex; gap: 8px; align-items: flex-end; flex-shrink: 0; }
#ex-chat-input { flex: 1; border: 1px solid rgba(10,61,98,0.15); border-radius: 10px; padding: 9px 13px; font-size: 13.5px; font-family: Inter, Arial, sans-serif; color: var(--blue); background: #f8f9fb; resize: none; max-height: 100px; min-height: 38px; outline: none; transition: border-color 0.15s; line-height: 1.4; }
#ex-chat-input:focus { border-color: var(--orange); background: #fff; }
#ex-chat-input::placeholder { color: #aab4bc; }

#ex-chat-send { width: 38px; height: 38px; background: var(--orange); border: none; border-radius: 10px; cursor: pointer; display: flex; align-items: center; justify-content: center; flex-shrink: 0; transition: background 0.15s, transform 0.15s; }
#ex-chat-send:hover { background: #d97f00; transform: scale(1.05); }
#ex-chat-send:disabled { background: #ccc; cursor: not-allowed; transform: none; }
#ex-chat-send svg { width: 16px; height: 16px; fill: #fff; }

.ex-chat-powered { text-align: center; padding: 6px; font-family: "JetBrains Mono", monospace; font-size: 9.5px; color: #aab4bc; letter-spacing: 0.08em; background: #fff; border-top: 1px solid rgba(10,61,98,0.05); }
.ex-chat-powered span { color: var(--orange); font-weight: 600; }

@media (max-width: 480px) {
  #ex-chat-panel { width: calc(100vw - 24px); right: 12px; bottom: 88px; }
  #ex-chat-bubble { right: 16px; bottom: 16px; }
}
