/* ==========================================================================
   Alimeo — site vitrine statique
   Aucune dépendance : HTML/CSS pur. La palette reflète utils/theme.ts.
   ========================================================================== */

:root {
  /* Palette de marque (miroir de utils/theme.ts — lightColors) */
  --primary: #5dae63;
  --primary-dark: #418547;
  --primary-light: #7fcd84;
  --primary-xlight: #e4f3e4;
  --accent: #eebd4f;
  --accent-light: #fdf3d0;
  --danger: #d9544a;
  --danger-light: #fde8e7;

  --bg: #ecebe6;
  --surface: #ffffff;
  --text: #26342b;
  --text-secondary: #5d6b62;
  --text-light: #9aa39c;
  --border: #e3e2db;
  --border-strong: #cfcec6;

  --radius: 20px;
  --radius-sm: 14px;
  --shadow: 0 10px 30px rgba(38, 52, 43, 0.08);
  --shadow-lg: 0 24px 60px rgba(38, 52, 43, 0.14);
  --maxw: 1120px;
  --font: "Nunito", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
}

@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --primary: #5dae63;
    --primary-dark: #7fcd84;
    --primary-light: #418547;
    --primary-xlight: #23382b;
    --accent: #eebd4f;
    --accent-light: #3d3010;
    --danger: #d9544a;
    --danger-light: #3d1210;

    --bg: #1b2820;
    --surface: #23382b;
    --text: #e4f3e4;
    --text-secondary: #9aa39c;
    --text-light: #5d6b62;
    --border: #2f4437;
    --border-strong: #3c5142;

    --shadow: 0 10px 30px rgba(0, 0, 0, 0.3);
    --shadow-lg: 0 24px 60px rgba(0, 0, 0, 0.45);
  }
}

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

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  font-family: var(--font);
  background: var(--bg);
  color: var(--text);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

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

a {
  color: var(--primary-dark);
  text-decoration: none;
}

a:hover {
  text-decoration: underline;
}

h1,
h2,
h3 {
  line-height: 1.15;
  margin: 0 0 0.4em;
  letter-spacing: -0.02em;
}

h1 {
  font-size: clamp(2.1rem, 5vw, 3.4rem);
  font-weight: 800;
}

h2 {
  font-size: clamp(1.6rem, 3.5vw, 2.4rem);
  font-weight: 800;
}

h3 {
  font-size: 1.2rem;
  font-weight: 700;
}

p {
  margin: 0 0 1rem;
}

.container {
  width: 100%;
  max-width: var(--maxw);
  margin: 0 auto;
  padding: 0 24px;
}

.muted {
  color: var(--text-secondary);
}

/* ---- Buttons ---------------------------------------------------------- */

.btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 13px 24px;
  border-radius: 999px;
  font-weight: 700;
  font-size: 1rem;
  font-family: var(--font);
  cursor: pointer;
  border: 2px solid transparent;
  transition: transform 0.15s ease, box-shadow 0.15s ease, background 0.15s ease;
}

.btn:hover {
  text-decoration: none;
  transform: translateY(-2px);
}

.btn-primary {
  /* Vert foncé fixe (même teinte que --primary) : le blanc dessus passe le
     contraste WCAG AA dans les deux thèmes, contrairement à --primary. */
  background: #2f7038;
  color: #fff;
  box-shadow: 0 8px 20px rgba(93, 174, 99, 0.35);
}

.btn-primary:hover {
  background: #255a2d;
}

.btn-ghost {
  background: transparent;
  color: var(--text);
  border-color: var(--border-strong);
}

.btn-ghost:hover {
  border-color: var(--primary);
  color: var(--primary-dark);
}

/* ---- Header ----------------------------------------------------------- */

.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: color-mix(in srgb, var(--bg) 85%, transparent);
  backdrop-filter: saturate(180%) blur(12px);
  border-bottom: 1px solid var(--border);
}

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

.brand {
  display: flex;
  align-items: center;
  gap: 10px;
  font-weight: 800;
  font-size: 1.25rem;
  color: var(--text);
}

.brand:hover {
  text-decoration: none;
}

.brand img {
  width: 34px;
  height: 34px;
  border-radius: 9px;
}

.nav-links {
  display: flex;
  align-items: center;
  gap: 28px;
}

.nav-links a {
  color: var(--text-secondary);
  font-weight: 600;
}

.nav-links a:hover {
  color: var(--primary-dark);
}

@media (max-width: 720px) {

  /* Masque les liens texte de navigation, mais garde le bouton et le
     sélecteur de langue (enfant indirect via .lang-switch). */
  .nav-links>a:not(.btn) {
    display: none;
  }
}

