/* ============================================================
   Puwapi · Direction artistique "Soleil Pastel" — v1.0
   Feuille de style partagée (site marketing)
   ============================================================ */

/* ---------- Tokens : mode clair ---------- */
:root {
  --bg:           #FAF7F0;
  --card:         #FFFBF2;
  --deep:         #F5EDDE;
  --cta:          #F5D060;
  --cta-text:     #5C3800;
  --amber:        #C8860A;
  --indigo:       #1A1040;
  --violet:       #8868A8;
  --violet-border:#C8A8D8;
  --muted:        #A08060;
  --border:       #EDE0C0;
  --hairline:     rgba(26,16,64,0.06);
  --success-bg:   #E8F8EE;
  --success-tx:   #1A4A2A;
  --pos:          #7AAA60;

  /* Couleurs modulaires (fond / texte) */
  --hub-bg:   #FEF0C0;  --hub-tx:   #5C3800;
  --rdv-bg:   #E4F0FC;  --rdv-tx:   #0C447C;
  --kds-bg:   #E8F8EE;  --kds-tx:   #085041;
  --fid-bg:   #F8ECFA;  --fid-tx:   #4B1528;
  --bur-bg:   #F1EFE8;  --bur-tx:   #1A1040;
  --ecom-bg:  #FCE9DC;  --ecom-tx:  #7C3A12;  /* extension harmonisée */

  --shadow-card: 0 1px 2px rgba(26,16,64,0.04), 0 6px 24px rgba(26,16,64,0.05);
  --shadow-float: 0 10px 40px rgba(26,16,64,0.10);

  --r-lg: 12px;
  --r-md: 8px;
  --r-pill: 20px;

  --font-display: "Fraunces", Georgia, serif;
  --font-body: "DM Sans", system-ui, sans-serif;

  --maxw: 1200px;
}

/* ---------- Tokens : mode sombre ---------- */
[data-theme="dark"] {
  --bg:           #17120A;
  --card:         #1E1810;
  --deep:         #201A14;
  --cta:          #F5D060;
  --cta-text:     #5C3800;
  --amber:        #C8860A;
  --indigo:       #F0E8D8;
  --violet:       #B79BD6;
  --violet-border:#3A2E48;
  --muted:        #7A6A58;
  --border:       #2E2418;
  --hairline:     rgba(240,232,216,0.07);
  --success-bg:   #101C14;
  --success-tx:   #9FE0B8;
  --pos:          #7AAA60;

  --hub-bg:   #2A2010;  --hub-tx:   #F0D9A0;
  --rdv-bg:   #101C28;  --rdv-tx:   #A9D0F2;
  --kds-bg:   #101C14;  --kds-tx:   #8FD9B0;
  --fid-bg:   #1E1028;  --fid-tx:   #E0B8D0;
  --bur-bg:   #201A14;  --bur-tx:   #F0E8D8;
  --ecom-bg:  #281810;  --ecom-tx:  #E8B48C;

  --shadow-card: 0 1px 2px rgba(0,0,0,0.3), 0 8px 28px rgba(0,0,0,0.35);
  --shadow-float: 0 14px 48px rgba(0,0,0,0.45);
}

/* ---------- Reset & base ---------- */
* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--indigo);
  font-family: var(--font-body);
  font-size: 15px;
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  transition: background .4s ease, color .4s ease;
}
body[data-theme] { /* used by dark on body for marketing pages where text base is body color */ }
[data-theme="dark"] body, body[data-theme="dark"] { color: var(--indigo); }

img { max-width: 100%; display: block; }
a { color: inherit; text-decoration: none; }
button { font-family: inherit; cursor: pointer; }

::selection { background: var(--cta); color: var(--cta-text); }

