:root {
  --blue: #0f5d9b;
  --blue-2: #0b7fc8;
  --cyan: #2de2ff;
  --ink: #07111f;
  --muted: #64748b;
  --soft: #f4f9fd;
  --white: #ffffff;
  --green: #16a34a;
  --red: #dc2626;
  --orange: #f59e0b;
  --border: rgba(15, 93, 155, 0.12);
  --shadow: 0 24px 70px rgba(10, 61, 102, 0.14);
  --shadow-strong: 0 34px 110px rgba(10, 61, 102, 0.18);
  --radius: 28px;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  font-family: Inter, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  color: var(--ink);
  background:
    radial-gradient(circle at top right, rgba(45, 226, 255, 0.14), transparent 32%),
    linear-gradient(180deg, #ffffff 0%, #f7fbff 100%);
  min-height: 100vh;
}

a {
  color: var(--blue);
  font-weight: 700;
}

a:hover {
  color: var(--blue-2);
  text-decoration: none;
}

h1,
h2,
h3,
h4 {
  font-weight: 900;
  letter-spacing: -0.045em;
  color: var(--ink);
}

.container {
  max-width: 1180px;
}

.form-group label,
label {
  font-weight: 800;
  color: #24364b;
  margin-bottom: 8px;
}

.form-control,
.form-control-file {
  border-radius: 16px;
  border: 1px solid rgba(15, 93, 155, 0.18);
  min-height: 48px;
  padding: 12px 14px;
  box-shadow: none;
}

.form-control:focus {
  border-color: var(--blue);
  box-shadow: 0 0 0 4px rgba(15, 93, 155, 0.12);
}

textarea.form-control {
  min-height: 110px;
}

.btn {
  border-radius: 999px;
  font-weight: 850;
  padding: 12px 22px;
  border: 1px solid transparent;
  transition: 0.22s ease;
}

.btn:hover {
  transform: translateY(-2px);
}

.btn-primary,
.btn-purple {
  background: linear-gradient(135deg, var(--blue), var(--blue-2));
  border: none;
  color: #fff;
  box-shadow: 0 16px 36px rgba(15, 93, 155, 0.26);
}

.btn-primary:hover,
.btn-purple:hover {
  background: linear-gradient(135deg, #0c4d82, var(--blue));
  color: #fff;
}

.btn-secondary {
  background: #fff;
  color: var(--blue);
  border-color: rgba(15, 93, 155, 0.22);
}

.btn-success {
  background: linear-gradient(135deg, #16a34a, #22c55e);
  border: none;
}

.btn-danger {
  background: linear-gradient(135deg, #dc2626, #ef4444);
  border: none;
}

.btn-link {
  color: var(--blue);
  font-weight: 800;
}

.alert {
  border-radius: 20px;
  border: 1px solid transparent;
  font-weight: 650;
}

.alert-warning {
  background: #fff7ed;
  border-color: rgba(245, 158, 11, 0.25);
  color: #9a3412;
}

.alert-info {
  background: #eff6ff;
  border-color: rgba(15, 93, 155, 0.20);
  color: #0f4f82;
}

.alert-success {
  background: #ecfdf5;
  border-color: rgba(22, 163, 74, 0.22);
  color: #166534;
}

.alert-danger {
  background: #fef2f2;
  border-color: rgba(220, 38, 38, 0.22);
  color: #991b1b;
}

/* AUTH / PAYMENT */

.auth-card,
.payment-container,
.success-container {
  max-width: 520px;
  width: calc(100% - 28px);
  margin: 56px auto;
  padding: 34px;
  background: rgba(255, 255, 255, 0.94);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
}

.auth-card h1,
.auth-card h2,
.payment-container h1,
.payment-container h2,
.success-container h1,
.success-container h2 {
  text-align: center;
  margin-bottom: 22px;
}

#card-element {
  display: flex;
  align-items: center;
  padding: 14px;
}

.partner-logo {
  max-width: 150px;
  margin: 0 auto 18px;
}

.product-img {
  width: 100%;
  border-radius: 24px;
  margin: 16px 0;
  box-shadow: 0 18px 40px rgba(15, 93, 155, 0.12);
}

.divider {
  height: 1px;
  background: rgba(15, 93, 155, 0.10);
  margin: 22px 0;
}

.unlock-code {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 160px;
  padding: 18px 24px;
  border-radius: 22px;
  border: 2px dashed var(--green);
  color: var(--green);
  font-size: 30px;
  font-weight: 950;
  background: #ecfdf5;
  margin: 18px 0;
}

.btn-copy {
  border: none;
  border-radius: 999px;
  padding: 12px 22px;
  font-weight: 850;
  background: linear-gradient(135deg, var(--blue), var(--blue-2));
  color: #fff;
  cursor: pointer;
}

/* DASHBOARD */

.dashboard-wrapper {
  width: min(1280px, calc(100% - 32px));
  margin: 0 auto;
  padding: 34px 0 70px;
}

.dashboard-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 22px;
  margin-bottom: 26px;
}

.dashboard-brand {
  display: flex;
  align-items: center;
  gap: 14px;
}

.dashboard-logo {
  width: 52px;
  height: 52px;
  border-radius: 16px;
  background: linear-gradient(135deg, var(--blue), var(--cyan));
  position: relative;
  box-shadow: 0 16px 38px rgba(15, 93, 155, 0.28);
}

.dashboard-logo::after {
  content: "";
  position: absolute;
  inset: 13px;
  border-left: 5px solid #fff;
  border-bottom: 5px solid #fff;
  transform: skew(-18deg);
}

.dashboard-brand h1 {
  margin: 0;
  font-size: clamp(32px, 4vw, 54px);
}

.dashboard-brand p {
  margin: 4px 0 0;
  color: var(--muted);
  font-weight: 700;
}

.dashboard-actions {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
}

.dashboard-hero {
  background:
    radial-gradient(circle at 85% 15%, rgba(45, 226, 255, 0.22), transparent 34%),
    linear-gradient(135deg, #ffffff, #eef8ff);
  border: 1px solid var(--border);
  border-radius: 42px;
  box-shadow: var(--shadow-strong);
  padding: 38px;
  margin-bottom: 28px;
  display: grid;
  grid-template-columns: minmax(0, 1fr) 300px;
  gap: 30px;
  align-items: center;
}

.dashboard-hero h2 {
  font-size: clamp(34px, 4vw, 58px);
  line-height: 1;
  margin-bottom: 16px;
}

.dashboard-hero p {
  color: #475569;
  font-size: 19px;
  line-height: 1.65;
  max-width: 760px;
}

.dashboard-badge {
  display: inline-flex;
  padding: 10px 14px;
  border-radius: 999px;
  background: #eaf7ff;
  color: var(--blue);
  font-weight: 900;
  margin-bottom: 18px;
}

.preview-phone {
  width: 245px;
  height: 500px;
  border-radius: 40px;
  background: linear-gradient(135deg, #0f172a, #334155);
  padding: 12px;
  box-shadow: 0 34px 80px rgba(15, 23, 42, 0.24);
  transform: rotate(4deg);
  justify-self: center;
}

.preview-phone-screen {
  height: 100%;
  border-radius: 30px;
  background: #fff;
  padding: 22px;
  display: flex;
  flex-direction: column;
  justify-content: center;
  text-align: center;
}

.preview-phone-badge {
  color: var(--blue);
  font-weight: 900;
  font-size: 12px;
  margin-bottom: 18px;
  text-transform: uppercase;
  letter-spacing: 0.08em;
}

.preview-phone-product {
  width: 92px;
  height: 92px;
  border-radius: 30px;
  margin: 0 auto 18px;
  background: #eaf7ff;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 44px;
}

.preview-phone-screen h3 {
  font-size: 22px;
  margin-bottom: 8px;
}

.preview-phone-screen p {
  color: var(--muted);
  font-size: 14px;
}

.preview-phone-screen strong {
  color: var(--blue);
  font-size: 32px;
  font-weight: 950;
  margin: 10px 0 18px;
}

.preview-phone-screen button {
  border: 0;
  border-radius: 999px;
  padding: 13px 16px;
  background: linear-gradient(135deg, var(--blue), var(--blue-2));
  color: #fff;
  font-weight: 900;
}

.nav-tabs {
  border: none;
  gap: 10px;
  margin-bottom: 28px;
  flex-wrap: wrap;
}

.nav-tabs .nav-link,
.nav-pills .nav-link {
  border: 1px solid rgba(15, 93, 155, 0.14);
  border-radius: 999px;
  color: #29435f;
  font-weight: 800;
  background: #fff;
  padding: 12px 18px;
}

.nav-tabs .nav-link.active,
.nav-pills .nav-link.active {
  color: #fff;
  background: linear-gradient(135deg, var(--blue), var(--blue-2));
  border-color: transparent;
  box-shadow: 0 14px 30px rgba(15, 93, 155, 0.20);
}

.dashboard-row {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 22px;
  margin-bottom: 22px;
}

.dashboard-col {
  margin: 0;
}

.dashboard-block {
  background: rgba(255, 255, 255, 0.94);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 26px;
  min-height: 140px;
}

.dashboard-block h3,
.dashboard-block h4 {
  font-size: 22px;
  margin-bottom: 10px;
}

.dashboard-block p {
  color: var(--muted);
  margin-bottom: 10px;
}

.dashboard-block canvas {
  width: 100% !important;
  height: 300px !important;
}

.metric-number {
  display: block;
  font-size: 36px;
  font-weight: 950;
  color: var(--blue);
  letter-spacing: -0.05em;
}

.locked-content {
  opacity: 0.52;
  pointer-events: none;
  position: relative;
}

.locked-content::after {
  content: "Contenu verrouillé";
  position: absolute;
  inset: auto 20px 20px 20px;
  background: rgba(255, 255, 255, 0.94);
  color: var(--blue);
  padding: 12px 14px;
  border-radius: 16px;
  font-weight: 900;
  text-align: center;
  box-shadow: 0 10px 26px rgba(15, 93, 155, 0.12);
}

.locked-preview-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 22px;
  margin-bottom: 28px;
}

.locked-preview-card {
  background: rgba(255, 255, 255, 0.94);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 28px;
}

.locked-preview-card span {
  display: inline-flex;
  width: 46px;
  height: 46px;
  border-radius: 16px;
  background: #eaf7ff;
  align-items: center;
  justify-content: center;
  color: var(--blue);
  font-weight: 950;
  margin-bottom: 18px;
}

.locked-preview-card h3 {
  font-size: 24px;
  margin-bottom: 10px;
}

.locked-preview-card p {
  color: var(--muted);
  line-height: 1.65;
}

.product-category {
  margin-top: 16px;
}

.product-price,
.price {
  color: var(--blue);
  font-weight: 900;
  font-size: 20px;
}

.room-card {
  display: grid;
  gap: 18px;
}

.logo-preview {
  display: inline-flex;
  padding: 14px;
  border-radius: 22px;
  background: #f8fbff;
  border: 1px solid rgba(15, 93, 155, 0.10);
  margin-bottom: 18px;
}

.logo-preview img {
  max-width: 150px;
  max-height: 90px;
  object-fit: contain;
}

.room-form-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 18px;
}

.payment-preview {
  margin-top: 22px !important;
  padding: 20px !important;
  background: #f8fbff !important;
  border: 1px solid var(--border) !important;
  border-radius: 24px !important;
}

.payment-preview iframe {
  width: 100%;
  height: 580px;
  border: 0;
  border-radius: 20px;
}

.link-box {
  padding: 18px;
  border-radius: 22px;
  background: #f8fbff;
  border: 1px solid rgba(15, 93, 155, 0.10);
  margin: 16px 0;
  overflow: hidden;
}

.link-box p {
  color: var(--muted);
  font-weight: 900;
  margin-bottom: 6px;
}

.link-box a {
  word-break: break-all;
}

/* CART */

.cart-icon {
  position: fixed;
  top: 18px;
  right: 20px;
  z-index: 200;
  font-size: 22px;
  cursor: pointer;
  background: #fff;
  padding: 12px 16px;
  border-radius: 999px;
  box-shadow: var(--shadow);
  border: 1px solid var(--border);
}

.cart-popup {
  display: none;
  position: fixed;
  z-index: 300;
  top: 50%;
  left: 50%;
  width: min(420px, calc(100% - 30px));
  transform: translate(-50%, -50%);
  background: #fff;
  padding: 26px;
  border-radius: 28px;
  box-shadow: 0 34px 100px rgba(7, 17, 31, 0.25);
}

#cart-items {
  list-style: none;
  padding: 0;
  margin: 16px 0;
}

#cart-items li {
  padding: 12px 0;
  border-bottom: 1px solid rgba(15, 93, 155, 0.10);
}

