/* =========================================================================
   Fotomeal — Feuille de style unique
   Style « Fresh & Clean » : émeraude, Outfit, coins arrondis, ombres douces.
   Aucune dépendance : tokens en variables CSS, composants écrits à la main.
   Voir .vault/decisions/ADR-0002 pour la justification des tokens.
   ========================================================================= */

/* ---- 1. Tokens ---------------------------------------------------------- */
:root {
  /* Palette (verrouillée par le brief + ADR-0002) */
  --emerald:      #10B981; /* actions clés, accents, CTA */
  --emerald-50:   #ECFDF5; /* fonds de section */
  --emerald-100:  #D1FAE5; /* badges, containers */
  --emerald-900:  #064E3B; /* texte sur fond clair coloré */
  --neutral-100:  #F3F4F6; /* séparateurs, surfaces alternées */
  --ink:          #111827; /* texte principal */
  --ink-soft:     #4B5563; /* texte secondaire (contraste AA sur blanc) */
  --white:        #FFFFFF;

  /* Dérivés utilitaires */
  --emerald-600:  #059669; /* survol / dégradés */
  --emerald-700:  #047857; /* eyebrows, liens sur blanc (AA) */
  --emerald-800:  #065F46;
  --cta-ink:      #043027; /* texte sur bouton émeraude — contraste ~7:1 (AA) */
  --border:       #E9EDEB; /* filets discrets */
  --border-strong:#D8E0DC;

  /* Rayons — « coins très arrondis » */
  --r-sm: 12px;
  --r-md: 18px;
  --r-lg: 28px;
  --r-pill: 999px;

  /* Ombres douces (teintées encre / émeraude) */
  --shadow-sm: 0 2px 10px rgba(17, 24, 39, .04);
  --shadow-md: 0 14px 34px rgba(17, 24, 39, .07);
  --shadow-lg: 0 30px 70px rgba(6, 78, 59, .13);

  /* Layout */
  --container: 1120px;
  --gutter: clamp(20px, 5vw, 24px);
  --section-y: clamp(64px, 10vw, 112px);

  /* Typo */
  --font: "Outfit", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
}

/* ---- 2. Reset léger ----------------------------------------------------- */
*, *::before, *::after { box-sizing: border-box; }
* { margin: 0; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
body {
  font-family: var(--font);
  font-weight: 400;
  color: var(--ink);
  background: var(--white);
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}
img, svg { display: block; max-width: 100%; }
img { height: auto; }
a { color: inherit; text-decoration: none; }
button { font: inherit; cursor: pointer; border: 0; background: none; color: inherit; }
ul { list-style: none; padding: 0; }
h1, h2, h3 { line-height: 1.1; letter-spacing: -0.02em; font-weight: 700; }
:focus-visible {
  outline: 3px solid rgba(16, 185, 129, .55);
  outline-offset: 3px;
  border-radius: 6px;
}

/* ---- 3. Layout & utilitaires ------------------------------------------- */
.container {
  width: 100%;
  max-width: var(--container);
  margin-inline: auto;
  padding-inline: var(--gutter);
}
.section { padding-block: var(--section-y); }
/* Décale les ancres sous le header sticky (72px) pour ne pas masquer les titres */
section[id] { scroll-margin-top: 88px; }
.section--tint  { background: var(--emerald-50); }
.section--muted { background: var(--neutral-100); }

.skip-link {
  position: absolute;
  left: 12px; top: -60px;
  background: var(--ink); color: var(--white);
  padding: 10px 16px; border-radius: var(--r-sm);
  z-index: 100; transition: top .2s ease;
}
.skip-link:focus { top: 12px; }

.visually-hidden {
  position: absolute !important; width: 1px; height: 1px;
  padding: 0; margin: -1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0;
}

.eyebrow {
  display: inline-flex; align-items: center; gap: 8px;
  font-size: .8rem; font-weight: 600; letter-spacing: .09em;
  text-transform: uppercase; color: var(--emerald-700);
  margin-bottom: 16px;
}
.eyebrow::before {
  content: ""; width: 7px; height: 7px; border-radius: 50%;
  background: var(--emerald); box-shadow: 0 0 0 4px var(--emerald-100);
}

.section-head { max-width: 640px; margin-bottom: clamp(36px, 6vw, 56px); }
.section-head--center { margin-inline: auto; text-align: center; }
.section-title { font-size: clamp(1.9rem, 4vw, 2.75rem); }
.section-intro {
  margin-top: 16px; font-size: clamp(1.05rem, 2vw, 1.2rem);
  color: var(--ink-soft);
}

/* ---- 4. Boutons --------------------------------------------------------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 10px;
  padding: 15px 26px; border-radius: var(--r-pill);
  font-weight: 600; font-size: 1rem; line-height: 1;
  transition: transform .18s ease, box-shadow .18s ease, background .18s ease, border-color .18s ease, color .18s ease;
  white-space: nowrap;
}
.btn svg { flex: none; }
.btn-primary {
  background: var(--emerald); color: var(--cta-ink); /* AA ~7:1, cf. ADR-0003 */
  box-shadow: 0 10px 24px rgba(16, 185, 129, .32);
}
.btn-primary:hover { background: var(--emerald-600); color: var(--white); transform: translateY(-2px); box-shadow: 0 16px 30px rgba(16, 185, 129, .38); }
.btn-secondary {
  background: var(--white); color: var(--ink);
  border: 1.5px solid var(--border-strong);
}
.btn-secondary:hover { border-color: var(--emerald); color: var(--emerald-700); transform: translateY(-2px); }
.btn-ghost { padding: 12px 18px; color: var(--ink); font-weight: 500; }
.btn-ghost:hover { color: var(--emerald-700); }
.btn-block { width: 100%; }
.btn-lg { padding: 17px 30px; font-size: 1.05rem; }

