/* Payreva : mise en page et composants. Les couleurs et polices sont dans brand.css. */

/* ---------------------------------------------------------------- type : serif titles */
.display, .h2, main h1, main h2 { font-family: var(--b-font-display); }
.display { font-weight: 600; letter-spacing: -0.02em; line-height: 1.08; font-size: clamp(2.5rem, 1.4rem + 3.6vw, 4.1rem); }
.h2 { font-weight: 600; letter-spacing: -0.015em; }
main h1 { font-weight: 600 !important; letter-spacing: -0.015em; }
.h2::before { content: ""; display: block; width: 2.5rem; height: 3px; margin-bottom: 1rem; background: var(--b-accent); }
.text-center .h2::before, .h2.text-center::before { margin-inline: auto; }
html[lang="ar"] .display, html[lang="ar"] .h2, html[lang="ar"] main h1, html[lang="ar"] main h2 { font-family: var(--b-font-arabic); letter-spacing: 0; line-height: 1.45; font-weight: 700; }
.link { color: var(--b-primary); text-decoration-color: color-mix(in srgb, var(--b-primary) 40%, transparent); }

/* ------------------------------------------------------------- controls : sober, square-ish */
.btn { border-radius: 0.3rem; font-weight: 600; letter-spacing: 0.005em; }
.btn-primary { background: var(--b-primary); box-shadow: inset 0 -2px 0 rgb(0 0 0 / 0.18); }
.btn-primary:hover { background: var(--b-primary-deep); }
.btn-quiet { box-shadow: inset 0 0 0 1px var(--b-border), inset 0 -2px 0 var(--b-border); }
.btn-quiet:hover { background: var(--b-background); box-shadow: inset 0 0 0 1px var(--b-primary), inset 0 -2px 0 var(--b-primary); }
.btn-light { background: var(--b-accent); color: #fff; }
.btn-light:hover { background: #9C7424; color: #fff; }
.btn-ink:hover { background: var(--b-primary-deep); }
.input { border-radius: 0.3rem; box-shadow: inset 0 0 0 1px #BAC3D2; }
.input:focus { box-shadow: inset 0 0 0 2px var(--b-primary); }
.icon-btn, .nav-link, .lang-option, .row-action { border-radius: 0.3rem; }
.menu, .lang-menu { border-radius: 0.35rem; border-top: 3px solid var(--b-accent); }
.lang-option[aria-current="true"] { background: var(--b-second-soft); }
.segmented { border-radius: 0.35rem; }
.segmented span { border-radius: 0.25rem; }
.segmented input:checked + span { background: var(--b-ink); }
.filter { border-radius: 0.3rem; }
.filter[aria-pressed="true"] { background: var(--b-ink); color: #fff; }
.pill { border-radius: 0.25rem; }
.pill-pending { background: var(--b-second-soft); color: var(--b-primary); }
.avatar { background: var(--b-accent); border-radius: 0.3rem; }
.panel { border-radius: 0.4rem; border-top: 3px solid var(--b-ink); }
.alert { border-radius: 0.3rem; }

/* ------------------------------------------- the header : a navy strip, then the menu on white */
.nav-glass { background: var(--b-ink); border-bottom: 0; -webkit-backdrop-filter: none; backdrop-filter: none; color: #fff; }
.nav-glass .nav-link, .nav-glass .icon-btn { color: rgb(255 255 255 / 0.82); }
.nav-glass .nav-link:hover, .nav-glass .icon-btn:hover { color: #fff; background: rgb(255 255 255 / 0.1); }
.nav-glass .btn-primary { background: var(--b-accent); }
.nav-glass .btn-primary:hover { background: #9C7424; }
.nav-glass .btn-quiet { background: transparent; color: #fff; box-shadow: inset 0 0 0 1px rgb(255 255 255 / 0.4); }
.nav-glass .lang-menu, .nav-glass .menu { color: var(--b-ink); }
.site-body .nav-glass { border-bottom: 3px solid var(--b-accent); }
#mobile-menu { border-top-color: rgb(255 255 255 / 0.15); }

.app-bar {
  background: linear-gradient(to bottom, var(--b-ink) 0 3.5rem, #fff 3.5rem);
  border-bottom: 1px solid var(--b-border);
  box-shadow: 0 6px 18px -14px rgb(11 31 58 / 0.4);
}
.app-bar > div {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  grid-template-areas: "logo . tools" "nav nav nav";
  height: auto;
  row-gap: 0;
}
.app-bar > div > a:first-child { grid-area: logo; height: 3.5rem; color: #fff; }
.app-bar > div > a:first-child > span { display: inline; }
.app-bar > div > div:last-child { grid-area: tools; height: 3.5rem; }
.app-bar nav { grid-area: nav; height: 3rem; margin: 0; gap: 0.25rem; align-items: stretch; overflow-x: auto; scrollbar-width: none; }
.app-bar nav .nav-link {
  height: 100%; border-radius: 0; padding-inline: 0.85rem;
  color: var(--b-muted); font-weight: 600;
  box-shadow: inset 0 -3px 0 transparent;
}
.app-bar nav .nav-link:hover { background: var(--b-background); color: var(--b-ink); }
.app-bar nav .nav-link[aria-current="page"] { color: var(--b-ink); background: transparent; box-shadow: inset 0 -3px 0 var(--b-accent); }
.app-bar nav .nav-link:first-child { margin-inline-start: -0.85rem; }
.app-bar nav .nav-link { display: inline-flex; flex-shrink: 0; }

/* -------------------------------------------------------------- landing */
.hero { background: var(--b-ink); color: #fff; }
.site-body .hero .mesh {
  background:
    linear-gradient(115deg, transparent 0 58%, rgb(184 138 46 / 0.1) 58% 58.3%, transparent 58.3%),
    radial-gradient(48rem 30rem at 90% 10%, rgb(29 78 137 / 0.7), transparent 70%),
    var(--b-ink);
}
.hero .display { color: #fff; }
.hero .text-muted { color: rgb(255 255 255 / 0.75); }
.hero .btn-primary { background: var(--b-accent); }
.hero .btn-primary:hover { background: #9C7424; }
.hero .btn-quiet { background: transparent; color: #fff; box-shadow: inset 0 0 0 1px rgb(255 255 255 / 0.45); }
.hero .btn-quiet:hover { background: rgb(255 255 255 / 0.08); color: #fff; }
.glass {
  background: #fff;
  -webkit-backdrop-filter: none; backdrop-filter: none;
  border-radius: 0.4rem;
  border-top: 4px solid var(--b-accent);
  box-shadow: 0 0 0 1px var(--b-border), 0 30px 60px -30px rgb(11 31 58 / 0.55);
}
.hero .glass { color: var(--b-ink); }
.hero .glass .text-muted { color: var(--b-muted); }
.mesh-soft { display: none; }
.page-index #product { background: #fff; }
.page-index #notifications { background: var(--b-background); }
.page-index #pricing { background: #fff; }
.page-index section:last-of-type { background: var(--b-accent-soft) !important; border-top: 3px solid var(--b-accent) !important; }
.plan-featured { background: var(--b-ink); }
.site-body .mesh:not(.hero .mesh) { background: linear-gradient(var(--b-ink) 0 11rem, var(--b-background) 11rem); }
.site-body footer { background: var(--b-ink) !important; color: rgb(255 255 255 / 0.85); border-top: 3px solid var(--b-accent) !important; }
.site-body footer .text-muted, .site-body footer .text-ink\/80, .site-body footer .text-ink\/75 { color: rgb(255 255 255 / 0.7); }
.site-body footer .text-ink, .site-body footer h2, .site-body footer h3, .site-body footer p.font-semibold { color: #fff; }
.site-body footer .link-quiet:hover { color: #fff; }
.site-body footer .border-rule, .site-body footer.border-rule { border-color: rgb(255 255 255 / 0.15); }
.site-body footer .link { color: #E7C779; }

/* -------------------------------------------------------- application */
.app-body { background: var(--b-background); }
.ledger { background: linear-gradient(180deg, var(--b-primary-deep), var(--b-ink)); border-bottom: 3px solid var(--b-accent); }
.metric-value { font-family: var(--b-font-display); font-weight: 600; letter-spacing: -0.01em; }
html[lang="ar"] .metric-value { font-family: var(--b-font-arabic); }

/* ------------------------------------------------------ the invoice sheet : a letterhead */
.sheet-stack::before, .sheet-stack::after { display: none; }
.sheet { border-radius: 0.2rem; box-shadow: 0 0 0 1px var(--b-border), 0 18px 40px -24px rgb(11 31 58 / 0.45); }
.sheet-head { padding-bottom: 1.1rem; border-bottom: 3px double var(--sheet-accent, var(--b-sheet)); }
.sheet-company { font-family: var(--b-font-display); font-size: 1.15rem; }
.sheet-title { font-family: var(--b-font-display); font-weight: 600; font-size: 1.6rem; letter-spacing: 0; }
html[lang="ar"] .sheet-company, html[lang="ar"] .sheet-title { font-family: var(--b-font-arabic); }
.sheet-items th { border-bottom: 3px double var(--sheet-accent, var(--b-sheet)); color: var(--b-ink); font-weight: 700; }
.sheet-items td { border-bottom: 1px solid var(--b-border); }
