/* =========================================================
   Adamkom Access — Styles communs (page de vente + back-office)
   Style : Neumorphism (crème + menthe)
   ========================================================= */
:root {
  /* Palette crème + menthe */
  --c-bg:          #ECE7DC; /* fond principal warm cream */
  --c-surface:     #F2EDE2; /* surface des cartes/boutons (légèrement plus clair) */
  --c-surface-2:   #E5DFD2; /* surface alternative */

  /* Accent menthe */
  --c-primary:     #00C49A;
  --c-primary-dark:#00A07F;
  --c-primary-soft:#B8EFE0;

  /* Accent secondaire (terracotta doux pour contraste chaleureux) */
  --c-accent:      #E08E6F;

  /* Texte */
  --c-text:        #2C3433;
  --c-text-soft:   #4A5251;
  --c-muted:       #7A807E;

  /* Statuts */
  --c-success:     #00C49A;
  --c-danger:      #E76F51;
  --c-warning:     #E9B949;
  --c-info:        #6BA8D8;

  /* Ombres néomorphiques */
  --shadow-light:  rgba(255, 255, 255, 0.75);
  --shadow-dark:   rgba(170, 156, 130, 0.45);

  --neu-out:       8px 8px 16px var(--shadow-dark), -8px -8px 16px var(--shadow-light);
  --neu-out-sm:    4px 4px 8px var(--shadow-dark), -4px -4px 8px var(--shadow-light);
  --neu-out-lg:    14px 14px 28px var(--shadow-dark), -14px -14px 28px var(--shadow-light);
  --neu-in:        inset 5px 5px 10px var(--shadow-dark), inset -5px -5px 10px var(--shadow-light);
  --neu-in-sm:     inset 3px 3px 6px var(--shadow-dark), inset -3px -3px 6px var(--shadow-light);

  --radius:        14px;
  --radius-lg:     22px;
  --radius-pill:   999px;
}

* { box-sizing: border-box; }

html, body {
  margin: 0;
  padding: 0;
  font-family: 'Inter', system-ui, -apple-system, 'Segoe UI', Roboto, sans-serif;
  color: var(--c-text);
  background: var(--c-bg);
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
}

a { color: var(--c-primary-dark); text-decoration: none; transition: color .15s; }
a:hover { color: var(--c-primary); text-decoration: none; }

img { max-width: 100%; display: block; }

/* Container */
.container { max-width: 1200px; margin: 0 auto; padding: 0 24px; }
.container-sm { max-width: 720px; margin: 0 auto; padding: 0 24px; }

/* ==================== BOUTONS NÉOMORPHIQUES ==================== */
.btn {
  display: inline-block;
  padding: 13px 28px;
  border-radius: var(--radius);
  font-size: 15px;
  font-weight: 600;
  cursor: pointer;
  border: none;
  text-decoration: none;
  transition: all .2s ease;
  text-align: center;
  background: var(--c-surface);
  color: var(--c-text);
  box-shadow: var(--neu-out-sm);
  font-family: inherit;
}
.btn:hover { box-shadow: var(--neu-out); transform: translateY(-1px); }
.btn:active { box-shadow: var(--neu-in-sm); transform: translateY(0); }

