/* SoloLedger Web — design system (aligné Paperasse / fintech FR) */

@import url('https://fonts.googleapis.com/css2?family=DM+Sans:ital,opsz,wght@0,9..40,400;0,9..40,500;0,9..40,600;0,9..40,700;1,9..40,400&display=swap');

:root {
  /* Marque — sarcelle comptable */
  --primary: #11abec;
  --primary-600: #0e97d1;
  --primary-700: #013a51;
  --primary-100: #f1f7fc;
  --primary-200: #dff2fb;

  --accent: #3aa657;
  --accent-700: #1d5836;
  --accent-100: #d5f6da;

  /* Neutres */
  --gray: #354a61;
  --gray-350: #516a87;
  --gray-325: #a8bfd7;
  --gray-300: #dfe8f2;
  --gray-200: #f3f7fc;
  --gray-100: #f9fbfc;
  --gray-700: #0b1c32;

  /* Sémantique */
  --green-600: #3aa657;
  --green-100: #d5f6da;
  --orange-500: #eb9c2d;
  --orange-100: #fcf0d9;
  --red: #dc4e41;
  --red-100: #fce4e2;

  --surface: #fff;
  --surface-muted: var(--gray-100);
  --canvas: var(--gray-200);
  --border-color: var(--gray-300);
  --border: 1px solid var(--border-color);

  --radius-xs: 0.375rem;
  --radius-sm: 0.5rem;
  --radius-md: 0.75rem;
  --radius-lg: 1rem;
  --radius-pill: 999px;

  --shadow-sm: 0 1px 2px rgba(11, 28, 50, 0.04), 0 1px 3px rgba(11, 28, 50, 0.06);
  --shadow-md: 0 6px 16px rgba(11, 28, 50, 0.08);
  --shadow-lg: 0 12px 32px rgba(11, 28, 50, 0.1);
  --ring: 0 0 0 3px rgba(17, 171, 236, 0.28);

  --font-sans: 'DM Sans', system-ui, -apple-system, 'Segoe UI', sans-serif;
  --text-xs: 0.75rem;
  --text-sm: 0.8125rem;
  --text-base: 0.875rem;
  --text-md: 1rem;
  --text-lg: 1.125rem;
  --text-xl: 1.375rem;
  --text-2xl: 1.75rem;
  --text-3xl: 2.25rem;

  --leading: 1.55;
  --leading-tight: 1.25;
  --max-width: 72rem;
  --header-h: 3.75rem;
}

*, *::before, *::after { box-sizing: border-box; }

html {
  scroll-behavior: smooth;
  overflow-x: clip;
}

body {
  margin: 0;
  font-family: var(--font-sans);
  font-size: var(--text-base);
  color: var(--gray);
  background: var(--canvas);
  line-height: var(--leading);
  -webkit-font-smoothing: antialiased;
  overflow-x: clip;
}

img { max-width: 100%; height: auto; }

a { color: var(--primary-600); text-decoration: none; }
a:hover { color: var(--primary-700); }

/* — Header — */

.top {
  position: sticky;
  top: 0;
  z-index: 50;
  background: rgba(255, 255, 255, 0.92);
  backdrop-filter: blur(8px);
  border-bottom: var(--border);
}

.top-inner {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 1rem;
  min-height: var(--header-h);
}

.top:not(:has(.top-inner)) {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 1rem;
  min-height: var(--header-h);
  padding: 0 1.25rem;
}

.top .brand {
  display: inline-flex;
  align-items: center;
  gap: 0.55rem;
  color: var(--primary-700);
  font-weight: 700;
  font-size: var(--text-md);
  text-decoration: none;
  letter-spacing: -0.02em;
}

.top .brand:hover { color: var(--primary-700); }

.brand-mark {
  display: grid;
  place-items: center;
  width: 1.75rem;
  height: 1.75rem;
  border-radius: var(--radius-sm);
  background: linear-gradient(145deg, var(--primary) 0%, var(--accent) 100%);
  color: #fff;
  font-size: 0.65rem;
  font-weight: 800;
  letter-spacing: -0.04em;
}

.top nav {
  display: flex;
  gap: 0.5rem;
  align-items: center;
  flex-wrap: wrap;
}

