/* ==========================================================================
   FridgEat — page d'accueil (FR « / » et EN « /en/ »)
   Chargé par le champ « styles: [accueil.css] » de pages/fr/index.html et pages/en/index.html.
   S'appuie sur site.css (variables, .hero, .split, .card, .btn, .badge, .faq, .check-list…).
   Images : /assets/img/accueil/ (captures recadrées des visuels App Store v4, mascotte, aliments).
   ========================================================================== */

/* ---------- Héros ---------- */
.home-hero { padding-block: clamp(4px, 3vw, 40px) clamp(40px, 6vw, 72px); }
.home-hero .hero__grid { gap: 12px; }
.home-hero__text { max-width: 600px; }
.home-hero .hero__title { margin-bottom: 0; }
.home-hero .hero__lead { margin: 18px 0 0; max-width: 34em; }
.home-hero .hero__actions { margin-top: 28px; }
/* « Voir comment ça marche » : quand il passe sous le bouton (petit écran), son texte s'aligne sur le titre grâce à une
   marge négative (rembourrage + bord transparent) ; à côté du bouton, l'écart de colonne grandit d'autant : même rendu. */
.home-hero .hero__actions { column-gap: calc(14px + 8px + var(--border)); }
.home-hero .hero__actions .btn--ghost { padding-inline: 8px; margin-inline-start: calc(-8px - var(--border)); }
.home-hero__perks { margin: 0; padding: 0; list-style: none; gap: 8px; }
.home-hero__note { margin: 14px 0 0; font-size: 0.9375rem; color: var(--muted); }

/* QR code vers l'App Store : seulement sur grand écran (sur iPhone, le bouton suffit). */
.home-qr { display: none; }
@media (min-width: 880px) {
  .home-qr {
    display: flex;
    align-items: center;
    gap: 16px;
    max-width: 30em;
    margin: 24px 0 0;
    font-size: 0.9375rem;
    font-weight: 600;
    color: var(--muted);
  }
  .home-qr__code {
    flex: none;
    width: 112px;
    height: 112px;
    background: #FFFFFF;
    border: var(--border-thin) solid var(--ink);
    border-radius: var(--radius-sm);
    box-shadow: 3px 3px 0 var(--shadow);
  }
}

/* Bouton de téléchargement en grand (icône et alignement : site.css), jamais de logo Apple */
.btn--store.btn--large { padding: 10px 24px 10px 20px; min-height: 60px; }
.btn--store.btn--large .btn__text { font-size: 1.25rem; line-height: 1.1; }

/* Petit écran : la promesse et le bouton d'abord, puis la mascotte, qui commence avant le bas de l'écran
   (iPhone : 375 × 664 avec la barre de Safari) ; les pastilles viennent ensuite.
   Grand écran : texte, pastilles et QR code à gauche, la scène à droite. */
@media (max-width: 879.98px) {
  .home-hero .hero__grid { gap: 20px; }
  .home-hero .hero__actions { margin-top: 24px; }
  .home-hero__extra { margin-top: 8px; }
}
@media (min-width: 880px) {
  .home-hero__grid {
    grid-template-areas: "text media" "extra media";
    grid-template-rows: auto 1fr;
    column-gap: 40px;
    row-gap: 26px;
  }
  .home-hero__text { grid-area: text; align-self: end; }
  .home-hero .hero__media { grid-area: media; align-self: center; }
  .home-hero__extra { grid-area: extra; align-self: start; }
}

/* La scène : disque citron, mascotte, aliments autocollants, bulle. */
.stage {
  position: relative;
  width: min(100%, 460px);
  aspect-ratio: 1 / 1;
  margin-inline: auto;
}
@media (max-width: 879.98px) {
  .stage { width: min(78vw, 300px); }
}
.stage__disc {
  position: absolute;
  left: 9%;
  right: 9%;
  top: 15%;
  aspect-ratio: 1 / 1;
  background: var(--citron);
  border: var(--border) solid var(--ink);
  border-radius: 50%;
  box-shadow: 6px 6px 0 var(--shadow);
}
.stage__mascot {
  position: absolute;
  left: 20%;
  bottom: 0;
  width: 60%;
  height: auto;
  filter: drop-shadow(5px 6px 0 rgba(17, 17, 17, 0.18));
}
.stage__food {
  position: absolute;
  width: 15%;
  height: auto;
  filter: drop-shadow(3px 3px 0 rgba(17, 17, 17, 0.2));
}
.stage__food--1 { left: 0; top: 34%; rotate: -12deg; animation-delay: -1.2s; }
.stage__food--2 { right: 0; top: 50%; rotate: 10deg; animation-delay: -2.6s; }
.stage__food--3 { left: 5%; bottom: 6%; rotate: 16deg; animation-delay: -3.4s; }
.stage__food--4 { right: 4%; bottom: 3%; rotate: -8deg; animation-delay: -0.6s; }
.stage__mascot.float { animation-duration: 5.2s; }

