/* =====================================================================
   Haqia — UI v3 : navigation, connexion, effets lumière & 3D, analyse, lecture audio
   ===================================================================== */

@property --ang { syntax: "<angle>"; initial-value: 0deg; inherits: false; }

/* Pas d'italique : l'emphase passe par la couleur et la lumière */
em, i, cite, .hx__title em, .hero__title em, .md em { font-style: normal; }
.md em { font-weight: 600; color: var(--brand); }

/* ---------------- Navigation : mega menu ---------------- */
.nav__links { display: none !important; }
.mnav { display: flex; align-items: center; gap: 2px; margin-inline-start: 18px; height: 100%; }
.mnav__item { position: static; height: 100%; display: flex; align-items: center; }
.mnav__trigger, .mnav__plain { display: inline-flex; align-items: center; gap: 6px; height: 40px; padding: 0 12px; border: 0; border-radius: 10px; background: transparent; color: var(--ink-2); font-weight: 500; font-size: .95rem; cursor: pointer; transition: color .2s, background-color .2s; }
.mnav__trigger:hover, .mnav__plain:hover, .mnav__item.is-open .mnav__trigger { color: var(--ink); background: var(--surface-2); }
.mnav__trigger .i { transition: transform .3s var(--ease); }
.mnav__item.is-open .mnav__trigger .i { transform: rotate(180deg); }
.nav { position: sticky; }
.mega { position: absolute; inset-inline: 0; top: 100%; padding: 10px 0 22px; visibility: hidden; opacity: 0; transform: perspective(1200px) rotateX(-8deg) translateY(-6px); transform-origin: top center;
  transition: opacity .28s var(--ease), transform .35s var(--ease), visibility .28s; pointer-events: none; z-index: 50; }
.mnav__item.is-open .mega { visibility: visible; opacity: 1; transform: none; pointer-events: auto; }
.mega__inner { display: grid; grid-template-columns: 1fr 300px; gap: 16px; padding: 18px; border-radius: 22px; background: color-mix(in srgb, var(--surface) 92%, transparent);
  backdrop-filter: blur(18px) saturate(1.3); -webkit-backdrop-filter: blur(18px) saturate(1.3); border: 1px solid var(--line); box-shadow: 0 30px 80px -24px rgba(7, 42, 35, .35); max-width: 1160px; }