.top nav a:not(.btn) {
  padding: 0.4rem 0.65rem;
  color: var(--gray);
  font-size: var(--text-sm);
  font-weight: 600;
  border-radius: var(--radius-sm);
  transition: color 0.15s, background 0.15s;
}

.top nav a:not(.btn):hover {
  color: var(--primary-700);
  background: var(--primary-100);
}

@media (max-width: 540px) {
  .top-inner {
    flex-wrap: nowrap;
    align-items: center;
    gap: 0.5rem;
    min-height: auto;
    padding-block: 0.5rem;
  }

  .top:not(:has(.top-inner)) {
    flex-wrap: nowrap;
    align-items: center;
    gap: 0.5rem;
    padding: 0.5rem 0.85rem;
    min-height: auto;
  }

  .top .brand {
    font-size: var(--text-sm);
    min-width: 0;
    flex-shrink: 1;
  }

  .top nav {
    flex-direction: row;
    flex-wrap: nowrap;
    align-items: center;
    gap: 0.3rem;
    flex-shrink: 0;
    margin-left: auto;
  }

  .top nav a:not(.btn) {
    padding: 0.35rem 0.45rem;
    font-size: 0.8rem;
  }

  .top nav .btn {
    padding: 0.45rem 0.65rem;
    font-size: 0.75rem;
  }
}

/* — Boutons — */

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.4rem;
  padding: 0.65rem 1.15rem;
  border: none;
  border-radius: var(--radius-sm);
  background: var(--primary);
  color: #fff;
  font-family: inherit;
  font-size: var(--text-sm);
  font-weight: 700;
  text-decoration: none;
  cursor: pointer;
  white-space: nowrap;
  transition: background 0.15s, box-shadow 0.15s, transform 0.1s;
}

.btn:hover {
  background: var(--primary-600);
  color: #fff;
}

.btn:focus-visible {
  outline: none;
  box-shadow: var(--ring);
}

.btn:active { transform: translateY(1px); }

.btn.ghost {
  background: var(--surface);
  color: var(--primary-700);
  border: var(--border);
}

.btn.ghost:hover {
  border-color: var(--primary);
  background: var(--primary-100);
  color: var(--primary-700);
}

.btn.accent {
  background: var(--accent);
}

.btn.accent:hover {
  background: var(--accent-700);
}

/* — Layout — */

.page-shell {
  min-height: calc(100vh - var(--header-h));
}

.container {
  width: min(100% - 2rem, var(--max-width));
  margin-inline: auto;
}

.section {
  padding: 3.5rem 0;
}

.section--muted {
  background: var(--surface-muted);
  border-block: var(--border);
}

.section-head {
  max-width: 38rem;
  margin-bottom: 2rem;
}

.section-head h2 {
  margin: 0 0 0.5rem;
  font-size: var(--text-2xl);
  font-weight: 700;
  color: var(--primary-700);
  letter-spacing: -0.02em;
  line-height: var(--leading-tight);
}

.section-head p {
  margin: 0;
  color: var(--gray-350);
  font-size: var(--text-md);
}

/* — Landing hero — */

.hero {
  position: relative;
  max-width: none;
  margin: 0;
  padding: 4rem 0 3.5rem;
  background:
    radial-gradient(ellipse 80% 60% at 70% -10%, rgba(17, 171, 236, 0.12) 0%, transparent 55%),
    radial-gradient(ellipse 50% 40% at 10% 80%, rgba(58, 166, 87, 0.08) 0%, transparent 50%),
    var(--canvas);
  border: none;
  border-radius: 0;
}

.hero-grid {
  display: grid;
  gap: 2.5rem;
  align-items: center;
}

.hero-copy {
  min-width: 0;
}

.hero-eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  margin-bottom: 1rem;
  padding: 0.3rem 0.75rem;
  border-radius: var(--radius-pill);
  background: var(--surface);
  border: var(--border);
  color: var(--gray-350);
  font-size: var(--text-xs);
  font-weight: 600;
  letter-spacing: 0.02em;
  text-transform: uppercase;
}