.stage__bubble {
  position: absolute;
  top: 0;
  right: 0;
  max-width: 52%;
  margin: 0;
  padding: 10px 14px;
  font-family: var(--font-display);
  font-size: clamp(0.875rem, 0.8rem + 0.45vw, 1.125rem);
  line-height: 1.15;
  letter-spacing: -0.005em;
  background: #FFFFFF;
  border: var(--border-thin) solid var(--ink);
  border-radius: 18px 18px 18px 4px;
  box-shadow: 3px 3px 0 var(--shadow);
  rotate: 3deg;
}

/* ---------- Fonctions (une capture App Store par section) ---------- */
.feature { --c: var(--citron); }
.feature--citron { --c: var(--citron); }
.feature--ciel { --c: var(--ciel); }
.feature--lime { --c: var(--citron-vert); }
.feature--rose { --c: var(--rose); }
.feature + .feature { padding-top: 0; }

.feature__text { max-width: 500px; }
.split--reverse .feature__text { justify-self: start; }
@media (min-width: 860px) {
  .split:not(.split--reverse) .feature__text { justify-self: end; }
}
.feature__step {
  display: flex;
  align-items: center;
  gap: 10px;
  margin: 0 0 14px;
  font-size: 0.8125rem;
  font-weight: 800;
  letter-spacing: 0.09em;
  text-transform: uppercase;
  color: var(--muted);
}
.feature__num {
  display: grid;
  place-items: center;
  flex: none;
  width: 36px;
  height: 36px;
  font-family: var(--font-display);
  font-size: 1.0625rem;
  letter-spacing: 0;
  color: #111111;
  background: var(--c);
  border: var(--border-thin) solid #111111;
  border-radius: 50%;
  box-shadow: 2px 2px 0 var(--shadow);
}
.feature__title { font-size: clamp(2rem, 1.35rem + 2.6vw, 3.25rem); line-height: 1.02; letter-spacing: -0.025em; }
.feature .lead { margin-bottom: 1.1em; }
.feature .check-list { margin-bottom: 0; }

.feature__media { display: flex; justify-content: center; }
.feature__shot {
  display: block;
  width: min(calc(100% - 16px), 380px);
  height: auto;
  background: var(--c);
  border: var(--border) solid #111111;
  border-radius: 30px;
  box-shadow: 8px 8px 0 var(--shadow);
  rotate: 2deg;
}
.split--reverse .feature__shot { rotate: -2deg; }

/* Apparition douce au défilement (navigateurs récents, si le mouvement n'est pas réduit). */
@media (prefers-reduced-motion: no-preference) {
  @supports (animation-timeline: view()) {
    .feature__shot {
      animation: home-rise linear both;
      animation-timeline: view();
      animation-range: entry 0% cover 30%;
    }
  }
}
@keyframes home-rise {
  from { opacity: 0; translate: 0 56px; }
  to { opacity: 1; translate: 0 0; }
}

/* ---------- Et aussi : rangée de captures (défile sur petit écran, grille de 3 sur grand écran) ---------- */
.home-more { padding-top: 0; }
.more {
  overflow-x: auto;
  overscroll-behavior-x: contain;
  scroll-snap-type: x mandatory;
  scroll-padding-inline: var(--gutter);
  padding-block: 6px 20px;
}
.more:focus-visible { outline: 3px solid var(--focus); outline-offset: -3px; border-radius: var(--radius-sm); }
.more__list {
  display: grid;
  grid-auto-flow: column;
  grid-auto-columns: min(76vw, 300px);
  gap: 22px;
  width: max-content;
  margin: 0;
  padding: 0 var(--gutter);
  list-style: none;
}
.more-card { scroll-snap-align: start; }
.more-card--lime { --c: var(--citron-vert); }
.more-card--ciel { --c: var(--ciel); }
.more-card--citron { --c: var(--citron); }
.more-card__shot {
  display: block;
  width: calc(100% - 8px);
  height: auto;
  background: var(--c);
  border: var(--border) solid #111111;
  border-radius: 26px;
  box-shadow: 6px 6px 0 var(--shadow);
}
.more-card__title { margin: 22px 0 8px; font-size: 1.5rem; line-height: 1.1; letter-spacing: -0.015em; }
.more-card p { margin: 0; }
@media (min-width: 960px) {
  .more { overflow: visible; scroll-snap-type: none; padding-block: 0; }
  .more__list {
    grid-auto-flow: row;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 40px;
    width: auto;
    max-width: calc(var(--max) + 2 * var(--gutter));
    margin-inline: auto;
  }
  .more-card { width: min(100%, 320px); justify-self: center; }
}

