/* ===========================
   EchoNav Landing Page
   Mobile-first, WCAG AA
   Optimised for conversion
   =========================== */

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

:root {
  --color-primary: #0B84FF;
  --color-secondary: #0066CC;
  --color-dark: #004499;
  --color-bg: #FFFFFF;
  --color-bg-alt: #F0F4F8;
  --color-text: #1A1A2E;
  --color-text-light: #FFFFFF;
  --color-focus: #FFD700;
  --color-success: #16A34A;
  --color-error: #DC2626;
  --font-main: system-ui, -apple-system, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
  --max-width: 1120px;
  --radius: 8px;
}

html {
  scroll-behavior: smooth;
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }
  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
    scroll-behavior: auto !important;
  }
}

body {
  font-family: var(--font-main);
  font-size: 1rem;
  line-height: 1.6;
  color: var(--color-text);
  background: var(--color-bg);
  -webkit-font-smoothing: antialiased;
}

img {
  max-width: 100%;
  height: auto;
  display: block;
}

/* --- Screen reader only --- */
.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

/* --- Skip Link --- */
.skip-link {
  position: absolute;
  top: -100%;
  left: 16px;
  z-index: 1000;
  padding: 12px 24px;
  background: var(--color-dark);
  color: var(--color-text-light);
  font-weight: 700;
  text-decoration: none;
  border-radius: var(--radius);
}

.skip-link:focus {
  top: 16px;
}

/* --- Focus visible --- */
:focus-visible {
  outline: 3px solid var(--color-focus);
  outline-offset: 2px;
}

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

section {
  padding: 64px 0;
}

/* --- Typography --- */
h1, h2, h3 {
  line-height: 1.2;
  font-weight: 700;
}

h1 {
  font-size: clamp(2rem, 5vw, 3rem);
}

h2 {
  font-size: clamp(1.5rem, 4vw, 2.25rem);
  margin-bottom: 16px;
}

h3 {
  font-size: 1.25rem;
  margin-bottom: 8px;
}

p {
  margin-bottom: 16px;
}

/* --- Buttons --- */
.btn {
  display: inline-block;
  padding: 14px 32px;
  font-size: 1.063rem;
  font-weight: 600;
  text-decoration: none;
  text-align: center;
  border: none;
  border-radius: var(--radius);
  cursor: pointer;
  min-height: 44px;
  min-width: 44px;
  transition: background-color 0.2s, transform 0.1s;
}

.btn:active {
  transform: scale(0.98);
}

.btn-primary {
  background: var(--color-primary);
  color: var(--color-text-light);
}

.btn-primary:hover {
  background: var(--color-secondary);
}

.btn-large {
  padding: 18px 48px;
  font-size: 1.125rem;
}

/* --- Header --- */
.site-header {
  background: var(--color-dark);
  color: var(--color-text-light);
  padding: 16px 0;
  position: sticky;
  top: 0;
  z-index: 100;
}

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

.logo {
  font-size: 1.5rem;
  font-weight: 800;
  color: var(--color-text-light);
  text-decoration: none;
  letter-spacing: -0.02em;
  display: inline-flex;
  align-items: center;
  gap: 10px;
}

.logo-img {
  width: 40px;
  height: 40px;
  border-radius: 8px;
}

.logo span {
  color: var(--color-primary);
}

.lang-switcher {
  display: flex;
  gap: 2px;
  background: rgba(255, 255, 255, 0.1);
  border-radius: var(--radius);
  padding: 2px;
}

.lang-switcher button {
  background: transparent;
  border: none;
  color: rgba(255, 255, 255, 0.6);
  font-size: 0.813rem;
  font-weight: 600;
  padding: 6px 10px;
  border-radius: 6px;
  cursor: pointer;
  min-height: 32px;
  min-width: 36px;
  transition: background-color 0.2s, color 0.2s;
}

.lang-switcher button:hover {
  color: var(--color-text-light);
  background: rgba(255, 255, 255, 0.1);
}

.lang-switcher button.active,
.lang-switcher button[aria-pressed="true"] {
  background: var(--color-primary);
  color: var(--color-text-light);
}

.header-cta {
  padding: 10px 24px;
  font-size: 0.938rem;
}