.hero-eyebrow::before {
  content: '';
  width: 0.45rem;
  height: 0.45rem;
  border-radius: 50%;
  background: var(--accent);
}

.hero h1 {
  margin: 0 0 1rem;
  font-size: clamp(1.75rem, 4vw, var(--text-3xl));
  font-weight: 700;
  color: var(--primary-700);
  letter-spacing: -0.03em;
  line-height: 1.15;
}

.hero-lead {
  margin: 0 0 1.75rem;
  max-width: 34rem;
  font-size: var(--text-lg);
  color: var(--gray-350);
  line-height: var(--leading);
}

.actions {
  display: flex;
  gap: 0.75rem;
  flex-wrap: wrap;
  margin: 0 0 1.5rem;
}

.hero-panel {
  padding: 1.5rem;
  background: var(--surface);
  border: var(--border);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-md);
}

.hero-panel-title {
  margin: 0 0 1rem;
  font-size: var(--text-sm);
  font-weight: 700;
  color: var(--primary-700);
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

/* — Feature grid — */

.feature-grid {
  display: grid;
  gap: 1rem;
}

@media (min-width: 640px) {
  .feature-grid { grid-template-columns: repeat(2, 1fr); }
}

.feature-card {
  padding: 1.25rem;
  background: var(--surface);
  border: var(--border);
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-sm);
  transition: box-shadow 0.2s, border-color 0.2s;
}

.feature-card:hover {
  border-color: var(--gray-325);
  box-shadow: var(--shadow-md);
}

.feature-icon {
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  width: 3rem;
  height: 3rem;
  margin-bottom: 0.85rem;
  border-radius: var(--radius-sm);
  background: var(--accent-100);
  color: var(--accent-700);
}

.feature-icon svg {
  width: 1.375rem;
  height: 1.375rem;
}

.feature-card h3 {
  margin: 0 0 0.4rem;
  font-size: var(--text-md);
  font-weight: 700;
  color: var(--primary-700);
}

.feature-card p {
  margin: 0;
  font-size: var(--text-sm);
  color: var(--gray-350);
  line-height: 1.5;
}

.feature-tag {
  display: inline-block;
  margin-top: 0.65rem;
  padding: 0.15rem 0.5rem;
  border-radius: var(--radius-pill);
  background: var(--orange-100);
  color: #8a5a12;
  font-size: var(--text-xs);
  font-weight: 600;
}

/* — Bullets / pillar list — */

.bullets {
  margin: 0;
  padding: 0;
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 0.65rem;
}

.bullets li {
  display: flex;
  gap: 0.6rem;
  align-items: flex-start;
  font-size: var(--text-sm);
  color: var(--gray);
}

.bullets--spaced { margin-top: 1.5rem; }

.bullets li::before {
  content: '';
  flex-shrink: 0;
  width: 1.125rem;
  height: 1.125rem;
  margin-top: 0.15rem;
  border-radius: 50%;
  background: var(--accent-100);
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16' fill='%233aa657'%3E%3Cpath d='M6.5 11.5 3.5 8.5l1-1 2 2 5-5 1 1z'/%3E%3C/svg%3E");
  background-size: contain;
}

.pillar-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

.pillar-item {
  display: flex;
  gap: 0.75rem;
  padding: 0.85rem 1rem;
  border: var(--border);
  border-radius: var(--radius-sm);
  background: var(--surface-muted);
}

.pillar-mark {
  flex-shrink: 0;
  width: 2rem;
  height: 2rem;
  border-radius: var(--radius-sm);
  background: var(--primary-200);
  color: var(--primary-700);
  display: grid;
  place-items: center;
  font-size: 0.7rem;
  font-weight: 700;
}

.pillar-item strong {
  display: block;
  font-size: 0.9rem;
  color: var(--primary-700);
  margin-bottom: 0.15rem;
}

.pillar-item p {
  margin: 0;
  font-size: var(--text-sm);
  color: var(--gray-350);
}

/* — CTA band — */

.cta-band {
  padding: 2.5rem;
  background: var(--primary-700);
  border-radius: var(--radius-lg);
  color: #fff;
  text-align: center;
}

.cta-band h2 {
  margin: 0 0 0.5rem;
  font-size: var(--text-xl);
  font-weight: 700;
  color: #fff;
}

