/* FoodEye — landing de pré-lancement
   Charte « proto Mathéo v5 » (marque/FOODEYE.md) : blanc dominant, un seul
   vert, Manrope pour le texte, DM Mono pour tout chiffre, ombres douces
   teintées, jamais de noir pur. Mobile d'abord : 390 × 844 dans le navigateur
   intégré d'Instagram. */

@font-face { font-family: "Manrope"; font-weight: 500; font-display: swap; src: url("assets/fonts/manrope-500.woff2") format("woff2"); }
@font-face { font-family: "Manrope"; font-weight: 700; font-display: swap; src: url("assets/fonts/manrope-700.woff2") format("woff2"); }
@font-face { font-family: "Manrope"; font-weight: 800; font-display: swap; src: url("assets/fonts/manrope-800.woff2") format("woff2"); }
@font-face { font-family: "DM Mono"; font-weight: 400; font-display: swap; src: url("assets/fonts/dmmono-400.woff2") format("woff2"); }
@font-face { font-family: "DM Mono"; font-weight: 500; font-display: swap; src: url("assets/fonts/dmmono-500.woff2") format("woff2"); }

:root {
  --g: #0F9D68; --g2: #2ECC8A; --gd: #0B7A51; --gl: #E2F6EC; --gll: #F1FAF5;
  --ink: #0B1F17; --ink2: #566860; --ink3: #8A9891;
  --bd: #E3E9E5; --bd2: #CFD9D3; --sf: #F6F8F7; --sf2: #EEF2F0;
  --fond: #FFFFFF; --doux: #F3F9F5; --erreur: #DC2626;
  --menthe: #E2F6EC; --peche: #FFF0E4; --ciel: #E8F3FF; --lilas: #F0ECFB;
  --ease: cubic-bezier(.22, 1, .36, 1);
  --spring: cubic-bezier(.34, 1.56, .64, 1);
  --bounce: cubic-bezier(.2, 1.4, .4, 1);
  --texte: "Manrope", system-ui, -apple-system, "Segoe UI", sans-serif;
  --mono: "DM Mono", ui-monospace, "SF Mono", Menlo, monospace;
  --halo: 0 0 0 4px rgba(15, 157, 104, .12);
  --ombre-cta: 0 12px 28px -14px rgba(15, 157, 104, .7);
  --ombre-carte: 0 10px 24px -12px rgba(11, 31, 23, .25);
  --dots: radial-gradient(rgba(11, 31, 23, .08) 1px, transparent 1px);
}

