/* ============================================================================
   Kanbinou - Feuille de style Vitrine, Espace Compte (/compte) & CGU (/cgu)
   100 % autonome (zéro CDN externe), léger, rapide et responsive
   ============================================================================ */

:root {
  --bg: #f8fafc;
  --surface: #ffffff;
  --ink: #0f172a;
  --ink-soft: #475569;
  --muted: #64748b;
  --border: #e2e8f0;
  --primary: #0284c7;
  --primary-dark: #0369a1;
  --primary-soft: #e0f2fe;
  --emerald: #059669;
  --emerald-soft: #ecfdf5;
  --postit-bg: #fffae6;
  --postit-border: #fcd34d;
  --danger: #dc2626;
  --danger-soft: #fef2f2;
  --warning-bg: #fffbeb;
  --warning-border: #fde68a;
  --radius: 12px;
  --shadow-sm: 0 1px 3px rgba(15, 23, 42, 0.06);
  --shadow-md: 0 10px 30px rgba(15, 23, 42, 0.08);
  --max-w: 1120px;
}

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

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Oxygen, Ubuntu, Cantarell, sans-serif;
  background: var(--bg);
  color: var(--ink);
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
}

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

a:hover {
  text-decoration: underline;
}

.container {
  max-width: var(--max-w);
  margin: 0 auto;
  padding: 0 20px;
}

/* --- Header --- */
.site-header {
  position: sticky;
  top: 0;
  z-index: 40;
  background: rgba(255, 255, 255, 0.92);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--border);
}

.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  min-height: 64px;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-weight: 800;
  font-size: 1.18rem;
  color: var(--ink);
  text-decoration: none !important;
}

.brand-mark {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 34px;
  height: 34px;
  border-radius: 9px;
  background: var(--postit-bg);
  border: 2px solid var(--postit-border);
  font-size: 1.1rem;
  box-shadow: var(--shadow-sm);
}

.site-nav {
  display: flex;
  align-items: center;
  gap: 20px;
  flex-wrap: wrap;
}

.site-nav a {
  color: var(--ink-soft);
  font-size: 0.92rem;
  font-weight: 600;
}

.site-nav a:hover {
  color: var(--ink);
  text-decoration: none;
}

.header-actions {
  display: flex;
  align-items: center;
  gap: 10px;
}

/* --- Boutons --- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 10px 18px;
  border-radius: 9px;
  border: 1px solid var(--border);
  background: var(--surface);
  color: var(--ink);
  font-weight: 600;
  font-size: 0.92rem;
  cursor: pointer;
  transition: transform 0.12s ease, background 0.15s ease, border-color 0.15s ease, box-shadow 0.15s ease;
  text-decoration: none !important;
}

.btn:hover:not(:disabled) {
  background: #f1f5f9;
  border-color: #cbd5e1;
}

.btn:disabled {
  opacity: 0.6;
  cursor: not-allowed;
}

.btn-primary {
  background: var(--primary);
  border-color: var(--primary);
  color: #ffffff;
  box-shadow: 0 4px 12px rgba(2, 132, 199, 0.22);
}

.btn-primary:hover:not(:disabled) {
  background: var(--primary-dark);
  border-color: var(--primary-dark);
}

.btn-emerald {
  background: var(--emerald);
  border-color: var(--emerald);
  color: #ffffff;
}

.btn-emerald:hover:not(:disabled) {
  background: #047857;
  border-color: #047857;
}

.btn-ghost {
  background: transparent;
  border-color: transparent;
  color: var(--ink-soft);
}

.btn-sm {
  padding: 7px 12px;
  font-size: 0.84rem;
}

.btn-lg {
  padding: 13px 22px;
  font-size: 1rem;
}

.btn-block {
  width: 100%;
}

/* --- Badges & Alertes --- */
.pill {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 5px 12px;
  border-radius: 999px;
  font-size: 0.8rem;
  font-weight: 700;
  background: var(--primary-soft);
  color: var(--primary-dark);
}

.pill-postit {
  background: var(--postit-bg);
  border: 1px solid var(--postit-border);
  color: #92400e;
}

.pill-emerald {
  background: var(--emerald-soft);
  color: #065f46;
}

.pill-warning {
  background: var(--warning-bg);
  border: 1px solid var(--warning-border);
  color: #92400e;
}

.pill-danger {
  background: var(--danger-soft);
  color: var(--danger);
}

.alert {
  padding: 12px 16px;
  border-radius: 10px;
  font-size: 0.9rem;
  border: 1px solid transparent;
  margin-bottom: 16px;
}

.alert-success {
  background: var(--emerald-soft);
  border-color: #a7f3d0;
  color: #065f46;
}

.alert-info {
  background: #eff6ff;
  border-color: #bfdbfe;
  color: #1e40af;
}

.alert-warning {
  background: var(--warning-bg);
  border-color: var(--warning-border);
  color: #92400e;
}

.alert-danger {
  background: var(--danger-soft);
  border-color: #fecaca;
  color: #b91c1c;
}