.cta-band p {
  margin: 0 0 1.25rem;
  color: rgba(255, 255, 255, 0.78);
  font-size: var(--text-md);
}

.cta-band .actions {
  justify-content: center;
  margin: 0;
}

.cta-band .btn.ghost {
  background: transparent;
  border-color: rgba(255, 255, 255, 0.35);
  color: #fff;
}

.cta-band .btn.ghost:hover {
  background: rgba(255, 255, 255, 0.1);
  border-color: rgba(255, 255, 255, 0.55);
  color: #fff;
}

/* — Landing desktop — */

@media (min-width: 900px) {
  .top nav {
    flex-wrap: nowrap;
    gap: 0.75rem;
  }

  .hero {
    padding: 4.5rem 0 4rem;
  }

  .hero-grid {
    grid-template-columns: minmax(0, 1.05fr) minmax(0, 0.95fr);
    gap: 3.5rem;
    align-items: center;
  }

  .hero h1 {
    font-size: var(--text-3xl);
  }

  .hero-lead {
    max-width: none;
  }

  .hero-panel {
    min-width: 0;
  }

  .section-head {
    max-width: 42rem;
    margin-inline: auto;
    margin-bottom: 2.5rem;
    text-align: center;
  }

  .feature-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 1.25rem;
  }

  .feature-card {
    height: 100%;
  }

  .cta-band {
    max-width: 56rem;
    margin-inline: auto;
    padding: 3rem 2.5rem;
  }

  .cta-band h2,
  .cta-band p {
    max-width: 36rem;
    margin-inline: auto;
  }

  .cta-band h2 {
    margin-bottom: 0.5rem;
  }

  .cta-band p {
    margin-bottom: 1.25rem;
  }

  .footer-inner {
    flex-wrap: nowrap;
  }
}

@media (min-width: 1024px) {
  .hero {
    padding: 5rem 0 4.5rem;
  }

  .hero-grid {
    gap: 4rem;
  }

  .section {
    padding: 4rem 0;
  }
}

/* — Footer — */

.site-footer {
  padding: 2rem 0;
  border-top: var(--border);
  background: var(--surface);
}

.footer-inner {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  align-items: center;
  gap: 1rem;
  font-size: var(--text-sm);
  color: var(--gray-350);
}

.footer-inner a {
  color: var(--gray-350);
  font-weight: 500;
}

.footer-inner a:hover { color: var(--primary-700); }

/* — Cards (auth + app) — */

.card {
  max-width: 42rem;
  margin: 2rem auto;
  padding: 1.75rem;
  background: var(--surface);
  border: var(--border);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-sm);
}

.card.narrow {
  max-width: 26rem;
  margin: 2.5rem auto;
}

.card h1 {
  margin: 0 0 0.35rem;
  font-size: var(--text-xl);
  font-weight: 700;
  color: var(--primary-700);
  letter-spacing: -0.02em;
}

.card-subtitle {
  margin: 0 0 1.5rem;
  font-size: var(--text-sm);
  color: var(--gray-350);
}

/* Auth shell */

.auth-page {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 2rem 1rem;
  background:
    radial-gradient(ellipse 60% 50% at 50% 0%, rgba(17, 171, 236, 0.08) 0%, transparent 60%),
    var(--canvas);
}

.auth-page .card.narrow {
  width: 100%;
  margin: 0;
}

.auth-logo {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  margin-bottom: 1.5rem;
  color: var(--primary-700);
  font-weight: 700;
  font-size: var(--text-md);
  text-decoration: none;
}

.auth-logo:hover { color: var(--primary-700); }

.auth-footer {
  margin-top: 1.25rem;
  text-align: center;
}

/* — Forms — */

label {
  display: block;
  margin-bottom: 1rem;
  font-size: var(--text-sm);
  font-weight: 600;
  color: var(--gray);
}

input {
  display: block;
  width: 100%;
  margin-top: 0.4rem;
  padding: 0.65rem 0.75rem;
  border: var(--border);
  border-radius: var(--radius-sm);
  background: var(--surface);
  font: inherit;
  font-size: var(--text-md);
  color: var(--gray-700);
  transition: border-color 0.15s, box-shadow 0.15s;
}