.mega__grid { display: grid; gap: 4px; }
.mega__grid--4 { grid-template-columns: repeat(3, 1fr); }
.mega__grid--2 { grid-template-columns: 1fr 1fr; }
.mega__link { display: flex; gap: 12px; align-items: flex-start; padding: 11px 12px; border-radius: 14px; transition: background-color .2s, transform .2s var(--ease); }
.mega__link:hover { background: var(--surface-2); transform: translateY(-1px); }
.mega__link strong { display: block; font-size: .92rem; font-weight: 600; }
.mega__link small { display: block; margin-top: 2px; font-size: .8rem; line-height: 1.4; color: var(--ink-3); }
.mega__ic { flex: none; display: grid; place-items: center; width: 34px; height: 34px; border-radius: 10px; background: var(--brand-soft); color: var(--brand); transition: transform .3s var(--ease), box-shadow .3s; }
.mega__link:hover .mega__ic { transform: rotate(-8deg) scale(1.08); box-shadow: 0 6px 18px -6px var(--brand); }
.mega__feature { position: relative; overflow: hidden; display: grid; align-content: start; gap: 8px; padding: 20px; border-radius: 18px; color: #EAF2EE;
  background: radial-gradient(120% 120% at 0% 0%, #12715B, #0B3D33 60%, #072A23); isolation: isolate; }
.mega__feature strong { font-family: "Fraunces", serif; font-weight: 500; font-size: 1.2rem; line-height: 1.25; color: #fff; }
.mega__feature > span:not(.mega__feature-glow) { font-size: .86rem; color: #B9CEC5; }
.mega__feature-k { font-size: .7rem !important; font-weight: 700; text-transform: uppercase; letter-spacing: .12em; color: #F3B28F !important; }
.mega__feature-cta { margin-top: 6px; display: inline-flex; align-items: center; gap: 6px; font-weight: 700; color: #8FDDBF !important; }
.mega__feature-glow { position: absolute; inset: -40%; z-index: -1; background: conic-gradient(from var(--ang), transparent 0 70%, rgba(143,221,191,.35), transparent 85%); animation: spinang 6s linear infinite; }
.mega__feature--modes strong { font-size: 1rem; margin-top: 4px; }
.mega__src { display: flex; align-items: center; gap: 8px; font-size: .84rem !important; color: #D6E4DD !important; }
.mega__src .i { color: #D2AC62; }
@keyframes spinang { to { --ang: 360deg; } }

/* Compte */
.acct { display: inline-grid; place-items: center; width: 40px; height: 40px; border-radius: 50%; border: 1px solid var(--line); color: var(--ink-2); overflow: hidden; flex: none; transition: border-color .2s, color .2s, box-shadow .2s; background: var(--surface); }
.acct:hover { color: var(--brand); border-color: var(--brand); box-shadow: 0 0 0 4px var(--brand-soft); }
.acct img { width: 100%; height: 100%; object-fit: cover; }
.acct__ini { font-weight: 700; color: var(--brand); }

/* ---------------- Panneau mobile ---------------- */
.drawer { position: fixed; inset: 0; z-index: 90; visibility: hidden; }
.drawer.is-open { visibility: visible; }
.drawer__scrim { position: absolute; inset: 0; background: rgba(5, 20, 16, .5); opacity: 0; transition: opacity .3s; backdrop-filter: blur(3px); }
.drawer.is-open .drawer__scrim { opacity: 1; }
.drawer__panel { position: absolute; inset-block: 0; inset-inline-end: 0; width: min(390px, 92vw); display: flex; flex-direction: column; gap: 12px; padding: 14px 16px 18px; overflow-y: auto;
  background: var(--bg); box-shadow: -30px 0 80px -20px rgba(0,0,0,.4); transform: translateX(102%); transition: transform .42s cubic-bezier(.2,.8,.2,1); }
[dir="rtl"] .drawer__panel { transform: translateX(-102%); }
.drawer.is-open .drawer__panel { transform: none; }
.drawer__top { display: flex; align-items: center; justify-content: space-between; }
.drawer__account { display: flex; align-items: center; gap: 12px; padding: 12px; border-radius: 16px; background: var(--surface-2); border: 1px solid var(--line); }
.drawer__account > span:nth-child(2) { flex: 1; min-width: 0; }
.drawer__account strong { display: block; font-size: .95rem; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.drawer__account small { display: block; font-size: .78rem; color: var(--ink-3); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.drawer__sec { border-radius: 16px; border: 1px solid var(--line); background: var(--surface); }
.drawer__sec summary { display: flex; align-items: center; justify-content: space-between; padding: 14px 16px; font-weight: 700; cursor: pointer; list-style: none; }
.drawer__sec summary::-webkit-details-marker { display: none; }
.drawer__sec summary .i { transition: transform .3s var(--ease); }
.drawer__sec[open] summary .i { transform: rotate(180deg); }
.drawer__grid { display: grid; grid-template-columns: 1fr 1fr; gap: 6px; padding: 0 10px 12px; }
.drawer__grid a { display: flex; align-items: center; gap: 8px; padding: 10px; border-radius: 12px; background: var(--surface-2); font-size: .84rem; font-weight: 500; line-height: 1.25; }
.drawer__grid .i, .drawer__list .i { color: var(--brand); flex: none; }
.drawer__list { display: grid; padding: 0 8px 10px; }
.drawer__list a { display: flex; align-items: center; gap: 10px; padding: 11px 8px; border-radius: 10px; font-size: .92rem; }
.drawer__list a:hover, .drawer__grid a:hover { background: var(--brand-soft); }
.drawer__langs { display: flex; flex-wrap: wrap; gap: 6px; }
.drawer__langs a { padding: 8px 12px; border-radius: 999px; border: 1px solid var(--line); font-size: .85rem; }
.drawer__langs a[aria-current] { background: var(--brand); color: var(--on-brand); border-color: var(--brand); }
.drawer__foot { display: grid; gap: 8px; margin-top: auto; }
.drawer__sec[open] .drawer__grid a, .drawer__sec[open] .drawer__list a { animation: drawerIn .4s var(--ease) both; }
.drawer__sec[open] a:nth-child(2) { animation-delay: .03s; } .drawer__sec[open] a:nth-child(3) { animation-delay: .06s; } .drawer__sec[open] a:nth-child(4) { animation-delay: .09s; }
@keyframes drawerIn { from { opacity: 0; transform: translateY(6px); } }
body.drawer-open { overflow: hidden; }

@media (max-width: 1020px) {
  .mnav { display: none; }
  .nav__burger { display: inline-grid !important; }
}
@media (max-width: 640px) {
  .nav__theme { display: none; }
  .nav__actions .lang__btn { height: 38px; padding: 0 8px; gap: 4px; font-size: .8rem; }
  .nav__inner { gap: 10px; }
}

/* ---------------- Page de connexion ---------------- */
.auth { position: relative; min-height: calc(100vh - 72px); display: grid; place-items: center; padding: 40px var(--gutter) 80px; overflow: hidden; }
.auth__glow { position: absolute; width: 900px; height: 900px; border-radius: 50%; top: -450px; left: 50%; transform: translateX(-50%); background: radial-gradient(closest-side, color-mix(in srgb, var(--brand) 22%, transparent), transparent 70%); pointer-events: none; }
.auth__card { position: relative; width: 100%; max-width: 460px; padding: clamp(24px, 4vw, 36px); border-radius: 26px; background: var(--surface); border: 1px solid var(--line); box-shadow: 0 40px 100px -40px rgba(7, 42, 35, .4); display: grid; gap: 14px; }
.auth__seal { display: grid; place-items: center; }
.auth__seal .seal { width: 56px; height: 56px; color: var(--brand); }
.auth h1 { text-align: center; font-size: 1.8rem; font-weight: 500; }
.auth__sub { text-align: center; color: var(--ink-2); font-size: .95rem; }
.auth__or { display: flex; align-items: center; gap: 12px; color: var(--ink-3); font-size: .82rem; }
.auth__or::before, .auth__or::after { content: ""; flex: 1; height: 1px; background: var(--line); }
.auth__tabs { display: grid; grid-template-columns: 1fr 1fr; gap: 4px; padding: 4px; border-radius: 14px; background: var(--surface-2); }
.auth__tabs button { display: inline-flex; align-items: center; justify-content: center; gap: 6px; padding: 10px 8px; border: 0; border-radius: 10px; background: transparent; font-weight: 600; font-size: .85rem; color: var(--ink-2); cursor: pointer; }
.auth__tabs button.is-on { background: var(--surface); color: var(--ink); box-shadow: var(--shadow-1); }
.auth__pane { display: grid; gap: 12px; }
.auth__pane .field input { height: 48px; padding: 0 14px; border-radius: 12px; border: 1px solid var(--line-2); background: var(--bg); font-size: 1rem; width: 100%; }
.auth__pane .field input:focus { outline: 0; border-color: var(--brand); box-shadow: 0 0 0 4px var(--brand-soft); }
.auth__pane .field small { font-weight: 400; color: var(--ink-3); }
.seg--auth { margin: 0; }
.auth__hint { font-size: .88rem; color: var(--ink-2); }
.otp { text-align: center; font-size: 1.6rem !important; letter-spacing: .5em; font-variant-numeric: tabular-nums; }
.auth__link { border: 0; background: none; color: var(--brand); font-size: .85rem; cursor: pointer; padding: 4px 0; text-align: center; }
.auth__row { display: flex; justify-content: space-between; }
.auth__msg { min-height: 1.2em; text-align: center; font-size: .9rem; font-weight: 600; }
.auth__msg.is-err { color: var(--accent); } .auth__msg.is-ok { color: var(--brand); }
.auth__terms { font-size: .76rem; color: var(--ink-3); text-align: center; }
.auth__terms a { color: var(--brand); }
.auth__stack { display: grid; gap: 10px; margin-top: 8px; }
.btn--ghost { background: transparent; color: var(--ink-2); }
.btn.is-busy { opacity: .7; pointer-events: none; }
.btn.is-busy::after { content: ""; width: 14px; height: 14px; border-radius: 50%; border: 2px solid currentColor; border-top-color: transparent; animation: spin .7s linear infinite; }

/* ---------------- Hero : lumière, 3D, texte qui brille ---------------- */
.hx__title em { font-weight: 500; white-space: nowrap; color: transparent;
  background: linear-gradient(100deg, #7FD8B6 0%, #B9F0DA 22%, #FFFFFF 32%, #F1C27D 44%, #7FD8B6 62%, #7FD8B6 100%);
  background-size: 260% 100%; -webkit-background-clip: text; background-clip: text; animation: shine 5.5s ease-in-out infinite; filter: drop-shadow(0 0 22px rgba(143,221,191,.35)); }
[dir="rtl"] .hx__title em { font-weight: 800; }
@keyframes shine { 0% { background-position: 100% 0; } 55%, 100% { background-position: -60% 0; } }
.hx__title em::after { height: .08em; bottom: -.04em; background: linear-gradient(90deg, transparent, #E58358, #F1C27D, transparent); box-shadow: 0 0 18px #E58358; }
.hx__title .word { display: inline-block; opacity: 0; transform: translateY(.45em) rotateX(-50deg); transform-origin: bottom; animation: wordIn .9s var(--ease) forwards; animation-delay: calc(var(--w, 0) * 90ms + 150ms); }
@keyframes wordIn { to { opacity: 1; transform: none; } }

.hx__stage { --mx: 50%; --my: 30%; }
.hx__spot { position: absolute; inset: 0; z-index: -1; pointer-events: none; background: radial-gradient(520px circle at var(--mx) var(--my), rgba(143,221,191,.16), transparent 60%); transition: background .1s; }
.hx__beams { position: absolute; inset: -20% -10% auto; height: 120%; z-index: -1; pointer-events: none; opacity: .5;
  background: conic-gradient(from 200deg at 50% -10%, transparent 0deg, rgba(143,221,191,.18) 12deg, transparent 24deg, rgba(241,194,125,.14) 40deg, transparent 52deg, rgba(143,221,191,.12) 70deg, transparent 84deg);
  filter: blur(6px); animation: beams 14s ease-in-out infinite alternate; transform-origin: 50% 0; }
@keyframes beams { to { transform: rotate(8deg) scale(1.05); opacity: .75; } }
.hx__star3d { position: absolute; z-index: -1; width: 220px; height: 220px; top: 70px; inset-inline-start: 6%; perspective: 800px; opacity: .55; pointer-events: none; }
.hx__star3d span { position: absolute; inset: 22%; border: 1.5px solid rgba(210,172,98,.55); border-radius: 10px; box-shadow: 0 0 24px rgba(210,172,98,.25), inset 0 0 24px rgba(210,172,98,.12); animation: rot3d 16s linear infinite; }
.hx__star3d span:nth-child(2) { animation-delay: -4s; border-color: rgba(143,221,191,.5); }
.hx__star3d span:nth-child(3) { inset: 34%; border-radius: 50%; animation-duration: 10s; border-color: rgba(229,131,88,.5); }
@keyframes rot3d { from { transform: rotateX(60deg) rotateY(0) rotateZ(45deg); } to { transform: rotateX(60deg) rotateY(360deg) rotateZ(405deg); } }
.hx__star3d--b { top: auto; bottom: 170px; inset-inline-start: auto; inset-inline-end: 7%; width: 160px; height: 160px; opacity: .45; }

/* Bordure lumineuse animée autour du champ de question */
.hx__ask { position: relative; isolation: isolate; }
.hx__ask::before { content: ""; position: absolute; inset: -2px; z-index: -1; border-radius: 24px; padding: 2px;
  background: conic-gradient(from var(--ang), transparent 0 60%, #43B694 72%, #F1C27D 80%, #E58358 86%, transparent 94%);
  -webkit-mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0); -webkit-mask-composite: xor; mask-composite: exclude; animation: spinang 5s linear infinite; }

/* Aperçu en 3D (inclinaison au survol) */
.hx__preview { perspective: 1400px; }
.pv { transform-style: preserve-3d; transform: rotateX(var(--rx, 6deg)) rotateY(var(--ry, 0deg)); transition: transform .5s var(--ease), box-shadow .5s; will-change: transform; }
.pv::after { content: ""; position: absolute; inset: 0; border-radius: inherit; pointer-events: none; background: radial-gradient(600px circle at var(--gx, 50%) var(--gy, 0%), rgba(255,255,255,.18), transparent 45%); }
.pv { position: relative; }

/* Hero mobile : mode + bouton sur toute la largeur */
@media (max-width: 640px) {
  .hx__ask { padding: 14px 14px 12px; }
  .hx__ask textarea { font-size: 1.02rem; min-height: 64px; }
  .hx__bar { display: grid; grid-template-columns: 1fr; gap: 10px; }
  .hx__bar .mode--hero { display: grid; grid-template-columns: 1fr 1fr; width: 100%; }
  .hx__bar .mode__btn { justify-content: center; height: 42px; font-size: .95rem; }
  .hx__modehint { display: block; white-space: normal; text-align: center; font-size: .78rem; }
  .hx__go { width: 100%; margin: 0; height: 50px; }
  .hx__star3d { display: none; }
  .hx__title .word { animation-duration: .7s; }
}

/* ---------------- Analyse en cours (chat) ---------------- */
.think { display: grid; gap: 10px; padding: 14px 16px; border-radius: 16px; background: var(--surface); border: 1px solid var(--line); max-width: 460px; position: relative; overflow: hidden; }
.think::before { content: ""; position: absolute; inset: 0; background: linear-gradient(100deg, transparent 30%, color-mix(in srgb, var(--brand) 9%, transparent) 50%, transparent 70%); background-size: 220% 100%; animation: sweep 1.8s linear infinite; }
@keyframes sweep { from { background-position: 120% 0; } to { background-position: -120% 0; } }
.think__head { display: flex; align-items: center; gap: 12px; position: relative; }
.think__orb { position: relative; width: 30px; height: 30px; flex: none; border-radius: 50%; background: conic-gradient(from var(--ang), var(--brand), #8FDDBF, var(--accent), var(--brand)); animation: spinang 1.6s linear infinite; box-shadow: 0 0 22px -2px color-mix(in srgb, var(--brand) 60%, transparent); }
.think__orb::after { content: ""; position: absolute; inset: 4px; border-radius: 50%; background: var(--surface); }
.think__orb i { position: absolute; inset: 10px; z-index: 1; border-radius: 50%; background: var(--accent); animation: pulse 1.2s infinite; }
.think__title { font-weight: 700; font-size: .92rem; }
.think ol { margin: 0; padding: 0; list-style: none; display: grid; gap: 7px; position: relative; }
.think li { display: flex; align-items: center; gap: 10px; font-size: .86rem; color: var(--ink-3); transition: color .3s; }
.think li::before { content: ""; width: 16px; height: 16px; flex: none; border-radius: 50%; border: 2px solid var(--line-2); transition: .3s; }
.think li.is-active { color: var(--ink); font-weight: 600; }
.think li.is-active::before { border-color: var(--brand); border-top-color: transparent; animation: spin .8s linear infinite; }
.think li.is-done { color: var(--ink-2); }
.think li.is-done::before { border-color: var(--brand); background: var(--brand) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='m6 12.5 4 4L18 8' fill='none' stroke='white' stroke-width='3' stroke-linecap='round'/%3E%3C/svg%3E") center/12px no-repeat; }
.think__bar { height: 3px; border-radius: 3px; background: var(--surface-2); overflow: hidden; position: relative; }
.think__bar i { position: absolute; inset-block: 0; width: 40%; border-radius: 3px; background: linear-gradient(90deg, var(--brand), #8FDDBF, var(--accent)); animation: bar 1.4s ease-in-out infinite; }
@keyframes bar { 0% { inset-inline-start: -40%; } 100% { inset-inline-start: 100%; } }
.msg.is-streaming .msg__avatar { box-shadow: 0 0 0 0 color-mix(in srgb, var(--brand) 40%, transparent); animation: ring 1.6s infinite; }
@keyframes ring { 70% { box-shadow: 0 0 0 10px transparent; } }

/* ---------------- Barre du chat sur mobile ---------------- */
.app, .thread-wrap { overflow-x: hidden; }
.bar .acct { width: 36px; height: 36px; }
.side { overflow: hidden; }
.side .btn { white-space: normal; text-align: center; line-height: 1.25; min-height: 44px; height: auto; padding-block: 8px; }
@media (max-width: 640px) {
  .bar { gap: 4px; padding: 8px; }
  .bar__end { gap: 2px; }
  .bar__end [data-theme-toggle] { display: none; }
  .topic-select { min-width: 0; flex: 1; }
  .topic-select select { max-width: 100%; width: 100%; font-size: .85rem; padding-inline: 34px 26px; }
  .bar .icon-btn { width: 36px; height: 36px; }
}

/* ---------------- Lecture audio ---------------- */
.acts [data-act="speak"].is-on { color: #fff; background: var(--brand); }
.acts [data-act="speak"].is-on .i { animation: pulse 1.2s infinite; }
.tts-bar { display: inline-flex; align-items: center; gap: 3px; height: 14px; margin-inline-start: 6px; }
.tts-bar i { width: 3px; height: 40%; border-radius: 2px; background: currentColor; animation: wave 1s ease-in-out infinite; }
.tts-bar i:nth-child(2) { animation-delay: -.2s; } .tts-bar i:nth-child(3) { animation-delay: -.4s; }

@media (prefers-reduced-motion: reduce) {
  .hx__title em, .hx__beams, .hx__star3d span, .hx__ask::before, .mega__feature-glow, .think::before, .think__orb { animation: none !important; }
  .hx__title .word { opacity: 1; transform: none; animation: none; }
  .pv { transform: none !important; }
}

/* ---------- Mega menu Documents ---------- */
.mega__inner--full { grid-template-columns: 1fr; }
.mega__grid--5 { grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 10px 22px; }
.mega__foot { display: flex; align-items: center; justify-content: space-between; gap: 14px; flex-wrap: wrap; margin-top: 14px; padding: 12px 16px; border-radius: 14px; background: linear-gradient(90deg, var(--brand-soft), transparent); font-size: .88rem; color: var(--ink-2); }
.mega__foot strong { color: var(--ink); }
@media (max-width: 1100px) { .mega__grid--5 { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
.mega__col h4 { display: flex; align-items: center; gap: 8px; margin-bottom: 8px; font-family: var(--f-body); font-size: .8rem; font-weight: 700; text-transform: uppercase; letter-spacing: .06em; color: var(--brand); }
.mega__col h4 a { color: inherit; display: inline-flex; align-items: center; gap: 8px; }
.mega__col ul { margin: 0; padding: 0; list-style: none; display: grid; gap: 2px; }
.mega__col li a { display: flex; justify-content: space-between; gap: 8px; padding: 6px 8px; margin-inline: -8px; border-radius: 8px; font-size: .86rem; color: var(--ink-2); transition: background .2s, color .2s; }
.mega__col li a:hover { background: var(--surface-2); color: var(--ink); }
.mega__col li a small { color: var(--ink-3); flex: none; }
.mega__col .mega__more { margin-top: 6px; font-size: .82rem; font-weight: 700; color: var(--brand); }

.drawer__count { margin-inline-start: auto; margin-inline-end: 8px; padding: 1px 8px; border-radius: 999px; background: var(--brand-soft); color: var(--brand); font-size: .74rem; }
html { overflow-x: clip; }
/* Mode Avocat : textes analysés */
.mode__btn--avocat.is-on { background: linear-gradient(135deg, #0B2F28, #12715B); color: #F7F3EA; box-shadow: 0 0 18px rgba(67,182,148,.45); }
.srcs--full .srcs__list { display: grid !important; grid-template-columns: 1fr !important; gap: 8px; }
.srcf { border: 1px solid var(--line); border-radius: 14px; background: var(--surface); overflow: hidden; }
.srcf summary { display: flex; gap: 10px; align-items: flex-start; padding: 10px 12px; cursor: pointer; list-style: none; font-size: .88rem; }
.srcf summary::-webkit-details-marker { display: none; }
.srcf summary b { flex: none; display: grid; place-items: center; width: 24px; height: 24px; border-radius: 8px; background: var(--brand-soft); color: var(--brand); font-size: .78rem; }
.srcf summary span { display: grid; gap: 2px; } .srcf summary small { color: var(--ink-3); }
.srcf blockquote { margin: 0; padding: 12px 16px; border-top: 1px dashed var(--line); background: var(--bg); font-family: "IBM Plex Sans Arabic", var(--f-body); font-size: .95rem; line-height: 1.9; white-space: pre-line; max-height: 320px; overflow: auto; }
.srcf__acts { display: flex; flex-wrap: wrap; gap: 8px; padding: 10px 12px; border-top: 1px solid var(--line); }

/* ---------------- Barre de navigation du bas (mobile / tablette) ---------------- */
.tabbar { display: none; }
@media (max-width: 1020px) {
  .tabbar { position: fixed; z-index: 45; inset-inline: 0; bottom: 0; display: grid; grid-template-columns: repeat(5, 1fr); align-items: end;
    padding: 6px 6px calc(6px + env(safe-area-inset-bottom)); background: color-mix(in srgb, var(--surface) 92%, transparent); backdrop-filter: blur(16px) saturate(1.4); -webkit-backdrop-filter: blur(16px) saturate(1.4);
    border-top: 1px solid var(--line); box-shadow: 0 -10px 30px -18px rgba(0,0,0,.35); }
  .tabbar__item { display: grid; justify-items: center; gap: 3px; padding: 6px 2px; border-radius: 14px; color: var(--ink-3); font-size: .68rem; font-weight: 600; text-align: center; line-height: 1.15; transition: color .2s, transform .2s; }
  .tabbar__item .i { width: 22px; height: 22px; }
  .tabbar__lb { max-width: 100%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
  .tabbar__item:active { transform: scale(.94); }
  .tabbar__item[aria-current] { color: var(--brand); }
  .tabbar__item[aria-current] .tabbar__ic { background: var(--brand-soft); }
  .tabbar__ic { display: grid; place-items: center; width: 44px; height: 30px; border-radius: 999px; transition: background .2s; }
  .tabbar__item--main { margin-top: -26px; color: var(--brand); }
  .tabbar__item--main .tabbar__ic { width: 58px; height: 58px; border-radius: 50%; color: #fff;
    background: radial-gradient(circle at 30% 25%, #43B694, #0B5D4B 60%, #073E33); border: 3px solid var(--surface);
    box-shadow: 0 10px 24px -8px rgba(11,93,75,.7), 0 0 0 0 rgba(67,182,148,.5); animation: tabpulse 3s ease-in-out infinite; }
  .tabbar__item--main .i { width: 26px; height: 26px; }
  .tabbar__item--main[aria-current] .tabbar__ic { background: radial-gradient(circle at 30% 25%, #E58358, #C4532D 65%); }
  @keyframes tabpulse { 0%, 100% { box-shadow: 0 10px 24px -8px rgba(11,93,75,.7), 0 0 0 0 rgba(67,182,148,.45); } 50% { box-shadow: 0 10px 24px -8px rgba(11,93,75,.7), 0 0 0 10px rgba(67,182,148,0); } }
  body.is-site { padding-bottom: calc(78px + env(safe-area-inset-bottom)); }
  .ded__switch { bottom: calc(84px + env(safe-area-inset-bottom)) !important; }
  .is-app .tabbar { display: none; }
  /* Pages sans barre d'onglets (éditeur de document, maintenance) : rien à réserver en bas d'écran */
  body.is-site.no-tabbar { padding-bottom: 0; }
  .no-tabbar .ded__switch { bottom: max(12px, env(safe-area-inset-bottom)) !important; }
}
@media (prefers-reduced-motion: reduce) { .tabbar__item--main .tabbar__ic { animation: none; } }

/* ---------------- Modal cookies / installation ---------------- */
.consent { position: fixed; inset: 0; z-index: 90; display: grid; place-items: end center; padding: 16px; padding-bottom: calc(16px + env(safe-area-inset-bottom)); }
.consent[hidden] { display: none; }
.consent__scrim { position: absolute; inset: 0; background: rgba(5, 28, 23, .55); backdrop-filter: blur(4px); -webkit-backdrop-filter: blur(4px); animation: cfade .3s ease; }
.consent__box { position: relative; width: 100%; max-width: 520px; display: grid; gap: 12px; padding: 24px 22px 20px; border-radius: 24px; background: var(--surface); border: 1px solid var(--line);
  box-shadow: 0 40px 100px -30px rgba(0,0,0,.6); animation: cup .45s var(--ease); }
@media (min-width: 700px) { .consent { place-items: center; } }
.consent__ic { display: grid; place-items: center; width: 52px; height: 52px; border-radius: 16px; background: var(--brand-soft); font-size: 1.6rem; }
.consent__ic--app { color: var(--brand); } .consent__ic--app .logo-mark { width: 34px; height: 34px; }
.consent__box h2 { font-size: 1.35rem; font-weight: 500; }
.consent__box p { color: var(--ink-2); font-size: .93rem; line-height: 1.6; }
.consent__opts { display: grid; gap: 8px; }
.consent__opt { display: flex; gap: 12px; align-items: flex-start; padding: 12px; border-radius: 14px; background: var(--surface-2); cursor: pointer; }
.consent__opt input { margin-top: 3px; accent-color: var(--brand); width: 18px; height: 18px; }
.consent__opt span { display: grid; gap: 2px; } .consent__opt small { color: var(--ink-3); font-size: .82rem; }
.consent__acts { display: flex; flex-wrap: wrap; gap: 8px; justify-content: flex-end; }
.consent__acts .btn { flex: 1 1 auto; }
.consent__more { font-size: .82rem; color: var(--ink-3); text-decoration: underline; }
.install__list { margin: 0; padding-inline-start: 1.1em; display: grid; gap: 8px; font-size: .9rem; color: var(--ink-2); }
html.consent-open { overflow: hidden; }
@keyframes cfade { from { opacity: 0; } }
@keyframes cup { from { opacity: 0; transform: translateY(24px) scale(.98); } }

/* ---------- Panneau d'offres d'emploi Jawb.ma (chat) ---------- */
.jobs { position: fixed; z-index: 60; inset-block: 84px auto; inset-inline-end: 16px; width: min(380px, calc(100vw - 32px)); max-height: calc(100vh - 110px); overflow: auto;
  background: var(--surface); border: 1px solid var(--line); border-radius: 20px; box-shadow: 0 24px 60px -24px rgba(6, 30, 24, .45);
  transform: translateX(calc(100% + 24px)); opacity: 0; transition: transform .4s var(--ease, ease), opacity .3s; }
[dir="rtl"] .jobs { transform: translateX(calc(-100% - 24px)); }
.jobs.is-open { transform: none; opacity: 1; }
.jobs__head { position: sticky; top: 0; display: flex; align-items: center; gap: 12px; padding: 14px 16px; background: linear-gradient(120deg, color-mix(in srgb, #16A34A 12%, var(--surface)), var(--surface)); border-bottom: 1px solid var(--line); }
.jobs__head img { border-radius: 10px; }
.jobs__head div { display: grid; flex: 1; min-width: 0; }
.jobs__head small { color: var(--ink-3); font-size: .76rem; }
.jobs__x { border: 0; background: var(--surface-2); color: var(--ink); width: 32px; height: 32px; border-radius: 50%; font-size: 1.2rem; cursor: pointer; }
.jobs__list { list-style: none; margin: 0; padding: 8px; display: grid; gap: 6px; }
.jobs__list a { display: grid; gap: 3px; padding: 11px 12px; border-radius: 14px; color: var(--ink); text-decoration: none; border: 1px solid transparent; }
.jobs__list a:hover { background: var(--surface-2); border-color: var(--line); }
.jobs__list strong { font-size: .9rem; line-height: 1.3; }
.jobs__meta { font-size: .74rem; font-weight: 700; color: #16A34A; }
.jobs__desc { font-size: .8rem; color: var(--ink-2); line-height: 1.4; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.jobs__all { display: flex; justify-content: center; align-items: center; gap: 6px; margin: 4px 12px 14px; padding: 11px; border-radius: 999px; background: #16A34A; color: #fff; font-weight: 700; font-size: .88rem; text-decoration: none; }
@media (max-width: 720px) { .jobs { inset: auto 8px 84px 8px; width: auto; max-height: 62vh; transform: translateY(calc(100% + 100px)); } [dir="rtl"] .jobs { transform: translateY(calc(100% + 100px)); } .jobs.is-open { transform: none; } }
.jobs__about { padding: 12px 16px 4px; border-bottom: 1px solid var(--line); }
.jobs__about p { margin: 0 0 8px; font-size: .84rem; color: var(--ink-2); line-height: 1.5; }
.jobs__contact { list-style: none; margin: 0 0 10px; padding: 0; display: flex; flex-wrap: wrap; gap: 6px 14px; font-size: .82rem; }
.jobs__contact a { color: #16A34A; font-weight: 700; text-decoration: none; }
.jobs__label { margin: 12px 16px 0; font-size: .72rem; font-weight: 800; letter-spacing: .05em; text-transform: uppercase; color: var(--ink-3); }
/* Panneau santé : Dokia.ma (site partenaire) */
.jobs--dokia .jobs__head { background: linear-gradient(120deg, color-mix(in srgb, #2F9E96 14%, var(--surface)), var(--surface)); }
.jobs--dokia .jobs__contact a { color: #2F9E96; }
.jobs--dokia .jobs__all { background: #2F9E96; }
.jobs__urgent { margin: 0 0 10px; padding: 8px 10px; border-radius: 10px; background: color-mix(in srgb, #DC2626 9%, var(--surface)); color: var(--ink); font-size: .8rem; font-weight: 600; }
.jobs__tools { list-style: none; margin: 0; padding: 8px 10px; display: grid; grid-template-columns: 1fr 1fr; gap: 6px; }
.jobs__tools a { display: flex; align-items: center; gap: 8px; height: 100%; padding: 9px 10px; border-radius: 12px; border: 1px solid var(--line); color: var(--ink); text-decoration: none; font-size: .8rem; font-weight: 600; line-height: 1.25; }
.jobs__tools a:hover { background: var(--surface-2); border-color: #2F9E96; }

/* Bouton Espace Avocat (footer, en-tête, menu mobile, connexion, chat) */
.btn--lawyer { display: inline-flex; align-items: center; gap: 8px; background: linear-gradient(135deg, #0B3D33, #12503F); color: #F3EFE4; border: 1px solid rgba(201, 162, 39, .55); box-shadow: 0 6px 18px -10px rgba(11, 61, 51, .8); }
.btn--lawyer:hover { background: linear-gradient(135deg, #0E4A3E, #176150); color: #fff; transform: translateY(-1px); }
.footer__lawyer { margin-top: 16px; padding: 10px 16px; border-radius: 12px; font-weight: 600; text-decoration: none; }
.nav .brand, .nav .brand .logo-mark { flex-shrink: 0; }
.drawer__lawyer { justify-content: center; }
.auth__lawyer { display: flex; align-items: center; justify-content: center; gap: 8px; margin-top: 18px; padding: 12px 14px; border-radius: 12px; border: 1px dashed var(--line-2); color: var(--ink-2); font-size: .92rem; text-decoration: none; }
.auth__lawyer strong { color: var(--brand); }
.auth__lawyer:hover { border-style: solid; background: var(--surface-2); }
.auth__badge { justify-self: center; margin: 0; padding: 5px 12px; border-radius: 999px; background: rgba(201, 162, 39, .14); border: 1px solid rgba(201, 162, 39, .45); color: #8A6D12; font-size: .85rem; font-weight: 700; }
.side__lawyer { justify-content: center; margin-top: 8px; text-decoration: none; }
.footer .footer__grid a.footer__lawyer { display: inline-flex; align-items: center; gap: 8px; width: auto; margin-top: 16px; padding: 10px 16px; color: #F3EFE4; white-space: nowrap; }
.footer .footer__grid a.footer__lawyer:hover { color: #fff; }

/* Annuaire : avocats proposés sous une réponse (ordre aléatoire, non sponsorisé) */
.reclaw { margin-top: 12px; padding: 12px 14px; border: 1px solid var(--line); border-radius: 14px; background: var(--surface); }
.reclaw__h { margin: 0 0 8px; } .reclaw__h small { color: var(--muted, #6b7a75); }
.reclaw ul { list-style: none; margin: 0; padding: 0; display: grid; gap: 6px; }
.reclaw li a { display: flex; align-items: center; gap: 10px; padding: 8px; border-radius: 10px; text-decoration: none; color: inherit; }
.reclaw li a:hover { background: var(--brand-soft); }
.reclaw li span:nth-child(2) { display: grid; flex: 1; } .reclaw small { opacity: .75; }
.reclaw em { font-style: normal; font-weight: 600; color: var(--brand); font-size: .9rem; }
.reclaw__av { width: 40px; height: 40px; border-radius: 50%; overflow: hidden; display: grid; place-items: center; background: var(--brand-soft); color: var(--brand); font-weight: 700; flex: none; }
.reclaw__av img { width: 100%; height: 100%; object-fit: cover; }
.reclaw__all { display: inline-block; margin-top: 6px; font-size: .9rem; }

/* Méga-menu Domaines : 4 colonnes compactes, assistant juridique en bandeau sous la grille, jamais coupé en bas */
.mega__inner--domains { grid-template-columns: 1fr; gap: 12px; padding: 14px; max-height: calc(100vh - 96px); overflow-y: auto; overscroll-behavior: contain; }
.mega__inner--domains .mega__grid--4 { grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 2px 6px; }
.mega__inner--domains .mega__link { padding: 8px 10px; gap: 10px; align-items: center; }
.mega__inner--domains .mega__link strong { font-size: .88rem; }
.mega__inner--domains .mega__link small { font-size: .74rem; display: -webkit-box; -webkit-line-clamp: 1; -webkit-box-orient: vertical; overflow: hidden; }
.mega__inner--domains .mega__ic { width: 30px; height: 30px; border-radius: 9px; }
.mega__feature--band { display: flex; align-items: center; justify-content: space-between; gap: 18px; padding: 14px 20px; }
.mega__band-txt { display: grid; gap: 2px; min-width: 0; }
.mega__feature--band strong { font-size: 1.05rem; }
.mega__feature--band .mega__feature-cta { margin: 0; flex: none; padding: 9px 16px; border-radius: 999px; background: rgba(255, 255, 255, .1); border: 1px solid rgba(143, 221, 191, .4); }
@media (max-width: 1100px) { .mega__inner--domains .mega__grid--4 { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
@media (max-width: 760px) { .mega__inner--domains .mega__grid--4 { grid-template-columns: repeat(2, minmax(0, 1fr)); } .mega__feature--band { flex-direction: column; align-items: flex-start; } }

/* Méga-menu Documents : cartes par catégorie, icône par type de document */
.mega__inner--docs { max-height: calc(100vh - 96px); overflow-y: auto; overscroll-behavior: contain; padding: 14px; }
.mdoc__grid { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 10px; }
.mdoc { --c: var(--brand); display: flex; flex-direction: column; border-radius: 16px; border: 1px solid var(--line); background: var(--bg); overflow: hidden; transition: border-color .2s, box-shadow .2s, transform .2s var(--ease); }
.mdoc:hover { border-color: color-mix(in srgb, var(--c) 45%, var(--line)); box-shadow: 0 16px 34px -22px color-mix(in srgb, var(--c) 70%, #000); transform: translateY(-1px); }
.mdoc--association { --c: #7A4FB5; } .mdoc--creation { --c: #1F6FB2; } .mdoc--gestion { --c: #0B7A5F; } .mdoc--quotidien { --c: #C4532D; } .mdoc--immobilier { --c: #B07F1E; }
.mdoc__head { display: flex; align-items: center; gap: 10px; padding: 12px 12px 10px; background: linear-gradient(135deg, color-mix(in srgb, var(--c) 16%, var(--surface)), var(--surface)); border-bottom: 1px solid color-mix(in srgb, var(--c) 18%, var(--line)); color: var(--ink); }
.mdoc__head strong { display: block; font-size: .9rem; line-height: 1.2; }
.mdoc__head small { display: block; font-size: .74rem; color: var(--ink-3); margin-top: 2px; }
.mdoc__badge { flex: none; display: grid; place-items: center; width: 36px; height: 36px; border-radius: 11px; background: var(--c); color: #fff; box-shadow: 0 8px 18px -10px var(--c); }
.mdoc__list { list-style: none; margin: 0; padding: 6px; display: grid; gap: 1px; }
.mdoc__list a { display: grid; grid-template-columns: auto minmax(0, 1fr); align-items: center; gap: 8px; padding: 6px 6px; border-radius: 9px; font-size: .82rem; color: var(--ink-2); transition: background .15s, color .15s; }
.mdoc__list a:hover { background: color-mix(in srgb, var(--c) 9%, transparent); color: var(--ink); }
.mdoc__t { overflow: hidden; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; line-height: 1.3; }
.mdoc__p { font-size: .7rem; font-weight: 700; color: var(--ink-3); white-space: nowrap; opacity: 0; transition: opacity .15s; }
.mdoc__list a:hover .mdoc__p { opacity: 1; color: var(--c); }
.mdoc__ic { display: grid; place-items: center; width: 24px; height: 24px; border-radius: 7px; flex: none; }
.mdoc__ic .i { width: 15px; height: 15px; }
.mdoc__ic--contract { background: #E3EEF9; color: #1F5E9C; } .mdoc__ic--letter { background: #FCE8DF; color: #B2441F; }
.mdoc__ic--cert { background: #FBF0D6; color: #93660F; } .mdoc__ic--minutes { background: #DDF3EA; color: #0B6B53; }
.mdoc__ic--statutes { background: #EDE5F8; color: #6A3FA6; } .mdoc__ic--file { background: #EAEDF0; color: #4C5B66; }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) .mdoc__ic { background: color-mix(in srgb, currentColor 18%, transparent); filter: brightness(1.5); } }
:root[data-theme="dark"] .mdoc__ic { background: color-mix(in srgb, currentColor 18%, transparent); filter: brightness(1.5); }
.mdoc__more { display: inline-flex; align-items: center; gap: 6px; margin: auto 12px 10px; padding-top: 4px; font-size: .8rem; font-weight: 700; color: var(--c); }
@media (max-width: 1100px) { .mdoc__grid { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
@media (max-width: 760px) { .mdoc__grid { grid-template-columns: 1fr; } }
.mdoc__list a { padding: 5px 6px; text-align: start; align-items: start; }
.mdoc__t { text-align: start; font-size: .81rem; padding-top: 3px; }
.mdoc__ic { margin-top: 1px; }

/* Fenêtre de connexion du chat (après la question offerte) */
.gate { border: 0; padding: 0; margin: auto; background: transparent; width: min(460px, calc(100vw - 32px)); max-width: none; max-height: calc(100dvh - 32px); overflow: auto; color: inherit; }
.gate::backdrop { background: rgba(6, 22, 18, .58); backdrop-filter: blur(3px); }
.gate[open] { animation: gate-in .22s ease-out; }
@keyframes gate-in { from { opacity: 0; transform: translateY(12px) scale(.98); } to { opacity: 1; transform: none; } }
.auth--gate { min-height: 0; padding: 0; overflow: visible; display: block; }
.auth--gate .auth__card { max-width: none; }
.auth--gate h2 { text-align: center; font-size: 1.45rem; font-weight: 500; margin: 0; }
.auth--gate .auth__seal svg { width: 52px; height: 52px; }
.gate__x { position: absolute; top: 12px; inset-inline-end: 12px; }
@media (prefers-reduced-motion: reduce) { .gate[open] { animation: none; } }
.gate__emoji { font-size: 2.6rem; line-height: 1; }

/* ===== Méga-menu v2 (28/11/2026) : fond opaque, plus large, plus aéré, contenus regroupés avec titres ===== */
.mega { padding: 8px 0 28px; }
.mega__inner { background: var(--surface); backdrop-filter: none; -webkit-backdrop-filter: none; max-width: min(1360px, calc(100vw - 32px));
  box-shadow: 0 1px 0 rgba(255, 255, 255, .4) inset, 0 40px 90px -30px rgba(7, 42, 35, .45), 0 12px 30px -18px rgba(7, 42, 35, .25); }
.mega__inner--docs { padding: 24px; }
.mega__inner--docs .mdoc__grid { gap: 14px; }
.mega__inner--docs .mdoc__list a { font-size: .86rem; padding: 7px 8px; }
.mega__inner--v2 { grid-template-columns: minmax(0, 1fr) 320px; gap: 32px; padding: 28px 28px 28px 32px; max-height: calc(100vh - 96px); overflow-y: auto; overscroll-behavior: contain; }
.mega__main { display: grid; gap: 20px; align-content: start; min-width: 0; }
.mega__head { display: grid; gap: 4px; padding-bottom: 16px; border-bottom: 1px solid var(--line); }
.mega__k { font-size: .72rem; font-weight: 700; letter-spacing: .12em; text-transform: uppercase; color: var(--brand); }
.mega__title { font-family: "Fraunces", serif; font-weight: 500; font-size: 1.45rem; line-height: 1.2; color: var(--ink); }
.mega__head p { margin: 2px 0 0; font-size: .92rem; color: var(--ink-3); max-width: 62ch; }
.mega__tiles { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 6px 14px; }
.mega__inner--v2 .mega__link { padding: 12px 14px; gap: 14px; align-items: flex-start; border: 1px solid transparent; }
.mega__inner--v2 .mega__link:hover { border-color: var(--line); background: var(--surface-2); }
.mega__inner--v2 .mega__link strong { font-size: .95rem; line-height: 1.3; }
.mega__inner--v2 .mega__link small { font-size: .82rem; line-height: 1.45; margin-top: 3px; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.mega__inner--v2 .mega__ic { width: 40px; height: 40px; border-radius: 12px; }
.mega__groups { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 28px; }
.mega__group { display: grid; gap: 4px; align-content: start; min-width: 0; }
.mega__group h3 { margin: 0 0 6px; padding: 0 14px 8px; font-family: var(--f-body, inherit); font-size: .74rem; font-weight: 700; letter-spacing: .1em; text-transform: uppercase; color: var(--ink-3); border-bottom: 1px dashed var(--line); }
.mega__group .mega__group-h2 { margin-top: 14px; }
.mega__group--wide { grid-column: span 2; }
.mega__sub2 { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 4px 14px; }
.mega__inner--v2 .mega__feature { padding: 26px; gap: 10px; border-radius: 20px; }
.mega__feature--cta { align-content: end; min-height: 100%; }
.mega__feature--cta strong { font-size: 1.5rem; }
.mega__feature--cta > span:not(.mega__feature-glow):not(.mega__feature-k):not(.mega__feature-cta) { font-size: .95rem; line-height: 1.5; }
.mega__feature--cta .mega__feature-cta { margin-top: 10px; justify-self: start; padding: 11px 18px; border-radius: 999px; background: rgba(255, 255, 255, .12); border: 1px solid rgba(143, 221, 191, .45); transition: background .2s; }
.mega__feature--cta:hover .mega__feature-cta { background: rgba(255, 255, 255, .2); }
.mega__inner--v2 .mega__feature--modes strong { font-size: 1.1rem; margin-top: 8px; }
.mega__inner--v2 .mega__feature--src { gap: 12px; }
@media (max-width: 1240px) { .mega__inner--v2 { grid-template-columns: minmax(0, 1fr) 260px; gap: 24px; padding: 24px; } .mega__tiles { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
@media (max-width: 1060px) { .mega__inner--v2 { grid-template-columns: 1fr; } .mega__inner--v2 > .mega__feature { display: none; } .mega__groups { gap: 18px; } }
@media (max-height: 820px) and (min-width: 1061px) { .mega__inner--v2 { padding: 20px 24px; gap: 24px; } .mega__main { gap: 14px; } .mega__head { padding-bottom: 10px; } .mega__head p { display: none; } .mega__inner--v2 .mega__link { padding: 9px 12px; } .mega__inner--v2 .mega__link small { -webkit-line-clamp: 1; } }

/* ===== Méga-menu Documents v2 (30/11/2026) : catégories à gauche, modèles de la catégorie survolée à droite (moins haut) ===== */
.mdoc--commerce { --c: #2E7D8C; } .mdoc--litiges { --c: #A23B4A; } .mdoc--famille { --c: #C2477E; } .mdoc--numerique { --c: #4D5BC2; }
.mega__inner--docs2 { display: grid; grid-template-columns: 290px minmax(0, 1fr); gap: 0; padding: 0; overflow: hidden; max-height: calc(100vh - 96px); }
.mdoc2__rail { list-style: none; margin: 0; padding: 14px 12px; display: grid; gap: 2px; align-content: start; background: var(--bg); border-inline-end: 1px solid var(--line); overflow-y: auto; }
.mdoc2__tab { --c: var(--brand); display: grid; grid-template-columns: auto minmax(0, 1fr) auto; align-items: center; gap: 12px; padding: 8px 10px; border-radius: 12px; color: var(--ink-2); font-weight: 600; font-size: .9rem; line-height: 1.25; transition: background .15s, color .15s; }
.mdoc2__tab .mdoc__badge { width: 32px; height: 32px; border-radius: 10px; }
.mdoc2__tab:hover, .mdoc2__tab:focus-visible, .mdoc2__tab.is-on { background: color-mix(in srgb, var(--c) 11%, var(--surface)); color: var(--ink); }
.mdoc2__tab.is-on { box-shadow: inset 3px 0 0 var(--c); }
[dir="rtl"] .mdoc2__tab.is-on { box-shadow: inset -3px 0 0 var(--c); }
.mdoc2__n { font-size: .74rem; font-weight: 700; padding: 2px 8px; border-radius: 999px; background: var(--surface-2); color: var(--ink-3); }
.mdoc2__tab.is-on .mdoc2__n { background: var(--c); color: #fff; }
.mdoc2__panes { display: flex; flex-direction: column; gap: 16px; padding: 22px 26px; min-width: 0; overflow-y: auto; }
.mdoc2__pane { --c: var(--brand); display: grid; gap: 14px; }
.mdoc2__pane[hidden] { display: none; }
.mdoc2__head { display: flex; justify-content: space-between; align-items: flex-start; gap: 16px; padding-bottom: 14px; border-bottom: 1px solid var(--line); }
.mdoc2__head strong { font-family: "Fraunces", serif; font-size: 1.35rem; font-weight: 500; line-height: 1.2; color: var(--ink); }
.mdoc2__head p { margin: 4px 0 0; font-size: .9rem; color: var(--ink-3); }
.mdoc2__head .btn { flex: none; border-color: color-mix(in srgb, var(--c) 40%, var(--line)); color: var(--c); }
.mdoc2__list { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 2px 16px; }
.mdoc2__list a { display: grid; grid-template-columns: auto minmax(0, 1fr); align-items: center; gap: 10px; padding: 8px 10px; border-radius: 10px; font-size: .88rem; color: var(--ink-2); transition: background .15s, color .15s; }
.mdoc2__list a:hover { background: color-mix(in srgb, var(--c) 9%, transparent); color: var(--ink); }
.mdoc2__panes .mega__foot { margin-top: auto; }
@media (max-width: 1240px) { .mega__inner--docs2 { grid-template-columns: 250px minmax(0, 1fr); } .mdoc2__list { grid-template-columns: repeat(2, minmax(0, 1fr)); } }

/* Abonnement Pro du chat (49 MAD / mois, 03/12/2026) : prix sur le bouton, fenêtre d'offre, gestion de l'abonnement */
.mode__price { margin-inline-start: 4px; padding: 1px 7px; border-radius: 999px; background: var(--brand-soft); color: var(--brand); font-size: .7rem; font-weight: 700; white-space: nowrap; }
.mode__btn.is-on .mode__price { background: rgba(255, 255, 255, .22); color: inherit; }
.proplan { margin: 4px 0; padding: 16px; border: 1px solid var(--line); border-radius: 16px; background: var(--surface-2); text-align: center; }
.proplan__price { margin: 0; line-height: 1.1; }
.proplan__price strong { font-family: var(--f-display); font-size: 2.3rem; font-weight: 600; color: var(--brand); }
.proplan__price span { color: var(--ink-2); font-size: .95rem; }
.proplan__recur { margin: 6px 0 12px; font-size: .84rem; color: var(--ink-2); }
.proplan__list { margin: 0; padding: 0; list-style: none; display: grid; gap: 6px; text-align: start; font-size: .9rem; }
.proplan__list li { display: flex; gap: 8px; }
.proplan__list li::before { content: '✓'; color: var(--brand); font-weight: 700; flex: none; }
.proplan__cgv { display: flex; gap: 8px; align-items: flex-start; margin: 6px 0; font-size: .8rem; line-height: 1.45; color: var(--ink-2); text-align: start; cursor: pointer; }
.proplan__cgv input { margin-top: 3px; flex: none; accent-color: var(--brand); }
.proplan__cgv.is-required { color: #B3261E; }
.proplan__note { margin: 6px 0 0; font-size: .76rem; color: var(--ink-3); text-align: center; }
.btn.is-disabled { opacity: .5; }
.pro-plans__cgv { max-width: 720px; margin: 0 auto 22px; font-size: .88rem; justify-content: center; }
.pro-plan__alt.is-disabled { opacity: .5; }
.mode__manage { margin-top: 4px; padding: 0; border: 0; background: none; font-size: .78rem; color: var(--brand); text-decoration: underline; cursor: pointer; }
