/* Petit Somme home (redo, round 2). Tokens from brand/visual-language/tokens.json v1.1.0: day palette B; the night palette for Dark Mode. */

@font-face {
  font-family: "Nunito PS";
  src: url("fonts/nunito-latin-var.woff2") format("woff2");
  font-weight: 200 1000;
  font-display: swap;
}

:root {
  --ground: #FFFCF7;
  --field: #FFF0C2;
  --ink: #3A2A23;
  --ink-soft: #6B574D;
  --bezel: #3A2A23;
  --on-bezel: #FFFCF7;
  --focus: #2F6FB0;
  --selection: #FFDA7A;
  --sunk: #F9F2E9;          /* day.sunk */
  --bubble: #FFF0C2;        /* day.honeySoft: the speech bubbles on the ground */
  --night-panel: #17110E;   /* night.ground: Karim's 3 a.m. panel, in both modes */

  --ease-out: cubic-bezier(0.23, 1, 0.32, 1);

  --display: "Nunito PS", ui-rounded, -apple-system, system-ui, sans-serif;
  --text: -apple-system, BlinkMacSystemFont, "SF Pro Text", system-ui, "Segoe UI", Roboto, sans-serif;

  --gutter: 20px;
  --max: 1200px;
  --phone-w: min(264px, calc(100vw - 80px));   /* no callout below 600 px, so the phone is centred */
  --phone-h: calc(var(--phone-w) * 2.1418);
  --card-y: 0.179;      /* the next-nap card's centre, as a share of the phone's height */
  --callout-w: 88px;
  --callout-gap: 10px;
  --dev-w: min(184px, calc(100vw - 120px));   /* the screens in sections 5-6 */
  --sec-y: 44px;        /* THE section spacing: top and bottom of every section from 3 on (r2.2); 112px from 960 */
  --tag-room: 32px; --crop-w: 236px; --widget-w: 188px;     /* space above a device for its « Avec l'abonnement » tab */
  --who-w: 96px;                             /* the characters */

  color-scheme: light dark;
}

@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --ground: #17110E;
    --field: #231A15;
    --ink: #DCC9B2;
    --ink-soft: #A8937E;
    --bezel: #7A6552;
    --on-bezel: #FAF1E4;
    --focus: #D99A48;
    --selection: #5A4126;
    --sunk: #1D1511;
    --bubble: #2E231C;
    --night-panel: #231A15;
  }
}
:root[data-theme="dark"] {
  --ground: #17110E;
  --field: #231A15;
  --ink: #DCC9B2;
  --ink-soft: #A8937E;
  --bezel: #7A6552;
  --on-bezel: #FAF1E4;
  --focus: #D99A48;
  --selection: #5A4126;
  --sunk: #1D1511;
  --bubble: #2E231C;
  --night-panel: #231A15;
}

*, *::before, *::after { box-sizing: border-box; }
html, body { overflow-x: clip; }
html { -webkit-text-size-adjust: 100%; text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--ground);
  color: var(--ink);
  font: 400 1.0625rem/1.45 var(--text);
  -webkit-font-smoothing: antialiased;
}
img { display: block; max-width: 100%; height: auto; }
h1, h2, h3, p, figure { margin: 0; }
::selection { background: var(--selection); color: var(--ink); }
a { color: inherit; text-underline-offset: 0.18em; }
a:focus-visible { outline: 3px solid var(--focus); outline-offset: 3px; border-radius: 6px; }

.sr {
  position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0;
}
.skip {
  position: absolute; left: 12px; top: -60px; z-index: 10;
  padding: 12px 16px; background: var(--ink); color: var(--ground);
  font-weight: 600; border-radius: 12px; text-decoration: none;
}
.skip:focus-visible { top: 12px; }

