/* ==========================================================================
   NguePay — Styles globaux (main.css)
   HTML/CSS vanilla · zéro framework
   ========================================================================== */

:root {
  --color-primary: #0a4f6e;
  --color-primary-light: #1aafcc;
  --color-accent: #f59e0b;
  --color-bg: #f8fafc;
  --color-text: #0f172a;
  --color-text-muted: #64748b;
  --color-border: #e2e8f0;
  --color-success: #10b981;
  --color-error: #ef4444;
  --color-warning: #f59e0b;
  --color-code-bg: #1e293b;
  --radius-card: 12px;
  --radius-btn: 8px;
  --shadow-card: 0 4px 24px rgba(0, 0, 0, 0.08);
  --shadow-hover: 0 8px 40px rgba(0, 0, 0, 0.12);
  --font-main: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  --transition: 0.2s ease;
  --maxw: 1200px;
}

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

html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }

body {
  font-family: var(--font-main);
  color: var(--color-text);
  background: #fff;
  line-height: 1.6;
  font-size: 16px;
  -webkit-font-smoothing: antialiased;
}

img, svg { display: block; max-width: 100%; }
a { color: var(--color-primary); text-decoration: none; transition: color var(--transition); }
a:hover { color: var(--color-primary-light); }
ul { list-style: none; }

/* --- Accessibilité --- */
.skip-link {
  position: absolute; left: -999px; top: 0; z-index: 1000;
  background: var(--color-primary); color: #fff; padding: 10px 16px; border-radius: 0 0 8px 0;
}
.skip-link:focus { left: 0; }
:focus-visible { outline: 3px solid var(--color-primary-light); outline-offset: 2px; border-radius: 4px; }

/* --- Layout --- */
.container { width: 100%; max-width: var(--maxw); margin: 0 auto; padding: 0 20px; }
section { padding: 80px 0; }
.section-head { text-align: center; max-width: 640px; margin: 0 auto 48px; }
.section-head h2 { font-size: clamp(28px, 4vw, 40px); font-weight: 800; letter-spacing: -0.02em; }
.section-head p { color: var(--color-text-muted); font-size: 18px; margin-top: 12px; }
.eyebrow { color: var(--color-primary-light); font-weight: 700; font-size: 14px; text-transform: uppercase; letter-spacing: 0.08em; }

/* --- Boutons --- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  font-family: inherit; font-weight: 600; font-size: 15px; line-height: 1;
  padding: 13px 22px; border-radius: var(--radius-btn); border: 1px solid transparent;
  cursor: pointer; transition: all var(--transition); white-space: nowrap;
}
.btn-primary { background: var(--color-primary); color: #fff; }
.btn-primary:hover { background: #08415b; color: #fff; transform: translateY(-1px); box-shadow: var(--shadow-card); }
.btn-secondary { background: #fff; color: var(--color-primary); border-color: var(--color-border); }
.btn-secondary:hover { background: var(--color-bg); color: var(--color-primary); border-color: var(--color-primary-light); }
.btn-outline { background: transparent; color: #fff; border-color: rgba(255,255,255,0.4); }
.btn-outline:hover { background: rgba(255,255,255,0.12); color: #fff; }
.btn-accent { background: var(--color-accent); color: #1a1300; }
.btn-accent:hover { background: #e08e00; transform: translateY(-1px); }
.btn-lg { padding: 16px 28px; font-size: 16px; }

/* --- Navigation --- */
.nav {
  position: sticky; top: 0; z-index: 100;
  background: transparent; transition: background var(--transition), box-shadow var(--transition);
}
.nav.scrolled { background: rgba(255,255,255,0.85); backdrop-filter: saturate(180%) blur(12px); box-shadow: 0 1px 0 var(--color-border); }
.nav-inner { display: flex; align-items: center; justify-content: space-between; height: 68px; }
.nav-logo { height: 30px; width: auto; }
.nav-links { display: flex; align-items: center; gap: 28px; }
.nav-links a { color: var(--color-text); font-weight: 500; font-size: 15px; }
.nav-links a:hover { color: var(--color-primary); }
.nav-cta { display: flex; align-items: center; gap: 12px; }
.nav-burger { display: none; background: none; border: 0; cursor: pointer; padding: 8px; }
.nav-burger span { display: block; width: 22px; height: 2px; background: var(--color-text); margin: 4px 0; border-radius: 2px; transition: var(--transition); }

