/* ==========================================================
   King 365 TV — feuille de style principale
   Palette stricte : fond blanc, bleu principal, jaune accent
   ========================================================== */

:root {
  --color-bg: #ffffff;
  --color-blue: #0052cc;
  --color-blue-dark: #003d99;
  --color-yellow: #ffd700;
  --color-text: #333333;
  --radius: 12px;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
  scroll-padding-top: 84px;
}

body {
  margin: 0;
  background: var(--color-bg);
  color: var(--color-text);
  font-family: "Segoe UI", Tahoma, Geneva, Verdana, sans-serif;
  line-height: 1.5;
}

h1, h2, h3, h4 {
  font-weight: 700;
  margin: 0;
  color: var(--color-blue);
}

a {
  color: inherit;
  text-decoration: none;
}

img {
  max-width: 100%;
}

.container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 20px;
}

/* ---------- Boutons ---------- */
.btn {
  display: inline-block;
  padding: 14px 28px;
  border-radius: var(--radius);
  font-weight: 700;
  font-size: 0.95rem;
  cursor: pointer;
  border: none;
  text-align: center;
  transition: filter 0.15s ease, background 0.15s ease, color 0.15s ease;
}

.btn-primary {
  background: var(--color-yellow);
  color: var(--color-text);
}
.btn-primary:hover {
  filter: brightness(0.95);
}

.btn-outline {
  background: transparent;
  color: var(--color-blue);
  border: 2px solid var(--color-blue);
}
.btn-outline:hover {
  background: var(--color-blue);
  color: #fff;
}

.btn-block {
  display: block;
  width: 100%;
}

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

/* ---------- Navbar ---------- */
.navbar {
  position: sticky;
  top: 0;
  z-index: 50;
  background: var(--color-bg);
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.08);
}

.navbar .container {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding-top: 14px;
  padding-bottom: 14px;
}

.logo {
  font-size: 1.3rem;
  font-weight: 700;
  color: var(--color-blue);
  text-decoration: none;
  display: inline-flex;
  align-items: center;
}
.logo span {
  color: var(--color-yellow);
}
.logo-img {
  height: 42px;
  width: auto;
  display: block;
}

.nav-links {
  display: none;
  gap: 24px;
  align-items: center;
}

.nav-links a {
  font-size: 0.9rem;
  font-weight: 600;
  color: var(--color-text);
}
.nav-links a:hover {
  color: var(--color-blue);
}

.nav-actions {
  display: none;
  gap: 12px;
  align-items: center;
}

.nav-actions .btn {
  padding: 10px 20px;
}

.nav-toggle {
  background: none;
  border: none;
  cursor: pointer;
}

.mobile-menu {
  display: none;
  flex-direction: column;
  gap: 12px;
  padding: 0 20px 16px;
  border-top: 1px solid #f0f0f0;
}
.mobile-menu.open {
  display: flex;
}
.mobile-menu a,
.mobile-menu button {
  font-size: 0.9rem;
  font-weight: 600;
  background: none;
  border: none;
  text-align: left;
  padding: 0;
  color: var(--color-text);
}
.mobile-menu .btn {
  display: block;
  text-align: center;
  padding: 12px 20px;
  border-radius: var(--radius);
}
.mobile-menu .btn-primary {
  background: var(--color-yellow);
  color: var(--color-text);
}
.mobile-menu .btn-outline {
  background: transparent;
  border: 2px solid var(--color-blue);
  color: var(--color-blue);
}

@media (min-width: 768px) {
  .nav-links,
  .nav-actions {
    display: flex;
  }
  .nav-toggle {
    display: none;
  }
}

/* ---------- Hero ---------- */
.hero {
  padding: 64px 0;
}
.hero .container {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 40px;
}
.hero-content {
  flex: 1;
  text-align: center;
}
.hero h1 {
  font-size: 2rem;
  line-height: 1.25;
}
.hero p {
  margin-top: 20px;
  font-size: 1.05rem;
}
.hero-cta {
  margin-top: 28px;
  display: flex;
  flex-direction: column;
  gap: 14px;
  justify-content: center;
}
.hero-visual {
  flex: 1;
  width: 100%;
}
.promo-card {
  max-width: 420px;
  margin: 0 auto;
  border-radius: 20px;
  background: var(--color-blue);
  color: #fff;
  text-align: center;
  padding: 40px 32px;
  box-shadow: 0 20px 40px rgba(0, 82, 204, 0.25);
}
.promo-badge {
  display: inline-block;
  background: var(--color-yellow);
  color: var(--color-text);
  padding: 6px 16px;
  border-radius: 999px;
  font-size: 0.75rem;
  font-weight: 700;
}
.promo-old-price {
  text-decoration: line-through;
  color: #9fb8e8;
  font-size: 1.15rem;
  margin-right: 10px;
}
.promo-new-price {
  font-size: 2.4rem;
  font-weight: 800;
  color: var(--color-yellow);
}
.promo-period {
  color: #dbeafe;
  font-size: 0.85rem;
}