/* Header: the wordmark and the language link, on the hero's field */
.site-head { background: var(--field); }
.site-head .wrap {
  max-width: var(--max); margin: 0 auto; padding: 6px var(--gutter) 0;
  display: flex; align-items: center; justify-content: space-between; gap: 16px;
}
.brand { display: inline-flex; align-items: center; gap: 10px; min-height: 48px; color: var(--ink); text-decoration: none; }
.brand img { width: 32px; height: 32px; border-radius: 8px; }
.brand svg { height: 21px; width: auto; fill: currentColor; }
.head-links a {
  display: inline-flex; align-items: center; min-height: 44px; min-width: 44px; padding: 0 4px;
  font-size: 0.9375rem; font-weight: 600; color: var(--ink);
}

/* Hero: the honey field holds the whole phone */
.hero { background: var(--field); }
.hero-in {
  max-width: var(--max); margin: 0 auto;
  padding: 14px var(--gutter) 40px;
  display: grid; grid-template-columns: minmax(0, 1fr);
}
.hero h1 {
  font: 900 2.25rem/1.04 var(--display);
  letter-spacing: -0.02em;
  overflow-wrap: break-word; min-width: 0;
}
.hero h1 span { display: block; text-wrap: balance; }
.hero-sub { margin-top: 14px; max-width: 34ch; font-size: 1.0625rem; line-height: 1.45; }
.hero-sub strong { font-weight: 650; }
.hero-cta { margin-top: 20px; display: flex; flex-direction: column; align-items: flex-start; gap: 12px; }

/* The App Store badge: Apple's official file only, 48 px tall, 12 px (a quarter) clear space all round */
.badge { display: inline-block; margin: 0; line-height: 0; border-radius: 9px; }
.badge img { height: 48px; width: auto; }
.badge-ph {
  height: 48px; aspect-ratio: 3.4 / 1;
  display: inline-flex; align-items: center; justify-content: center;
  border: 2px dashed var(--ink-soft); border-radius: 9px;
  font: 600 0.75rem/1.2 var(--text); color: var(--ink); text-align: center; text-decoration: none;
}
.hero-price { font-size: 1rem; font-weight: 600; }

/* The phone: the real capture in our plain current-iPhone frame, straight on, no shadow.
   Le loir sleeps on its top edge, the subscription tag hangs from its top corner,
   and one callout beside it points at the next-nap card. Nothing sits on the screen. */
.hero-phone {
  --w: var(--phone-w);
  position: relative;
  width: var(--phone-w);
  justify-self: center;
  margin-top: 64px;
}
.phone {           /* --w is set by each context: the hero, a section device, the aha */
  width: var(--w);
  padding: calc(var(--w) * 0.0132);
  border-radius: calc(var(--w) * 0.1493);
  background: var(--bezel);
}
.phone img { width: 100%; border-radius: calc(var(--w) * 0.136); }

.loir {
  position: absolute;
  left: calc(var(--phone-w) * 0.07);
  bottom: calc(100% - 3px);
  width: calc(var(--phone-w) * 0.29);
}
.loir img { width: 100%; }

.paid {
  position: absolute;
  right: calc(var(--w) * 0.095);
  bottom: calc(100% - 2px);
  padding: 5px 12px 6px;
  border-radius: 10px 10px 0 0;
  background: var(--bezel); color: var(--on-bezel);
  font-size: 0.75rem; font-weight: 600; line-height: 1.3; white-space: nowrap;
}

.callout {             /* desktop and tablet only (team lead, r1.2): at 390 the sub-line already says it */
  display: none;
  position: absolute;
  right: calc(100% + var(--callout-gap));
  top: calc(var(--phone-h) * var(--card-y));
  transform: translateY(-50%);
  width: var(--callout-w);
  text-align: right;
  font-size: 0.8125rem; font-weight: 650; line-height: 1.3; text-wrap: balance;
}
.callout::before {   /* the pointer, from the label to the card's left edge */
  content: "";
  position: absolute; top: 50%; left: calc(100% + 4px);
  width: calc(var(--callout-gap) - 4px + var(--phone-w) * 0.04);
  height: 2px; margin-top: -1px;
  background: var(--ink); border-radius: 1px;
}
.callout::after {    /* the dot that lands on the card */
  content: "";
  position: absolute; top: 50%;
  left: calc(100% + var(--callout-gap) + var(--phone-w) * 0.04 - 4px);
  width: 10px; height: 10px; margin-top: -5px;
  background: var(--ink); border: 2px solid var(--on-bezel); border-radius: 50%;
}

