/* Carnéo — feuille de style unique du site.
   Couleurs et rayons repris de l'app (theme/colors.ts, theme/spacing.ts du dépôt Akilai-carnet).
   Police : Nunito (OFL 1.1, assets/fonts/OFL.txt), auto-hébergée, un seul fichier variable 400 à 800, latin. Mobile d'abord. */

@font-face {
  font-family: "Nunito";
  src: url("/assets/fonts/nunito-latin-wght-400-800.woff2?v=1") format("woff2");
  font-weight: 400 800;
  font-style: normal;
  font-display: swap;
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329,
    U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
/* Repli aux mesures de Nunito, le temps que le fichier arrive : la page ne saute pas au chargement.
   Nunito 400 ≈ Arial / Roboto + 0,4 % en largeur ; hauteurs : ascendante 1011, descendante 353 (sur 1000). */
@font-face {
  font-family: "Nunito Fallback";
  src: local("Roboto"), local("Arial"), local("Helvetica"), local("Liberation Sans");
  size-adjust: 101%;
  ascent-override: 100%;
  descent-override: 35%;
  line-gap-override: 0%;
}

:root {
  --bg: #FBF4E4;          /* crème Carnéo */
  --surface: #FFFFFF;
  --surface-muted: #EFEAE2;
  --border: #D8D0C3;
  --border-strong: #A99E8C;
  --ink: #1B1A17;
  --ink-muted: #55504A;   /* ≥ 7:1 sur le crème */
  --green: #0F6B47;       /* vert Carnéo */
  --green-press: #0A5235;
  --green-soft: #E1F1E8;
  --sun: #F5BE3A;         /* jaune soleil : accent seulement, jamais de texte blanc dessus */
  --on-color: #FFFFFF;

  --r-sm: 8px;
  --r-md: 14px;
  --r-lg: 20px;
  --r-xl: 28px;
  --r-pill: 999px;

  --gutter: 20px;
  --wrap: 1120px;
  --shadow: 0 1px 2px rgba(59, 47, 30, .06), 0 6px 20px rgba(59, 47, 30, .08);

  --font: "Nunito", "Nunito Fallback", system-ui, Roboto, "Segoe UI", sans-serif;
  color-scheme: light;
}

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

html { -webkit-text-size-adjust: 100%; scroll-padding-top: 84px; }

body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: var(--font);
  font-size: 18px;
  font-weight: 500;   /* Nunito est arrondie : 500 reste lisible en petit sur mobile */
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

img, svg, video, iframe { display: block; max-width: 100%; }
img { height: auto; }

a { color: var(--green); text-underline-offset: 3px; text-decoration-thickness: 1.5px; }
a:hover { color: var(--green-press); }

:focus-visible {
  outline: 3px solid var(--green);
  outline-offset: 3px;
  border-radius: 6px;
}

h1, h2, h3 { line-height: 1.15; margin: 0 0 .5em; letter-spacing: -.01em; font-weight: 800; text-wrap: balance; }
h1 { font-size: clamp(2.1rem, 8.2vw, 3.6rem); letter-spacing: -.02em; }
h2 { font-size: clamp(1.7rem, 6vw, 2.5rem); }
h3 { font-size: 1.25rem; }
p { margin: 0 0 1em; }

.wrap { width: 100%; max-width: var(--wrap); margin: 0 auto; padding: 0 var(--gutter); }

.skip-link {
  position: absolute; left: 12px; top: -60px; z-index: 100;
  background: var(--ink); color: #fff; padding: 12px 16px; border-radius: var(--r-sm);
  text-decoration: none; font-weight: 700;
}
.skip-link:focus { top: 12px; color: #fff; }

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

/* ---------- En-tête commun ---------- */
.site-header {
  position: sticky; top: 0; z-index: 50;
  background: rgba(251, 244, 228, .94);
  border-bottom: 1px solid rgba(216, 208, 195, .7);
  backdrop-filter: saturate(1.4) blur(8px);
  -webkit-backdrop-filter: saturate(1.4) blur(8px);
}
.site-header .wrap { display: flex; align-items: center; justify-content: space-between; gap: 12px; min-height: 64px; }
.brand { display: inline-flex; align-items: center; padding: 6px 0; }
.brand img { width: 128px; height: auto; }

/* ---------- Badge Google Play (image officielle, jamais déformée) ---------- */
.play-badge { display: inline-block; line-height: 0; border-radius: 10px; transition: transform .15s ease; }
.play-badge img { width: auto; }
.play-badge--sm img { height: 48px; }
.play-badge--lg img { height: 72px; }
.play-badge:hover { transform: translateY(-1px); }
.play-badge:focus-visible { outline: 3px solid var(--green); outline-offset: 4px; box-shadow: 0 0 0 9px var(--green-soft); }
.play-badge:active { transform: translateY(1px); }

/* ---------- Boutons ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 10px;
  min-height: 56px; padding: 12px 22px;
  border-radius: var(--r-md);
  font: inherit; font-weight: 700; font-size: 1.05rem; line-height: 1.25;
  text-decoration: none; text-align: center;
  cursor: pointer; transition: background-color .15s ease, transform .15s ease, border-color .15s ease;
}
.btn svg { flex: none; width: 24px; height: 24px; }
.btn:active { transform: translateY(1px); }
.btn--outline { background: var(--surface); color: var(--green); border: 2px solid var(--green); }
.btn--outline:hover { background: var(--green-soft); color: var(--green-press); }
.btn--light { background: var(--surface); color: var(--green); border: 2px solid var(--surface); }
.btn--light:hover { background: var(--green-soft); color: var(--green-press); }

.actions { display: flex; flex-direction: column; align-items: flex-start; gap: 14px; }

/* ---------- Cadre de téléphone (CSS seul) ---------- */
.phone {
  position: relative;
  width: 100%;
  aspect-ratio: 1080 / 2104;
  background: var(--ink);
  border: 9px solid var(--ink);
  border-radius: 34px;
  box-shadow: 0 2px 4px rgba(27, 26, 23, .12), 0 24px 48px -12px rgba(27, 26, 23, .35);
  overflow: hidden;
}
.phone img { width: 100%; height: 100%; object-fit: cover; border-radius: 25px; background: var(--surface-muted); }

/* ---------- Sections ---------- */
main > section { padding: 64px 0; }
.section-head { max-width: 640px; margin-bottom: 32px; }
.section-head p { color: var(--ink-muted); font-size: 1.1rem; margin: 0; }
.eyebrow {
  display: inline-block; margin-bottom: 12px;
  font-size: .85rem; font-weight: 800; letter-spacing: .08em; text-transform: uppercase; color: var(--green);
}

/* Haut de page */
.hero { padding: 28px 0 56px; }
.hero .wrap { display: grid; gap: 36px; }
.hero h1 { margin-bottom: 16px; }
.hero .lead { font-size: 1.2rem; color: var(--ink-muted); max-width: 34ch; margin-bottom: 26px; }
.hero .lead strong { color: var(--ink); }
.hero .proof { display: flex; flex-wrap: wrap; gap: 8px 18px; margin: 22px 0 0; padding: 0; list-style: none; font-weight: 700; font-size: 1rem; }
.hero .proof li { display: inline-flex; align-items: center; gap: 8px; }
.hero .proof svg { width: 22px; height: 22px; color: var(--green); flex: none; }
.hero-visual { position: relative; display: flex; justify-content: center; }
.hero-visual .phone { max-width: 290px; }
.hero-visual::before {
  content: ""; position: absolute; z-index: 0;
  width: min(86vw, 400px); aspect-ratio: 1; border-radius: 50%;
  top: 50%; left: 50%; transform: translate(-50%, -50%);
  background: radial-gradient(circle, rgba(245, 190, 58, .45) 0%, rgba(245, 190, 58, .14) 52%, rgba(245, 190, 58, 0) 70%);
}
.hero-visual .phone { z-index: 1; }

/* Entrée du haut de page : une seule fois, coupée si l'utilisateur demande moins d'animations */
@media (prefers-reduced-motion: no-preference) {
  [data-enter] .enter { animation: enter .6s cubic-bezier(.2, .7, .2, 1) both; }
  [data-enter] .enter:nth-child(2) { animation-delay: .06s; }
  [data-enter] .enter:nth-child(3) { animation-delay: .12s; }
  [data-enter] .enter:nth-child(4) { animation-delay: .18s; }
  [data-enter] .hero-visual { animation: enter-up .8s .1s cubic-bezier(.2, .7, .2, 1) both; }
}
@keyframes enter { from { opacity: 0; transform: translateY(10px); } to { opacity: 1; transform: none; } }
@keyframes enter-up { from { opacity: 0; transform: translateY(28px); } to { opacity: 1; transform: none; } }

/* Fonctionnalités */
.features { background: var(--surface); border-block: 1px solid var(--border); }
.cards { display: grid; gap: 14px; margin: 0; padding: 0; list-style: none; }
.card {
  display: grid; grid-template-columns: 56px 1fr; gap: 4px 16px; align-items: start;
  background: var(--bg); border: 1px solid var(--border); border-radius: var(--r-lg);
  padding: 20px;
}
.card h3 { margin: 0; align-self: center; }
.card p { grid-column: 2; margin: 0; color: var(--ink-muted); }
.icon-tile {
  grid-row: span 2;
  width: 56px; height: 56px; border-radius: var(--r-md);
  display: grid; place-items: center;
  background: var(--green); color: var(--on-color);
}
.icon-tile svg { width: 30px; height: 30px; }
.icon-tile--sun { background: var(--sun); color: var(--ink); }
.card--bonus { background: var(--surface); border-style: dashed; border-color: var(--border-strong); }
.card--bonus .icon-tile { background: var(--green-soft); color: var(--green); }
.tag {
  display: inline-block; margin-left: 6px; vertical-align: 2px;
  padding: 2px 10px; border-radius: var(--r-pill);
  background: var(--sun); color: var(--ink); font-size: .78rem; font-weight: 800; letter-spacing: .02em;
}

/* Galerie de captures : défile au doigt sur mobile */
.shots {
  display: grid; grid-auto-flow: column; grid-auto-columns: 62%;
  gap: 16px; margin: 0; padding: 8px var(--gutter) 20px; list-style: none;
  overflow-x: auto; scroll-snap-type: x mandatory; overscroll-behavior-x: contain;
  scroll-padding-inline: var(--gutter);
  scrollbar-width: none;              /* Firefox : barre cachée, le défilement reste */
  -ms-overflow-style: none;
}
.shots::-webkit-scrollbar { display: none; }   /* Chrome, Safari */
.shots:focus-visible { outline: 3px solid var(--green); outline-offset: 2px; border-radius: var(--r-lg); }
.shots li { scroll-snap-align: start; }
.shots .phone { border-width: 7px; border-radius: 28px; }
.shots .phone img { border-radius: 21px; }
.scroll-hint { display: flex; align-items: center; gap: 8px; color: var(--ink-muted); font-weight: 600; font-size: .95rem; margin: 0; }
.scroll-hint svg { width: 22px; height: 22px; }

/* Points et flèches de la galerie (créés / affichés par assets/js/site.js) */
.carousel { position: relative; }
.carousel-dots { display: flex; justify-content: center; flex-wrap: wrap; gap: 0; margin-top: 4px; padding: 0 var(--gutter); }
.carousel-dot {
  width: 44px; height: 44px; padding: 0; border: 0; background: none; cursor: pointer;
  display: grid; place-items: center; border-radius: 50%;
}
.carousel-dot::before {
  content: ""; width: 10px; height: 10px; border-radius: 50%;
  background: var(--border-strong); opacity: .55; transition: background-color .2s ease, opacity .2s ease, transform .2s ease;
}
.carousel-dot:hover::before { opacity: .9; }
.carousel-dot[aria-current="true"]::before { background: var(--green); opacity: 1; transform: scale(1.3); }
.carousel-arrow { display: none; }
@media (hover: hover) and (pointer: fine) {
  .scroll-hint { display: none; }
}
@media (hover: hover) and (pointer: fine) and (min-width: 960px) {
  .carousel-arrow:not([hidden]) {
    position: absolute; z-index: 2; top: calc(50% - 6px); transform: translateY(-50%);
    display: grid; place-items: center;
    width: 56px; height: 56px; border-radius: 50%; cursor: pointer;
    background: var(--green); color: var(--on-color); border: 3px solid var(--bg);
    box-shadow: var(--shadow); transition: background-color .15s ease, opacity .2s ease;
  }
  .carousel-arrow svg { width: 26px; height: 26px; }
  .carousel-arrow:hover { background: var(--green-press); }
  .carousel-arrow:disabled { opacity: 0; pointer-events: none; }
  .carousel-arrow--prev { left: max(8px, calc((100vw - var(--wrap)) / 2 + var(--gutter) - 28px)); }
  .carousel-arrow--next { right: max(8px, calc((100vw - var(--wrap)) / 2 + var(--gutter) - 28px)); }
}

/* Étapes */
.steps { display: grid; gap: 14px; margin: 0; padding: 0; list-style: none; counter-reset: step; }
.step {
  position: relative; display: grid; grid-template-columns: 56px 1fr; gap: 16px; align-items: start;
  background: var(--surface); border: 1px solid var(--border); border-radius: var(--r-lg); padding: 20px;
}
.step::before {
  counter-increment: step; content: counter(step);
  width: 56px; height: 56px; border-radius: 50%;
  display: grid; place-items: center;
  background: var(--green); color: var(--on-color); font-size: 1.5rem; font-weight: 800;
}
.step h3 { margin: 4px 0 4px; }
.step p { margin: 0; color: var(--ink-muted); }

/* Prix */
.pricing .wrap { display: grid; justify-items: center; text-align: center; }
.pricing .section-head { margin-inline: auto; }
.price-card {
  width: 100%; max-width: 440px;
  background: var(--surface); border: 2px solid var(--green); border-radius: var(--r-xl);
  padding: 28px 22px; box-shadow: var(--shadow);
}
.price { margin: 0 0 4px; font-weight: 800; line-height: 1.05; }
.price .amount { font-size: clamp(2.6rem, 12vw, 3.4rem); color: var(--green); letter-spacing: -.02em; white-space: nowrap; }
.price .per { display: block; font-size: 1.15rem; color: var(--ink-muted); font-weight: 700; margin-top: 6px; }
.price-list { margin: 22px 0 26px; padding: 0; list-style: none; text-align: left; display: grid; gap: 12px; }
.price-list li { display: grid; grid-template-columns: 28px 1fr; gap: 12px; align-items: start; font-weight: 600; }
.price-list svg { width: 28px; height: 28px; color: var(--green); }
.price-card .play-badge { margin-inline: auto; }

/* Vidéos (section masquée tant qu'il n'y a pas de vidéo : voir assets/js/videos.js) */
.videos-grid { display: grid; gap: 16px; margin: 0; padding: 0; list-style: none; }
.video-frame {
  position: relative; width: 100%; max-width: 360px; aspect-ratio: 9 / 16;
  border-radius: var(--r-lg); overflow: hidden; background: var(--ink);
}
.video-frame video, .video-frame iframe { width: 100%; height: 100%; border: 0; object-fit: cover; }
.video-play {
  position: absolute; inset: 0; width: 100%; border: 0; cursor: pointer;
  display: grid; place-items: center; gap: 12px; align-content: center;
  background: var(--ink) center / cover no-repeat; color: #fff; font: inherit; font-weight: 700;
}
.video-play span.circle { width: 76px; height: 76px; border-radius: 50%; background: var(--sun); color: var(--ink); display: grid; place-items: center; }
.video-play svg { width: 34px; height: 34px; }
.video-title { margin: 10px 0 0; font-weight: 700; }

/* FAQ : accordéon natif (details / summary), sans script */
.faq-list { display: grid; gap: 12px; max-width: 760px; }
.faq-list details { background: var(--surface); border: 1px solid var(--border); border-radius: var(--r-lg); }
.faq-list summary {
  list-style: none; cursor: pointer;
  display: flex; align-items: center; justify-content: space-between; gap: 16px;
  min-height: 64px; padding: 16px 20px; font-weight: 700; font-size: 1.1rem;
}
.faq-list summary::-webkit-details-marker { display: none; }
.faq-list summary::after {
  content: ""; flex: none; width: 28px; height: 28px; border-radius: 50%;
  background: var(--green-soft) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%230F6B47' stroke-width='2.6' stroke-linecap='round'%3E%3Cpath d='M12 6v12M6 12h12'/%3E%3C/svg%3E") center / 18px no-repeat;
  transition: transform .2s ease;
}
.faq-list details[open] summary::after { transform: rotate(45deg); }
.faq-list summary:focus-visible { outline-offset: -3px; border-radius: var(--r-lg); }
.faq-list .answer { padding: 0 20px 20px; color: var(--ink-muted); }
.faq-list .answer p:last-child { margin-bottom: 0; }

/* Dernier appel */
.cta { background: var(--green); color: var(--on-color); }
.cta .wrap { display: grid; justify-items: center; text-align: center; gap: 8px; }
.cta h2 { color: var(--on-color); margin-bottom: 4px; }
.cta p { color: rgba(255, 255, 255, .9); font-size: 1.15rem; margin-bottom: 22px; max-width: 32ch; }
.cta .symbol { width: 78px; height: 64px; margin-bottom: 12px; }
.cta .actions { align-items: center; }
.cta :focus-visible { outline-color: var(--sun); }

/* ---------- Pied de page commun ---------- */
.site-footer { background: var(--ink); color: #E9E4DA; padding: 48px 0 32px; font-size: 1rem; }
.site-footer a { color: #fff; }
.site-footer a:hover { color: var(--sun); }
.site-footer :focus-visible { outline-color: var(--sun); }
.footer-grid { display: grid; gap: 28px; }
.footer-brand img { width: 140px; margin-bottom: 14px; }
.footer-brand p { margin: 0 0 6px; }
.footer-title { font-size: .85rem; font-weight: 800; letter-spacing: .08em; text-transform: uppercase; color: var(--sun); margin: 0 0 10px; }
.footer-list { margin: 0; padding: 0; list-style: none; display: grid; gap: 0; }
.footer-list a { display: inline-flex; align-items: center; min-height: 48px; }
.footer-bottom { margin-top: 32px; padding-top: 20px; border-top: 1px solid rgba(255, 255, 255, .15); color: #BDB6A9; font-size: .92rem; }
.footer-bottom p { margin: 0; }

/* ---------- Pages légales ---------- */
.legal { padding: 36px 0 64px; }
.legal .wrap { max-width: 820px; }
.legal h1 { font-size: clamp(1.9rem, 7vw, 2.6rem); margin-bottom: 8px; }
.legal .updated { color: var(--ink-muted); font-weight: 600; margin-bottom: 28px; }
.legal h2 { font-size: 1.35rem; margin: 2em 0 .6em; scroll-margin-top: 84px; }
.legal p, .legal li { color: var(--ink); }
.legal ul { padding-left: 1.2em; }
.legal li { margin-bottom: .5em; }
.legal a { overflow-wrap: anywhere; }
.legal blockquote { margin: 0; }
.toc {
  background: var(--surface); border: 1px solid var(--border); border-radius: var(--r-lg);
  padding: 18px 22px; margin: 0 0 32px;
}
.toc h2 { font-size: 1rem; margin: 0 0 8px; text-transform: uppercase; letter-spacing: .06em; color: var(--green); }
.toc ol { margin: 0; padding-left: 1.3em; columns: 1; }
.toc li { margin: 0; }
.toc a { display: inline-flex; align-items: center; min-height: 44px; }
.table-scroll { overflow-x: auto; margin: 0 0 1.2em; border: 1px solid var(--border); border-radius: var(--r-md); background: var(--surface); }
.legal table { width: 100%; border-collapse: collapse; font-size: .95rem; min-width: 520px; }
.legal th, .legal td { text-align: left; vertical-align: top; padding: 10px 12px; border-bottom: 1px solid var(--border); }
.legal th { background: var(--surface-muted); font-weight: 800; }
.legal tr:last-child td { border-bottom: 0; }
.note-box { background: var(--green-soft); border-radius: var(--r-lg); padding: 18px 20px; margin: 0 0 1.4em; }

/* 404 */
.notfound { padding: 72px 0 96px; text-align: center; }
.notfound .wrap { display: grid; justify-items: center; }
.notfound img { width: 107px; height: 88px; margin-bottom: 20px; }
.notfound p { color: var(--ink-muted); font-size: 1.15rem; max-width: 30ch; }
.btn--solid { background: var(--green); color: var(--on-color); border: 2px solid var(--green); }
.btn--solid:hover { background: var(--green-press); border-color: var(--green-press); color: var(--on-color); }

/* ---------- Tablette et bureau ---------- */
@media (min-width: 640px) {
  :root { --gutter: 32px; }
  .actions { flex-direction: row; flex-wrap: wrap; align-items: center; }
  .cards { grid-template-columns: repeat(2, 1fr); }
  .card--bonus { grid-column: 1 / -1; }
  .shots { grid-auto-columns: 34%; }
  .steps { grid-template-columns: repeat(3, 1fr); }
  .step { grid-template-columns: 1fr; }
  .videos-grid { grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); }
  .footer-grid { grid-template-columns: 1.4fr 1fr 1fr; }
  .toc ol { columns: 2; column-gap: 32px; }
}

@media (min-width: 960px) {
  main > section { padding: 96px 0; }
  .hero { padding: 56px 0 96px; }
  .hero .wrap { grid-template-columns: 1.1fr .9fr; align-items: start; gap: 48px; }
  .hero-text { padding-top: 24px; }
  .hero-visual .phone { max-width: 330px; }
  .cards { grid-template-columns: repeat(6, 1fr); gap: 16px; }
  .card { grid-column: span 2; grid-template-columns: 1fr; gap: 14px; padding: 24px; }
  .card:nth-child(4), .card--bonus { grid-column: span 3; }
  .card p { grid-column: 1; }
  .icon-tile { grid-row: auto; }
  .pricing .wrap { grid-template-columns: 1fr 440px; justify-items: start; align-items: start; text-align: left; gap: 64px; }
  .pricing .section-head { margin: 0; }
  .price-card { justify-self: end; }
  .shots { grid-auto-columns: calc((100% - 6 * 16px) / 4.6); max-width: var(--wrap); margin: 0 auto; }
}

@media (min-width: 1200px) {
  .shots {
    --shots-pad: calc((100vw - var(--wrap)) / 2 + var(--gutter));
    padding-inline: var(--shots-pad); scroll-padding-inline: var(--shots-pad);
    max-width: none; grid-auto-columns: 220px;
  }
}