.btn-primary {
  background: linear-gradient(145deg, #00D8A8, #00B086);
  color: #fff;
  box-shadow: var(--neu-out-sm), inset 1px 1px 2px rgba(255,255,255,.3);
}
.btn-primary:hover {
  background: linear-gradient(145deg, #00C49A, #009975);
  color: #fff;
  box-shadow: var(--neu-out);
}
.btn-primary:active { box-shadow: inset 4px 4px 8px rgba(0,0,0,.15); }

.btn-outline { background: var(--c-surface); color: var(--c-primary-dark); box-shadow: var(--neu-out-sm); }
.btn-outline:hover { color: var(--c-primary); }

.btn-light { background: #fff; color: var(--c-primary-dark); box-shadow: var(--neu-out-sm); }
.btn-danger {
  background: linear-gradient(145deg, #EF8770, #DD5A40);
  color: #fff;
  box-shadow: var(--neu-out-sm);
}
.btn-block { display: block; width: 100%; }
.btn-sm { padding: 8px 16px; font-size: 13px; }

/* ==================== FORMULAIRES NÉOMORPHIQUES ==================== */
.form-group { margin-bottom: 18px; }
.form-group label {
  display: block;
  font-weight: 600;
  margin-bottom: 8px;
  font-size: 14px;
  color: var(--c-text-soft);
  letter-spacing: .2px;
}
.form-control {
  width: 100%;
  padding: 14px 18px;
  border: none;
  border-radius: var(--radius);
  font-size: 15px;
  font-family: inherit;
  color: var(--c-text);
  background: var(--c-bg);
  box-shadow: var(--neu-in-sm);
  transition: box-shadow .2s;
}
.form-control:focus {
  outline: none;
  box-shadow: var(--neu-in-sm), 0 0 0 3px var(--c-primary-soft);
}
textarea.form-control { min-height: 120px; resize: vertical; }
select.form-control {
  appearance: none;
  background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 12 12'><path fill='%2300A07F' d='M6 9L1 4h10z'/></svg>");
  background-repeat: no-repeat;
  background-position: right 16px center;
  padding-right: 40px;
}

/* Toggle / Checkbox stylisé */
.toggle { position: relative; display: inline-flex; align-items: center; cursor: pointer; }
.toggle input { display: none; }
.toggle .track {
  width: 48px; height: 26px;
  border-radius: var(--radius-pill);
  background: var(--c-bg);
  box-shadow: var(--neu-in-sm);
  position: relative;
  transition: background .2s;
}
.toggle .track::after {
  content: '';
  position: absolute;
  top: 3px; left: 3px;
  width: 20px; height: 20px;
  border-radius: 50%;
  background: var(--c-surface);
  box-shadow: var(--neu-out-sm);
  transition: transform .2s;
}
.toggle input:checked + .track { background: var(--c-primary-soft); }
.toggle input:checked + .track::after { transform: translateX(22px); background: var(--c-primary); }

/* ==================== ALERTES ==================== */
.alert {
  padding: 14px 20px;
  border-radius: var(--radius);
  margin-bottom: 18px;
  font-size: 14px;
  background: var(--c-surface);
  box-shadow: var(--neu-in-sm);
}
.alert-success { color: #05604E; background: #D8F5EC; }
.alert-danger  { color: #8C2D1A; background: #F8DCD2; }
.alert-info    { color: #1F4E7A; background: #D6E8F5; }
.alert-warning { color: #7A5500; background: #F8EDC9; }

/* ==================== CARTES NÉOMORPHIQUES ==================== */
.card {
  background: var(--c-surface);
  border-radius: var(--radius-lg);
  border: none;
  padding: 28px;
  box-shadow: var(--neu-out);
}
.card-flat {
  background: var(--c-surface);
  border-radius: var(--radius-lg);
  padding: 28px;
  box-shadow: var(--neu-in);
}
.card-header { font-size: 18px; font-weight: 700; margin-bottom: 18px; color: var(--c-text); }
.card-section { margin-bottom: 28px; }

/* ==================== HEADER PUBLIC ==================== */
.site-header {
  background: rgba(236, 231, 220, 0.85);
  backdrop-filter: blur(12px);
  padding: 16px 0;
  position: sticky;
  top: 0;
  z-index: 100;
}
.site-header .container { display: flex; align-items: center; justify-content: space-between; }
.brand {
  font-size: 19px;
  font-weight: 700;
  color: var(--c-text);
  display: flex;
  align-items: center;
  gap: 10px;
  text-decoration: none;
  letter-spacing: -.3px;
}
.brand:hover { text-decoration: none; color: var(--c-text); }
.brand .logo {
  width: 38px; height: 38px;
  border-radius: 12px;
  background: var(--c-surface);
  box-shadow: var(--neu-out-sm);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: var(--c-primary);
}
.brand .logo svg { width: 26px; height: 26px; }
.brand-text-light { font-weight: 300; opacity: .85; }
.nav { display: flex; align-items: center; gap: 28px; }
.nav a { color: var(--c-text-soft); font-weight: 500; font-size: 15px; }
.nav a:hover { color: var(--c-primary-dark); }
@media (max-width: 720px) { .nav .hide-mobile { display: none; } }

/* ==================== LANDING / HERO ==================== */
.hero {
  padding: 100px 0 80px;
  text-align: center;
  background: linear-gradient(180deg, var(--c-bg), var(--c-surface));
}
.hero h1 {
  font-size: 56px;
  font-weight: 800;
  line-height: 1.05;
  margin: 0 0 22px;
  letter-spacing: -1.5px;
  color: var(--c-text);
}
.hero h1 .highlight {
  background: linear-gradient(120deg, var(--c-primary), var(--c-primary-dark));
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}
.hero p.lead {
  font-size: 19px;
  color: var(--c-text-soft);
  max-width: 660px;
  margin: 0 auto 36px;
  line-height: 1.6;
}
.hero .cta { display: flex; gap: 16px; justify-content: center; flex-wrap: wrap; }
@media (max-width: 720px) { .hero h1 { font-size: 38px; } }

.section { padding: 80px 0; }
.section.alt { background: var(--c-surface-2); }
.section h2 {
  font-size: 38px;
  font-weight: 800;
  text-align: center;
  margin: 0 0 14px;
  letter-spacing: -.8px;
  color: var(--c-text);
}
.section .subtitle {
  font-size: 17px;
  color: var(--c-text-soft);
  text-align: center;
  max-width: 600px;
  margin: 0 auto 56px;
}

.grid-3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 28px; }
.grid-2 { display: grid; grid-template-columns: repeat(2, 1fr); gap: 28px; }
.grid-4 { display: grid; grid-template-columns: repeat(4, 1fr); gap: 22px; }
@media (max-width: 900px) { .grid-3, .grid-4 { grid-template-columns: 1fr 1fr; } }
@media (max-width: 600px) { .grid-3, .grid-4, .grid-2 { grid-template-columns: 1fr; } }

.feature {
  background: var(--c-surface);
  border-radius: var(--radius-lg);
  padding: 32px;
  box-shadow: var(--neu-out);
  transition: transform .25s, box-shadow .25s;
}
.feature:hover { transform: translateY(-4px); box-shadow: var(--neu-out-lg); }
.feature .icon {
  font-size: 28px;
  margin-bottom: 16px;
  width: 56px; height: 56px;
  border-radius: 16px;
  background: var(--c-bg);
  box-shadow: var(--neu-in-sm);
  display: inline-flex;
  align-items: center;
  justify-content: center;
}
.feature h3 { font-size: 20px; font-weight: 700; margin: 0 0 10px; color: var(--c-text); }
.feature p { color: var(--c-text-soft); margin: 0; font-size: 14px; line-height: 1.6; }

/* Pricing */
.pricing { display: grid; grid-template-columns: repeat(3, 1fr); gap: 28px; max-width: 1080px; margin: 0 auto; }
@media (max-width: 900px) { .pricing { grid-template-columns: 1fr; max-width: 480px; } }
.plan {
  background: var(--c-surface);
  border-radius: var(--radius-lg);
  padding: 36px 32px;
  text-align: center;
  position: relative;
  box-shadow: var(--neu-out);
  transition: transform .25s, box-shadow .25s;
}
.plan:hover { transform: translateY(-4px); box-shadow: var(--neu-out-lg); }
.plan.featured {
  background: linear-gradient(145deg, #00D8A8, #00A07F);
  color: #fff;
}
.plan.featured .price, .plan.featured h3 { color: #fff; }
.plan.featured li { color: rgba(255,255,255,.95); }
.plan.featured li::before { color: #fff; }
.plan.featured::before {
  content: 'POPULAIRE';
  position: absolute;
  top: -14px;
  left: 50%;
  transform: translateX(-50%);
  background: var(--c-surface);
  color: var(--c-primary-dark);
  padding: 5px 16px;
  border-radius: var(--radius-pill);
  font-size: 11px;
  font-weight: 700;
  letter-spacing: .8px;
  box-shadow: var(--neu-out-sm);
}
.plan h3 { font-size: 22px; margin: 0 0 8px; font-weight: 700; }
.plan .price { font-size: 46px; font-weight: 800; color: var(--c-text); letter-spacing: -1px; }
.plan .price span { font-size: 16px; color: var(--c-muted); font-weight: 500; }
.plan.featured .price span { color: rgba(255,255,255,.85); }
.plan ul { list-style: none; padding: 0; margin: 28px 0; text-align: left; }
.plan li { padding: 8px 0 8px 28px; position: relative; font-size: 14px; color: var(--c-text-soft); }
.plan li::before { content: '✓'; position: absolute; left: 0; color: var(--c-primary); font-weight: 800; font-size: 16px; }

/* ==================== FOOTER ==================== */
.site-footer { background: var(--c-surface-2); color: var(--c-text-soft); padding: 56px 0 28px; margin-top: 80px; }
.site-footer a { color: var(--c-text-soft); }
.site-footer a:hover { color: var(--c-primary-dark); }
.site-footer .grid-3 { gap: 40px; margin-bottom: 36px; }
.site-footer h4 { color: var(--c-text); margin: 0 0 14px; font-size: 13px; text-transform: uppercase; letter-spacing: 1.2px; font-weight: 700; }
.site-footer ul { list-style: none; padding: 0; margin: 0; }
.site-footer li { padding: 5px 0; font-size: 14px; }
.site-footer .copyright {
  border-top: 1px solid rgba(122,128,126,.2);
  padding-top: 24px;
  text-align: center;
  font-size: 13px;
  color: var(--c-muted);
}

/* ==================== BACK-OFFICE ==================== */
.app-shell { display: flex; min-height: 100vh; background: var(--c-bg); }

.sidebar {
  width: 260px;
  background: var(--c-surface);
  flex-shrink: 0;
  padding: 24px 0;
  display: flex;
  flex-direction: column;
  box-shadow: 4px 0 16px rgba(170,156,130,.15);
}
.sidebar .brand { color: var(--c-text); padding: 0 22px 22px; }
.sidebar .brand .logo { background: var(--c-bg); }
.sidebar nav { padding: 12px 14px; flex: 1; }
.sidebar nav a {
  display: block;
  padding: 12px 16px;
  color: var(--c-text-soft);
  font-weight: 500;
  font-size: 14px;
  border-radius: var(--radius);
  margin-bottom: 4px;
  transition: all .15s;
}
.sidebar nav a:hover { background: var(--c-bg); color: var(--c-text); text-decoration: none; }
.sidebar nav a.active {
  background: var(--c-bg);
  color: var(--c-primary-dark);
  box-shadow: var(--neu-in-sm);
  font-weight: 600;
}
.sidebar .nav-section-title {
  padding: 14px 16px 6px;
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: .8px;
  color: var(--c-muted);
  font-weight: 700;
}
.sidebar .user-block {
  padding: 18px 22px;
  border-top: 1px solid rgba(122,128,126,.15);
  font-size: 13px;
  color: var(--c-text-soft);
}
.sidebar .user-block .email { color: var(--c-muted); font-size: 12px; word-break: break-all; }

.main { flex: 1; padding: 36px 44px; }
.main-header { display: flex; justify-content: space-between; align-items: flex-start; margin-bottom: 32px; }
.main-header h1 { margin: 0 0 6px; font-size: 28px; font-weight: 800; letter-spacing: -.5px; }
.main-header p { margin: 0; color: var(--c-muted); }

.stat-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 18px; margin-bottom: 36px; }
@media (max-width: 900px) { .stat-grid { grid-template-columns: 1fr 1fr; } }
.stat {
  background: var(--c-surface);
  border-radius: var(--radius-lg);
  padding: 22px;
  box-shadow: var(--neu-out-sm);
}
.stat .label { font-size: 11px; color: var(--c-muted); text-transform: uppercase; letter-spacing: .8px; margin-bottom: 8px; font-weight: 600; }
.stat .value { font-size: 28px; font-weight: 800; color: var(--c-text); letter-spacing: -.5px; }
.stat .delta { font-size: 12px; color: var(--c-success); margin-top: 6px; font-weight: 600; }

.table { width: 100%; border-collapse: collapse; }
.table th, .table td { padding: 14px 16px; text-align: left; border-bottom: 1px solid rgba(122,128,126,.12); font-size: 14px; }
.table th { font-weight: 700; color: var(--c-muted); text-transform: uppercase; font-size: 11px; letter-spacing: .8px; background: transparent; }
.table tr:last-child td { border-bottom: none; }

.code-block {
  background: #2C3433;
  color: #DFE8E5;
  padding: 18px 20px;
  border-radius: var(--radius);
  font-family: 'SF Mono', Menlo, Monaco, Consolas, monospace;
  font-size: 13px;
  line-height: 1.6;
  overflow-x: auto;
  position: relative;
  box-shadow: var(--neu-in-sm);
}
.code-block .copy {
  position: absolute;
  top: 10px; right: 10px;
  background: rgba(0, 196, 154, .25);
  border: none;
  color: #fff;
  padding: 6px 12px;
  border-radius: 8px;
  cursor: pointer;
  font-size: 12px;
  font-weight: 600;
}
.code-block .copy:hover { background: var(--c-primary); }

.badge {
  display: inline-block;
  padding: 4px 12px;
  border-radius: var(--radius-pill);
  font-size: 12px;
  font-weight: 600;
  background: var(--c-bg);
  box-shadow: var(--neu-in-sm);
}
.badge.active { color: #05604E; background: #D8F5EC; }
.badge.inactive { color: #8C2D1A; background: #F8DCD2; }
.badge.trial { color: #7A5500; background: #F8EDC9; }

/* Responsive */
@media (max-width: 720px) {
  .sidebar { width: 70px; }
  .sidebar .brand span:not(.logo), .sidebar nav a span, .sidebar .user-block { display: none; }
  .main { padding: 22px; }
  .hero h1 { font-size: 36px; }
  .section h2 { font-size: 28px; }
}