@media (min-width: 600px) {
  :root { --gutter: 32px; --phone-w: 290px; --callout-w: 150px; --callout-gap: 16px; }
  .hero h1 { font-size: 3rem; }
  .hero-sub { font-size: 1.1875rem; }
  .hero-phone { justify-self: center; margin-top: 72px; }
  .callout { display: block; font-size: 0.9375rem; }
}

@media (min-width: 960px) {
  :root {
    --gutter: 48px; --phone-w: 312px;
    --gap: clamp(150px, 15vw, 220px);
    --callout-w: calc(var(--gap) - 40px); --callout-gap: 20px;
  }
  .site-head .wrap { padding-top: 14px; }
  .hero-in {
    grid-template-columns: minmax(0, 1fr) var(--phone-w);
    column-gap: var(--gap); align-items: center;
    padding-top: 24px; padding-bottom: 72px;
  }
  .hero h1 { font-size: clamp(3.5rem, 5.3vw, 4.75rem); line-height: 1; letter-spacing: -0.03em; }
  .hero-sub { margin-top: 26px; font-size: 1.3125rem; max-width: 36ch; text-wrap: pretty; }
  .hero-cta { margin-top: 32px; }
  .hero-phone { justify-self: end; margin-top: 72px; }
  .callout { font-size: 1rem; line-height: 1.35; }
}

/* ---- Round 2: sections 3 to 11 ---------------------------------------------------------------
   Grounds, top to bottom: hero field, pain ground, how sunk, aha field, benefits ground,
   trust sunk, questions ground, final call field, footer sunk. Phone first; 600 and 960 below. */

.sec-in, .pain-in { max-width: var(--max); margin: 0 auto; padding: var(--sec-y) var(--gutter); }
main h2 {
  font: 900 1.75rem/1.1 var(--display);
  letter-spacing: -0.015em; text-wrap: balance;
  overflow-wrap: break-word; min-width: 0;
}
main h2 span { display: block; }
.lede { margin-top: 12px; max-width: 36ch; font-size: 1.125rem; text-wrap: pretty; }

/* A section device: the real screen in the same frame as the hero, tag on its top corner */
.device { --w: var(--dev-w); position: relative; width: var(--w); margin: var(--tag-room) auto 0; }
.split > .split-text + .aha-seq { margin-top: calc(var(--tag-room) + 8px); }
.split > .device + .split-text,
.split > .duo + .split-text { margin-top: 28px; }
.duo { display: flex; align-items: center; justify-content: center; gap: 12px; margin-top: var(--tag-room); }
.duo .device { margin: 0; }
/* r2.3, phones: in the two blocks with a full phone (6a, 6c), the character stands beside the screen,
   bubble under them, then the words. Saves a whole row on a phone; desktop keeps words then character. */
.split.aside {
  display: grid; grid-template-columns: var(--dev-w) minmax(0, 1fr);
  grid-template-areas: "media voice" "text text"; column-gap: 14px; align-items: center;
}
.split.aside > .device { grid-area: media; margin: var(--tag-room) 0 0; }
.split.aside > .split-text { grid-area: text; margin-top: 28px; }
.split.aside > .voice { grid-area: voice; display: flex; flex-direction: column; align-items: center; margin: var(--tag-room) 0 0; }
.split.aside .voice .who { order: 0; }
.split.aside .bubble { margin-top: 14px; padding: 10px 12px 12px; font-size: 0.9375rem; }
.split.aside .bubble::before { top: -7px; left: 50%; right: auto; margin-left: -8px; }