/* Sélecteur de langue */
.lang-switch {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-weight: 700;
  font-size: 0.9rem;
}

.lang-switch a {
  color: var(--text-light);
  padding: 2px 4px;
  border-radius: 6px;
}

.lang-switch a:hover {
  color: var(--primary-dark);
  text-decoration: none;
}

.lang-switch a.active {
  color: var(--primary-dark);
  background: var(--primary-xlight);
}

.lang-switch .sep {
  color: var(--border-strong);
  font-weight: 400;
}

/* ---- Hero ------------------------------------------------------------- */

.hero {
  position: relative;
  overflow: hidden;
  padding: clamp(48px, 8vw, 96px) 0;
}

.hero::before {
  content: "";
  position: absolute;
  inset: 0;
  background: radial-gradient(1000px 500px at 80% -10%,
      var(--primary-xlight),
      transparent 60%),
    radial-gradient(700px 400px at -10% 110%, var(--accent-light), transparent 55%);
  opacity: 0.9;
  z-index: -1;
}

.hero-grid {
  display: grid;
  grid-template-columns: 1.05fr 0.95fr;
  gap: clamp(32px, 5vw, 64px);
  align-items: center;
}

@media (max-width: 860px) {
  .hero-grid {
    grid-template-columns: 1fr;
    text-align: center;
  }
}

.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: var(--primary-xlight);
  color: var(--primary-dark);
  font-weight: 700;
  font-size: 0.85rem;
  padding: 6px 14px;
  border-radius: 999px;
  margin-bottom: 20px;
}

.hero p.lead {
  font-size: 1.2rem;
  color: var(--text-secondary);
  max-width: 30em;
}

@media (max-width: 860px) {
  .hero p.lead {
    margin-left: auto;
    margin-right: auto;
  }
}

.hero-cta {
  display: flex;
  flex-wrap: wrap;
  gap: 14px;
  margin-top: 28px;
}

@media (max-width: 860px) {
  .hero-cta {
    justify-content: center;
  }
}

/* Store badges (placeholders) */
.store-badges {
  display: flex;
  flex-wrap: wrap;
  gap: 14px;
  margin-top: 28px;
}

@media (max-width: 860px) {
  .store-badges {
    justify-content: center;
  }
}

.store-badge {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  padding: 12px 20px;
  border-radius: var(--radius-sm);
  background: var(--text);
  color: #fff;
  min-width: 200px;
  transition: transform 0.15s ease, opacity 0.15s ease;
}

.store-badge:hover {
  text-decoration: none;
  transform: translateY(-2px);
}

.store-badge[aria-disabled="true"] {
  opacity: 0.5;
  cursor: not-allowed;
  pointer-events: none;
}

.store-badge svg {
  width: 26px;
  height: 26px;
  flex-shrink: 0;
  fill: #fff;
}

.store-badge .small {
  font-size: 0.7rem;
  line-height: 1;
  opacity: 0.85;
}

.store-badge .big {
  font-size: 1.05rem;
  font-weight: 800;
  line-height: 1.2;
}

@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) .store-badge {
    background: var(--surface);
    border: 1px solid var(--border-strong);
  }
}

/* Phone mockup (screenshot placeholder) */
.phone-wrap {
  display: flex;
  justify-content: center;
}

.phone {
  position: relative;
  width: min(280px, 78vw);
  aspect-ratio: 9 / 19;
  background: var(--surface);
  border: 10px solid var(--text);
  border-radius: 44px;
  box-shadow: var(--shadow-lg);
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: center;
}

.phone::before {
  content: "";
  position: absolute;
  top: 14px;
  left: 50%;
  transform: translateX(-50%);
  width: 42%;
  height: 22px;
  background: var(--text);
  border-radius: 0 0 16px 16px;
  z-index: 2;
}

/* ---- Real screenshots ------------------------------------------------- */

.phone>img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

/* Screenshots already include the device status bar, so drop the fake notch. */
.phone:has(> img)::before {
  display: none;
}

/* ---- Screenshot placeholders ----------------------------------------- */

.placeholder {
  width: 100%;
  height: 100%;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 10px;
  text-align: center;
  padding: 24px;
  color: var(--text-light);
  background: repeating-linear-gradient(45deg,
      var(--primary-xlight),
      var(--primary-xlight) 14px,
      transparent 14px,
      transparent 28px);
  border: 2px dashed var(--border-strong);
  font-weight: 700;
  font-size: 0.9rem;
}