.btn-store { padding-block: 12px; text-align: left; gap: 12px; }
.btn-store .store-kicker { display: block; font-size: .72rem; font-weight: 500; letter-spacing: .02em; opacity: .85; line-height: 1.2; }
.btn-store .store-name { display: block; font-size: 1.1rem; font-weight: 700; line-height: 1.1; }
.btn-store small { display: flex; flex-direction: column; }

/* ---- 5. Header / navigation -------------------------------------------- */
.site-header {
  position: sticky; top: 0; z-index: 50;
  background: rgba(255, 255, 255, .82);
  backdrop-filter: saturate(180%) blur(14px);
  -webkit-backdrop-filter: saturate(180%) blur(14px);
  border-bottom: 1px solid transparent;
  transition: border-color .25s ease, box-shadow .25s ease;
}
.site-header.is-scrolled { border-color: var(--border); box-shadow: var(--shadow-sm); }
.nav { display: flex; align-items: center; gap: 24px; height: 72px; }
.brand { display: inline-flex; align-items: center; gap: 10px; font-weight: 700; font-size: 1.2rem; letter-spacing: -.02em; }
.brand-mark {
  width: 34px; height: 34px; border-radius: 10px;
  background: linear-gradient(135deg, var(--emerald), var(--emerald-600));
  display: grid; place-items: center; color: var(--white);
  box-shadow: 0 6px 14px rgba(16, 185, 129, .35);
}
.nav-list { display: flex; align-items: center; gap: 4px; margin-left: auto; }
.nav-list a { padding: 10px 14px; border-radius: var(--r-sm); font-weight: 500; color: var(--ink-soft); transition: color .15s ease, background .15s ease; }
.nav-list a:hover { color: var(--ink); background: var(--emerald-50); }
.nav-cta { display: inline-flex; align-items: center; gap: 12px; }
.nav-toggle { display: none; width: 44px; height: 44px; border-radius: var(--r-sm); margin-left: auto; }
.nav-toggle span, .nav-toggle span::before, .nav-toggle span::after {
  content: ""; display: block; width: 20px; height: 2px; border-radius: 2px; background: var(--ink);
  margin-inline: auto; transition: transform .2s ease, opacity .2s ease;
}
.nav-toggle span::before { transform: translateY(-6px); }
.nav-toggle span::after  { transform: translateY(4px); }