/* r2.3: a crop of a real capture on a soft honey card, tab on its corner (crèche rows, the widget) */
.crop-card {
  --w: var(--crop-w); position: relative; width: var(--w); margin: var(--tag-room) auto 0;
  padding: 14px; border-radius: 24px; background: var(--field);
}
.crop-card img { width: 100%; border-radius: 12px; }
.crop-widget { --w: var(--widget-w); }
.crop-widget img { border-radius: 16.8%; }   /* the tile's own corner (89 px on a 530 px tile), so no wallpaper shows */
.duo .crop-card { margin: 0; }
.sheet { display: none; flex: none; width: 148px; }   /* desktop only (r2.2): unreadable next to a phone-sized phone */   /* the shared nanny image (4:5), framed like the phones: same bezel colour */
.sheet img { width: 100%; border: 3px solid var(--bezel); border-radius: 16px; }

/* The characters: presenters, each with an HTML bubble and its « Exemple » tag */
.voice {
  display: grid; grid-template-columns: var(--who-w) minmax(0, 1fr);
  column-gap: 16px; align-items: start;
  margin-top: 22px; max-width: 30rem;
}
.voice-end { grid-template-columns: minmax(0, 1fr) var(--who-w); }
.voice-end .who { order: 2; }
.who { display: block; width: var(--who-w); }
.who img { width: 100%; }
.who-night { padding: 10px 8px 0; border-radius: 20px; background: var(--night-panel); overflow: hidden; }
.who-ph {
  aspect-ratio: 3 / 4; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 4px;
  border: 2px dashed var(--ink-soft); border-radius: 16px;
  font-size: 0.8125rem; font-weight: 700; text-align: center; color: var(--ink-soft);
}
.who-ph span:first-child { font-size: 1rem; color: var(--ink); }
.bubble {
  position: relative; margin-top: 18px;
  padding: 12px 16px 14px; border-radius: 18px;
  background: var(--bubble);
  font-size: 1rem; line-height: 1.4; text-wrap: pretty;
}
.bubble::before {     /* the tail, towards the speaker */
  content: ""; position: absolute; top: 24px; left: -7px;
  width: 16px; height: 16px; border-radius: 3px;
  background: var(--bubble); transform: rotate(45deg);
}
.voice-end .bubble::before { left: auto; right: -7px; }
.ex {
  display: block; width: fit-content; margin-bottom: 6px;
  padding: 2px 9px; border-radius: 999px;
  background: var(--ground); color: var(--ink-soft);
  font-size: 0.75rem; font-weight: 700; line-height: 1.35;
}

/* 4. Comment ça marche: three numbered steps, text only (r2.2) */
.how { background: var(--sunk); }
.steps { list-style: none; margin: 24px 0 0; padding: 0; display: grid; gap: 16px; }
.steps li { display: flex; gap: 14px; align-items: flex-start; }
.step-n {
  flex: none; width: 36px; height: 36px; border-radius: 50%;
  background: var(--ink); color: var(--ground);
  font: 900 1.125rem/36px var(--display); text-align: center;
}
.steps li > p { padding-top: 5px; font-size: 1.125rem; font-weight: 600; line-height: 1.35; max-width: 28ch; text-wrap: pretty; }