@media (min-width: 1024px) {
  .hero .container {
    flex-direction: row;
    text-align: left;
  }
  .hero-content {
    text-align: left;
  }
  .hero h1 {
    font-size: 2.75rem;
  }
  .hero-cta {
    flex-direction: row;
    justify-content: flex-start;
  }
}

/* ---------- Sections generiques ---------- */
.section {
  padding: 64px 0;
}
.section-alt {
  background: #f8fafc;
}
.section-title {
  text-align: center;
  font-size: 1.6rem;
}
.section-subtitle {
  max-width: 640px;
  margin: 12px auto 0;
  text-align: center;
  color: var(--color-text);
}

/* ---------- Features ---------- */
.grid {
  display: grid;
  gap: 24px;
  margin-top: 40px;
}
.grid-3 {
  grid-template-columns: 1fr;
}
.grid-4 {
  grid-template-columns: 1fr;
}
@media (min-width: 640px) {
  .grid-3 {
    grid-template-columns: repeat(2, 1fr);
  }
  .grid-4 {
    grid-template-columns: repeat(2, 1fr);
  }
}
@media (min-width: 1024px) {
  .grid-3 {
    grid-template-columns: repeat(3, 1fr);
  }
  .grid-4 {
    grid-template-columns: repeat(4, 1fr);
  }
}

.card {
  border: 1px solid #f0f0f0;
  border-radius: var(--radius);
  padding: 24px;
  background: #fff;
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.04);
  transition: box-shadow 0.15s ease;
}
.card:hover {
  box-shadow: 0 12px 24px rgba(0, 0, 0, 0.08);
}
.card-icon {
  width: 48px;
  height: 48px;
  border-radius: 10px;
  background: rgba(0, 82, 204, 0.1);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.4rem;
  margin-bottom: 16px;
}
.card h3 {
  font-size: 1.1rem;
}
.card p {
  margin-top: 8px;
  font-size: 0.9rem;
}

/* ---------- Pricing ---------- */
.pricing-grid {
  display: grid;
  gap: 32px;
  margin-top: 40px;
  grid-template-columns: 1fr;
  max-width: 1100px;
  margin-left: auto;
  margin-right: auto;
}
@media (min-width: 768px) {
  .pricing-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}
@media (min-width: 1024px) {
  .pricing-grid {
    grid-template-columns: repeat(3, 1fr);
  }
}

.pricing-card {
  position: relative;
  border-radius: 18px;
  padding: 36px 32px;
  border: 1px solid #e5e7eb;
  background: #fff;
  display: flex;
  flex-direction: column;
}
.pricing-card.highlighted {
  border-color: var(--color-yellow);
  background: var(--color-blue);
  color: #fff;
  box-shadow: 0 24px 48px rgba(0, 82, 204, 0.25);
}
.pricing-card.highlighted h3 {
  color: #fff;
}
.badge-popular {
  position: absolute;
  top: -14px;
  left: 50%;
  transform: translateX(-50%);
  background: var(--color-yellow);
  color: var(--color-text);
  padding: 6px 18px;
  border-radius: 999px;
  font-size: 0.75rem;
  font-weight: 700;
}
.price {
  margin-top: 16px;
}
.price .amount {
  font-size: 2.4rem;
  font-weight: 800;
}
.price .period {
  color: #6b7280;
}
.pricing-card.highlighted .period {
  color: #dbeafe;
}
.pricing-features {
  list-style: none;
  padding: 0;
  margin: 24px 0;
  flex: 1;
  font-size: 0.9rem;
}
.pricing-features li {
  display: flex;
  gap: 10px;
  align-items: flex-start;
  margin-bottom: 10px;
}
.pricing-features li::before {
  content: "\2713";
  color: var(--color-blue);
  font-weight: 700;
}
.pricing-card.highlighted .pricing-features li::before {
  color: var(--color-yellow);
}