* { box-sizing: border-box; }
html { color-scheme: light; -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
body {
  margin: 0; background: var(--fond); color: var(--ink);
  font: 500 16px/1.5 var(--texte);
  -webkit-font-smoothing: antialiased; text-rendering: optimizeLegibility;
  overflow-x: hidden;
}
img { max-width: 100%; height: auto; display: block; }
h1, h2, h3, p, ul, ol, figure { margin: 0; }
button, input { font: inherit; color: inherit; }
b, strong { font-weight: 700; }
[hidden] { display: none !important; } /* l'attribut hidden gagne toujours, même sur un élément stylé */

/* accès */
.sauter { position: absolute; left: -9999px; top: 8px; background: var(--ink); color: #fff; padding: 10px 14px; border-radius: 999px; z-index: 50; font-weight: 700; }
.sauter:focus { left: 12px; }
:focus-visible { outline: 3px solid rgba(15, 157, 104, .55); outline-offset: 2px; border-radius: 6px; }
.hp { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }

/* en-tête */
.haut { display: flex; align-items: center; justify-content: space-between; padding: 18px 20px 6px; }
.haut__marque { display: inline-flex; }
.phase {
  font: 500 11px/1 var(--mono); letter-spacing: .08em; text-transform: uppercase;
  color: var(--gd); background: var(--gl); padding: 8px 11px; border-radius: 999px; white-space: nowrap;
}

/* ─── HERO ────────────────────────────────────────────────────────────── */
.hero {
  position: relative; padding: 10px 20px 40px;
  background-image: var(--dots); background-size: 18px 18px;
}
.hero::after { /* fondu du motif vers le blanc en bas */
  content: ""; position: absolute; inset: auto 0 0; height: 120px;
  background: linear-gradient(to bottom, rgba(255, 255, 255, 0), #fff); pointer-events: none;
}
.hero__texte, .hero__alex { position: relative; z-index: 1; }
h1 { font-size: 31px; line-height: 1.12; font-weight: 800; letter-spacing: -.02em; max-width: 12ch; margin-top: 14px; }
.lead { margin-top: 12px; font-size: 16px; line-height: 1.5; color: var(--ink2); max-width: 36ch; }

/* Alex en grand, avec sa bulle : c'est elle qui accueille */
.hero__alex { display: block; }
.alex__grande { width: 150px; height: auto; margin-left: 4px; filter: drop-shadow(0 14px 22px rgba(11, 31, 23, .18)); animation: pop .7s var(--spring) .1s both; }
.alex__bulle {
  position: relative; margin-top: 10px; font-size: 15px; line-height: 1.45; color: var(--ink); text-align: left;
  background: #fff; border: 1.5px solid var(--bd); padding: 13px 15px; border-radius: 18px;
  box-shadow: var(--ombre-carte);
  animation: rise .5s var(--ease) .35s both;
}
.alex__bulle::after { /* la petite pointe, vers Alex */
  content: ""; position: absolute; left: 52px; top: -7px; width: 12px; height: 12px;
  background: #fff; border-left: 1.5px solid var(--bd); border-bottom: 1.5px solid var(--bd);
  transform: rotate(135deg); border-radius: 0 0 0 3px;
}
@keyframes pop { from { transform: scale(.6); opacity: 0; } to { transform: none; opacity: 1; } }
@keyframes rise { from { opacity: 0; transform: translateY(14px); } to { opacity: 1; transform: none; } }

/* formulaire */
.zone { margin-top: 18px; }
.etiquette { display: block; font-size: 13px; font-weight: 700; color: var(--ink2); margin-bottom: 6px; }
.champ {
  width: 100%; height: 56px; padding: 0 16px; border-radius: 16px;
  border: 1.5px solid var(--bd); background: #fff; font-size: 16px; /* ≥ 16 px : iOS ne zoome pas */
  transition: border-color .2s, box-shadow .2s;
}
.champ::placeholder { color: var(--ink3); }
.champ:focus { outline: none; border-color: var(--g); box-shadow: var(--halo); }
.cta {
  position: relative; display: flex; align-items: center; justify-content: center;
  width: 100%; height: 56px; margin-top: 10px; border: 0; border-radius: 999px;
  background: var(--g); color: #fff; font-weight: 700; font-size: 19px; cursor: pointer;
  box-shadow: var(--ombre-cta);
  transition: width .5s var(--ease), background .2s, transform .18s var(--spring);
  margin-inline: auto; overflow: hidden;
}
.cta:hover { background: var(--gd); }
.cta:active { transform: scale(.975); }
.cta:disabled { cursor: default; }
.cta__lbl { transition: opacity .2s; }
.cta__spin {
  position: absolute; width: 22px; height: 22px; border-radius: 999px;
  border: 3px solid rgba(255, 255, 255, .35); border-top-color: #fff; opacity: 0;
}
.cta__check { position: absolute; width: 26px; height: 26px; fill: none; stroke: var(--ink); stroke-width: 3; stroke-linecap: round; stroke-linejoin: round; stroke-dasharray: 30; stroke-dashoffset: 30; opacity: 0; }
/* la métamorphose de la charte : pill → cercle + spinner → coche sur vert succès */
.cta.is-load { width: 56px; box-shadow: none; }
.cta.is-load .cta__lbl { opacity: 0; }
.cta.is-load .cta__spin { opacity: 1; animation: rot .9s linear infinite; }
.cta.is-ok { background: var(--g2); }
.cta.is-ok .cta__spin { opacity: 0; animation: none; }
.cta.is-ok .cta__check { opacity: 1; animation: draw .4s var(--ease) forwards; }
@keyframes rot { to { transform: rotate(360deg); } }
@keyframes draw { to { stroke-dashoffset: 0; } }

.erreur { margin-top: 8px; font-size: 14px; font-weight: 600; color: var(--erreur); }
.erreur:empty { display: none; }
.consent { display: flex; gap: 8px; align-items: flex-start; margin-top: 10px; font-size: 13px; line-height: 1.4; color: var(--ink2); }
.consent svg { width: 16px; height: 16px; flex: none; margin-top: 2px; fill: none; stroke: var(--g); stroke-width: 2; stroke-linejoin: round; }
.noscript { margin-top: 10px; font-size: 13px; color: var(--ink2); }
.a-completer { font: 500 12px/1.3 var(--mono); color: var(--gd); background: var(--gl); padding: 2px 6px; border-radius: 6px; }

.succes {
  border: 1.5px solid var(--g); background: var(--gll); border-radius: 20px;
  padding: 22px 20px; text-align: center; outline: none;
  animation: pop .7s var(--spring);
}
.succes img { width: 104px; height: auto; margin: 0 auto 10px; }
.succes h2 { font-size: 22px; line-height: 1.2; letter-spacing: -.02em; }
.succes p { margin-top: 6px; font-size: 15px; color: var(--ink2); }

/* ─── SECTIONS ────────────────────────────────────────────────────────── */
.bloc { padding: 48px 20px; }
.bloc--doux { background: var(--doux); }
.int { max-width: 640px; margin: 0 auto; }
.sur { font: 500 11px/1 var(--mono); letter-spacing: .08em; text-transform: uppercase; color: var(--gd); margin-bottom: 10px; }
h2 { font-size: 26px; line-height: 1.15; font-weight: 800; letter-spacing: -.02em; }
.texte { margin-top: 12px; font-size: 16px; color: var(--ink2); }

/* la section vivante : un dégradé animé (WebGL, la seule section qui en a),
   un repli CSS dessous, et une carte de verre par-dessus */
.bloc--vivant {
  position: relative; overflow: hidden; isolation: isolate;
  background: linear-gradient(135deg, var(--menthe), var(--peche) 45%, var(--ciel) 80%, var(--menthe));
}
.fond-shader { position: absolute; inset: 0; z-index: 0; opacity: 0; transition: opacity 1.2s var(--ease); }
.fond-shader.ok { opacity: 1; }
.fond-shader canvas { position: absolute; inset: 0; width: 100% !important; height: 100% !important; display: block; }
.bloc--vivant .int { position: relative; z-index: 1; }
.bloc--vivant::after { /* léger voile en bas pour raccorder au blanc */
  content: ""; position: absolute; inset: auto 0 0; height: 40px; z-index: 0;
  background: linear-gradient(to bottom, rgba(255, 255, 255, 0), rgba(255, 255, 255, .6)); pointer-events: none;
}
.verre {
  background: rgba(255, 255, 255, .58);
  -webkit-backdrop-filter: blur(22px) saturate(1.5); backdrop-filter: blur(22px) saturate(1.5);
  border: 1px solid rgba(255, 255, 255, .8);
  box-shadow: 0 28px 60px -26px rgba(11, 31, 23, .38), inset 0 1px 0 rgba(255, 255, 255, .95), inset 0 -1px 0 rgba(11, 31, 23, .05);
}

/* la liste du dimanche */
.liste { margin-top: 20px; border-radius: 20px; padding: 16px 16px 12px; }
.liste__titre { font-weight: 700; font-size: 15px; }
.liste__titre span { font: 500 12px/1 var(--mono); color: var(--ink2); }
.liste ul { list-style: none; padding: 0; margin: 10px 0 0; }
.liste li { display: grid; grid-template-columns: 40px 1fr auto; align-items: center; gap: 10px; padding: 7px 0; border-top: 1px solid rgba(11, 31, 23, .07); }
.liste li:first-child { border-top: 0; }
.liste li img { width: 40px; height: 40px; padding: 4px; background: rgba(255, 255, 255, .75); border-radius: 10px; object-fit: contain; }
.liste li span { font-size: 14.5px; font-weight: 700; }
.liste li b { font: 500 13px/1 var(--mono); color: var(--ink2); }
.liste__pied { margin-top: 10px; font-size: 13px; color: var(--ink2); }

/* Alex propose des plats : une conversation, trois cartes */
.chat { margin-top: 20px; border: 1.5px solid var(--bd); border-radius: 24px; background: #fff; padding: 16px; box-shadow: var(--ombre-carte); }
.chat__moi { margin-left: auto; width: fit-content; max-width: 86%; background: var(--sf2); border-radius: 18px 18px 6px 18px; padding: 10px 14px; font-size: 15px; font-weight: 600; }
.chat__alex { display: flex; gap: 10px; align-items: flex-start; margin-top: 12px; }
.chat__alex img { width: 36px; height: 36px; border-radius: 999px; border: 1.5px solid var(--bd); flex: none; }
.chat__alex p { font-size: 15px; padding-top: 6px; }
.plats { list-style: none; padding: 0; margin: 12px 0 0 0; display: grid; gap: 10px; }
.plats li { display: grid; grid-template-columns: 64px 1fr; gap: 12px; align-items: center; border: 1.5px solid var(--bd); border-radius: 16px; padding: 12px; background: #fff; }
.plat__icones { position: relative; width: 64px; height: 56px; }
.plat__icones img { position: absolute; width: 40px; height: 40px; padding: 4px; border-radius: 12px; object-fit: contain; }
.plat__icones img:first-child { left: 0; top: 0; background: var(--menthe); }
.plat__icones img:last-child { left: 22px; top: 14px; background: var(--peche); box-shadow: 0 6px 14px -8px rgba(11, 31, 23, .5); }
.plats h3 { font-size: 15.5px; line-height: 1.3; font-weight: 700; }
.plats p { margin-top: 3px; font-size: 13.5px; line-height: 1.4; color: var(--ink2); }
.ajout { display: inline-block; margin-top: 4px; font: 500 12px/1 var(--mono); color: var(--gd); background: var(--gl); padding: 5px 8px; border-radius: 999px; }
.ajout--ok { color: var(--ink2); background: var(--sf); }

/* le titre découpé en mots par plats.js : chaque mot garde sa ligne */
.mot { display: inline-block; overflow: hidden; vertical-align: top; }
.mot > span { display: inline-block; will-change: transform, opacity; }
.plats li, .plat__icones img, .ajout, .chat__moi, .chat__alex { will-change: transform, opacity; }

/* les trois étapes */
.etapes { list-style: none; padding: 0; margin: 22px 0 0; display: grid; gap: 16px; }
.etapes li { display: grid; grid-template-columns: 34px 1fr; gap: 12px; align-items: start; }
.num { width: 34px; height: 34px; border-radius: 10px; background: var(--gl); color: var(--gd); display: grid; place-items: center; font: 500 14px/1 var(--mono); }
.etapes h3 { font-size: 16px; line-height: 1.3; font-weight: 700; }
.etapes p { margin-top: 3px; font-size: 15px; color: var(--ink2); }

/* les questions : accordéons natifs, sans script */
.faq { margin-top: 20px; display: grid; gap: 10px; }
.faq details { border: 1.5px solid var(--bd); border-radius: 16px; background: #fff; padding: 0 18px; transition: border-color .2s; }
.faq details[open] { border-color: var(--bd2); }
.faq summary { list-style: none; cursor: pointer; padding: 16px 28px 16px 0; font-size: 15.5px; font-weight: 700; line-height: 1.35; position: relative; }
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after {
  content: ""; position: absolute; right: 2px; top: 50%; width: 9px; height: 9px;
  border-right: 2px solid var(--gd); border-bottom: 2px solid var(--gd);
  transform: translateY(-70%) rotate(45deg); transition: transform .25s var(--ease);
}
.faq details[open] summary::after { transform: translateY(-30%) rotate(-135deg); }
.faq details p { padding: 0 0 16px; font-size: 14.5px; color: var(--ink2); }
.faq details a { color: var(--gd); font-weight: 700; }

/* clôture */
.fin { text-align: center; padding-bottom: 56px; }
.fin__alex { width: 150px; height: auto; margin: 0 auto 10px; }
.fin .texte { max-width: 36ch; margin-inline: auto; }
.fin .zone { max-width: 440px; margin: 20px auto 0; text-align: left; }

/* pied */
.pied { border-top: 1px solid var(--bd); padding: 30px 20px calc(36px + env(safe-area-inset-bottom)); text-align: center; }
.pied img { width: 90px; height: auto; margin: 0 auto 10px; }
.pied p { font-size: 13px; color: var(--ink2); }
.pied nav { margin-top: 8px; display: flex; justify-content: center; gap: 14px; flex-wrap: wrap; }
.pied a { font-size: 13px; font-weight: 700; color: var(--gd); text-decoration: none; }
.pied a:hover { text-decoration: underline; }

/* bouton flottant, téléphone seulement ; le corps réserve sa place en bas */
.flottant { position: fixed; left: 16px; right: 16px; bottom: calc(14px + env(safe-area-inset-bottom)); display: none; z-index: 40; }
.flottant a { display: block; height: 52px; line-height: 52px; border-radius: 999px; background: var(--g); color: #fff; text-align: center; font-weight: 700; font-size: 19px; text-decoration: none; box-shadow: var(--ombre-cta); }
body.a-flottant .flottant { display: block; animation: rise .4s var(--ease); }
body.a-flottant { padding-bottom: calc(84px + env(safe-area-inset-bottom)); }

/* ─── L'ÉCRAN D'OUVERTURE DE L'APP, À L'ARRIVÉE SUR LA PAGE ───────────── */
/* head.js pose `intro-on` avant le premier rendu (donc sans clignotement) et
   la retire à 3,4 s ; l'écran s'efface tout seul par animation à 2,9 s. Sans
   JavaScript, l'attribut hidden le laisse invisible et la page est normale. */
html.intro-on, html.intro-on body { overflow: hidden; }
.intro {
  position: fixed; inset: 0; z-index: 100; background: #fff;
  background-image: var(--dots); background-size: 18px 18px;
  flex-direction: column; align-items: center; justify-content: center;
  cursor: pointer; touch-action: manipulation;
}
html.intro-on .intro[hidden] {
  display: flex !important;
  animation: intro-out .5s var(--ease) 1.5s forwards;
}
@keyframes intro-out { to { opacity: 0; visibility: hidden; } }
.intro .basket { width: clamp(200px, 56vw, 240px); height: auto; aspect-ratio: 1; transform: scale(.2); opacity: 0; animation: bk-in .45s var(--bounce) .05s forwards; }
@keyframes bk-in { to { transform: scale(1); opacity: 1; } }
.intro .basket .body { transform-origin: 130px 200px; }
.intro .basket.bob .body { animation: bob .3s var(--ease); }
@keyframes bob { 40% { transform: translateY(3px) scaleX(1.02); } }
.intro .fr { opacity: 0; transform: translateY(-120px) rotate(-8deg); transform-box: fill-box; transform-origin: center; animation: drop .42s var(--bounce) forwards; }
@keyframes drop { 60% { opacity: 1; } to { opacity: 1; transform: none; } }
.intro .fr:nth-child(1) { animation-delay: .30s; }
.intro .fr:nth-child(2) { animation-delay: .38s; }
.intro .fr:nth-child(3) { animation-delay: .46s; }
.intro .fr:nth-child(4) { animation-delay: .54s; }
.intro .fr:nth-child(5) { animation-delay: .62s; }
.intro .fr:nth-child(6) { animation-delay: .70s; }
.intro .fr:nth-child(7) { animation-delay: .78s; }
.intro .fr:nth-child(8) { animation-delay: .86s; }
.intro__marque { width: 180px; height: auto; margin-top: 2px; opacity: 0; animation: rise .5s var(--ease) .95s forwards; }
.intro__tag { margin-top: 8px; font-size: 15px; color: var(--ink2); opacity: 0; animation: rise .5s var(--ease) 1.1s forwards; }
.intro__passer { position: absolute; bottom: calc(36px + env(safe-area-inset-bottom)); font-size: 13px; font-weight: 600; color: var(--ink3); opacity: 0; animation: rise .5s var(--ease) .55s forwards; }

/* apparitions : uniquement quand le script est là, jamais un contenu perdu */
html.js [data-rise] { opacity: 0; transform: translateY(14px); transition: opacity .5s var(--ease), transform .5s var(--ease); }
html.js [data-rise].in { opacity: 1; transform: none; }

/* ─── DESKTOP ─────────────────────────────────────────────────────────── */
@media (min-width: 900px) {
  .haut { max-width: 1120px; margin: 0 auto; padding: 24px 32px 0; }
  .haut__marque img { width: 136px; height: auto; }
  .hero {
    display: grid; grid-template-columns: 1.05fr .95fr; align-items: center; gap: 48px;
    max-width: 1120px; margin: 0 auto; padding: 40px 32px 72px; min-height: 74svh;
  }
  .hero__texte { grid-column: 1; grid-row: 1; }
  .hero__alex { grid-column: 2; grid-row: 1; display: block; text-align: center; }
  .alex__grande { width: 300px; margin: 0 auto; }
  .alex__bulle { max-width: 350px; margin: 16px auto 0; font-size: 16px; }
  .alex__bulle::after { left: 50%; transform: translateX(-50%) rotate(135deg); }
  h1 { font-size: 52px; margin-top: 0; }
  .lead { font-size: 18px; margin-top: 14px; }
  .zone { max-width: 460px; }
  .bloc { padding: 76px 32px; }
  h2 { font-size: 36px; }
  .texte { font-size: 17px; }
  .plats { grid-template-columns: repeat(3, 1fr); }
  .plats li { grid-template-columns: 1fr; align-content: start; }
  .etapes { gap: 20px; }
  .faq { gap: 12px; }
  .faq summary { font-size: 16.5px; }
  .intro .basket { width: 260px; }
  .flottant { display: none !important; }
  body.a-flottant { padding-bottom: 0; }
}

/* ─── MOUVEMENT RÉDUIT : tout s'arrête, rien ne disparaît ─────────────── */
/* (head.js ne pose pas `intro-on` dans ce mode : pas d'écran d'ouverture.) */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .01ms !important; animation-iteration-count: 1 !important; transition-duration: .01ms !important; scroll-behavior: auto !important; }
  html.js [data-rise] { opacity: 1; transform: none; }
  .alex__grande, .alex__bulle { opacity: 1; transform: none; animation: none; }
}