/* --- Hero --- */
.hero {
  padding: 64px 0 48px;
  background: radial-gradient(circle at top right, #e0f2fe 0%, transparent 45%),
              radial-gradient(circle at bottom left, #fffae6 0%, transparent 40%);
}

.hero-grid {
  display: grid;
  grid-template-columns: 1.15fr 0.95fr;
  gap: 38px;
  align-items: center;
}

.hero h1 {
  margin: 14px 0 16px;
  font-size: clamp(2rem, 4vw, 3rem);
  line-height: 1.12;
  letter-spacing: -0.025em;
}

.hero-lead {
  font-size: 1.08rem;
  color: var(--ink-soft);
  margin: 0 0 24px;
  max-width: 560px;
}

.hero-cta {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-bottom: 18px;
}

.hero-trust {
  display: flex;
  flex-wrap: wrap;
  gap: 14px;
  font-size: 0.84rem;
  color: var(--muted);
  font-weight: 500;
}

/* Mockup Kanban post-it dans le Hero */
.board-preview {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 16px;
  padding: 16px;
  box-shadow: var(--shadow-md);
}

.board-preview-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding-bottom: 12px;
  margin-bottom: 12px;
  border-bottom: 1px solid var(--border);
  font-size: 0.8rem;
  font-weight: 700;
  color: var(--ink-soft);
}

.preview-cols {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 10px;
}

.preview-col {
  background: #f1f5f9;
  border-radius: 10px;
  padding: 10px;
}

.preview-col-title {
  font-size: 0.76rem;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  margin-bottom: 8px;
  display: flex;
  align-items: center;
  gap: 6px;
}

.dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  display: inline-block;
}

.postit-card {
  background: var(--postit-bg);
  border: 1px solid var(--postit-border);
  border-left: 4px solid #f59e0b;
  border-radius: 8px;
  padding: 10px;
  margin-bottom: 8px;
  box-shadow: 0 2px 6px rgba(15, 23, 42, 0.05);
}

.postit-card.blue {
  border-left-color: #0284c7;
}

.postit-title {
  font-size: 0.84rem;
  font-weight: 700;
  color: var(--ink);
  margin-bottom: 4px;
}

.postit-meta {
  font-size: 0.72rem;
  color: var(--muted);
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.preview-subcol {
  margin-top: 8px;
  background: #e2e8f0;
  border-radius: 8px;
  padding: 8px;
}

.preview-subcol-label {
  font-size: 0.7rem;
  font-weight: 700;
  color: #475569;
  margin-bottom: 6px;
}

/* --- Sections --- */
.section {
  padding: 58px 0;
}

.section-alt {
  background: var(--surface);
  border-top: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
}

.section-head {
  text-align: center;
  max-width: 700px;
  margin: 0 auto 38px;
}

.section-head h2 {
  margin: 10px 0 10px;
  font-size: clamp(1.55rem, 3vw, 2.15rem);
  letter-spacing: -0.02em;
}

.section-head p {
  margin: 0;
  color: var(--ink-soft);
}

/* --- Grille Fonctionnalités --- */
.features-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 18px;
}

.feature-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 20px;
  box-shadow: var(--shadow-sm);
}

.feature-icon {
  font-size: 1.6rem;
  margin-bottom: 10px;
  display: inline-block;
}

.feature-card h3 {
  margin: 0 0 8px;
  font-size: 1.03rem;
}

.feature-card p {
  margin: 0;
  font-size: 0.9rem;
  color: var(--ink-soft);
}

/* --- Grille Tarifs --- */
.billing-switch {
  display: inline-flex;
  align-items: center;
  background: #e2e8f0;
  padding: 4px;
  border-radius: 10px;
  gap: 4px;
  margin-top: 16px;
}

.billing-switch button {
  border: none;
  background: transparent;
  padding: 7px 14px;
  border-radius: 7px;
  font-weight: 700;
  font-size: 0.85rem;
  color: var(--ink-soft);
  cursor: pointer;
}

.billing-switch button.active {
  background: var(--surface);
  color: var(--ink);
  box-shadow: var(--shadow-sm);
}

.pricing-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 16px;
  align-items: stretch;
}

.plan-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 14px;
  padding: 22px 18px;
  display: flex;
  flex-direction: column;
  box-shadow: var(--shadow-sm);
  position: relative;
}

.plan-card.featured {
  border: 2px solid var(--primary);
  box-shadow: 0 12px 32px rgba(2, 132, 199, 0.14);
}