/* ---------- Trust stats ---------- */
.stats {
  background: var(--color-blue);
  color: #fff;
}
.stats-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 32px;
  text-align: center;
}
@media (min-width: 768px) {
  .stats-grid {
    grid-template-columns: repeat(4, 1fr);
  }
}
.stats-grid .value {
  font-size: 1.8rem;
  font-weight: 800;
  color: var(--color-yellow);
}
.stats-grid .label {
  margin-top: 4px;
  font-size: 0.85rem;
}

/* ---------- Install steps ---------- */
.step-number {
  width: 40px;
  height: 40px;
  border-radius: 999px;
  background: var(--color-yellow);
  color: var(--color-text);
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  margin-bottom: 16px;
}
.card ol {
  margin: 12px 0 0;
  padding-left: 18px;
  font-size: 0.88rem;
}
.card ol li {
  margin-bottom: 6px;
}

/* ---------- FAQ ---------- */
.faq {
  max-width: 720px;
  margin: 40px auto 0;
}
.faq-item {
  border-bottom: 1px solid #e5e7eb;
  padding: 18px 0;
}
.faq-question {
  width: 100%;
  background: none;
  border: none;
  display: flex;
  justify-content: space-between;
  align-items: center;
  text-align: left;
  font-weight: 600;
  font-size: 0.95rem;
  color: var(--color-text);
  cursor: pointer;
}
.faq-question .icon {
  color: var(--color-blue);
  font-size: 1.2rem;
  transition: transform 0.15s ease;
}
.faq-item.open .faq-question .icon {
  transform: rotate(45deg);
}
.faq-answer {
  display: none;
  margin-top: 12px;
  font-size: 0.9rem;
  color: #4b5563;
}
.faq-item.open .faq-answer {
  display: block;
}

/* ---------- Temoignages ---------- */
.stars {
  color: var(--color-yellow);
  font-size: 1rem;
  letter-spacing: 2px;
}
.testimonial-author {
  margin-top: 16px;
  font-weight: 700;
  font-size: 0.85rem;
  color: var(--color-blue);
}

/* ---------- Bande CTA finale ---------- */
.cta-banner {
  background: var(--color-blue);
  color: #fff;
  text-align: center;
}
.cta-banner h2 {
  color: #fff;
}
.cta-banner p {
  margin-top: 12px;
  color: #dbeafe;
  font-size: 1.05rem;
}
.cta-banner .btn {
  margin-top: 28px;
}

/* ---------- Bloc de texte SEO ---------- */
.prose-block {
  max-width: 820px;
  margin: 0 auto;
  font-size: 0.95rem;
  color: var(--color-text);
}
.prose-block p {
  margin-top: 16px;
}
.prose-block p:first-child {
  margin-top: 0;
}

/* ---------- Footer ---------- */
.footer {
  background: var(--color-blue);
  color: #fff;
}
.footer .logo {
  color: #fff;
}
.footer .container {
  padding-top: 56px;
  padding-bottom: 32px;
}
.footer-grid {
  display: grid;
  gap: 32px;
  grid-template-columns: 1fr;
}
@media (min-width: 768px) {
  .footer-grid {
    grid-template-columns: repeat(3, 1fr);
  }
}
.footer h4 {
  color: var(--color-yellow);
  font-size: 0.95rem;
  margin-bottom: 12px;
}
.footer ul {
  list-style: none;
  padding: 0;
  margin: 0;
  font-size: 0.85rem;
  color: #dbeafe;
}
.footer ul li {
  margin-bottom: 8px;
}
.footer ul li a:hover {
  color: #fff;
}
.footer-bottom {
  margin-top: 40px;
  padding-top: 24px;
  border-top: 1px solid rgba(255, 255, 255, 0.2);
  text-align: center;
  font-size: 0.75rem;
  color: #dbeafe;
}