/* --- Hero --- */
.hero { position: relative; overflow: hidden; padding: 72px 0 64px; background: linear-gradient(180deg, #eaf6fb 0%, #f8fafc 55%, #fff 100%); }
.hero-grid { display: grid; grid-template-columns: 1.05fr 0.95fr; gap: 48px; align-items: center; }
.hero h1 { font-size: clamp(34px, 5.2vw, 60px); font-weight: 800; line-height: 1.05; letter-spacing: -0.03em; }
.hero h1 .accent { background: linear-gradient(90deg, var(--color-primary), var(--color-primary-light)); -webkit-background-clip: text; background-clip: text; -webkit-text-fill-color: transparent; }
.hero p.lead { font-size: 19px; color: var(--color-text-muted); margin: 22px 0 32px; max-width: 540px; }
.hero-actions { display: flex; gap: 14px; flex-wrap: wrap; }
.hero-providers { display: flex; gap: 18px; margin-top: 36px; flex-wrap: wrap; }
.hero-providers span { display: inline-flex; align-items: center; gap: 8px; font-size: 14px; font-weight: 600; color: var(--color-text-muted); opacity: 0; transform: translateY(8px); animation: rise 0.5s forwards; }
.hero-providers span:nth-child(1){animation-delay:.2s} .hero-providers span:nth-child(2){animation-delay:.35s} .hero-providers span:nth-child(3){animation-delay:.5s} .hero-providers span:nth-child(4){animation-delay:.65s}
@keyframes rise { to { opacity: 1; transform: translateY(0); } }

/* Visuel hero — mockup CSS */
.hero-visual { position: relative; height: 420px; }
.float-card { position: absolute; background: #fff; border-radius: var(--radius-card); box-shadow: var(--shadow-hover); padding: 18px; animation: floaty 6s ease-in-out infinite; }
.float-card.c1 { top: 0; left: 6%; width: 230px; animation-delay: 0s; }
.float-card.c2 { top: 120px; right: 0; width: 210px; animation-delay: 1.2s; }
.float-card.c3 { bottom: 0; left: 16%; width: 250px; animation-delay: 0.6s; }
@keyframes floaty { 0%,100% { transform: translateY(0); } 50% { transform: translateY(-12px); } }
.mock-row { display: flex; align-items: center; justify-content: space-between; font-size: 13px; padding: 6px 0; }
.mock-amount { font-size: 24px; font-weight: 800; color: var(--color-primary); }
.mock-pill { font-size: 11px; font-weight: 700; padding: 3px 9px; border-radius: 999px; }
.pill-ok { background: #dcfce7; color: #166534; }
.pill-wait { background: #fef3c7; color: #92400e; }
.mock-bar { height: 8px; border-radius: 4px; background: var(--color-bg); margin: 7px 0; }
.mock-bar.lg { width: 80%; background: linear-gradient(90deg, var(--color-primary-light), var(--color-primary)); }

/* --- Stats --- */
.stats { display: grid; grid-template-columns: repeat(4, 1fr); gap: 16px; margin-top: 56px; }
.stat { text-align: center; padding: 20px; border-radius: var(--radius-card); background: #fff; border: 1px solid var(--color-border); }
.stat .num { font-size: 34px; font-weight: 800; color: var(--color-primary); letter-spacing: -0.02em; }
.stat .lbl { color: var(--color-text-muted); font-size: 14px; margin-top: 4px; }

/* --- Cards / grids --- */
.grid { display: grid; gap: 20px; }
.grid-3 { grid-template-columns: repeat(3, 1fr); }
.grid-4 { grid-template-columns: repeat(4, 1fr); }
.grid-2 { grid-template-columns: repeat(2, 1fr); }
.card { background: #fff; border: 1px solid var(--color-border); border-radius: var(--radius-card); padding: 26px; transition: transform var(--transition), box-shadow var(--transition); }
.card-hover:hover { transform: translateY(-4px); box-shadow: var(--shadow-hover); }
.card .ico { font-size: 28px; margin-bottom: 12px; }
.card h3 { font-size: 18px; font-weight: 700; margin-bottom: 6px; }
.card p { color: var(--color-text-muted); font-size: 15px; }
.bg-soft { background: var(--color-bg); }

/* --- Badges --- */
.badge { display: inline-block; font-size: 12px; font-weight: 700; padding: 3px 10px; border-radius: 999px; }
.badge-success { background: #dcfce7; color: #166534; }
.badge-warning { background: #fef3c7; color: #92400e; }
.badge-error { background: #fee2e2; color: #991b1b; }
.badge-soon { background: #e0e7ff; color: #3730a3; }

/* --- Liste à coches --- */
.checklist li { display: flex; gap: 10px; align-items: flex-start; padding: 7px 0; color: var(--color-text); }
.checklist li::before { content: '✓'; color: var(--color-success); font-weight: 800; }

/* --- Bloc code --- */
.code-demo { display: grid; grid-template-columns: 1fr 1fr; gap: 20px; align-items: start; }
.tabs { display: flex; gap: 6px; margin-bottom: 12px; flex-wrap: wrap; }
.tab-btn { background: #fff; border: 1px solid var(--color-border); color: var(--color-text-muted); padding: 8px 16px; border-radius: var(--radius-btn); font: inherit; font-size: 14px; font-weight: 600; cursor: pointer; }
.tab-btn.active { background: var(--color-primary); color: #fff; border-color: var(--color-primary); }
.code-block { position: relative; background: var(--color-code-bg); border-radius: var(--radius-card); padding: 20px 18px; overflow: auto; }
.code-block pre { margin: 0; }
.code-block code { font-family: 'SFMono-Regular', Consolas, 'Liberation Mono', Menlo, monospace; font-size: 13.5px; line-height: 1.7; color: #e2e8f0; white-space: pre; }
.code-block .copy { position: absolute; top: 10px; right: 10px; background: rgba(255,255,255,0.1); color: #cbd5e1; border: 0; border-radius: 6px; padding: 6px 10px; font: inherit; font-size: 12px; cursor: pointer; }
.code-block .copy:hover { background: rgba(255,255,255,0.2); }
.tab-pane { display: none; }
.tab-pane.active { display: block; animation: fade 0.25s ease; }
@keyframes fade { from { opacity: 0; } to { opacity: 1; } }
/* Syntax highlighting CSS-only */
.kw { color: #c792ea; } .str { color: #c3e88d; } .num { color: #f78c6c; }
.cmt { color: #5c6e80; font-style: italic; } .key { color: #82aaff; } .fn { color: #82aaff; } .punc { color: #89ddff; }

/* --- Étapes --- */
.steps { display: grid; grid-template-columns: repeat(3, 1fr); gap: 24px; }
.step { text-align: center; }
.step .n { width: 44px; height: 44px; margin: 0 auto 14px; border-radius: 999px; background: var(--color-primary); color: #fff; font-weight: 800; display: grid; place-items: center; }
.step h3 { font-size: 17px; }
.step p { color: var(--color-text-muted); font-size: 14px; }

/* --- Témoignages --- */
.quote { font-size: 16px; }
.quote .who { margin-top: 16px; font-weight: 700; }
.quote .who small { display: block; color: var(--color-text-muted); font-weight: 500; }

/* --- Bandes / CTA --- */
.cta-final { background: var(--color-primary); color: #fff; text-align: center; }
.cta-final h2 { font-size: clamp(26px, 4vw, 38px); font-weight: 800; }
.cta-final p { color: #cfe7f0; margin: 12px 0 28px; }
.cta-actions { display: flex; gap: 14px; justify-content: center; flex-wrap: wrap; }

/* --- Alternance produit --- */
.feature-row { display: grid; grid-template-columns: 1fr 1fr; gap: 56px; align-items: center; padding: 56px 0; }
.feature-row.reverse .feature-visual { order: -1; }
.feature-row h2 { font-size: 30px; font-weight: 800; margin-bottom: 14px; }
.feature-row p.lead { color: var(--color-text-muted); margin-bottom: 18px; }

/* --- Tarifs --- */
.pricing { display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; align-items: stretch; }
.plan { background: #fff; border: 1px solid var(--color-border); border-radius: var(--radius-card); padding: 28px; display: flex; flex-direction: column; }
.plan.popular { border-color: var(--color-primary); box-shadow: var(--shadow-card); position: relative; }
.plan.popular::after { content: 'POPULAIRE'; position: absolute; top: -11px; right: 20px; background: var(--color-accent); color: #1a1300; font-size: 11px; font-weight: 800; padding: 4px 10px; border-radius: 999px; }
.plan h3 { font-size: 18px; }
.plan .price { font-size: 32px; font-weight: 800; color: var(--color-primary); margin: 8px 0; }
.plan .price small { font-size: 14px; color: var(--color-text-muted); font-weight: 500; }
.plan ul { margin: 18px 0; flex: 1; }
.plan ul li { padding: 7px 0; color: var(--color-text-muted); font-size: 14px; border-bottom: 1px solid var(--color-bg); }
.table-wrap { overflow-x: auto; }
table.pricing-table { width: 100%; border-collapse: collapse; min-width: 640px; }
table.pricing-table th, table.pricing-table td { padding: 14px 16px; text-align: left; border-bottom: 1px solid var(--color-border); font-size: 14px; }
table.pricing-table th { font-weight: 700; }
table.pricing-table thead th { background: var(--color-bg); }

/* --- FAQ --- */
.faq details { background: #fff; border: 1px solid var(--color-border); border-radius: var(--radius-card); padding: 16px 20px; margin-bottom: 12px; }
.faq summary { font-weight: 600; cursor: pointer; }
.faq p { color: var(--color-text-muted); margin-top: 10px; }

/* --- Footer --- */
.footer { background: #0b1726; color: #94a3b8; padding: 56px 0 28px; }
.footer a { color: #cbd5e1; font-size: 14px; }
.footer a:hover { color: #fff; }
.footer-grid { display: grid; grid-template-columns: 1.4fr repeat(4, 1fr); gap: 32px; }
.footer-brand p { font-size: 14px; margin-top: 12px; max-width: 280px; }
.footer h4 { color: #fff; font-size: 14px; margin-bottom: 14px; text-transform: uppercase; letter-spacing: 0.06em; }
.footer ul li { margin-bottom: 9px; }
.footer-bottom { display: flex; justify-content: space-between; align-items: center; flex-wrap: wrap; gap: 10px; margin-top: 40px; padding-top: 24px; border-top: 1px solid #1e293b; font-size: 13px; }

/* --- Responsive --- */
@media (max-width: 1023px) {
  .grid-4 { grid-template-columns: repeat(2, 1fr); }
  .footer-grid { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 900px) {
  .hero-grid { grid-template-columns: 1fr; }
  .hero-visual { height: 360px; margin-top: 20px; }
  .code-demo { grid-template-columns: 1fr; }
  .feature-row, .feature-row.reverse { grid-template-columns: 1fr; gap: 24px; }
  .feature-row.reverse .feature-visual { order: 0; }
}
@media (max-width: 767px) {
  section { padding: 56px 0; }
  .nav-links, .nav-cta .btn-secondary { display: none; }
  .nav-burger { display: block; }
  .nav.mobile-open .nav-links { display: flex; position: absolute; top: 68px; left: 0; right: 0; flex-direction: column; background: #fff; padding: 16px 20px; gap: 16px; box-shadow: var(--shadow-card); }
  .nav.mobile-open .nav-cta .btn-secondary { display: inline-flex; }
  .grid-3, .grid-4, .grid-2, .steps, .pricing { grid-template-columns: 1fr; }
  .stats { grid-template-columns: repeat(2, 1fr); }
  .footer-grid { grid-template-columns: 1fr; }
}

/* --- Bouton WhatsApp flottant --- */
.whatsapp-float { position: fixed; bottom: 28px; right: 28px; z-index: 9999; cursor: pointer; text-decoration: none; }
.whatsapp-float .whatsapp-circle {
  width: 56px; height: 56px; background: #ffffff; border-radius: 50%;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.15);
  display: flex; align-items: center; justify-content: center;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}
.whatsapp-float:hover .whatsapp-circle { transform: scale(1.1); box-shadow: 0 8px 30px rgba(0, 0, 0, 0.2); }
.whatsapp-float .whatsapp-icon { width: 32px; height: 32px; fill: #25d366; }
.whatsapp-float .whatsapp-badge {
  position: absolute; top: 0; right: 0; width: 14px; height: 14px;
  background: #ef4444; border-radius: 50%; border: 2px solid #ffffff;
  animation: whatsapp-pulse 2s infinite;
}
@keyframes whatsapp-pulse {
  0% { transform: scale(1); opacity: 1; }
  50% { transform: scale(1.2); opacity: 0.8; }
  100% { transform: scale(1); opacity: 1; }
}
.whatsapp-float .whatsapp-tooltip {
  position: absolute; right: 68px; top: 50%; transform: translateY(-50%);
  background: #1f2937; color: #ffffff; font-size: 13px; font-weight: 500;
  padding: 6px 12px; border-radius: 8px; white-space: nowrap;
  opacity: 0; pointer-events: none; transition: opacity 0.2s ease;
}
.whatsapp-float .whatsapp-tooltip::after {
  content: ''; position: absolute; left: 100%; top: 50%; transform: translateY(-50%);
  border: 5px solid transparent; border-left-color: #1f2937;
}
.whatsapp-float:hover .whatsapp-tooltip { opacity: 1; }

@media (max-width: 767px) {
  .whatsapp-float { bottom: 16px; right: 16px; }
  .whatsapp-float .whatsapp-circle { width: 48px; height: 48px; }
  .whatsapp-float .whatsapp-tooltip { display: none; }
}
