/* ============================================================
   Chafflix Store — CSS Global
   Dark theme — Rouge #E31E24 — Fond #141414
   ============================================================ */

/* ---------- Variables ---------- */
:root {
  --red:        #E31E24;
  --red-dark:   #b8161b;
  --red-glow:   rgba(227, 30, 36, 0.25);
  --bg:         #141414;
  --bg2:        #1e1e1e;
  --bg3:        #2a2a2a;
  --card:       #1e1e1e;
  --border:     rgba(255,255,255,0.08);
  --text:       #f0f0f0;
  --text-muted: #888;
  --text-dim:   #bbb;
  --white:      #ffffff;
  --green:      #1DB954;
  --blue:       #00A8E0;
  --orange:     #FF6B00;
  --radius:     12px;
  --radius-sm:  8px;
  --shadow:     0 4px 24px rgba(0,0,0,0.4);
  --shadow-red: 0 4px 24px rgba(227,30,36,0.3);
  --font:       'Poppins', sans-serif;
  --transition: 0.22s ease;
}

/* ---------- Reset & Base ---------- */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

html { scroll-behavior: smooth; }

body {
  font-family: var(--font);
  background: var(--bg);
  color: var(--text);
  font-size: 15px;
  line-height: 1.6;
  overflow-x: hidden;
}

a { color: var(--red); text-decoration: none; transition: opacity var(--transition); }
a:hover { opacity: 0.8; }

img { max-width: 100%; }

/* ---------- Typography ---------- */
h1, h2, h3, h4, h5 { font-weight: 700; line-height: 1.2; }
h1 { font-size: clamp(2rem, 5vw, 3.2rem); }
h2 { font-size: clamp(1.5rem, 3vw, 2.2rem); }
h3 { font-size: 1.3rem; }
h4 { font-size: 1.1rem; }

.text-muted { color: var(--text-muted); }
.text-red   { color: var(--red); }
.text-center { text-align: center; }

/* ---------- Layout ---------- */
.container {
  width: 100%;
  max-width: 1100px;
  margin: 0 auto;
  padding: 0 20px;
}

.section {
  padding: 80px 0;
}

.section-sm {
  padding: 48px 0;
}

/* ---------- Navbar ---------- */
.navbar {
  position: fixed;
  top: 0; left: 0; right: 0;
  z-index: 1000;
  background: rgba(20, 20, 20, 0.92);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--border);
  height: 64px;
  display: flex;
  align-items: center;
}

.navbar .container {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.navbar-logo img {
  height: 36px;
}

.navbar-nav {
  display: flex;
  align-items: center;
  gap: 8px;
  list-style: none;
}

.navbar-nav a {
  color: var(--text-dim);
  font-size: 14px;
  font-weight: 500;
  padding: 8px 14px;
  border-radius: var(--radius-sm);
  transition: color var(--transition), background var(--transition);
}

.navbar-nav a:hover,
.navbar-nav a.active {
  color: var(--white);
  background: var(--bg3);
}

.navbar-nav-mobile-actions { display: none; }

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

.btn-menu {
  display: none;
  background: none;
  border: none;
  color: var(--text);
  font-size: 24px;
  cursor: pointer;
  padding: 4px;
}

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 12px 24px;
  border-radius: var(--radius-sm);
  font-family: var(--font);
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  border: none;
  transition: all var(--transition);
  text-decoration: none;
  white-space: nowrap;
}

.btn-primary {
  background: var(--red);
  color: #fff;
}
.btn-primary:hover {
  background: var(--red-dark);
  color: #fff;
  opacity: 1;
  transform: translateY(-1px);
  box-shadow: var(--shadow-red);
}

.btn-outline {
  background: transparent;
  color: var(--text);
  border: 1.5px solid var(--border);
}
.btn-outline:hover {
  border-color: var(--red);
  color: var(--red);
  opacity: 1;
}

.btn-ghost {
  background: var(--bg3);
  color: var(--text);
}
.btn-ghost:hover {
  background: var(--bg3);
  color: var(--white);
  opacity: 0.9;
}

.btn-lg {
  padding: 16px 36px;
  font-size: 16px;
  border-radius: var(--radius);
}

.btn-sm {
  padding: 8px 16px;
  font-size: 13px;
}