.plan-card.sante {
  border-color: #a7f3d0;
  background: linear-gradient(180deg, #ffffff 0%, #f0fdf4 100%);
}

.plan-badge {
  position: absolute;
  top: -11px;
  right: 14px;
  background: var(--primary);
  color: #fff;
  font-size: 0.72rem;
  font-weight: 800;
  padding: 3px 10px;
  border-radius: 999px;
}

.plan-card.sante .plan-badge {
  background: var(--emerald);
}

.plan-name {
  font-size: 1.08rem;
  font-weight: 800;
  margin: 0 0 4px;
}

.plan-sub {
  font-size: 0.82rem;
  color: var(--muted);
  margin: 0 0 14px;
  min-height: 36px;
}

.plan-price {
  display: flex;
  align-items: baseline;
  gap: 4px;
  margin-bottom: 4px;
}

.plan-price .amount {
  font-size: 2rem;
  font-weight: 900;
  letter-spacing: -0.03em;
}

.plan-price .period {
  font-size: 0.84rem;
  color: var(--muted);
  font-weight: 600;
}

.plan-note {
  font-size: 0.76rem;
  color: var(--muted);
  margin-bottom: 16px;
  min-height: 20px;
}

.plan-list {
  list-style: none;
  padding: 0;
  margin: 0 0 20px;
  display: flex;
  flex-direction: column;
  gap: 8px;
  font-size: 0.85rem;
  color: var(--ink-soft);
  flex: 1;
}

.plan-list li {
  display: flex;
  align-items: flex-start;
  gap: 7px;
}

.hds-banner {
  margin-top: 24px;
  background: var(--postit-bg);
  border: 1px solid var(--postit-border);
  border-radius: var(--radius);
  padding: 16px 20px;
  font-size: 0.88rem;
  color: #78350f;
}

/* --- Modale Checkout --- */
.modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(15, 23, 42, 0.56);
  backdrop-filter: blur(3px);
  z-index: 100;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 16px;
}

.modal-overlay[hidden] {
  display: none !important;
}

.modal-box {
  background: var(--surface);
  border-radius: 16px;
  width: 100%;
  max-width: 520px;
  max-height: 92vh;
  overflow-y: auto;
  box-shadow: 0 24px 60px rgba(15, 23, 42, 0.25);
  border: 1px solid var(--border);
}

.modal-head {
  padding: 18px 20px;
  border-bottom: 1px solid var(--border);
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.modal-head h3 {
  margin: 0;
  font-size: 1.12rem;
}

.modal-close {
  border: none;
  background: transparent;
  font-size: 1.5rem;
  line-height: 1;
  color: var(--muted);
  cursor: pointer;
}

.modal-body {
  padding: 20px;
}

/* --- Formulaires --- */
.form-stack {
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.field {
  display: flex;
  flex-direction: column;
  gap: 5px;
}

.field label {
  font-size: 0.84rem;
  font-weight: 700;
  color: var(--ink);
}

.field input[type="text"],
.field input[type="email"],
.field input[type="password"],
.field input[type="number"] {
  width: 100%;
  padding: 10px 12px;
  border: 1px solid #cbd5e1;
  border-radius: 8px;
  font-size: 0.94rem;
  color: var(--ink);
  background: #ffffff;
}

.field input:focus {
  outline: 2px solid var(--primary-soft);
  border-color: var(--primary);
}

.checkbox-card {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  padding: 12px;
  border-radius: 9px;
  border: 1px solid var(--border);
  background: #f8fafc;
  font-size: 0.83rem;
  color: var(--ink-soft);
  cursor: pointer;
}

.checkbox-card.legal {
  background: var(--warning-bg);
  border-color: var(--warning-border);
  color: #78350f;
}

.checkbox-card input {
  margin-top: 2px;
  width: 17px;
  height: 17px;
  flex-shrink: 0;
  accent-color: var(--primary);
}

.summary-box {
  background: #f1f5f9;
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 12px 14px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  font-size: 0.88rem;
}

/* --- Pages /compte & /cgu --- */
.page-wrap {
  padding: 42px 0 64px;
}

.card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 14px;
  padding: 24px;
  box-shadow: var(--shadow-sm);
}

.auth-card {
  max-width: 460px;
  margin: 0 auto;
}

.agency-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
  gap: 18px;
  margin-top: 20px;
}

.agency-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 14px;
  padding: 20px;
  display: flex;
  flex-direction: column;
  gap: 14px;
  box-shadow: var(--shadow-sm);
}

.agency-card-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 10px;
}

.agency-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: auto;
  padding-top: 8px;
  border-top: 1px solid var(--border);
}

.legal-doc {
  max-width: 820px;
  margin: 0 auto;
}

.legal-doc h1 {
  margin-top: 0;
  font-size: 1.9rem;
}

.legal-doc h2 {
  margin-top: 28px;
  font-size: 1.2rem;
  color: var(--ink);
  border-bottom: 1px solid var(--border);
  padding-bottom: 6px;
}

.legal-doc p,
.legal-doc li {
  color: var(--ink-soft);
  font-size: 0.94rem;
}

/* --- Footer --- */
.site-footer {
  border-top: 1px solid var(--border);
  background: var(--surface);
  padding: 28px 0;
  font-size: 0.85rem;
  color: var(--muted);
}

.footer-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 12px;
}

.footer-links {
  display: flex;
  gap: 18px;
  flex-wrap: wrap;
}

/* --- Responsive --- */
@media (max-width: 980px) {
  .hero-grid {
    grid-template-columns: 1fr;
  }
  .features-grid {
    grid-template-columns: repeat(2, 1fr);
  }
  .pricing-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (max-width: 640px) {
  .site-nav {
    display: none;
  }
  .features-grid,
  .pricing-grid,
  .preview-cols {
    grid-template-columns: 1fr;
  }
  .hero {
    padding-top: 36px;
  }
}
