/* FunSpeech — feuille de styles partagée
   Palette et composants alignés sur l'app Flutter (lib/core/theme/app_colors.dart)
*/

:root {
  --brand-50:  #F2EBF7;
  --brand-100: #E3D8EB;
  --brand-200: #D3C4E1;
  --brand-500: #9381BB;
  --brand-600: #7A6AA3;
  --brand-700: #5D4A89;
  --brand-800: #4A3A73;
  --lilac-500: #8B6DD0;

  --text-high:   #1B1B1B;
  --text-medium: #3F3F3F;
  --text-low:    #757575;

  --white: #FFFFFF;
  --alert: #D62842;

  --space-1: 8px;
  --space-2: 16px;
  --space-3: 24px;
  --space-4: 32px;
  --space-5: 48px;
  --space-6: 64px;

  --radius-sm: 8px;
  --radius-md: 12px;
  --radius-lg: 16px;

  --max-width: 720px;
}

*, *::before, *::after {
  box-sizing: border-box;
}

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

body {
  margin: 0;
  background: var(--brand-50);
  color: var(--text-high);
  font-family: 'ADLaM Display', system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  font-size: 17px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

/* On utilise ADLaM Display pour les titres/CTA mais pas pour le corps de texte
   long — la lisibilité d'un texte juridique en ADLaM Display est faible.
   On bascule donc le body vers une sans-serif système, et on réserve ADLaM
   pour h1/h2/h3 et boutons. */
body, p, li, dd, dt, td, th {
  font-family: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", sans-serif;
}

h1, h2, h3, .brand, .btn {
  font-family: 'ADLaM Display', system-ui, sans-serif;
  font-weight: 400;
  color: var(--brand-700);
  letter-spacing: 0.01em;
}

h1 { font-size: 2.25rem; line-height: 1.2; margin: 0 0 var(--space-3); }
h2 { font-size: 1.5rem;  line-height: 1.3; margin: var(--space-5) 0 var(--space-2); }
h3 { font-size: 1.15rem; line-height: 1.4; margin: var(--space-3) 0 var(--space-1); color: var(--text-high); }

p { margin: 0 0 var(--space-2); color: var(--text-medium); }
strong { color: var(--text-high); }
a { color: var(--brand-700); text-decoration: underline; text-underline-offset: 3px; }
a:hover { color: var(--lilac-500); }

ul, ol { padding-left: 1.25rem; margin: 0 0 var(--space-2); color: var(--text-medium); }
li { margin-bottom: 6px; }

hr {
  border: 0;
  border-top: 1px solid var(--brand-100);
  margin: var(--space-4) 0;
}

/* Layout */
.site-header,
.site-footer,
.page {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: var(--space-3) var(--space-3);
}

.site-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-2);
  padding-top: var(--space-3);
  padding-bottom: var(--space-2);
  flex-wrap: wrap;
}

.site-header .brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-size: 1.15rem;
  text-decoration: none;
  color: var(--brand-700);
}

.site-header .brand img {
  width: 32px;
  height: 32px;
  border-radius: 8px;
}

.site-nav {
  display: flex;
  gap: var(--space-2);
  flex-wrap: wrap;
}

.site-nav a {
  color: var(--text-medium);
  text-decoration: none;
  font-size: 0.95rem;
  padding: 6px 10px;
  border-radius: var(--radius-sm);
}

.site-nav a:hover { background: var(--brand-100); color: var(--brand-700); }
.site-nav a[aria-current="page"] { color: var(--brand-700); font-weight: 600; }

.site-footer {
  padding-top: var(--space-4);
  padding-bottom: var(--space-4);
  color: var(--text-low);
  font-size: 0.9rem;
  border-top: 1px solid var(--brand-100);
  margin-top: var(--space-5);
}

.site-footer .footer-links {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-2);
  margin-bottom: var(--space-1);
}

.site-footer .footer-links a {
  color: var(--text-medium);
}

/* Page card */
.page {
  background: var(--white);
  border-radius: var(--radius-lg);
  padding: var(--space-4);
  box-shadow: 0 2px 0 var(--brand-100);
  margin-top: var(--space-2);
  margin-bottom: var(--space-3);
}