/* ---- 6. Hero ------------------------------------------------------------ */
.hero { position: relative; overflow: hidden; padding-top: clamp(40px, 7vw, 72px); padding-bottom: var(--section-y); }
.hero::before {
  content: ""; position: absolute; inset: 0; z-index: -1;
  background:
    radial-gradient(60% 55% at 82% 8%, rgba(16, 185, 129, .14), transparent 60%),
    radial-gradient(50% 45% at 8% 92%, rgba(16, 185, 129, .10), transparent 60%);
}
.hero-grid { display: grid; grid-template-columns: 1.05fr .95fr; gap: clamp(32px, 5vw, 64px); align-items: center; }
.hero-title { font-size: clamp(2.35rem, 5.6vw, 3.7rem); }
.hero-title .accent { color: var(--emerald-700); }
.hero-lead { margin-top: 22px; font-size: clamp(1.1rem, 2.2vw, 1.3rem); color: var(--ink-soft); max-width: 34ch; }
.hero-actions { display: flex; flex-wrap: wrap; gap: 14px; margin-top: 32px; }
.hero-trust { display: flex; flex-wrap: wrap; gap: 10px 22px; margin-top: 26px; color: var(--ink-soft); font-size: .93rem; }
.hero-trust li { display: inline-flex; align-items: center; gap: 8px; }
.hero-trust svg { color: var(--emerald); }

/* Mockup téléphone + carte de scan (élément signature) */
.hero-visual { position: relative; display: grid; place-items: center; }
.phone {
  position: relative; width: min(300px, 78vw); aspect-ratio: 9 / 19;
  background: var(--ink); border-radius: 46px; padding: 12px;
  box-shadow: var(--shadow-lg); rotate: 2deg;
}
.phone-screen { position: relative; height: 100%; border-radius: 36px; overflow: hidden; background: var(--emerald-50); display: flex; flex-direction: column; }
.phone-photo { position: relative; flex: 1 1 58%; }
.scan-frame { position: absolute; inset: 16% 14% auto 14%; aspect-ratio: 1; border: 3px solid rgba(255,255,255,.9); border-radius: 22px; box-shadow: 0 0 0 3000px rgba(4, 48, 39, .12); }
.scan-frame::after { content: ""; position: absolute; left: 8%; right: 8%; top: 50%; height: 2px; background: var(--emerald); box-shadow: 0 0 12px 2px rgba(16,185,129,.8); }