/* ADMIN */

.table {
  background: #fff;
  border-radius: 24px;
  overflow: hidden;
  box-shadow: var(--shadow);
}

.table thead th {
  background: #0b3f68;
  color: #fff;
  border: none;
  font-weight: 850;
}

.table td,
.table th {
  vertical-align: middle;
  padding: 14px 16px;
}

/* UTILITIES */

.text-muted {
  color: var(--muted) !important;
}

@media (max-width: 980px) {
  .dashboard-header,
  .dashboard-hero {
    grid-template-columns: 1fr;
  }

  .dashboard-header {
    flex-direction: column;
    align-items: flex-start;
  }

  .dashboard-hero {
    display: block;
  }

  .preview-phone {
    display: none;
  }

  .dashboard-row,
  .locked-preview-grid {
    grid-template-columns: 1fr;
  }

  .room-form-grid {
    grid-template-columns: 1fr;
  }

  .nav-tabs,
  .nav-pills {
    overflow-x: auto;
    flex-wrap: nowrap;
    padding-bottom: 8px;
  }

  .nav-tabs .nav-link,
  .nav-pills .nav-link {
    white-space: nowrap;
  }

  .table {
    display: block;
    overflow-x: auto;
  }
}

@media (max-width: 560px) {
  .dashboard-wrapper {
    width: calc(100% - 20px);
    padding-top: 22px;
  }

  .dashboard-hero {
    padding: 26px;
    border-radius: 30px;
  }

  .dashboard-block {
    padding: 20px;
  }

  .btn {
    width: 100%;
    margin-bottom: 8px;
  }

  .auth-card,
  .payment-container,
  .success-container {
    width: calc(100% - 20px);
    padding: 22px;
    border-radius: 24px;
  }

  .payment-preview iframe {
    height: 420px;
  }
}