.page--hero {
  text-align: center;
  background: transparent;
  box-shadow: none;
  padding-top: var(--space-2);
}

.hero-art {
  display: block;
  width: 100%;
  max-width: 360px;
  height: auto;
  margin: 0 auto var(--space-2);
}

.hero-tagline {
  font-size: 1.1rem;
  color: var(--text-medium);
  max-width: 520px;
  margin: 0 auto var(--space-3);
}

/* Buttons (effet 3D bordure inférieure) */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 14px 28px;
  border-radius: var(--radius-lg);
  border: none;
  border-bottom: 4px solid var(--brand-800);
  background: var(--brand-700);
  color: var(--white);
  font-size: 1.05rem;
  text-decoration: none;
  cursor: pointer;
  transition: transform 80ms ease, border-bottom-width 80ms ease, background 120ms ease;
}

.btn:hover { background: var(--brand-600); color: var(--white); }

.btn:active {
  transform: translateY(2px);
  border-bottom-width: 2px;
}

.btn--secondary {
  background: var(--brand-200);
  color: var(--brand-700);
  border-bottom-color: var(--brand-500);
}

.btn--secondary:hover { background: var(--brand-100); color: var(--brand-700); }

.btn-group {
  display: flex;
  gap: var(--space-2);
  flex-wrap: wrap;
  justify-content: center;
  margin: var(--space-3) 0 var(--space-4);
}

/* Badges officiels Apple / Google — ne pas modifier les couleurs ni l'aspect.
   Apple : hauteur min ~40px. Google : hauteur min 60dp et padding intégré. */
.store-badges {
  display: flex;
  gap: var(--space-2);
  flex-wrap: wrap;
  align-items: center;
  justify-content: center;
  margin: var(--space-3) 0 var(--space-2);
}

.store-badge {
  display: inline-flex;
  text-decoration: none;
  transition: transform 120ms ease, opacity 120ms ease;
}

.store-badge:hover { opacity: 0.9; transform: translateY(-1px); }
.store-badge:active { transform: translateY(0); }

.store-badge img {
  display: block;
  height: 52px;
  width: auto;
}

/* Le badge Google a un padding interne ; on l'agrandit légèrement pour
   compenser visuellement et aligner les zones cliquables. */
.store-badge--play img {
  height: 76px;
}

/* Feature list */
.feature-list {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: var(--space-2);
  list-style: none;
  padding: 0;
  margin: var(--space-2) 0 var(--space-3);
}

.feature-list li {
  background: var(--brand-50);
  border-radius: var(--radius-md);
  padding: var(--space-2);
  color: var(--text-medium);
  border: 1px solid var(--brand-100);
}

.feature-list li strong {
  display: block;
  color: var(--brand-700);
  font-family: 'ADLaM Display', system-ui, sans-serif;
  font-weight: 400;
  margin-bottom: 4px;
}

/* FAQ */
.faq dt {
  color: var(--text-high);
  font-weight: 600;
  margin-top: var(--space-2);
}

.faq dd {
  margin: 4px 0 var(--space-2);
  color: var(--text-medium);
}

/* Placeholder hint */
.placeholder {
  background: #FFF4D6;
  color: #8A6A1F;
  padding: 1px 6px;
  border-radius: 4px;
  font-size: 0.95em;
  font-family: ui-monospace, "SF Mono", Menlo, monospace;
}

/* Contact block */
.contact-card {
  background: var(--brand-50);
  border: 1px solid var(--brand-100);
  border-radius: var(--radius-md);
  padding: var(--space-3);
  margin: var(--space-2) 0;
}

.contact-card p { margin: 4px 0; }

/* Mobile tweaks */
@media (max-width: 540px) {
  body { font-size: 16px; }
  h1 { font-size: 1.75rem; }
  h2 { font-size: 1.25rem; }
  .page { padding: var(--space-3) var(--space-2); }
  .site-header { padding: var(--space-2); }
}