/* --- Hero --- */
.hero {
  background: linear-gradient(135deg, var(--color-dark) 0%, #002255 100%);
  color: var(--color-text-light);
  text-align: center;
  padding: 64px 0 56px;
}

.hero h1 {
  margin-bottom: 16px;
}

.hero-subtitle {
  font-size: clamp(1.063rem, 2.5vw, 1.25rem);
  max-width: 600px;
  margin: 0 auto 28px;
  opacity: 0.9;
}

/* Hero benefits */
.hero-benefits {
  list-style: none;
  max-width: 520px;
  margin: 0 auto 32px;
  text-align: left;
  font-size: 1rem;
}

.hero-benefits li {
  padding: 6px 0 6px 28px;
  position: relative;
  line-height: 1.5;
}

.hero-benefits li::before {
  content: "✓";
  position: absolute;
  left: 0;
  color: var(--color-primary);
  font-weight: 700;
  font-size: 1.125rem;
}

/* Hero inline form */
.hero-form {
  max-width: 480px;
  margin: 0 auto 16px;
}

.hero-form-row {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.hero-form-field {
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.hero-form-field input[type="email"] {
  padding: 14px 16px;
  font-size: 1rem;
  border: 2px solid transparent;
  border-radius: var(--radius);
  background: #FFFFFF;
  color: var(--color-text);
  min-height: 44px;
  width: 100%;
}

.hero-form-field input[type="email"]:focus {
  outline: none;
  border-color: var(--color-focus);
  box-shadow: 0 0 0 3px rgba(255, 215, 0, 0.3);
}

.hero-form-field input[type="email"][aria-invalid="true"] {
  border-color: var(--color-error);
}

.form-error {
  color: #FCA5A5;
  font-size: 0.875rem;
  min-height: 1.25em;
}

.btn-submit {
  padding: 14px 32px;
  font-size: 1.063rem;
  white-space: nowrap;
}

.form-status {
  text-align: center;
  padding: 12px;
  border-radius: var(--radius);
  font-weight: 600;
  min-height: 48px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.form-status.success {
  background: rgba(22, 163, 74, 0.15);
  color: #86EFAC;
}

.form-status.error {
  background: rgba(220, 38, 38, 0.15);
  color: #FCA5A5;
}

.form-status:empty {
  display: none;
}

/* Micro reassurance */
.micro-reassurance {
  font-size: 0.875rem;
  opacity: 0.7;
  margin-bottom: 8px;
}

.micro-reassurance--dark {
  color: var(--color-text);
  opacity: 0.6;
}

.hero-proof {
  font-size: 0.813rem;
  opacity: 0.55;
  margin-bottom: 0;
}

/* --- Constat (stats) --- */
.constat {
  background: var(--color-bg-alt);
  text-align: center;
}

.stat-number {
  font-size: clamp(3rem, 8vw, 5rem);
  font-weight: 800;
  color: var(--color-primary);
  line-height: 1;
  display: block;
  margin-bottom: 12px;
}

.constat p {
  max-width: 640px;
  margin: 0 auto 16px;
  font-size: 1.125rem;
}

/* --- Comment ça marche (steps) --- */
.steps {
  text-align: center;
}

.steps-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 40px;
  margin-top: 40px;
}

.step {
  padding: 24px;
}

.step-icon {
  font-size: 3rem;
  margin-bottom: 16px;
  display: block;
}

.step-number {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 36px;
  height: 36px;
  background: var(--color-primary);
  color: var(--color-text-light);
  font-weight: 700;
  border-radius: 50%;
  margin-bottom: 12px;
  font-size: 1rem;
}

/* Section CTA (repeated) */
.section-cta {
  margin-top: 40px;
  text-align: center;
}

.section-cta .micro-reassurance {
  margin-top: 8px;
}

/* --- Fonctionnalites --- */
.features {
  background: var(--color-bg-alt);
}

.features-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 24px;
  margin-top: 40px;
}

.feature-card {
  background: var(--color-bg);
  border-radius: var(--radius);
  padding: 32px 24px;
  box-shadow: 0 1px 3px rgba(0,0,0,0.08);
}

.feature-card-icon {
  font-size: 2.5rem;
  margin-bottom: 12px;
  display: block;
}

.feature-card h3 {
  color: var(--color-dark);
}

/* --- FAQ --- */
.faq {
  background: var(--color-bg);
}

.faq h2 {
  text-align: center;
  margin-bottom: 32px;
}

.faq-list {
  max-width: 720px;
  margin: 0 auto;
}

.faq-item {
  border-bottom: 1px solid #E2E8F0;
  padding: 20px 0;
}

.faq-item:last-child {
  border-bottom: none;
}

.faq-item dt {
  font-weight: 700;
  font-size: 1.063rem;
  margin-bottom: 8px;
  color: var(--color-dark);
}

.faq-item dd {
  margin: 0;
  line-height: 1.6;
  color: #4A5568;
}

/* --- Final CTA --- */
.final-cta {
  background: linear-gradient(135deg, var(--color-dark) 0%, #002255 100%);
  color: var(--color-text-light);
  text-align: center;
}

.final-cta h2 {
  margin-bottom: 12px;
}

.final-cta p {
  opacity: 0.9;
  margin-bottom: 24px;
}

.final-cta .micro-reassurance {
  margin-top: 12px;
}

/* --- Footer --- */
.site-footer {
  background: #0A0A1A;
  color: #A0AEC0;
  padding: 40px 0 24px;
  font-size: 0.875rem;
}

.footer-content {
  display: flex;
  flex-direction: column;
  gap: 24px;
}

.footer-brand .logo {
  margin-bottom: 8px;
  display: inline-block;
}

.footer-contact {
  margin-top: 4px;
}

.footer-contact a {
  color: var(--color-primary);
  text-decoration: underline;
}

.footer-links {
  list-style: none;
  display: flex;
  flex-wrap: wrap;
  gap: 16px;
}

.footer-links a {
  color: #A0AEC0;
  text-decoration: none;
}

.footer-links a:hover {
  color: var(--color-text-light);
  text-decoration: underline;
}

.footer-bottom {
  margin-top: 32px;
  padding-top: 16px;
  border-top: 1px solid #1A1A2E;
  text-align: center;
  font-size: 0.813rem;
}

/* ===========================
   Responsive Breakpoints
   =========================== */

/* Tablet (640px+) */
@media (min-width: 640px) {
  .hero-form-row {
    flex-direction: row;
  }

  .steps-grid {
    grid-template-columns: repeat(3, 1fr);
  }

  .features-grid {
    grid-template-columns: repeat(2, 1fr);
  }

  .footer-content {
    flex-direction: row;
    justify-content: space-between;
    align-items: flex-start;
  }
}

/* Desktop (1024px+) */
@media (min-width: 1024px) {
  section {
    padding: 80px 0;
  }

  .hero {
    padding: 80px 0 72px;
  }

  .features-grid {
    grid-template-columns: repeat(4, 1fr);
  }
}