input:hover { border-color: var(--gray-325); }

input:focus {
  outline: none;
  border-color: var(--primary);
  box-shadow: var(--ring);
}

input:user-invalid:not(:focus):not(:placeholder-shown) {
  border-color: var(--red);
}

form .btn {
  width: 100%;
  margin-top: 0.25rem;
  padding: 0.75rem;
  font-size: var(--text-md);
}

/* — Messages — */

.muted {
  color: var(--gray-350);
  font-size: var(--text-sm);
}

.error {
  margin: 0.75rem 0 0;
  padding: 0.65rem 0.85rem;
  border-radius: var(--radius-sm);
  background: var(--red-100);
  color: var(--red);
  font-size: var(--text-sm);
  font-weight: 600;
}

.error[hidden] { display: none; }

.success {
  margin: 0.75rem 0 0;
  padding: 0.65rem 0.85rem;
  border-radius: var(--radius-sm);
  background: var(--green-100);
  color: var(--accent-700);
  font-size: var(--text-sm);
  font-weight: 600;
}

.status {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.55rem 0.85rem;
  margin: 0 0 1.25rem;
  border-radius: var(--radius-sm);
  background: var(--primary-100);
  border: var(--border);
  font-size: var(--text-sm);
  font-weight: 600;
  color: var(--primary-700);
}

.status::before {
  content: '';
  width: 0.5rem;
  height: 0.5rem;
  border-radius: 50%;
  background: var(--primary);
}

/* — Dashboard — */

.dashboard-grid {
  display: grid;
  gap: 1rem;
}

@media (min-width: 640px) {
  .dashboard-grid { grid-template-columns: 1fr 1fr; }
}

.info-tile {
  padding: 1.15rem;
  border: var(--border);
  border-radius: var(--radius-md);
  background: var(--surface-muted);
}

.info-tile h2 {
  margin: 0 0 0.35rem;
  font-size: var(--text-sm);
  font-weight: 700;
  color: var(--primary-700);
  text-transform: uppercase;
  letter-spacing: 0.03em;
}

.info-tile p {
  margin: 0;
  font-size: var(--text-sm);
  color: var(--gray-350);
}

.info-tile a {
  font-weight: 600;
}

/* — Billing / plans — */

.plans {
  display: grid;
  gap: 1rem;
  margin: 1.25rem 0;
}

@media (min-width: 480px) {
  .plans { grid-template-columns: 1fr 1fr; }
}

.plan-card {
  position: relative;
  padding: 1.35rem;
  border: var(--border);
  border-radius: var(--radius-md);
  background: var(--surface);
  text-align: left;
  transition: border-color 0.2s, box-shadow 0.2s;
}

.plan-card--featured {
  border-color: var(--primary);
  box-shadow: var(--shadow-md);
}

.plan-card--featured::after {
  content: 'Recommandé';
  position: absolute;
  top: -0.55rem;
  right: 1rem;
  padding: 0.15rem 0.55rem;
  border-radius: var(--radius-pill);
  background: var(--accent);
  color: #fff;
  font-size: var(--text-xs);
  font-weight: 700;
}

.plan-name {
  margin: 0 0 0.25rem;
  font-size: var(--text-sm);
  font-weight: 700;
  color: var(--gray-350);
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.plan-price {
  margin: 0 0 0.35rem;
  font-size: var(--text-2xl);
  font-weight: 700;
  color: var(--primary-700);
  letter-spacing: -0.02em;
}

.plan-price span {
  font-size: var(--text-sm);
  font-weight: 500;
  color: var(--gray-350);
}

.plan-desc {
  margin: 0 0 1rem;
  font-size: var(--text-sm);
  color: var(--gray-350);
}

.plans .btn {
  width: 100%;
}

.billing-note {
  margin-top: 1.5rem;
  padding: 1rem;
  border-radius: var(--radius-sm);
  background: var(--surface-muted);
  border: var(--border);
  font-size: var(--text-sm);
  color: var(--gray-350);
}

#manage {
  margin-top: 1rem;
}

#manage[hidden] { display: none; }