.btn-full { width: 100%; }

.btn:disabled {
  opacity: 0.5;
  cursor: not-allowed;
  transform: none !important;
}

/* ---------- Cards ---------- */
.card {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 28px;
  transition: border-color var(--transition), box-shadow var(--transition);
}

.card:hover {
  border-color: rgba(227,30,36,0.3);
  box-shadow: var(--shadow);
}

/* ---------- Badge ---------- */
.badge {
  display: inline-block;
  padding: 3px 10px;
  border-radius: 100px;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.5px;
  text-transform: uppercase;
}

.badge-red    { background: var(--red); color: #fff; }
.badge-green  { background: var(--green); color: #fff; }
.badge-blue   { background: var(--blue); color: #fff; }
.badge-orange { background: var(--orange); color: #fff; }
.badge-muted  { background: var(--bg3); color: var(--text-muted); }

/* ---------- Forms ---------- */
.form-group {
  margin-bottom: 20px;
}

.form-label {
  display: block;
  font-size: 13px;
  font-weight: 600;
  color: var(--text-dim);
  margin-bottom: 8px;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.form-control {
  width: 100%;
  background: var(--bg3);
  border: 1.5px solid var(--border);
  border-radius: var(--radius-sm);
  color: var(--text);
  font-family: var(--font);
  font-size: 15px;
  padding: 12px 16px;
  transition: border-color var(--transition), box-shadow var(--transition);
  outline: none;
}

.form-control:focus {
  border-color: var(--red);
  box-shadow: 0 0 0 3px var(--red-glow);
}

.form-control::placeholder { color: var(--text-muted); }

.form-control-lg {
  padding: 16px 20px;
  font-size: 18px;
  border-radius: var(--radius);
  letter-spacing: 3px;
  text-align: center;
  font-weight: 700;
}

.form-hint {
  font-size: 12px;
  color: var(--text-muted);
  margin-top: 6px;
}

.form-error {
  font-size: 12px;
  color: var(--red);
  margin-top: 6px;
  display: none;
}
.form-error.show { display: block; }

/* ---------- Hero ---------- */
.hero {
  min-height: 100vh;
  display: flex;
  align-items: center;
  position: relative;
  padding-top: 64px;
  overflow: hidden;
  padding-bottom: 40px;
}

.hero-bg {
  position: absolute;
  inset: 0;
  background:
    radial-gradient(ellipse 70% 60% at 60% 40%, rgba(227,30,36,0.12) 0%, transparent 70%),
    radial-gradient(ellipse 50% 50% at 10% 80%, rgba(227,30,36,0.06) 0%, transparent 60%);
}

.hero-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 60px;
  align-items: center;
  position: relative;
  z-index: 1;
}

.hero-label {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: rgba(227,30,36,0.15);
  border: 1px solid rgba(227,30,36,0.3);
  color: var(--red);
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 1px;
  text-transform: uppercase;
  padding: 6px 14px;
  border-radius: 100px;
  margin-bottom: 20px;
}

.hero-label::before {
  content: '';
  width: 6px; height: 6px;
  background: var(--red);
  border-radius: 50%;
  animation: pulse 2s infinite;
}

.hero-title {
  margin-bottom: 20px;
  letter-spacing: -1px;
}

.hero-title span {
  color: var(--red);
  position: relative;
}

.hero-desc {
  color: var(--text-dim);
  font-size: 17px;
  margin-bottom: 36px;
  max-width: 460px;
}

.hero-actions {
  display: flex;
  gap: 14px;
  flex-wrap: wrap;
}

.hero-visual {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 14px;
  align-content: start;
  padding-bottom: 28px;
}

.service-card-mini {
  background: var(--bg2);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 20px;
  transition: transform var(--transition), border-color var(--transition);
}

.service-card-mini:hover {
  transform: translateY(-4px);
  border-color: rgba(255,255,255,0.15);
}

.service-card-mini .service-icon {
  width: 56px;
  height: 56px;
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 12px;
  font-size: 22px;
  padding: 10px;
}
.service-card-mini .service-logo-img {
  width: 100%;
  height: 100%;
  object-fit: contain;
}

.service-card-mini h4 { font-size: 15px; margin-bottom: 4px; }
.service-card-mini p { font-size: 13px; color: var(--text-muted); }

.service-card-mini:nth-child(even) { margin-top: 28px; }

/* Sur les petits écrans, supprimer les décalages */
@media (max-width: 1100px) {
  .service-card-mini:nth-child(even) { margin-top: 0; }
}

/* ---------- Trust bar ---------- */
.trust-bar {
  border-top: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
  background: var(--bg2);
  padding: 20px 0;
}

.trust-bar .container {
  display: flex;
  align-items: center;
  justify-content: space-around;
  flex-wrap: wrap;
  gap: 20px;
}

.trust-item {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 14px;
  font-weight: 500;
  color: var(--text-dim);
}

.trust-item svg, .trust-item i {
  color: var(--red);
  font-size: 20px;
}

/* ---------- Services grid ---------- */
.services-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 20px;
}

.service-card {
  background: var(--card);
  border: 1.5px solid var(--border);
  border-radius: var(--radius);
  padding: 28px 24px;
  cursor: pointer;
  transition: all var(--transition);
  position: relative;
  overflow: hidden;
}

.service-card::before {
  content: '';
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 3px;
  background: var(--service-color, var(--red));
  transform: scaleX(0);
  transition: transform var(--transition);
}

.service-card:hover::before { transform: scaleX(1); }

.service-card:hover {
  border-color: rgba(255,255,255,0.15);
  transform: translateY(-4px);
  box-shadow: var(--shadow);
}

.service-logo {
  height: 36px;
  margin-bottom: 16px;
  object-fit: contain;
  object-position: left;
}

.service-card h3 { margin-bottom: 8px; }
.service-card p { font-size: 13px; color: var(--text-muted); margin-bottom: 16px; }

.service-price {
  font-size: 13px;
  color: var(--text-dim);
}

.service-price strong {
  font-size: 20px;
  color: var(--text);
  font-weight: 700;
}

/* ---------- Pricing cards ---------- */
.pricing-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 16px;
}

.pricing-card {
  background: var(--card);
  border: 1.5px solid var(--border);
  border-radius: var(--radius);
  padding: 24px 20px;
  transition: all var(--transition);
  cursor: pointer;
  position: relative;
}

.pricing-card.featured {
  border-color: var(--red);
  box-shadow: 0 0 0 1px var(--red), var(--shadow-red);
}

.pricing-card:hover {
  border-color: var(--red);
  transform: translateY(-3px);
}

.pricing-card .badge {
  position: absolute;
  top: -12px;
  left: 50%;
  transform: translateX(-50%);
  white-space: nowrap;
}

.pricing-name {
  font-size: 15px;
  font-weight: 700;
  margin-bottom: 6px;
}

.pricing-desc {
  font-size: 12px;
  color: var(--text-muted);
  margin-bottom: 20px;
  line-height: 1.5;
}

.pricing-amount {
  font-size: 28px;
  font-weight: 800;
  color: var(--white);
}

.pricing-amount span {
  font-size: 13px;
  font-weight: 400;
  color: var(--text-muted);
}

/* ---------- Section header ---------- */
.section-header {
  text-align: center;
  margin-bottom: 48px;
}

.section-header h2 { margin-bottom: 12px; }
.section-header p { color: var(--text-muted); font-size: 16px; max-width: 540px; margin: 0 auto; }

/* ---------- Steps ---------- */
.steps-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 24px;
}

.step-card {
  text-align: center;
  padding: 28px 20px;
}

.step-num {
  width: 52px;
  height: 52px;
  border-radius: 50%;
  background: var(--red-glow);
  border: 1.5px solid var(--red);
  color: var(--red);
  font-size: 20px;
  font-weight: 800;
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto 16px;
}

.step-card h4 { margin-bottom: 8px; }
.step-card p { font-size: 13px; color: var(--text-muted); }

/* ---------- Alert / Notice ---------- */
.alert {
  padding: 14px 18px;
  border-radius: var(--radius-sm);
  font-size: 14px;
  display: flex;
  align-items: flex-start;
  gap: 12px;
  margin-bottom: 16px;
}

.alert-info    { background: rgba(0,168,224,0.12); border: 1px solid rgba(0,168,224,0.3); color: #7dd6f4; }
.alert-success { background: rgba(29,185,84,0.12); border: 1px solid rgba(29,185,84,0.3); color: #6ee09a; }
.alert-error   { background: rgba(227,30,36,0.12); border: 1px solid rgba(227,30,36,0.3); color: #f87171; }
.alert-warning { background: rgba(255,107,0,0.12); border: 1px solid rgba(255,107,0,0.3); color: #fdb06e; }

/* ---------- Modal ---------- */
.modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.75);
  backdrop-filter: blur(4px);
  z-index: 2000;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
  opacity: 0;
  pointer-events: none;
  transition: opacity var(--transition);
}

.modal-overlay.open {
  opacity: 1;
  pointer-events: all;
}

.modal {
  background: var(--bg2);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 36px;
  width: 100%;
  max-width: 460px;
  position: relative;
  transform: translateY(20px);
  transition: transform var(--transition);
}

.modal-overlay.open .modal {
  transform: translateY(0);
}

.modal-close {
  position: absolute;
  top: 16px; right: 16px;
  background: var(--bg3);
  border: none;
  color: var(--text-muted);
  width: 32px; height: 32px;
  border-radius: 50%;
  cursor: pointer;
  font-size: 18px;
  display: flex; align-items: center; justify-content: center;
  transition: color var(--transition);
}
.modal-close:hover { color: var(--text); }

.modal h3 { margin-bottom: 6px; }
.modal .modal-sub { color: var(--text-muted); font-size: 14px; margin-bottom: 28px; }

/* ---------- OTP input ---------- */
.otp-input {
  display: flex;
  gap: 10px;
  justify-content: center;
  margin: 24px 0;
}

.otp-input input {
  width: 52px;
  height: 60px;
  background: var(--bg3);
  border: 1.5px solid var(--border);
  border-radius: var(--radius-sm);
  color: var(--text);
  font-family: var(--font);
  font-size: 24px;
  font-weight: 700;
  text-align: center;
  outline: none;
  transition: border-color var(--transition), box-shadow var(--transition);
}

.otp-input input:focus {
  border-color: var(--red);
  box-shadow: 0 0 0 3px var(--red-glow);
}

/* ---------- Order summary ---------- */
.order-summary {
  background: var(--bg2);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 24px;
}

.order-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 10px 0;
  border-bottom: 1px solid var(--border);
  font-size: 14px;
}

.order-row:last-child { border-bottom: none; }

.order-row.total {
  font-size: 16px;
  font-weight: 700;
  padding-top: 14px;
}

.order-row.total .amount {
  color: var(--red);
  font-size: 22px;
}

/* ---------- Status badge ---------- */
.status-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 4px 12px;
  border-radius: 100px;
  font-size: 12px;
  font-weight: 600;
}

.status-en_attente { background: rgba(255,107,0,0.15); color: var(--orange); }
.status-paye       { background: rgba(0,168,224,0.15);  color: var(--blue); }
.status-livre      { background: rgba(29,185,84,0.15);  color: var(--green); }
.status-annule     { background: rgba(227,30,36,0.12);  color: var(--red); }

/* ---------- Subscription card ---------- */
.sub-card {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 20px;
  display: flex;
  align-items: center;
  gap: 16px;
  transition: border-color var(--transition);
}

.sub-card:hover { border-color: rgba(255,255,255,0.15); }

.sub-icon {
  width: 48px; height: 48px;
  border-radius: 12px;
  display: flex; align-items: center; justify-content: center;
  flex-shrink: 0;
  font-size: 20px;
}

.sub-info { flex: 1; }
.sub-info h4 { font-size: 15px; margin-bottom: 3px; }
.sub-info p { font-size: 13px; color: var(--text-muted); }

.sub-expiry {
  text-align: right;
  font-size: 13px;
  color: var(--text-muted);
}

.sub-expiry strong { display: block; font-size: 15px; color: var(--text); }
.sub-expiry.expiring strong { color: var(--orange); }
.sub-expiry.expired strong { color: var(--red); }

/* ---------- Footer ---------- */
.footer {
  background: var(--bg2);
  border-top: 1px solid var(--border);
  padding: 48px 0 24px;
  margin-top: 80px;
}

.footer-grid {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr;
  gap: 40px;
  margin-bottom: 40px;
}

.footer-brand p {
  font-size: 14px;
  color: var(--text-muted);
  margin-top: 12px;
  max-width: 280px;
  line-height: 1.7;
}

.footer-col h5 {
  font-size: 13px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.8px;
  color: var(--text-muted);
  margin-bottom: 16px;
}

.footer-col ul { list-style: none; }
.footer-col ul li { margin-bottom: 10px; }
.footer-col ul a { color: var(--text-dim); font-size: 14px; }
.footer-col ul a:hover { color: var(--text); opacity: 1; }

.footer-bottom {
  border-top: 1px solid var(--border);
  padding-top: 20px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 12px;
}

.footer-bottom p { font-size: 13px; color: var(--text-muted); }

/* ---------- WhatsApp FAB ---------- */
.whatsapp-fab {
  position: fixed;
  bottom: 24px;
  right: 24px;
  z-index: 999;
  width: 54px;
  height: 54px;
  background: #25D366;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 4px 20px rgba(37,211,102,0.4);
  color: #fff;
  font-size: 26px;
  transition: transform var(--transition), box-shadow var(--transition);
}

.whatsapp-fab:hover {
  transform: scale(1.1);
  box-shadow: 0 6px 28px rgba(37,211,102,0.5);
  color: #fff;
  opacity: 1;
}

/* ---------- Loader ---------- */
.loader {
  display: inline-block;
  width: 20px;
  height: 20px;
  border: 2px solid rgba(255,255,255,0.3);
  border-top-color: #fff;
  border-radius: 50%;
  animation: spin 0.7s linear infinite;
}

/* ---------- Divider ---------- */
.divider {
  border: none;
  border-top: 1px solid var(--border);
  margin: 24px 0;
}

/* ---------- Animations ---------- */
@keyframes pulse {
  0%, 100% { transform: scale(1); opacity: 1; }
  50%       { transform: scale(1.4); opacity: 0.7; }
}

@keyframes spin {
  to { transform: rotate(360deg); }
}

@keyframes fadeUp {
  from { opacity: 0; transform: translateY(24px); }
  to   { opacity: 1; transform: translateY(0); }
}

.animate-fade-up { animation: fadeUp 0.5s ease forwards; }

/* ---------- Utilities ---------- */
.hidden { display: none !important; }
.flex { display: flex; }
.flex-col { flex-direction: column; }
.items-center { align-items: center; }
.justify-between { justify-content: space-between; }
.gap-2 { gap: 8px; }
.gap-4 { gap: 16px; }
.mt-2 { margin-top: 8px; }
.mt-4 { margin-top: 16px; }
.mt-6 { margin-top: 24px; }
.mb-4 { margin-bottom: 16px; }
.mb-6 { margin-bottom: 24px; }
.w-full { width: 100%; }

/* ---------- Responsive ---------- */
@media (max-width: 900px) {
  .hero-grid {
    grid-template-columns: 1fr;
    gap: 0;
  }
  .hero-visual { display: none !important; }
  .footer-grid { grid-template-columns: 1fr 1fr; }
}

@media (max-width: 640px) {
  .navbar-nav { display: none; }
  .btn-menu { display: flex; }
  .navbar-actions .btn { display: none; }
  .service-tabs-desktop { display: none !important; }
  .service-tabs-mobile  { display: grid !important; }
  .navbar-nav-mobile-actions {
    display: flex;
    flex-direction: column;
    gap: 8px;
    padding-top: 12px;
    margin-top: 8px;
    border-top: 1px solid var(--border);
    width: 100%;
  }
  .navbar-nav.open {
    display: flex;
    flex-direction: column;
    position: fixed;
    top: 64px; left: 0; right: 0;
    background: var(--bg2);
    border-bottom: 1px solid var(--border);
    padding: 16px;
    gap: 4px;
  }
  .section { padding: 56px 0; }
  .footer-grid { grid-template-columns: 1fr; }
  .footer-brand { grid-column: 1; }
  .modal { padding: 24px; }
  .hero-actions { flex-direction: column; }
  .btn-lg { padding: 14px 24px; font-size: 15px; }
}