/* 5. The aha: one phone, the screen goes from 11 h 40 to 12 h 40 (site-next.js). Without JS: both, side by side */
.aha { background: var(--field); }
.aha-seq {
  --w: min(var(--dev-w), calc((100vw - 2 * var(--gutter) - 16px) / 2));
  display: flex; justify-content: center; gap: 16px;
}
.aha-state { position: relative; width: var(--w); }
.aha-state figcaption {
  display: flex; gap: 8px; align-items: flex-start; margin-top: 14px;
  font-size: 0.9375rem; font-weight: 600; line-height: 1.35;
}
.aha-n {
  flex: none; width: 24px; height: 24px; border-radius: 50%;
  background: var(--ink); color: var(--ground);
  font: 800 0.8125rem/24px var(--display); text-align: center;
}
.js .aha-seq { --w: var(--dev-w); display: grid; justify-content: center; }
.js .aha-state { grid-area: 1 / 1; }
.js .aha-b .phone { background: transparent; }    /* B's frame sits exactly on A's: only the screen changes */
.js .aha-a .paid { visibility: hidden; }          /* the same tag, in the same place, on B */
.js .aha-b img, .js .aha-b figcaption {
  opacity: 0; filter: blur(2px);
  transition: opacity 700ms var(--ease-out), filter 700ms var(--ease-out);
}
.js .aha-b figcaption { transition-delay: 180ms; }
.js .aha-a figcaption { transition: opacity 240ms var(--ease-out); }
.js .is-done .aha-b img, .js .is-done .aha-b figcaption { opacity: 1; filter: none; }
.js .is-done .aha-a figcaption { opacity: 0; }

/* 6. Benefits */
.ben + .ben .sec-in { padding-top: 0; }   /* same ground: one gap between blocks, not two */

/* 7. Trust */
.trust { background: var(--sunk); }
.trust-grid { display: grid; gap: 22px; margin-top: 22px; }
.trust h3 { font: 800 1.1875rem/1.25 var(--display); }
.trust-grid p { margin-top: 6px; max-width: 38ch; }
.trust-grid a { display: inline-block; padding: 10px 0; margin: -10px 0; font-weight: 600; overflow-wrap: anywhere; }
.note { margin-top: 24px; color: var(--ink-soft); font-size: 0.9375rem; }
.pain .note { grid-column: 1 / -1; margin-top: 16px; }   /* the example label, right under the first character (team lead, 3 Nov) */

/* 9. Questions: native details, no JS */
.faq-list { display: grid; gap: 8px; margin-top: 22px; max-width: 46rem; }
.faq details { border-radius: 16px; background: var(--sunk); }
.faq summary {
  position: relative; display: flex; align-items: center; min-height: 50px;
  padding: 12px 52px 12px 20px; border-radius: 16px;
  font-weight: 700; line-height: 1.3; cursor: pointer; list-style: none;
}
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after {
  content: "+"; position: absolute; right: 18px; top: 50%;
  font: 500 1.625rem/1 var(--display); transform: translateY(-52%);
  transition: transform 200ms var(--ease-out);
}
.faq details[open] summary::after { transform: translateY(-52%) rotate(45deg); }
.faq summary:focus-visible { outline: 3px solid var(--focus); outline-offset: 2px; }
.faq details p { padding: 0 20px 18px; max-width: 62ch; }

/* 10. The final call */
.cta { background: var(--field); }
.cta-in { display: grid; justify-items: center; text-align: center; }
.cta-loir { display: block; width: 104px; margin: 0 auto 14px; }
.cta-loir img { width: 100%; }
.cta h2 { font-size: 2.25rem; line-height: 1.04; letter-spacing: -0.02em; }
.cta h2 span { display: block; }
.cta .hero-cta { align-items: center; margin-top: 24px; }
.qr-card { display: none; }
.qr { display: block; width: 148px; height: 148px; }

/* 11. Footer: the shared footer() */
.site-foot { background: var(--sunk); font-size: 0.9375rem; }
.site-foot .wrap { max-width: var(--max); margin: 0 auto; padding: var(--sec-y) var(--gutter); display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 24px 16px; }
.site-foot .wrap > :first-child { grid-column: 1 / -1; }
.site-foot .brand svg { height: 20px; }
.site-foot h2 { font: 800 1rem/1.3 var(--display); }
.site-foot ul { list-style: none; margin: 4px 0 0; padding: 0; }
.site-foot li a { display: inline-flex; align-items: center; min-height: 44px; min-width: 44px; }
.site-foot .tag { margin-top: 6px; color: var(--ink-soft); }
.site-foot .tag a { display: inline-block; padding: 12px 0; margin: -12px 0; color: var(--ink); font-weight: 600; }

