/* ====== Variables et Reset CSS ====== */
:root {
    --primary: #1a36b2;
    --primary-dark: #102273;
    --primary-light: #254be2;
    --accent: #00d2b6;
    --danger: #e64545;
    --success: #19b77f;
    --warning: #fbbc05;
    --neutral-bg: #f5f7fb;
    --neutral-border: #e5e7eb;
    --text-main: #222c38;
    --text-muted: #7a869a;
    --radius: 12px;
    --transition: 0.2s cubic-bezier(.4,0,.2,1);
    --shadow: 0 4px 24px 0 rgba(30,54,130,0.10);
    --max-width: 480px;
  }
  
  html, body {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: 'Inter', 'Segoe UI', Arial, sans-serif;
    background: var(--neutral-bg);
    color: var(--text-main);
    min-height: 100vh;
  }
  
  *, *::before, *::after { box-sizing: inherit; }
  
  img, svg { max-width: 100%; height: auto; display: block; }
  
  a {
    color: var(--primary);
    text-decoration: none;
    transition: color var(--transition);
  }
  a:hover { color: var(--primary-dark); }
  
  input, select, textarea, button {
    font-family: inherit;
    font-size: 1rem;
    border-radius: var(--radius);
    border: 1px solid var(--neutral-border);
    background: #fff;
    color: var(--text-main);
    padding: 0.8em 1em;
    outline: none;
    transition: border-color var(--transition), box-shadow var(--transition);
  }
  
  input:focus, select:focus, textarea:focus {
    border-color: var(--primary);
    box-shadow: 0 0 0 2px rgba(26,54,178,0.08);
  }
  
  button {
    cursor: pointer;
    border: none;
    padding: 0.85em 1.5em;
    font-weight: 600;
    background: var(--primary);
    color: #fff;
    border-radius: var(--radius);
    box-shadow: var(--shadow);
    transition: background var(--transition), box-shadow var(--transition);
    display: inline-flex;
    align-items: center;
    gap: 0.5em;
  }
  
  button:hover, .btn:hover {
    background: var(--primary-dark);
    box-shadow: 0 2px 8px 0 rgba(26,54,178,0.15);
  }
  
  button:active, .btn:active {
    background: var(--primary-light);
  }
  
  .btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0.85em 1.5em;
    border-radius: var(--radius);
    font-weight: 600;
    border: none;
    transition: background var(--transition), box-shadow var(--transition);
    background: var(--primary);
    color: #fff;
    box-shadow: var(--shadow);
    cursor: pointer;
    gap: 0.5em;
  }
  
  .btn-secondary {
    background: #fff;
    color: var(--primary);
    border: 1px solid var(--primary);
  }
  .btn-secondary:hover {
    background: var(--primary-light);
    color: #fff;
  }
  
  .btn-danger {
    background: var(--danger);
    color: #fff;
  }
  .btn-danger:hover { background: #b73232; }
  
  .btn-success {
    background: var(--success);
    color: #fff;
  }
  .btn-success:hover { background: #13875f; }
  
  .btn-block { display: block; width: 100%; }
  
  .btn-icon {
    padding: 0.7em;
    width: 2.8em;
    height: 2.8em;
    justify-content: center;
  }
  
  .card {
    background: #fff;
    border-radius: var(--radius);
    box-shadow: var(--shadow);
    padding: 1.5em 1.25em;
    margin: 1em 0;
    border: 1px solid var(--neutral-border);
    transition: box-shadow var(--transition), border-color var(--transition);
  }
  
  .card:hover {
    box-shadow: 0 6px 32px 0 rgba(26,54,178,0.12);
    border-color: var(--primary-light);
  }
  
  .card-title {
    font-size: 1.2em;
    font-weight: 700;
    margin-bottom: 0.5em;
  }
  
  .card-desc {
    color: var(--text-muted);
    font-size: 0.97em;
  }
  
  .card-actions {
    display: flex;
    gap: 0.5em;
    margin-top: 1em;
  }
  
  /* Alerts & Messages */
  .alert {
    border-radius: var(--radius);
    padding: 1em 1.5em;
    margin-bottom: 1em;
    font-weight: 500;
    background: #f6f9ff;
    border-left: 4px solid var(--primary);
    color: var(--primary-dark);
  }
  .alert-success { border-color: var(--success); color: var(--success);}
  .alert-danger { border-color: var(--danger); color: var(--danger);}
  .alert-warning { border-color: var(--warning); color: var(--warning);}
  
  .form-group {
    margin-bottom: 1.3em;
    display: flex;
    flex-direction: column;
  }
  
  label {
    margin-bottom: 0.4em;
    font-weight: 500;
    font-size: 0.98em;
  }
  
  .input-group {
    display: flex;
    align-items: stretch;
    gap: 0.5em;
  }
  
  input[type="checkbox"], input[type="radio"] {
    width: 1.2em;
    height: 1.2em;
    accent-color: var(--primary);
    margin-right: 0.5em;
    vertical-align: middle;
  }
  
  select {
    appearance: none;
    background: #fff url('data:image/svg+xml,<svg width="10" height="8" viewBox="0 0 10 8" fill="none" xmlns="http://www.w3.org/2000/svg"><path d="M1 2.5L5 6.5L9 2.5" stroke="%231a36b2" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"/></svg>') right 1em center/1em no-repeat;
  }
  
  /* Progress Bar */
  .progress {
    background: #e5e7eb;
    border-radius: var(--radius);
    overflow: hidden;
    height: 1.1em;
    margin: 1em 0;
  }
  .progress-bar {
    background: var(--primary);
    height: 100%;
    transition: width 0.5s cubic-bezier(.4,0,.2,1);
  }
  
  /* Tabs (PrimeVue inspired) */
  .tabs {
    display: flex;
    border-bottom: 2px solid var(--neutral-border);
    margin-bottom: 1em;
    gap: 1em;
  }
  .tab {
    padding: 0.7em 1.3em;
    background: none;
    border: none;
    border-bottom: 2.5px solid transparent;
    font-weight: 600;
    color: var(--text-muted);
    cursor: pointer;
    transition: color var(--transition), border-color var(--transition);
  }
  .tab.active, .tab:focus {
    border-color: var(--primary);
    color: var(--primary);
  }
  
  /* Modal/Dialog */
  .modal-overlay {
    position: fixed; top: 0; left: 0; right: 0; bottom: 0;
    background: rgba(26,54,178,0.13);
    z-index: 90; display: flex; align-items: center; justify-content: center;
  }
  .modal {
    background: #fff;
    border-radius: var(--radius);
    box-shadow: 0 8px 40px 0 rgba(26,54,178,0.16);
    padding: 2em 1.5em;
    max-width: 96vw; min-width: 300px;
  }
  
  /* Navbar (bottom fixed for mobile) */
  .navbar-bottom {
    position: fixed;
    bottom: 0; left: 0; right: 0;
    background: #fff;
    border-top: 1.5px solid var(--neutral-border);
    box-shadow: 0 -2px 12px 0 rgba(26,54,178,0.08);
    display: flex; justify-content: space-around; align-items: center;
    padding: 0.6em 0;
    z-index: 100;
  }
  
  .navbar-bottom .nav-item {
    flex: 1;
    text-align: center;
    color: var(--primary);
    font-weight: 600;
    font-size: 1em;
    padding: 0.7em 0.5em;
    transition: color var(--transition), background var(--transition);
    border-radius: var(--radius);
  }
  .navbar-bottom .nav-item.active, .navbar-bottom .nav-item:hover {
    background: var(--primary-light);
    color: #fff;
  }
  
  /* Utilities */
  .mt-2 { margin-top: 1.5em !important; }
  .mb-2 { margin-bottom: 1.5em !important; }
  .text-center { text-align: center !important; }
  .text-right { text-align: right !important; }
  .hide { display: none !important; }
  
  /* ======= Responsive ======= */
  @media (max-width: 900px) {
    body { font-size: 0.97em; }
    .card { padding: 1.2em 0.8em; }
  }
  
  @media (max-width: 600px) {
    :root { --max-width: 100vw; }
    body { font-size: 0.96em; }
    .navbar-bottom { font-size: 0.95em; }
    .card { margin: 0.7em 0; }
  }
  
  @media (max-width: 400px) {
    .card { padding: 0.7em 0.4em; }
    .modal { padding: 1.1em 0.4em; }
  }
  
  /* Logo */
  .logo {
    display: block;
    margin: 0 auto 1.2em auto;
    max-width: 120px;
    height: auto;
  }
  .login-container {
    max-width: 420px;
    margin: 3.2em auto 5em auto;
    padding: 1.4em 0.8em 0 0.8em;
  }
  
  .login-title {
    text-align: center;
    font-size: 2em;
    font-weight: 800;
    margin-bottom: 0.1em;
    letter-spacing: -1px;
  }
  .login-subtitle {
    text-align: center;
    color: var(--text-muted);
    font-size: 1.05em;
    margin-bottom: 1.5em;
    font-weight: 500;
  }
  
  .login-tabs {
    margin-bottom: 1.6em;
    justify-content: center;
  }
  .login-tabs .tab {
    border-radius: 24px 24px 0 0;
    background: #f0f3ff;
    color: var(--primary);
    margin-right: 0.6em;
    font-size: 1em;
    box-shadow: none;
    border: none;
    padding: 0.65em 1.5em 0.65em 1.1em;
    display: flex;
    align-items: center;
    gap: 0.6em;
    font-weight: 700;
    transition: background 0.18s, color 0.15s;
    border-bottom: 2.5px solid transparent;
  }
  .login-tabs .tab.active,
  .login-tabs .tab:focus {
    background: var(--primary);
    color: #fff;
    border-bottom: 2.5px solid var(--primary-dark);
  }
  
  .login-card {
    padding: 2em 1.2em 1.5em 1.2em;
    border-radius: 22px;
    margin: 0 auto 1.2em auto;
    box-shadow: 0 6px 32px 0 rgba(26,54,178,0.10);
    border: none;
  }
  @media (max-width: 500px) {
    .login-container { max-width: 98vw; padding: 0.7em 0.15em 0 0.15em; }
    .login-card { padding: 1.2em 0.7em 1.1em 0.7em; }
    .login-tabs .tab { padding: 0.5em 0.7em 0.5em 0.7em; font-size: 0.97em; }
  }

  .tarif-card .btn {
    font-size: 0.97em;
    padding: 0.55em 1em;
    min-width: 140px;
  }
  .card.promo-card {
    border-left: 5px solid var(--primary);
    background: #f7f9fe;
    margin-bottom: 2.2em;
    padding: 1.15em 1.1em 1.1em 1.15em;
    border-top: 1.5px solid #e3e8f9;
    border-radius: 1.2em;
  }
  .promo-badge {
    background: linear-gradient(90deg, #009ffd 60%, #1a36b2 100%);
    color: #fff;
    border-radius: 14px;
    font-size: 0.97em;
    padding: 0.23em 0.7em;
    font-weight: 600;
  }
  .card.tarif-card {
    display: flex; justify-content: space-between; align-items: center;
    margin-bottom: 1em;
  }
  hr.sep {
    border: none;
    border-top: 1.5px solid #eceff7;
    margin: 2em 0 1.7em 0;
  }
  
  /* =====================================================================
   PrimeVue-like components for the sales funnel MVP (boutique-ebook)
   - Buttons (sizes, ghost, link, loading)
   - Badges & Tags (severity variants)
   - Toolbar & Breadcrumb
   - Table (DataTable-like) + Paginator
   - Forms: rows, input sizes, input-group, invalid states, help text
   - Switch (toggle)
   - Accordion (FAQ)
   - Steps indicator
   - Toasts (notifications)
   - Loading overlay + Spinner
   - Skeleton loader
   - Tooltip
   - Pricing blocks
   ===================================================================== */

/* -------- Buttons: sizes, ghost & link, loading ------- */
.btn-sm { padding: 0.5em 0.9em; font-size: 0.92em; }
.btn-lg { padding: 1em 1.6em; font-size: 1.05em; }

.btn-ghost {
  background: transparent;
  color: var(--primary);
  border: 1px solid var(--neutral-border);
  box-shadow: none;
}
.btn-ghost:hover { background: #f5f7ff; border-color: var(--primary-light); }

.btn-link {
  background: transparent; box-shadow: none; border: none; padding: 0;
  color: var(--primary); font-weight: 700;
}
.btn-link:hover { color: var(--primary-dark); text-decoration: underline; }

.btn[disabled], .btn:disabled, button[disabled] {
  opacity: .6; cursor: not-allowed; filter: grayscale(.1);
}

.btn-loading { position: relative; pointer-events: none; }
.btn-loading::after {
  content: ""; position: absolute; right: 12px; top: 50%; transform: translateY(-50%);
  width: 16px; height: 16px; border-radius: 50%;
  border: 2px solid rgba(255,255,255,.6); border-top-color: #fff;
  animation: spin .7s linear infinite;
}
@keyframes spin { to { transform: rotate(360deg); } }

/* -------------------- Badges & Tags -------------------- */
.badge {
  display: inline-flex; align-items: center; gap: .4em; padding: .2em .6em;
  border-radius: 9999px; font-weight: 700; font-size: .82em;
  background: #eef2ff; color: var(--primary);
}
.badge.success { background: #e8fbf3; color: var(--success); }
.badge.info    { background: #eef7ff; color: #0d6efd; }
.badge.warn    { background: #fff7e6; color: #a97100; }
.badge.danger  { background: #ffecec; color: var(--danger); }

.tag {
  display: inline-flex; align-items: center; gap: .45em;
  padding: .35em .75em; border-radius: 9999px; font-weight: 600;
  background: #f0f3ff; color: var(--primary);
}
.tag .dot { width: .5em; height: .5em; border-radius: 9999px; background: currentColor; opacity: .7; }
.tag.success { background: #e8fbf3; color: var(--success); }
.tag.info    { background: #eef7ff; color: #0d6efd; }
.tag.warn    { background: #fff7e6; color: #a97100; }
.tag.danger  { background: #ffecec; color: var(--danger); }

/* ---------------- Toolbar & Breadcrumb ----------------- */
.toolbar {
  display: flex; align-items: center; justify-content: space-between; gap: 1em;
  padding: .7em 1em; background: #fff; border: 1px solid var(--neutral-border);
  box-shadow: var(--shadow); border-radius: var(--radius);
}
.toolbar .actions { display: flex; gap: .5em; flex-wrap: wrap; }

.breadcrumb { display: flex; align-items: center; flex-wrap: wrap; gap: .4em; font-size: .95em; }
.breadcrumb a { color: var(--primary); font-weight: 600; }
.breadcrumb .sep { color: #a3acc2; margin: 0 .2em; }

/* ----------------- Table (DataTable-like) -------------- */
.table-responsive { width: 100%; overflow-x: auto; }
.table { width: 100%; border-collapse: separate; border-spacing: 0; background: #fff; border: 1px solid var(--neutral-border); border-radius: 12px; }
.table thead th {
  position: sticky; top: 0; z-index: 1; background: #f7f9fe; color: #4b5563; font-weight: 700;
  text-align: left; font-size: .92em; border-bottom: 1px solid var(--neutral-border); padding: .85em .9em;
}
.table tbody td { padding: .85em .9em; border-bottom: 1px solid #eef1f7; font-size: .95em; }
.table tbody tr:hover { background: #fafbff; }
.table tbody tr:last-child td { border-bottom: none; }
.table .actions { display: flex; gap: .4em; }

.table.striped tbody tr:nth-child(2n) { background: #fbfcff; }

/* ----------------------- Paginator --------------------- */
.paginator { display: flex; align-items: center; gap: .4em; flex-wrap: wrap; }
.paginator .page { min-width: 36px; height: 36px; display: inline-flex; align-items: center; justify-content: center; border-radius: 10px; border: 1px solid var(--neutral-border); background: #fff; cursor: pointer; font-weight: 600; }
.paginator .page:hover { border-color: var(--primary-light); }
.paginator .page.active { background: var(--primary); color: #fff; border-color: var(--primary); }
.paginator .spacer { flex: 1; }

/* ------------------------ Forms ------------------------ */
.form-row { display: grid; grid-template-columns: repeat(12, 1fr); gap: 1rem; }
.form-col-12 { grid-column: span 12; }
.form-col-6  { grid-column: span 6; }
.form-col-4  { grid-column: span 4; }
.form-col-3  { grid-column: span 3; }
@media (max-width: 780px) {
  .form-col-6, .form-col-4, .form-col-3 { grid-column: span 12; }
}

.input-sm { padding: .55em .8em; font-size: .95em; }
.input-lg { padding: 1em 1.2em; font-size: 1.08em; }

.input-group { display: flex; align-items: stretch; }
.input-addon { background: #f2f4fb; border: 1px solid var(--neutral-border); border-right: 0; padding: 0 .9em; border-radius: var(--radius) 0 0 var(--radius); display: inline-flex; align-items: center; font-weight: 600; color: #5b6783; }
.input-group > input,
.input-group > select,
.input-group > textarea { border-top-left-radius: 0; border-bottom-left-radius: 0; }

.is-invalid { border-color: var(--danger) !important; box-shadow: 0 0 0 2px rgba(230,69,69,.08) !important; }
.error-text { color: var(--danger); font-size: .9em; margin-top: .35em; }
.help-text { color: var(--text-muted); font-size: .9em; margin-top: .3em; }

/* ----------------------- Switch (toggle) --------------- */
.switch { position: relative; display: inline-block; width: 46px; height: 26px; }
.switch input { opacity: 0; width: 0; height: 0; }
.switch .slider { position: absolute; cursor: pointer; inset: 0; background: #e5e7eb; border-radius: 9999px; transition: background var(--transition); }
.switch .slider::before { content: ""; position: absolute; height: 20px; width: 20px; left: 3px; top: 3px; background: #fff; border-radius: 50%; transition: transform var(--transition); box-shadow: 0 1px 3px rgba(0,0,0,.12); }
.switch input:checked + .slider { background: var(--primary); }
.switch input:checked + .slider::before { transform: translateX(20px); }

/* ----------------------- Accordion (FAQ) --------------- */
.accordion { border: 1px solid var(--neutral-border); border-radius: var(--radius); overflow: hidden; background: #fff; }
.accordion details { border-bottom: 1px solid var(--neutral-border); }
.accordion details:last-child { border-bottom: none; }
.accordion summary { list-style: none; cursor: pointer; padding: 1em 1.1em; font-weight: 700; }
.accordion summary::-webkit-details-marker { display: none; }
.accordion .content { padding: 0 1.1em 1em; color: var(--text-muted); }

/* ---------------------- Steps indicator ---------------- */
.steps { display: flex; align-items: center; gap: .9em; flex-wrap: wrap; }
.step { display: inline-flex; align-items: center; gap: .6em; color: #6b7280; }
.step .dot { width: 26px; height: 26px; border-radius: 9999px; background: #e5e7eb; display: inline-flex; align-items: center; justify-content: center; font-weight: 700; }
.step.active { color: var(--primary); }
.step.active .dot { background: var(--primary); color: #fff; }
.step.done { color: var(--success); }
.step.done .dot { background: var(--success); color: #fff; }

/* ----------------------- Toasts (alerts) --------------- */
.toast-container { position: fixed; right: 14px; top: 14px; display: flex; flex-direction: column; gap: .6em; z-index: 9999; }
.toast {
  min-width: 280px; max-width: 380px; background: #fff; border: 1px solid var(--neutral-border); border-left: 5px solid var(--primary);
  box-shadow: 0 8px 24px rgba(0,0,0,.08); border-radius: 12px; padding: .85em 1em; animation: slideIn .18s ease-out;
}
.toast.success { border-left-color: var(--success); }
.toast.info    { border-left-color: #0d6efd; }
.toast.warn    { border-left-color: var(--warning); }
.toast.danger  { border-left-color: var(--danger); }
.toast .title { font-weight: 800; margin-bottom: .2em; }
.toast .desc  { color: var(--text-muted); font-size: .95em; }
@keyframes slideIn { from { opacity: 0; transform: translateY(-6px) } to { opacity: 1; transform: translateY(0) } }

/* ---------------- Loading overlay + Spinner ----------- */
.loading-overlay { position: fixed; inset: 0; background: rgba(26,54,178,.08); display: none; align-items: center; justify-content: center; z-index: 9998; }
.loading-overlay.active { display: flex; }
.spinner {
  width: 42px; height: 42px; border-radius: 9999px; border: 3px solid rgba(26,54,178,.25); border-top-color: var(--primary);
  animation: spin 1s linear infinite;
}

/* ----------------------- Skeleton ---------------------- */
.skeleton { position: relative; background: #eef1f7; border-radius: 10px; overflow: hidden; }
.skeleton::after { content: ""; position: absolute; inset: 0; transform: translateX(-100%);
  background: linear-gradient(90deg, transparent, rgba(255,255,255,.5), transparent);
  animation: shimmer 1.2s infinite;
}
@keyframes shimmer { 100% { transform: translateX(100%); } }

/* ------------------------ Tooltip ---------------------- */
[data-tooltip] { position: relative; }
[data-tooltip]:hover::after {
  content: attr(data-tooltip); position: absolute; bottom: calc(100% + 8px); left: 50%; transform: translateX(-50%);
  background: #111827; color: #fff; padding: .35em .6em; border-radius: 8px; font-size: .85em; white-space: nowrap; box-shadow: 0 6px 18px rgba(0,0,0,.18);
}
[data-tooltip]:hover::before {
  content: ""; position: absolute; bottom: 100%; left: 50%; transform: translateX(-50%);
  border: 6px solid transparent; border-top-color: #111827;
}

/* ---------------------- Pricing blocks ----------------- */
.pricing { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 1rem; }
@media (max-width: 900px) { .pricing { grid-template-columns: 1fr; } }
.pricing .price-card {
  background: #fff; border: 1px solid var(--neutral-border); border-radius: 16px; box-shadow: var(--shadow);
  padding: 1.4em 1.2em; display: flex; flex-direction: column; gap: .7em; position: relative;
}
.pricing .price-card.featured { border-color: var(--primary-light); box-shadow: 0 10px 34px rgba(26,54,178,.18); }
.pricing .price { font-size: 2.2em; font-weight: 900; letter-spacing: -1px; }
.pricing .unit { font-size: .55em; opacity: .7; font-weight: 700; margin-left: .15em; }
.pricing .features { list-style: none; padding: 0; margin: .4em 0 0; display: grid; gap: .35em; }
.pricing .features li { display: flex; align-items: center; gap: .5em; }
.pricing .features li::before { content: "✔"; font-weight: 900; }

/* ------- Section helpers (spacing / containers) ------- */
.section { padding: 2.4em 1.1em; }
.section.narrow { padding: 1.6em .9em; }
.container { max-width: var(--max-width); margin: 0 auto; }

/* ---------------------- Utilities grid ----------------- */
.grid-2 { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 1rem; }
.grid-3 { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 1rem; }
@media (max-width: 900px) { .grid-2, .grid-3 { grid-template-columns: 1fr; } }