/* the body text in dark needs warm white; in light it should be muted-ink not pure indigo for paragraphs */
p { color: color-mix(in srgb, var(--indigo) 78%, var(--bg)); }
[data-theme="dark"] p, body[data-theme="dark"] p { color: #CFC4B0; }

/* ---------- Typo helpers ---------- */
.display {
  font-family: var(--font-display);
  font-weight: 600;
  font-style: italic;
  color: var(--indigo);
  line-height: 1.02;
  letter-spacing: -0.01em;
}
.eyebrow {
  font-weight: 500;
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.14em;
  color: var(--amber);
  display: inline-flex;
  align-items: center;
  gap: 8px;
}
.eyebrow::before {
  content: "";
  width: 18px; height: 1px;
  background: currentColor;
  opacity: .6;
}
.muted { color: var(--muted); }
.serif-num { font-family: var(--font-display); font-weight: 600; font-style: italic; }

/* ---------- Layout ---------- */
.wrap { max-width: var(--maxw); margin: 0 auto; padding: 0 32px; }
.section { padding: 96px 0; }
.section--tight { padding: 64px 0; }

/* ============================================================
   Topbar
   ============================================================ */
.topbar {
  position: sticky; top: 0; z-index: 50;
  background: color-mix(in srgb, var(--card) 82%, transparent);
  backdrop-filter: blur(18px) saturate(1.3);
  -webkit-backdrop-filter: blur(18px) saturate(1.3);
  border-bottom: 0.5px solid var(--border);
}
.topbar__inner {
  max-width: var(--maxw); margin: 0 auto;
  height: 60px; padding: 0 32px;
  display: flex; align-items: center; gap: 28px;
}
.wordmark {
  font-family: var(--font-display);
  font-weight: 600; font-style: italic;
  font-size: 23px;
  color: var(--indigo);
  letter-spacing: -0.01em;
  display: inline-flex; align-items: center; gap: 9px;
}
.wordmark__mark { height: 26px; width: auto; display: block; }
.wordmark .dot { color: var(--amber); }
[data-theme="dark"] .wordmark .dot, body[data-theme="dark"] .wordmark .dot { color: var(--cta); }

.nav { display: flex; align-items: center; gap: 4px; }
.nav a {
  font-size: 13.5px; font-weight: 500;
  color: color-mix(in srgb, var(--indigo) 70%, var(--bg));
  padding: 8px 12px; border-radius: var(--r-md);
  transition: background .18s, color .18s;
}
[data-theme="dark"] .nav a, body[data-theme="dark"] .nav a { color: #BCB0A0; }
.nav a:hover { color: var(--violet); background: color-mix(in srgb, var(--violet) 10%, transparent); }
.nav a.active { color: var(--indigo); background: var(--hub-bg); }

.topbar__spacer { flex: 1; }
.topbar__tools { display: flex; align-items: center; gap: 10px; }

.icon-btn {
  width: 36px; height: 36px;
  display: inline-flex; align-items: center; justify-content: center;
  border: 0.5px solid var(--border);
  background: var(--card);
  color: var(--muted);
  border-radius: var(--r-md);
  font-size: 18px;
  transition: all .18s;
}
.icon-btn:hover { color: var(--amber); border-color: var(--amber); }

.lang-toggle {
  display: inline-flex; border: 0.5px solid var(--border);
  border-radius: var(--r-md); overflow: hidden; font-size: 12px; font-weight: 500;
}
.lang-toggle button {
  border: 0; background: transparent; color: var(--muted);
  padding: 7px 10px; transition: all .18s;
}
.lang-toggle button.active { background: var(--hub-bg); color: var(--hub-tx); }

/* ============================================================
   Buttons
   ============================================================ */
.btn {
  display: inline-flex; align-items: center; gap: 8px;
  font-size: 14px; font-weight: 500;
  padding: 11px 18px; border-radius: var(--r-md);
  border: 0.5px solid transparent;
  transition: transform .16s ease, box-shadow .16s ease, background .18s, border-color .18s;
  white-space: nowrap;
}
.btn:active { transform: translateY(1px); }
.btn i { font-size: 17px; }

.btn--primary { background: var(--cta); color: var(--cta-text); box-shadow: 0 2px 10px rgba(245,208,96,0.4); }
.btn--primary:hover { box-shadow: 0 6px 22px rgba(245,208,96,0.55); transform: translateY(-1px); }

.btn--secondary { background: transparent; color: var(--violet); border-color: var(--violet-border); }
.btn--secondary:hover { background: color-mix(in srgb, var(--violet) 8%, transparent); }

.btn--ghost { background: transparent; color: var(--muted); }
.btn--ghost:hover { color: var(--amber); }

.btn--lg { padding: 14px 24px; font-size: 15px; }

.link-tertiary {
  font-weight: 500; font-size: 13.5px;
  display: inline-flex; align-items: center; gap: 6px;
  transition: gap .18s;
}
.link-tertiary:hover { gap: 10px; }

/* ============================================================
   Cards & surfaces
   ============================================================ */
.card {
  background: var(--card);
  border: 0.5px solid var(--border);
  border-radius: var(--r-lg);
  padding: 16px;
}
.badge {
  display: inline-flex; align-items: center; gap: 6px;
  font-size: 11px; font-weight: 500;
  padding: 4px 10px; border-radius: var(--r-pill);
  background: var(--deep); color: var(--muted);
  border: 0.5px solid var(--border);
}
.pill {
  font-size: 11px; font-weight: 500;
  padding: 3px 10px; border-radius: var(--r-pill);
  background: var(--hub-bg); color: var(--hub-tx);
}

/* ============================================================
   App / module cards (pastel)
   ============================================================ */
.app-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 16px;
}
.app-card {
  --acc-bg: var(--hub-bg); --acc-tx: var(--hub-tx);
  position: relative;
  background: var(--acc-bg);
  border: 0.5px solid color-mix(in srgb, var(--acc-tx) 14%, transparent);
  border-radius: var(--r-lg);
  padding: 24px 22px 22px;
  color: var(--acc-tx);
  overflow: hidden;
  transition: transform .22s ease, box-shadow .22s ease;
  display: flex; flex-direction: column; min-height: 230px;
}
.app-card:hover { transform: translateY(-4px); box-shadow: var(--shadow-float); }
.app-card__icon {
  width: 44px; height: 44px; border-radius: 10px;
  display: inline-flex; align-items: center; justify-content: center;
  background: color-mix(in srgb, var(--acc-tx) 12%, transparent);
  color: var(--acc-tx); font-size: 24px; margin-bottom: 16px;
}
.app-card__num {
  position: absolute; top: 18px; right: 20px;
  font-family: var(--font-display); font-style: italic; font-weight: 600;
  font-size: 26px; color: color-mix(in srgb, var(--acc-tx) 28%, transparent);
}
.app-card h3 { margin: 0 0 6px; font-size: 18px; font-weight: 500; color: var(--acc-tx); }
.app-card p { margin: 0 0 16px; font-size: 13.5px; color: color-mix(in srgb, var(--acc-tx) 78%, transparent); }
.app-card .link-tertiary { color: var(--acc-tx); margin-top: auto; }
.app-card__tags { display: flex; flex-wrap: wrap; gap: 6px; margin-bottom: 16px; }
.app-card__tags span {
  font-size: 10.5px; font-weight: 500; padding: 3px 9px; border-radius: var(--r-pill);
  background: color-mix(in srgb, var(--acc-tx) 9%, transparent);
}

.mod-hub  { --acc-bg: var(--hub-bg);  --acc-tx: var(--hub-tx); }
.mod-rdv  { --acc-bg: var(--rdv-bg);  --acc-tx: var(--rdv-tx); }
.mod-kds  { --acc-bg: var(--kds-bg);  --acc-tx: var(--kds-tx); }
.mod-fid  { --acc-bg: var(--fid-bg);  --acc-tx: var(--fid-tx); }
.mod-bur  { --acc-bg: var(--bur-bg);  --acc-tx: var(--bur-tx); }
.mod-ecom { --acc-bg: var(--ecom-bg); --acc-tx: var(--ecom-tx); }

/* ============================================================
   Footer
   ============================================================ */
.footer {
  border-top: 0.5px solid var(--border);
  background: var(--card);
  padding: 56px 0 36px;
}
.footer__grid {
  display: grid; grid-template-columns: 1.6fr 1fr 1fr 1fr;
  gap: 40px;
}
.footer h4 { font-size: 11px; text-transform: uppercase; letter-spacing: 0.12em; color: var(--muted); margin: 0 0 16px; font-weight: 500; }
.footer ul { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 10px; }
.footer ul a { font-size: 13.5px; color: color-mix(in srgb, var(--indigo) 72%, var(--bg)); transition: color .16s; }
[data-theme="dark"] .footer ul a, body[data-theme="dark"] .footer ul a { color: #BCB0A0; }
.footer ul a:hover { color: var(--violet); }
.footer__brand p { font-size: 13.5px; max-width: 30ch; margin: 14px 0 18px; }
.footer__bottom {
  margin-top: 44px; padding-top: 22px; border-top: 0.5px solid var(--border);
  display: flex; justify-content: space-between; align-items: center; gap: 16px;
  font-size: 12px; color: var(--muted); flex-wrap: wrap;
}

/* ============================================================
   Generic section header
   ============================================================ */
.sec-head { max-width: 640px; margin-bottom: 48px; }
.sec-head .eyebrow { margin-bottom: 16px; }
.sec-head h2 { font-family: var(--font-display); font-style: italic; font-weight: 600; font-size: clamp(30px, 4vw, 44px); line-height: 1.05; margin: 0 0 14px; color: var(--indigo); letter-spacing: -0.015em; }
.sec-head p { font-size: 16px; margin: 0; }
.sec-head--center { margin-left: auto; margin-right: auto; text-align: center; }
.sec-head--center .eyebrow { justify-content: center; }

/* ============================================================
   Striped placeholder (for screenshots-to-come)
   ============================================================ */
.ph {
  background-image: repeating-linear-gradient(135deg, var(--deep) 0 10px, var(--card) 10px 20px);
  border: 0.5px solid var(--border);
  border-radius: var(--r-md);
  display: flex; align-items: center; justify-content: center;
  color: var(--muted); font-family: ui-monospace, "SF Mono", monospace; font-size: 11px;
  letter-spacing: 0.04em;
}

/* ============================================================
   Reveal on scroll
   ============================================================ */
.reveal { opacity: 0; transform: translateY(18px); transition: opacity .7s ease, transform .7s ease; }
.reveal.in { opacity: 1; transform: none; }
@media (prefers-reduced-motion: reduce) { .reveal { opacity: 1; transform: none; transition: none; } }

/* ============================================================
   Responsive
   ============================================================ */
@media (max-width: 920px) {
  .app-grid { grid-template-columns: repeat(2, 1fr); }
  .footer__grid { grid-template-columns: 1fr 1fr; gap: 32px; }
  .nav { display: none; }
}
@media (max-width: 560px) {
  .wrap { padding: 0 20px; }
  .topbar__inner { padding: 0 20px; }
  .app-grid { grid-template-columns: 1fr; }
  .section { padding: 64px 0; }
  .footer__grid { grid-template-columns: 1fr; }
}

/* ============================================================
   APP PAGES — themed by module via .page-<mod> on <body>
   Each page sets --acc-bg / --acc-tx ; falls back to Hub
   ============================================================ */
body { --acc-bg: var(--hub-bg); --acc-tx: var(--hub-tx); }
.page-hub  { --acc-bg: var(--hub-bg);  --acc-tx: var(--hub-tx); }
.page-rdv  { --acc-bg: var(--rdv-bg);  --acc-tx: var(--rdv-tx); }
.page-kds  { --acc-bg: var(--kds-bg);  --acc-tx: var(--kds-tx); }
.page-fid  { --acc-bg: var(--fid-bg);  --acc-tx: var(--fid-tx); }
.page-bur  { --acc-bg: var(--bur-bg);  --acc-tx: var(--bur-tx); }
.page-ecom { --acc-bg: var(--ecom-bg); --acc-tx: var(--ecom-tx); }

.app-hero { position: relative; overflow: hidden; padding: 64px 0 56px; }
.app-hero__bg {
  position: absolute; inset: 0; z-index: 0; pointer-events: none;
  background: linear-gradient(180deg, var(--acc-bg) 0%, color-mix(in srgb, var(--acc-bg) 30%, var(--bg)) 60%, var(--bg) 100%);
  opacity: .85;
}
.app-hero__in { position: relative; z-index: 1; display: grid; grid-template-columns: 1fr 1fr; gap: 48px; align-items: center; }
.app-eyebrow { display: inline-flex; align-items: center; gap: 10px; font-size: 11px; font-weight: 500; text-transform: uppercase; letter-spacing: 0.14em; color: var(--acc-tx); }
.app-eyebrow .chip { width: 28px; height: 28px; border-radius: 8px; display: inline-flex; align-items: center; justify-content: center; background: color-mix(in srgb, var(--acc-tx) 14%, transparent); font-size: 16px; }
.app-hero h1 { font-family: var(--font-display); font-style: italic; font-weight: 600; font-size: clamp(34px, 5vw, 56px); line-height: 1.05; letter-spacing: -0.02em; margin: 18px 0 22px; color: var(--indigo); }
.app-hero__lede { font-size: 17px; max-width: 46ch; margin: 0 0 26px; }
.app-crumb { font-size: 12.5px; color: var(--muted); margin-bottom: 4px; display: flex; gap: 8px; align-items: center; }
.app-crumb a:hover { color: var(--violet); }

/* breakdown feature list */
.feat-list { display: grid; gap: 14px; margin-top: 8px; }
.feat {
  display: grid; grid-template-columns: auto 1fr; gap: 16px; align-items: start;
  background: var(--card); border: 0.5px solid var(--border); border-radius: var(--r-lg); padding: 18px 20px;
}
.feat__ic { width: 40px; height: 40px; border-radius: 10px; background: var(--acc-bg); color: var(--acc-tx); display: flex; align-items: center; justify-content: center; font-size: 21px; }
.feat h3 { margin: 0 0 4px; font-size: 15px; font-weight: 500; color: var(--indigo); }
.feat p { margin: 0; font-size: 13.5px; }

/* ---- device / window chrome for mockups ---- */
.frame {
  border-radius: 14px; border: 0.5px solid var(--border); background: var(--card);
  box-shadow: var(--shadow-float); overflow: hidden; max-width: 100%;
}
.frame__bar { height: 38px; display: flex; align-items: center; gap: 7px; padding: 0 14px; border-bottom: 0.5px solid var(--border); background: var(--deep); }
.frame__bar .dot { width: 10px; height: 10px; border-radius: 50%; background: color-mix(in srgb, var(--muted) 45%, transparent); }
.frame__bar .ttl { margin-left: 10px; font-size: 11.5px; color: var(--muted); font-weight: 500; }

/* mini dashboard pieces (reused) */
.mini { display: grid; grid-template-columns: 124px minmax(0, 1fr); min-height: 360px; }
.mini__side { background: var(--card); border-right: 0.5px solid var(--border); padding: 14px 10px; display: flex; flex-direction: column; gap: 3px; }
.mini__brand { font-family: var(--font-display); font-style: italic; font-weight: 600; font-size: 16px; color: var(--indigo); padding: 4px 8px 12px; }
.mini__brand .dot { color: var(--amber); }
.mini__nav { display: flex; align-items: center; gap: 9px; padding: 8px 10px; border-radius: 8px; font-size: 12px; color: var(--muted); }
.mini__nav i { font-size: 16px; }
.mini__nav.active { background: var(--acc-bg); color: var(--acc-tx); font-weight: 500; }
.mini__nav .count { margin-left: auto; font-size: 10px; padding: 1px 7px; border-radius: 20px; background: var(--acc-bg); color: var(--acc-tx); }
.mini__seclabel { font-size: 9px; text-transform: uppercase; letter-spacing: 0.14em; color: #C0A880; padding: 14px 10px 4px; }
[data-theme="dark"] .mini__seclabel, body[data-theme="dark"] .mini__seclabel { color: #4A3A28; }
.mini__main { padding: 16px; background: var(--bg); display: flex; flex-direction: column; gap: 14px; }
.mini__h1 { font-family: var(--font-display); font-style: italic; font-weight: 600; font-size: 21px; color: var(--indigo); margin: 0; }
.mini__sub { font-size: 12px; color: var(--muted); margin: 2px 0 0; }
.kpi-row { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 10px; }
.kpi { background: var(--acc-bg); border-radius: 12px; padding: 13px; color: var(--acc-tx); }
.kpi .lab { font-size: 9px; text-transform: uppercase; letter-spacing: 0.14em; opacity: .8; font-weight: 500; }
.kpi .val { font-family: var(--font-display); font-style: italic; font-weight: 600; font-size: 28px; line-height: 1.1; margin-top: 4px; }
.kpi .trend { font-size: 10.5px; color: var(--pos); margin-top: 2px; }
.mini-card { background: var(--card); border: 0.5px solid var(--border); border-radius: 12px; padding: 13px; }
.mini-card__h { display: flex; justify-content: space-between; align-items: center; font-size: 12px; font-weight: 500; color: var(--indigo); margin-bottom: 10px; }
.mini-card__h .more { font-size: 11px; color: var(--violet); font-weight: 500; }
.row-item { display: flex; align-items: center; gap: 10px; padding: 7px 0; border-top: 0.5px solid var(--hairline); font-size: 12px; }
.row-item:first-child { border-top: 0; }
.row-item .av { width: 26px; height: 26px; border-radius: 6px; background: var(--acc-bg); color: var(--acc-tx); display: flex; align-items: center; justify-content: center; font-size: 11px; font-weight: 500; }
.row-item .nm { font-weight: 500; color: var(--indigo); }
.row-item .meta { color: var(--muted); font-size: 11px; }
.row-item .amt { margin-left: auto; font-weight: 500; color: var(--indigo); }

/* cross-sell strip */
.xsell { display: grid; grid-template-columns: repeat(3, 1fr); gap: 14px; }
.xsell a {
  display: flex; gap: 12px; align-items: center; padding: 16px; border-radius: var(--r-lg);
  background: var(--xb); color: var(--xt); border: 0.5px solid color-mix(in srgb, var(--xt) 14%, transparent);
  transition: transform .18s, box-shadow .18s;
}
.xsell a:hover { transform: translateY(-3px); box-shadow: var(--shadow-card); }
.xsell a i { font-size: 22px; }
.xsell a b { font-weight: 500; font-size: 14px; display: block; }
.xsell a small { font-size: 11.5px; opacity: .8; }

@media (max-width: 920px) {
  .app-hero__in { grid-template-columns: 1fr; gap: 32px; }
  .xsell { grid-template-columns: 1fr; }
  .kpi-row { grid-template-columns: repeat(3, 1fr); }
}