.placeholder svg {
  width: 40px;
  height: 40px;
  fill: var(--primary);
  opacity: 0.7;
}

/* ---- Sections --------------------------------------------------------- */

section {
  padding: clamp(56px, 9vw, 96px) 0;
}

.section-head {
  max-width: 40em;
  margin: 0 auto clamp(36px, 6vw, 56px);
  text-align: center;
}

.section-head p {
  font-size: 1.1rem;
  color: var(--text-secondary);
}

/* Features grid */
.features {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 22px;
}

.feature-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 28px;
  box-shadow: var(--shadow);
  transition: transform 0.18s ease, box-shadow 0.18s ease;
}

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

.feature-icon {
  width: 52px;
  height: 52px;
  border-radius: 14px;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 18px;
  background: var(--primary-xlight);
}

.feature-icon svg {
  width: 28px;
  height: 28px;
  fill: var(--primary-dark);
}

.feature-icon.accent {
  background: var(--accent-light);
}

.feature-icon.accent svg {
  fill: #b8860b;
}

.feature-icon.danger {
  background: var(--danger-light);
}

.feature-icon.danger svg {
  fill: var(--danger);
}

.feature-card h3 {
  margin-bottom: 8px;
}

.feature-card p {
  color: var(--text-secondary);
  margin: 0;
}

/* Steps */
.steps {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 28px;
  counter-reset: step;
}

.step {
  position: relative;
  padding-top: 8px;
}

.step .num {
  width: 44px;
  height: 44px;
  border-radius: 50%;
  background: var(--primary);
  color: #fff;
  font-weight: 800;
  font-size: 1.2rem;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 16px;
  box-shadow: 0 8px 18px rgba(93, 174, 99, 0.35);
}

.step h3 {
  margin-bottom: 6px;
}

.step p {
  color: var(--text-secondary);
  margin: 0;
}

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

.gallery .phone {
  width: 100%;
  margin: 0 auto;
}

/* CTA band */
.cta-band {
  background: linear-gradient(135deg, var(--primary), var(--primary-dark));
  border-radius: var(--radius);
  padding: clamp(40px, 6vw, 64px);
  text-align: center;
  color: #fff;
  box-shadow: var(--shadow-lg);
}

.cta-band h2 {
  color: #fff;
}

.cta-band p {
  color: rgba(255, 255, 255, 0.9);
  font-size: 1.1rem;
  max-width: 34em;
  margin: 0 auto 28px;
}

.cta-band .store-badges {
  justify-content: center;
}

.cta-band .store-badge {
  background: #fff;
  color: var(--text);
}

.cta-band .store-badge svg {
  fill: var(--text);
}

/* ---- Footer ----------------------------------------------------------- */

.site-footer {
  background: var(--surface);
  border-top: 1px solid var(--border);
  padding: 48px 0 32px;
}

.footer-grid {
  display: flex;
  flex-wrap: wrap;
  gap: 24px;
  justify-content: space-between;
  align-items: flex-start;
}

.footer-links {
  display: flex;
  flex-wrap: wrap;
  gap: 24px;
}

.footer-links a {
  color: var(--text-secondary);
  font-weight: 600;
}

.footer-bottom {
  margin-top: 32px;
  padding-top: 20px;
  border-top: 1px solid var(--border);
  font-size: 0.88rem;
  color: var(--text-light);
}

/* ---- Legal / content pages ------------------------------------------- */

.legal {
  padding: clamp(48px, 7vw, 80px) 0;
}

.legal .container {
  max-width: 760px;
}

.legal h1 {
  font-size: clamp(1.9rem, 4vw, 2.6rem);
}

.legal .updated {
  color: var(--text-light);
  font-weight: 600;
  margin-bottom: 2.5rem;
}

.legal h2 {
  font-size: 1.4rem;
  margin-top: 2.5rem;
  padding-top: 1.5rem;
  border-top: 1px solid var(--border);
}

.legal h2:first-of-type {
  border-top: none;
  padding-top: 0;
}

.legal ul {
  padding-left: 1.2em;
}

.legal li {
  margin-bottom: 0.5em;
  color: var(--text-secondary);
}

.legal a {
  color: var(--primary-dark);
  font-weight: 600;
}

.callout {
  background: var(--primary-xlight);
  border: 1px solid var(--primary-light);
  border-radius: var(--radius-sm);
  padding: 18px 22px;
  margin: 1.5rem 0;
}

.callout p:last-child {
  margin-bottom: 0;
}

.back-link {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-weight: 700;
  margin-bottom: 2rem;
}