/* Carte de résultat — le motif signature réutilisé ailleurs */
.scan-card {
  position: absolute; left: 14px; right: 14px; bottom: 14px;
  background: var(--white); border-radius: 22px; padding: 16px 16px 18px;
  box-shadow: 0 18px 40px rgba(4, 48, 39, .22);
}
.scan-card__top { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.scan-card__dish { font-weight: 600; font-size: .95rem; }
.scan-card__kcal { font-weight: 700; font-size: 1.5rem; font-variant-numeric: tabular-nums; letter-spacing: -.02em; }
.scan-card__kcal span { font-size: .8rem; font-weight: 500; color: var(--ink-soft); }
.macro { margin-top: 12px; }
.macro__row { display: flex; justify-content: space-between; font-size: .78rem; font-weight: 500; margin-bottom: 5px; color: var(--ink-soft); }
.macro__row b { color: var(--ink); font-variant-numeric: tabular-nums; }
.macro__track { height: 7px; border-radius: 99px; background: var(--neutral-100); overflow: hidden; }
.macro__fill { height: 100%; border-radius: 99px; background: linear-gradient(90deg, var(--emerald), var(--emerald-600)); }
.confidence {
  display: inline-flex; align-items: center; gap: 6px; margin-top: 14px;
  background: var(--emerald-100); color: var(--emerald-900);
  font-size: .74rem; font-weight: 600; padding: 5px 10px; border-radius: var(--r-pill);
}
.confidence::before { content: ""; width: 6px; height: 6px; border-radius: 50%; background: var(--emerald); }
.badge-float {
  position: absolute; top: 6%; right: -4%;
  background: var(--white); border-radius: var(--r-md); padding: 10px 14px;
  box-shadow: var(--shadow-md); font-size: .8rem; font-weight: 600;
  display: flex; align-items: center; gap: 8px;
}
.badge-float svg { color: var(--emerald); }

/* ---- 7. Placeholders images -------------------------------------------- */
.ph {
  position: relative; display: grid; place-content: center; gap: 8px;
  background:
    linear-gradient(135deg, var(--emerald-50), var(--emerald-100)),
    repeating-linear-gradient(45deg, rgba(255,255,255,.4) 0 10px, transparent 10px 20px);
  color: var(--emerald-800); text-align: center; overflow: hidden;
}
.ph svg { margin-inline: auto; opacity: .7; }
.ph small { font-size: .72rem; font-weight: 600; letter-spacing: .04em; text-transform: uppercase; opacity: .85; }
.ph--photo { width: 100%; height: 100%; }

/* ---- 8. « Comment ça marche » ------------------------------------------ */
.steps { display: grid; grid-template-columns: repeat(3, 1fr); gap: 22px; counter-reset: step; }
.step {
  position: relative; background: var(--white); border: 1px solid var(--border);
  border-radius: var(--r-lg); padding: 28px; box-shadow: var(--shadow-sm);
}
.step__num { font-size: .9rem; font-weight: 700; color: var(--emerald); font-variant-numeric: tabular-nums; letter-spacing: .04em; }
.step__illu { height: 150px; border-radius: var(--r-md); margin: 14px 0 20px; }
.step__icon { width: 46px; height: 46px; border-radius: 12px; display: grid; place-items: center; background: var(--emerald-50); color: var(--emerald-700); margin-bottom: 14px; }
.step h3 { font-size: 1.2rem; }
.step p { margin-top: 8px; color: var(--ink-soft); }
.step:not(:last-child)::after {
  content: ""; position: absolute; top: 50%; right: -14px; width: 12px; height: 12px;
  border-top: 2px solid var(--border-strong); border-right: 2px solid var(--border-strong);
  transform: translateY(-50%) rotate(45deg);
}

/* ---- 9. « Pourquoi » : axes + comparatif ------------------------------- */
.pillars { display: grid; grid-template-columns: repeat(3, 1fr); gap: 22px; margin-bottom: clamp(40px, 6vw, 64px); }
.pillar { background: var(--white); border: 1px solid var(--border); border-radius: var(--r-lg); padding: 30px; box-shadow: var(--shadow-sm); transition: transform .2s ease, box-shadow .2s ease; }
.pillar:hover { transform: translateY(-4px); box-shadow: var(--shadow-md); }
.pillar__icon { width: 52px; height: 52px; border-radius: 14px; display: grid; place-items: center; background: var(--emerald-50); color: var(--emerald-700); margin-bottom: 18px; }
.pillar h3 { font-size: 1.3rem; }
.pillar p { margin-top: 10px; color: var(--ink-soft); }
.pillar__proof { display: inline-flex; align-items: center; gap: 8px; margin-top: 16px; font-size: .9rem; font-weight: 600; color: var(--emerald-800); background: var(--emerald-50); padding: 7px 12px; border-radius: var(--r-pill); }

.compare { background: var(--white); border: 1px solid var(--border); border-radius: var(--r-lg); box-shadow: var(--shadow-md); overflow: hidden; }
.compare__scroll { overflow-x: auto; }
table.compare-table { width: 100%; border-collapse: collapse; min-width: 520px; }
.compare-table th, .compare-table td { padding: 18px 20px; text-align: left; border-bottom: 1px solid var(--border); }
.compare-table thead th { font-size: .95rem; }
.compare-table thead .col-snapcal { color: var(--emerald-800); }
.compare-table tbody th { font-weight: 500; color: var(--ink-soft); }
.compare-table .col-snapcal { background: var(--emerald-50); font-weight: 600; }
.compare-table tr:last-child td, .compare-table tr:last-child th { border-bottom: 0; }
.compare-table .yes { color: var(--emerald-700); font-weight: 600; }
.compare-note { margin-top: 14px; font-size: .85rem; color: var(--ink-soft); }
.cell-ico { display: inline-flex; align-items: center; gap: 8px; }

/* ---- 10. Fonctionnalités ----------------------------------------------- */
.features { display: grid; grid-template-columns: repeat(2, 1fr); gap: 20px; }
.feature { display: flex; gap: 18px; background: var(--white); border: 1px solid var(--border); border-radius: var(--r-lg); padding: 26px; box-shadow: var(--shadow-sm); transition: transform .2s ease, box-shadow .2s ease; }
.feature:hover { transform: translateY(-3px); box-shadow: var(--shadow-md); }
.feature__icon { flex: none; width: 50px; height: 50px; border-radius: 14px; display: grid; place-items: center; background: var(--emerald-50); color: var(--emerald-700); }
.feature h3 { font-size: 1.15rem; }
.feature p { margin-top: 6px; color: var(--ink-soft); font-size: .97rem; }
.features-note { margin-top: 28px; text-align: center; color: var(--ink-soft); font-weight: 500; }

/* ---- 11. Prix ----------------------------------------------------------- */
.plans { display: grid; grid-template-columns: repeat(2, 1fr); gap: 24px; align-items: stretch; }
.plan { position: relative; background: var(--white); border: 1px solid var(--border); border-radius: var(--r-lg); padding: 34px; box-shadow: var(--shadow-sm); display: flex; flex-direction: column; }
.plan--featured { border: 1.5px solid var(--emerald); box-shadow: var(--shadow-md); }
.plan__tag { position: absolute; top: 20px; right: 22px; font-size: .72rem; font-weight: 700; letter-spacing: .06em; text-transform: uppercase; color: var(--emerald-800); background: var(--emerald-100); padding: 6px 12px; border-radius: var(--r-pill); }
.plan__name { font-size: 1.15rem; font-weight: 600; }
.plan__price { margin-top: 14px; font-size: 2.6rem; font-weight: 700; font-variant-numeric: tabular-nums; letter-spacing: -.03em; }
.plan__price span { font-size: 1rem; font-weight: 500; color: var(--ink-soft); }
.plan__sub { color: var(--ink-soft); margin-top: 4px; min-height: 1.4em; }
.plan__list { margin: 24px 0 28px; display: grid; gap: 12px; }
.plan__list li { display: flex; align-items: flex-start; gap: 10px; }
.plan__list svg { flex: none; margin-top: 3px; color: var(--emerald); }
.plan .btn { margin-top: auto; }
.plan__note { margin-top: 14px; font-size: .82rem; color: var(--ink-soft); text-align: center; }
.pledge { display: flex; flex-wrap: wrap; justify-content: center; gap: 12px 28px; margin-top: 36px; }
.pledge li { display: inline-flex; align-items: center; gap: 9px; font-weight: 500; color: var(--emerald-900); }
.pledge svg { color: var(--emerald); }

/* ---- 12. FAQ ------------------------------------------------------------ */
.faq { max-width: 780px; margin-inline: auto; display: grid; gap: 14px; }
.faq details { background: var(--white); border: 1px solid var(--border); border-radius: var(--r-md); padding: 4px 22px; box-shadow: var(--shadow-sm); }
.faq summary { display: flex; align-items: center; justify-content: space-between; gap: 16px; padding: 18px 0; font-weight: 600; font-size: 1.05rem; list-style: none; cursor: pointer; }
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after { content: ""; flex: none; width: 12px; height: 12px; border-right: 2px solid var(--emerald-700); border-bottom: 2px solid var(--emerald-700); transform: rotate(45deg); transition: transform .2s ease; }
.faq details[open] summary::after { transform: rotate(-135deg); }
.faq p { padding: 0 0 20px; color: var(--ink-soft); }

/* ---- 13. CTA final ------------------------------------------------------ */
.final-cta { position: relative; overflow: hidden; background: linear-gradient(135deg, var(--emerald-900), var(--emerald-800)); color: var(--white); border-radius: var(--r-lg); padding: clamp(40px, 7vw, 72px); text-align: center; }
.final-cta::after { content: ""; position: absolute; inset: 0; background: radial-gradient(50% 80% at 80% 0%, rgba(16,185,129,.35), transparent 60%); pointer-events: none; }
.final-cta > * { position: relative; }
.final-cta h2 { font-size: clamp(1.8rem, 4vw, 2.6rem); }
.final-cta p { margin: 16px auto 0; max-width: 46ch; color: rgba(255,255,255,.85); font-size: 1.1rem; }
.final-cta .btn-primary { background: var(--white); color: var(--emerald-900); box-shadow: 0 14px 30px rgba(0,0,0,.2); margin-top: 30px; }
.final-cta .btn-primary:hover { background: var(--emerald-50); color: var(--emerald-900); }
.final-cta small { display: block; margin-top: 16px; color: rgba(255,255,255,.75); font-size: .9rem; }

/* ---- 14. Footer --------------------------------------------------------- */
.site-footer { padding-block: clamp(48px, 7vw, 72px) 40px; border-top: 1px solid var(--border); }
.footer-grid { display: grid; grid-template-columns: 1.4fr 1fr 1fr; gap: 40px; }
.footer-about p { margin-top: 14px; color: var(--ink-soft); max-width: 34ch; }
.footer-col h4 { font-size: .8rem; text-transform: uppercase; letter-spacing: .08em; color: var(--ink-soft); margin-bottom: 14px; }
.footer-col li { margin-bottom: 10px; }
.footer-col a { color: var(--ink); font-weight: 500; }
.footer-col a:hover { color: var(--emerald-700); }
.footer-bottom { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 12px; margin-top: 44px; padding-top: 24px; border-top: 1px solid var(--border); color: var(--ink-soft); font-size: .9rem; }

/* ---- 15. Animations d'apparition --------------------------------------- */
.reveal { opacity: 0; transform: translateY(18px); transition: opacity .6s ease, transform .6s ease; }
.reveal.is-visible { opacity: 1; transform: none; }

/* ---- 16. Responsive ----------------------------------------------------- */
@media (max-width: 900px) {
  .hero-grid { grid-template-columns: 1fr; }
  .hero-visual { order: -1; }
  .hero-lead { max-width: none; }
  .steps, .pillars { grid-template-columns: 1fr; }
  .step:not(:last-child)::after { display: none; }
  .features, .plans { grid-template-columns: 1fr; }
  .footer-grid { grid-template-columns: 1fr 1fr; }
  .footer-about { grid-column: 1 / -1; }

  .nav-list, .nav .nav-cta { display: none; }
  .nav-toggle { display: grid; place-items: center; }
  .nav[data-open="true"] .nav-list {
    display: flex; flex-direction: column; align-items: stretch;
    position: absolute; left: var(--gutter); right: var(--gutter); top: 72px;
    background: var(--white); border: 1px solid var(--border); border-radius: var(--r-lg);
    padding: 12px; gap: 4px; box-shadow: var(--shadow-md);
  }
  .nav[data-open="true"] .nav-list a { padding: 12px 14px; }
  .nav[data-open="true"] .nav-cta { display: flex; margin-top: 6px; }
  .nav[data-open="true"] .nav-toggle span { background: transparent; }
  .nav[data-open="true"] .nav-toggle span::before { transform: rotate(45deg); }
  .nav[data-open="true"] .nav-toggle span::after  { transform: rotate(-45deg); }
}
@media (max-width: 560px) {
  .footer-grid { grid-template-columns: 1fr; }
  .btn { width: 100%; }
  .hero-actions { flex-direction: column; }
}

/* ---- 17. Accessibilité : mouvement réduit ------------------------------ */
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .reveal { opacity: 1; transform: none; transition: none; }
  * { animation-duration: .001ms !important; transition-duration: .001ms !important; }
}