/* ---------- Vie privée ---------- */
.home-privacy { margin-top: clamp(16px, 3vw, 32px); }
.privacy-grid {
  display: grid;
  gap: 20px;
  margin: 0;
  padding: 0;
  list-style: none;
}
@media (min-width: 620px) {
  .privacy-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (min-width: 1000px) {
  .privacy-grid { grid-template-columns: repeat(4, minmax(0, 1fr)); }
}
.privacy-card .card__title { font-size: 1.25rem; }
.privacy-card p { font-size: 1rem; }
.home-icon {
  display: grid;
  place-items: center;
  width: 58px;
  height: 58px;
  margin-bottom: 14px;
  background: var(--c, var(--citron));
  border: var(--border-thin) solid #111111;
  border-radius: 50%;
  box-shadow: 3px 3px 0 var(--shadow);
}
.home-icon--lime { --c: var(--citron-vert); }
.home-icon--ciel { --c: var(--ciel); }
.home-icon--rose { --c: var(--rose); }
.home-icon--citron { --c: var(--citron); }
.home-icon svg {
  width: 32px;
  height: 32px;
  fill: none;
  stroke: #111111;
  stroke-width: 3.2;
  stroke-linecap: round;
  stroke-linejoin: round;
}
.home-icon .home-icon__fill { fill: #111111; stroke: none; }
.home-privacy__more { margin: 32px 0 0; }
.home-privacy__health { margin: 18px 0 0; font-size: 0.9375rem; font-weight: 600; }

/* ---------- Gratuit / FridgEat+ ---------- */
.plans {
  display: grid;
  gap: 24px;
  max-width: 920px;
  margin-inline: auto;
}
@media (min-width: 760px) {
  .plans { grid-template-columns: repeat(2, minmax(0, 1fr)); align-items: stretch; }
}
.plan__name { margin-bottom: 10px; font-size: 1.5rem; }
.plan__price {
  margin: 0;
  font-family: var(--font-display);
  font-weight: 800;
  font-size: clamp(2.5rem, 2rem + 2vw, 3.25rem);
  line-height: 1;
  letter-spacing: -0.03em;
}
.plan__price small { font-family: var(--font-text); font-size: 1rem; font-weight: 700; letter-spacing: 0; }
.plan__alt { margin: 8px 0 0; font-weight: 700; color: var(--muted); }
.plan--plus .plan__alt { color: #111111; }
.plan__trial { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 10px; margin: 16px 0 0; font-size: 0.9375rem; font-weight: 600; }
.plan .check-list { margin: 22px 0 0; padding-top: 20px; border-top: 2px dashed var(--line); }
.plans__fine {
  max-width: 720px;
  margin: 28px auto 0;
  font-size: 0.875rem;
  line-height: 1.5;
  text-align: center;
  color: var(--muted);
}

/* ---------- Questions ---------- */
.home-faq h2 { margin-bottom: 28px; }
.home-faq .faq-list { margin-bottom: 24px; }

/* ---------- Dernier appel ---------- */
.home-end { padding-bottom: 0; }
.home-cta {
  display: grid;
  justify-items: center;
  gap: 4px;
  padding: clamp(28px, 6vw, 52px) clamp(20px, 5vw, 48px);
  text-align: center;
}
.home-cta__mascot { width: 72px; height: auto; margin-bottom: 10px; rotate: -4deg; }
.home-cta h2 { margin-bottom: 0.25em; }
.home-cta p { margin-bottom: 22px; font-weight: 600; }


/* ---------- Mode sombre : contour clair des grandes surfaces colorées (comme les cartes de site.css) ---------- */
@media (prefers-color-scheme: dark) {
  .stage__disc, .feature__shot, .more-card__shot { border-color: #F4F0FF; }
}