/* The English page: one line before the header */
.notice {
  margin: 0; padding: 10px var(--gutter);
  background: var(--ink); color: var(--ground);
  font-size: 0.875rem; line-height: 1.4; text-align: center; text-wrap: balance;
}

@media (min-width: 600px) {
  :root { --dev-w: 260px; --who-w: 128px; --sec-y: 72px; }
  main h2 { font-size: 2.25rem; }
  .lede { font-size: 1.1875rem; }
  .cta h2 { font-size: 3rem; }
}

@media (min-width: 960px) {
  :root { --dev-w: 300px; --who-w: 144px; --sec-y: 112px; --tag-room: 28px; --crop-w: 300px; --widget-w: 232px; }
  .pain-in {
    display: grid; grid-template-columns: minmax(0, 1.3fr) minmax(0, 1fr);
    column-gap: clamp(48px, 7vw, 112px); align-items: center;
  }
  .pain .voice { margin-top: 0; }
  main h2 { font-size: clamp(2.25rem, 2.8vw, 2.625rem); }
  .lede { font-size: 1.25rem; max-width: 30ch; }
  .split {
    display: grid; grid-template-columns: minmax(0, 1.3fr) minmax(0, 1fr);   /* the words get the wider column */
    column-gap: clamp(48px, 7vw, 112px); align-items: center;
  }
  .split.media-first { grid-template-columns: minmax(0, 1fr) minmax(0, 1.3fr); }
  .split > * { margin-top: 0 !important; }
  .split > .device, .split > .aha-seq, .split > .duo { justify-self: center; padding-top: 28px; }
  .split > .device { margin-top: 28px !important; padding-top: 0; }
  .split.flip > :first-child { order: 2; }
  .split.aside { grid-template-columns: minmax(0, 1fr) minmax(0, 1.3fr); grid-template-areas: "media text" "media voice"; align-items: end; }
  .split.aside > .split-text { align-self: end; }
  .split.aside > .voice { display: grid; flex-direction: initial; align-items: start; align-self: start; margin-top: 22px !important; max-width: 30rem; }
  .split.aside .voice .who { order: 2; }
  .split.aside .bubble { margin-top: 18px; padding: 12px 16px 14px; font-size: 1rem; }
  .split.aside .bubble::before { top: 24px; left: auto; right: -7px; margin-left: 0; }
  .split-text { max-width: 36rem; }
  .duo .device { --w: 240px; }
  .sheet { display: block; width: 200px; }
  .steps { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 32px; margin-top: 40px; }
  .trust-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 40px; margin-top: 40px; }
  .faq .sec-in { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 2fr); column-gap: 64px; align-items: start; }
  .faq-list { margin-top: 0; }
  .cta-in {
    grid-template-columns: minmax(0, 1fr) auto; justify-items: start; align-items: center;
    column-gap: 64px; text-align: left;
  }
  .cta-loir { margin: 0 0 18px; }
  .cta h2 { font-size: clamp(3rem, 4.4vw, 4rem); line-height: 1; letter-spacing: -0.03em; }
  .cta .hero-cta { align-items: flex-start; margin-top: 32px; }
  .qr-card {
    display: grid; justify-items: center; gap: 12px;
    padding: 20px 20px 16px; border-radius: 24px; background: var(--ground);
  }
  .qr-card figcaption { max-width: 150px; font-size: 0.875rem; font-weight: 600; line-height: 1.35; text-align: center; }
  .site-foot .wrap { grid-template-columns: 2fr 1fr 1fr; gap: 40px; }
  .site-foot .wrap > :first-child { grid-column: auto; }
}

/* Reduced motion: the aha shows its still, state B (capture 03) with its label, with or without JS */
@media (prefers-reduced-motion: reduce) {
  .aha-a { display: none; }
  .aha-seq { --w: var(--dev-w); }
  .js .aha-b .phone { background: var(--bezel); }
  .js .aha-b img, .js .aha-b figcaption { opacity: 1; filter: none; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; scroll-behavior: auto !important; }
}
