/* =====================================================
   DiagMobile — Site Vitrine — Custom CSS
   Stack : Tailwind CDN + CSS custom
   ===================================================== */

/* ── Variables ─────────────────────────────────────── */
:root {
  --primary: #2563EB;
  --primary-dark: #1d4ed8;
  --violet: #7C3AED;
  --success: #10B981;
  --dark: #0F172A;
  --muted: #475569;
  --surface: #F8FAFC;
  --radius-card: 20px;
  --shadow-card: 0 4px 24px rgba(15, 23, 42, 0.08);
  --shadow-card-hover: 0 20px 60px rgba(37, 99, 235, 0.15);
}

/* ── Reset & Base ───────────────────────────────────── */
*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  font-family: 'Inter', ui-sans-serif, system-ui, sans-serif;
  color: #0F172A;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

/* ── Typography ─────────────────────────────────────── */
.font-display { font-family: 'Space Grotesk', 'Inter', sans-serif; }

.gradient-text {
  background: linear-gradient(135deg, var(--primary) 0%, var(--violet) 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.gradient-text-green {
  background: linear-gradient(135deg, #059669 0%, var(--success) 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

/* ── Header Glass ───────────────────────────────────── */
.glass-header {
  background: rgba(255, 255, 255, 0.85);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border-bottom: 1px solid rgba(255, 255, 255, 0.3);
  box-shadow: 0 1px 20px rgba(15, 23, 42, 0.06);
}

/* ── Hero Section ───────────────────────────────────── */
.hero-bg {
  position: relative;
  background: #ffffff;
  overflow: hidden;
}

.hero-bg::before {
  content: '';
  position: absolute;
  inset: 0;
  background:
    radial-gradient(ellipse 80% 60% at 60% -10%, rgba(37, 99, 235, 0.12) 0%, transparent 60%),
    radial-gradient(ellipse 50% 50% at 100% 50%, rgba(124, 58, 237, 0.08) 0%, transparent 60%),
    radial-gradient(ellipse 40% 40% at 0% 80%, rgba(16, 185, 129, 0.06) 0%, transparent 60%);
  pointer-events: none;
}

/* ── Float animation (hero mockup) ─────────────────── */
@keyframes float {
  0%, 100% { transform: translateY(0px) rotate(0deg); }
  33%  { transform: translateY(-12px) rotate(0.5deg); }
  66%  { transform: translateY(-6px) rotate(-0.3deg); }
}

.animate-float {
  animation: float 6s ease-in-out infinite;
}

/* ── Mockup placeholder ─────────────────────────────── */
.mockup-placeholder {
  background: linear-gradient(135deg, #f1f5f9 0%, #e2e8f0 100%);
  border-radius: 24px;
  border: 2px dashed #cbd5e1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  color: #94a3b8;
  font-size: 0.875rem;
  font-family: 'Inter', sans-serif;
  text-align: center;
  gap: 8px;
  min-height: 400px;
}

.mockup-phone {
  background: linear-gradient(145deg, #1e293b 0%, #0f172a 100%);
  border-radius: 40px;
  padding: 10px;
  box-shadow:
    0 40px 80px rgba(15, 23, 42, 0.4),
    0 0 0 1px rgba(255,255,255,0.08),
    inset 0 1px 0 rgba(255,255,255,0.1);
  position: relative;
}

.mockup-phone::before {
  content: '';
  position: absolute;
  top: 14px;
  left: 50%;
  transform: translateX(-50%);
  width: 80px;
  height: 6px;
  background: rgba(255,255,255,0.15);
  border-radius: 3px;
  z-index: 1;
}

.mockup-phone-screen {
  background: linear-gradient(135deg, #1e40af 0%, #7c3aed 100%);
  border-radius: 32px;
  overflow: hidden;
  position: relative;
}

/* ── Cards ──────────────────────────────────────────── */
.card {
  background: #ffffff;
  border-radius: var(--radius-card);
  box-shadow: var(--shadow-card);
  border: 1px solid rgba(241, 245, 249, 0.8);
  transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.card:hover {
  transform: translateY(-5px);
  box-shadow: var(--shadow-card-hover);
}

.card-glass {
  background: rgba(255, 255, 255, 0.7);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border: 1px solid rgba(255, 255, 255, 0.5);
  border-radius: var(--radius-card);
  box-shadow: var(--shadow-card);
  transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.card-glass:hover {
  transform: translateY(-5px);
  box-shadow: var(--shadow-card-hover);
}

/* ── Feature icon circle ────────────────────────────── */
.icon-circle {
  width: 52px;
  height: 52px;
  border-radius: 14px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.icon-circle-primary {
  background: linear-gradient(135deg, rgba(37,99,235,0.12) 0%, rgba(124,58,237,0.12) 100%);
  color: var(--primary);
}

/* ── Diagnostic cards ───────────────────────────────── */
.diag-card {
  border-radius: var(--radius-card);
  padding: 28px;
  position: relative;
  overflow: hidden;
  transition: transform 0.3s ease, box-shadow 0.3s ease;
  cursor: default;
}

.diag-card::after {
  content: '';
  position: absolute;
  top: -30%;
  right: -20%;
  width: 120px;
  height: 120px;
  border-radius: 50%;
  background: rgba(255,255,255,0.1);
  pointer-events: none;
}

.diag-card:hover {
  transform: translateY(-4px) scale(1.01);
  box-shadow: 0 20px 50px rgba(0,0,0,0.15);
}

.diag-dpe    { background: linear-gradient(135deg, #059669 0%, #10B981 100%); }
.diag-elec   { background: linear-gradient(135deg, #d97706 0%, #F59E0B 100%); }
.diag-gaz    { background: linear-gradient(135deg, #dc2626 0%, #EF4444 100%); }
.diag-amiant { background: linear-gradient(135deg, #ea580c 0%, #F97316 100%); }
.diag-plomb  { background: linear-gradient(135deg, #7c3aed 0%, #8B5CF6 100%); }
.diag-mesur  { background: linear-gradient(135deg, #4f46e5 0%, #6366F1 100%); }

/* ── Showcase section ───────────────────────────────── */
.showcase-section { position: relative; }

.showcase-block {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 64px;
  align-items: center;
}

@media (max-width: 768px) {
  .showcase-block {
    grid-template-columns: 1fr;
    gap: 32px;
  }
}

.showcase-number {
  font-family: 'Space Grotesk', sans-serif;
  font-size: 4rem;
  font-weight: 700;
  line-height: 1;
  background: linear-gradient(135deg, rgba(37,99,235,0.15) 0%, rgba(124,58,237,0.15) 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

/* ── Stats section ──────────────────────────────────── */
.stats-section {
  background: var(--dark);
  position: relative;
  overflow: hidden;
}

.stats-section::before {
  content: '';
  position: absolute;
  inset: 0;
  background:
    radial-gradient(ellipse 60% 60% at 20% 50%, rgba(37,99,235,0.15) 0%, transparent 60%),
    radial-gradient(ellipse 40% 60% at 80% 50%, rgba(124,58,237,0.12) 0%, transparent 60%);
  pointer-events: none;
}

.stat-number {
  font-family: 'Space Grotesk', sans-serif;
  font-size: clamp(2.5rem, 5vw, 4rem);
  font-weight: 700;
  line-height: 1;
  background: linear-gradient(135deg, #60a5fa 0%, #a78bfa 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

/* ── Testimonials ───────────────────────────────────── */
.testimonial-card {
  background: #ffffff;
  border-radius: var(--radius-card);
  padding: 32px;
  box-shadow: var(--shadow-card);
  border: 1px solid #f1f5f9;
  position: relative;
  transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.testimonial-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 24px 60px rgba(37,99,235,0.1);
}

.testimonial-quote {
  font-size: 4rem;
  line-height: 0.8;
  font-family: 'Space Grotesk', sans-serif;
  background: linear-gradient(135deg, var(--primary) 0%, var(--violet) 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  display: block;
  margin-bottom: 8px;
}

.avatar-placeholder {
  width: 48px;
  height: 48px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  font-size: 1rem;
  flex-shrink: 0;
  color: #fff;
}

/* ── CTA section ────────────────────────────────────── */
.cta-section {
  background: linear-gradient(135deg, var(--primary) 0%, var(--violet) 100%);
  position: relative;
  overflow: hidden;
}

.cta-section::before {
  content: '';
  position: absolute;
  inset: 0;
  background:
    radial-gradient(ellipse 50% 80% at 20% 50%, rgba(255,255,255,0.08) 0%, transparent 60%),
    radial-gradient(ellipse 40% 60% at 80% 50%, rgba(0,0,0,0.08) 0%, transparent 60%);
  pointer-events: none;
}

/* ── Store buttons ──────────────────────────────────── */
.store-btn {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 14px 24px;
  border-radius: 14px;
  font-size: 0.9375rem;
  font-weight: 600;
  text-decoration: none;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.store-btn:hover {
  transform: scale(1.03);
}

.store-btn-apple {
  background: #000000;
  color: #ffffff;
  box-shadow: 0 4px 20px rgba(0,0,0,0.25);
}

.store-btn-apple:hover {
  box-shadow: 0 8px 32px rgba(0,0,0,0.35);
}

.store-btn-google {
  background: #1a1a2e;
  color: #ffffff;
  box-shadow: 0 4px 20px rgba(26,26,46,0.25);
}

.store-btn-google:hover {
  box-shadow: 0 8px 32px rgba(26,26,46,0.35);
}

/* Store btn variants */
.store-btn-sm {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 8px 14px;
  border-radius: 10px;
  font-size: 0.8125rem;
  font-weight: 600;
  text-decoration: none;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.store-btn-sm:hover { transform: scale(1.03); }

.store-btn-mobile {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 12px 20px;
  border-radius: 12px;
  font-size: 0.9375rem;
  font-weight: 600;
  text-decoration: none;
  transition: opacity 0.2s;
  width: 100%;
}

.store-btn-mobile:hover { opacity: 0.9; }

.store-btn-footer {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 8px 14px;
  border-radius: 10px;
  font-size: 0.8125rem;
  font-weight: 600;
  text-decoration: none;
  transition: opacity 0.2s, transform 0.2s;
  background: rgba(255,255,255,0.1);
  color: rgba(255,255,255,0.85);
  border: 1px solid rgba(255,255,255,0.15);
}

.store-btn-footer:hover {
  background: rgba(255,255,255,0.18);
  transform: translateY(-1px);
}

/* CTA section store buttons — blanc sur gradient */
.store-btn-cta-apple {
  background: rgba(255,255,255,0.95);
  color: #0f172a;
  box-shadow: 0 4px 24px rgba(0,0,0,0.2);
}

.store-btn-cta-apple:hover {
  background: #ffffff;
  box-shadow: 0 8px 40px rgba(0,0,0,0.25);
  transform: scale(1.03) translateY(-2px);
}

.store-btn-cta-google {
  background: rgba(0,0,0,0.25);
  color: #ffffff;
  border: 1px solid rgba(255,255,255,0.25);
  box-shadow: 0 4px 24px rgba(0,0,0,0.15);
}

.store-btn-cta-google:hover {
  background: rgba(0,0,0,0.35);
  box-shadow: 0 8px 40px rgba(0,0,0,0.2);
  transform: scale(1.03) translateY(-2px);
}

/* ── Badge ──────────────────────────────────────────── */
.badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 6px 14px;
  border-radius: 100px;
  font-size: 0.8125rem;
  font-weight: 500;
}

.badge-blue  { background: rgba(37,99,235,0.1); color: #1d4ed8; }
.badge-green { background: rgba(16,185,129,0.1); color: #059669; }

/* ── Section titles ─────────────────────────────────── */
.section-label {
  font-family: 'Inter', sans-serif;
  font-size: 0.75rem;
  font-weight: 600;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--primary);
}

.section-title {
  font-family: 'Space Grotesk', sans-serif;
  font-weight: 700;
  line-height: 1.15;
  letter-spacing: -0.02em;
  color: var(--dark);
}

.section-subtitle {
  color: var(--muted);
  font-size: 1.125rem;
  line-height: 1.7;
}

/* ── Separator divider ──────────────────────────────── */
.gradient-divider {
  height: 1px;
  background: linear-gradient(90deg, transparent, rgba(37,99,235,0.3), rgba(124,58,237,0.3), transparent);
}

/* ── Features page – TOC ────────────────────────────── */
.toc-sidebar {
  position: sticky;
  top: 88px;
  max-height: calc(100vh - 120px);
  overflow-y: auto;
  scrollbar-width: thin;
  scrollbar-color: rgba(37,99,235,0.3) transparent;
}

.toc-link {
  display: block;
  padding: 6px 12px;
  border-left: 2px solid transparent;
  font-size: 0.875rem;
  color: var(--muted);
  text-decoration: none;
  transition: all 0.2s;
  border-radius: 0 6px 6px 0;
}

.toc-link:hover {
  color: var(--primary);
  border-left-color: rgba(37,99,235,0.4);
  background: rgba(37,99,235,0.04);
}

.toc-link.active {
  color: var(--primary);
  border-left-color: var(--primary);
  background: rgba(37,99,235,0.07);
  font-weight: 600;
}

/* ── Legal pages ────────────────────────────────────── */
.legal-content h2 {
  font-family: 'Space Grotesk', sans-serif;
  font-size: 1.375rem;
  font-weight: 700;
  color: var(--dark);
  margin-top: 2.5rem;
  margin-bottom: 1rem;
  padding-bottom: 0.5rem;
  border-bottom: 2px solid #f1f5f9;
}

.legal-content h3 {
  font-family: 'Space Grotesk', sans-serif;
  font-size: 1.125rem;
  font-weight: 600;
  color: var(--dark);
  margin-top: 1.75rem;
  margin-bottom: 0.75rem;
}

.legal-content p {
  color: #334155;
  line-height: 1.8;
  margin-bottom: 1rem;
  font-size: 0.9375rem;
}

.legal-content ul {
  list-style: none;
  padding: 0;
  margin-bottom: 1rem;
}

.legal-content ul li {
  color: #334155;
  line-height: 1.7;
  font-size: 0.9375rem;
  padding-left: 1.25rem;
  position: relative;
  margin-bottom: 0.375rem;
}

.legal-content ul li::before {
  content: '—';
  position: absolute;
  left: 0;
  color: var(--primary);
  font-weight: 600;
}

.legal-content a {
  color: var(--primary);
  text-decoration: underline;
  text-underline-offset: 2px;
}

.legal-content a:hover { color: var(--primary-dark); }

.placeholder-bracket {
  color: #ef4444;
  font-weight: 600;
  background: #fef2f2;
  padding: 1px 4px;
  border-radius: 4px;
  font-size: 0.875em;
}

/* ── Utility ────────────────────────────────────────── */
.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0,0,0,0);
  border: 0;
}

/* Focus visible */
*:focus-visible {
  outline: 2px solid var(--primary);
  outline-offset: 3px;
  border-radius: 4px;
}

/* Smooth reveal for AOS */
[data-aos] { will-change: transform, opacity; }