/* ---------- Forms (login/register/dashboard) ---------- */
.auth-main {
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 64px 20px;
}
.auth-card {
  width: 100%;
  max-width: 420px;
  border: 1px solid #f0f0f0;
  border-radius: 18px;
  padding: 36px 32px;
  box-shadow: 0 12px 32px rgba(0, 0, 0, 0.08);
}
.auth-card h1 {
  text-align: center;
  font-size: 1.5rem;
}
.auth-subtitle {
  margin-top: 8px;
  text-align: center;
  font-size: 0.85rem;
  color: #6b7280;
}
.form-group {
  margin-top: 16px;
}
.form-group label {
  display: block;
  font-size: 0.85rem;
  font-weight: 600;
  margin-bottom: 6px;
}
.form-group input {
  width: 100%;
  padding: 10px 14px;
  border: 1px solid #d1d5db;
  border-radius: 10px;
  font-size: 0.95rem;
  font-family: inherit;
}
.form-group input:focus {
  outline: none;
  border-color: var(--color-blue);
}
.form-hint {
  margin-top: 4px;
  font-size: 0.75rem;
  color: #9ca3af;
}
.form-error {
  margin-top: 16px;
  background: #fef2f2;
  color: #dc2626;
  padding: 12px;
  border-radius: 10px;
  font-size: 0.85rem;
}
.form-success {
  margin-top: 16px;
  background: #ecfdf5;
  color: #059669;
  padding: 12px;
  border-radius: 10px;
  font-size: 0.85rem;
}
.auth-switch {
  margin-top: 24px;
  text-align: center;
  font-size: 0.85rem;
  color: #6b7280;
}
.auth-switch a {
  font-weight: 700;
  color: var(--color-blue);
}

/* ---------- Dashboard ---------- */
.dashboard-main {
  flex: 1;
  max-width: 960px;
  margin: 0 auto;
  padding: 40px 20px;
  width: 100%;
}
.dashboard-section {
  margin-top: 40px;
}
.dashboard-section h2 {
  font-size: 1.2rem;
  color: var(--color-text);
}
.sub-card {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  align-items: center;
  justify-content: space-between;
  border: 1px solid #f0f0f0;
  border-radius: var(--radius);
  padding: 16px;
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.04);
  margin-top: 16px;
}
.badge {
  padding: 4px 12px;
  border-radius: 999px;
  font-size: 0.75rem;
  font-weight: 700;
}
.badge-pending { background: #fef9c3; color: #a16207; }
.badge-active { background: #dcfce7; color: #15803d; }
.badge-expired { background: #f3f4f6; color: #4b5563; }
.badge-cancelled { background: #fee2e2; color: #b91c1c; }

.empty-box {
  margin-top: 16px;
  border: 2px dashed #d1d5db;
  border-radius: var(--radius);
  padding: 32px;
  text-align: center;
}

table {
  width: 100%;
  border-collapse: collapse;
  margin-top: 16px;
  font-size: 0.85rem;
}
table th, table td {
  padding: 12px;
  text-align: left;
  border-top: 1px solid #f0f0f0;
}
table th {
  background: #f8fafc;
  border-top: none;
}
.table-wrap {
  overflow-x: auto;
  border: 1px solid #f0f0f0;
  border-radius: var(--radius);
}

/* ---------- Payment ---------- */
.payment-main {
  flex: 1;
  max-width: 480px;
  margin: 0 auto;
  padding: 64px 20px;
  width: 100%;
}
.payment-main h1 {
  text-align: center;
  font-size: 1.5rem;
}
.payment-amount {
  margin-top: 8px;
  text-align: center;
  font-size: 0.9rem;
  color: #6b7280;
}
.payment-card {
  margin-top: 32px;
  border: 1px solid #f0f0f0;
  border-radius: 18px;
  padding: 32px;
  box-shadow: 0 12px 32px rgba(0, 0, 0, 0.08);
}
#payment-element {
  margin-bottom: 20px;
}

/* ---------- 404 ---------- */
.notfound-main {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 96px 20px;
  text-align: center;
}
.notfound-main .code {
  font-size: 4rem;
  font-weight: 800;
  color: var(--color-blue);
}

/* ---------- Layout helper ---------- */
.page {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

/* ---------- Finitions responsive / mobile ---------- */
@media (max-width: 480px) {
  .container {
    padding: 0 16px;
  }
  .section {
    padding: 48px 0;
  }
  .hero {
    padding: 40px 0;
  }
  .hero h1 {
    font-size: 1.6rem;
  }
  .hero p {
    font-size: 0.95rem;
  }
  .section-title {
    font-size: 1.35rem;
  }
  .promo-card {
    padding: 28px 20px;
  }
  .promo-new-price {
    font-size: 2rem;
  }
  .pricing-card {
    padding: 28px 22px;
  }
  .auth-card,
  .payment-card {
    padding: 28px 20px;
  }
  .cta-banner h2 {
    font-size: 1.4rem;
  }
  .logo-img {
    height: 34px;
  }
}

/* Evite les debordements horizontaux sur mobile (texte long, emoji, etc.) */
body {
  overflow-x: hidden;
}
