/* ==========================================================================
   Module sections of the home page (v2). Markup: partials/home-why.html and partials/home-modules.html, generated
   from the approved canvas boards (C:/Users/user/Documents/Github/Studio/restobridge-landing-assets/module-sections/build_landing.py).

   Every measure in that markup is a multiple of --u, one design pixel of the 1440 px board:
     - from 1100 px up, the section is the board itself: --u is 1px on a 1440 px page and shrinks with narrower windows;
     - under 1100 px, text flows (rbm-t), pictures are scaled to the column as one piece (rbm-art), and the blocks
       marked rbm-f have their own layout below.
   Nothing here is used by another page, and no other stylesheet styles .rbm.
   ========================================================================== */
/* Same rhythm as the page's other sections: the board keeps 100 design px above and below its content, the section adds
   the rest up to --rb-section. Same column too: 1200 design px drawn on the page's 1160 px column (--rb-max less its gutters). */
.rbm {
  --ud: min(calc(1160px / 1200), 100vw / 1440);
  position: relative; container-type: inline-size; overflow: hidden; padding: max(0px, calc(var(--rb-section) - 100 * var(--ud))) 0;
  font-family: 'Figtree', 'Inter', system-ui, sans-serif; color: #1B1414;
}
.rbm-dark { color: #fff; }
.rbm-stage, .rbm-stage *, .rbm > .rbm-bg { box-sizing: content-box; }
.rbm-stage {
  --u: min(calc(1160px / 1200), 100cqw / 1440);
  position: relative; width: calc(1440 * var(--u)); height: calc(var(--h) * var(--u)); margin: 0 auto;
  font-size: calc(16 * var(--u)); line-height: normal; letter-spacing: normal;
}
.rbm > .rbm-bg { --u: min(calc(1160px / 1200), 100cqw / 1440); }
.rbm-stage :is(h2, h3) { font-family: inherit; }
.rbm-stage img { max-width: none; }
.rbm-art, .rbm-art-in { display: contents; }
.rbm-cta { transition: background-color .2s ease, border-color .2s ease, transform .2s ease; }
.rbm-cta:hover { transform: translateY(-1px); border-color: var(--rb-primary) !important; }
.rbm-cta:focus-visible { outline: 2px solid var(--rb-primary); outline-offset: 3px; }
.rbm-dark .rbm-cta:hover { border-color: #fff !important; }
/* Owner, 2026-11-11: only the hero and the footer keep rounded corners; the dark sections in between are square. */
.rbm > .rbm-bg[style*="border-radius"] { border-radius: 0 !important; }
.rbm-w { display: contents; }

/* ---- under 1100 px: text flows, pictures scale to the column ------------------------------------------------------ */
@media (max-width: 1099px) {
  .rbm { --g: clamp(20px, 5vw, 40px); padding: 0; }
  .rbm-stage {
    --u: 1px; width: auto; height: auto; max-width: 760px; box-sizing: border-box; padding: var(--rb-section) var(--g);
    display: flex; flex-direction: column; align-items: stretch; gap: 28px;
  }
  .rbm-x { display: none !important; }
  .rbm-t, .rbm-f { position: static !important; width: auto !important; min-width: 0; }
  .rbm-t > div[style^="width"], .rbm-t > div[style^="max-width"] { width: auto !important; }
  .rbm-stage h2 { font-size: clamp(34px, 8.6cqw, 52px) !important; }
  .rbm-stage br { display: none; }
  /* a picture: its box in design px is --bx --by --bw --bh; --pu is the size of one design px that fits it to the column */
  .rbm-art {
    --pu: calc(min(100cqw - 2 * var(--g), 720px) / var(--bw)); --u: var(--pu);
    display: block; position: relative; width: calc(var(--bw) * var(--pu)); height: calc(var(--bh) * var(--pu)); margin: 0 auto;
  }
  .rbm-art-in { display: block; position: absolute; left: calc(var(--bx) * -1 * var(--pu)); top: calc(var(--by) * -1 * var(--pu)); width: 0; height: 0; }
  /* pills and small cards laid over a picture keep a readable size; --fx --fy place them, as fractions of the picture */
  .rbm-pop {
    --u: clamp(.74px, var(--pu) * 1.2, 1px);
    left: calc((var(--bx) + var(--fx, 0) * var(--bw)) * var(--pu)) !important; top: calc((var(--by) + var(--fy, 0) * var(--bh)) * var(--pu)) !important;
  }
  .rbm-f-count { flex-direction: column !important; align-items: flex-start !important; gap: 20px !important; }
  .rbm-f-count > span { width: auto !important; }
  .rbm-f-minis { grid-template-columns: 1fr !important; }

  /* pills and cards over the pictures */
  .rbm-rapports .rbm-art { margin-top: 52px; }
  .rbm-rapports .rbm-pop { --fx: .1; --fy: -.17; }
  .rbm-equipe .rbm-art { margin: 64px auto 28px; }
  .rbm-equipe .rbm-n12 { --fx: .01; --fy: -.11; }
  .rbm-equipe .rbm-n11 { --fx: 0; --fy: .93; }
  .rbm-stocks .rbm-art { margin-bottom: 44px; }
  .rbm-stocks .rbm-n4 { --fx: .04; --fy: .04; }
  .rbm-stocks .rbm-n6 { --fx: .05; --fy: .8; }
  .rbm-finances .rbm-art { margin-bottom: 44px; }
  .rbm-finances .rbm-n3 { --fx: -.02; --fy: .05; }
  .rbm-finances .rbm-n5 { --fx: .08; --fy: .66; }

  /* Equipe: the closing row stacks */
  .rbm-equipe .rbm-t-end { flex-direction: column; align-items: flex-start !important; gap: 22px; }
  .rbm-equipe .rbm-t-end > div { flex-direction: column; align-items: flex-start !important; gap: 8px !important; }
  .rbm-equipe .rbm-t-end > div > span { white-space: normal !important; }
  .rbm-equipe .rbm-t-end > div > span[style*="border-radius"] { display: none !important; }

  /* Gestion: one tile per row, their text enlarged */
  .rbm-gestion .rbm-stage { gap: 16px; }
  .rbm-gestion .rbm-t { margin-bottom: 8px; }
  .rbm-gestion .rbm-art div[style*="z-index: 5"] { --u: calc(var(--pu) * 1.5); }
  .rbm-gestion .rbm-art-t2 div[style*="z-index: 5"], .rbm-gestion .rbm-art-t3 div[style*="z-index: 5"] { --u: calc(var(--pu) * 1.18); }
  .rbm-gestion .rbm-art-t4 div[style*="z-index: 5"] { --u: calc(var(--pu) * 1.12); left: calc(334 * var(--pu)) !important; width: calc(330 * var(--pu)) !important; }
  .rbm-gestion .rbm-art-t4 .rbm-art-in > div > div[style*="z-index: 4"] { top: calc(262 * var(--pu)) !important; }
}
@media (min-width: 640px) and (max-width: 1099px) {
  .rbm-f-minis { grid-template-columns: 1fr 1fr !important; }
  .rbm-why .rbm-w-old { grid-template-columns: 1fr 1fr 1fr; }
  .rbm-why .rbm-w-old > :last-child { grid-column: auto; width: auto !important; justify-self: stretch; }
}

/* ---- motion (js/home-modules.js adds .rbm-anim to <html>, .rbm-in to a section in view) ------------------------------
   translate and scale are used instead of transform, so the tilt set on pills and cards is kept. Without the script, or
   with "reduce motion", everything is simply shown. */
.rbm-anim .rbm-a {
  opacity: 0; translate: 0 24px;
  transition: opacity .75s cubic-bezier(.16, 1, .3, 1) var(--d, 0ms), translate .75s cubic-bezier(.16, 1, .3, 1) var(--d, 0ms), scale .6s cubic-bezier(.2, 1.4, .4, 1) var(--d, 0ms);
}
.rbm-anim .rbm-a-pop { scale: .84; translate: 0 10px; }
.rbm-anim .rbm-in .rbm-a { opacity: 1; translate: none; scale: none; }
/* hand-drawn arrows draw themselves */
.rbm-anim .rbm-a-draw path { stroke-dasharray: 1; stroke-dashoffset: 1; transition: stroke-dashoffset .9s ease calc(var(--d, 0ms) + 250ms); }
.rbm-anim .rbm-in .rbm-a-draw path { stroke-dashoffset: 0; }
/* pills keep a slow float once in */
.rbm-anim .rbm-in .rbm-a-pop { animation: rbm-float 6.5s ease-in-out calc(var(--d, 0ms) + 1200ms) infinite; }
@keyframes rbm-float { 0%, 100% { translate: 0 0; } 50% { translate: 0 -7px; } }

/* Agent IA: the conversation plays (typing, request, change to confirm, done) and the four steps follow it */
.rbm-live [data-rbm-show] { opacity: 0; translate: 0 12px; transition: opacity .45s ease, translate .5s cubic-bezier(.16, 1, .3, 1); }
.rbm-live [data-rbm-show].is-on { opacity: 1; translate: none; }
.rbm-live [data-rbm-step] {
  position: relative; isolation: isolate; opacity: .36; transition: opacity .4s ease;
  background: transparent !important; border-color: transparent !important; box-shadow: none !important;
}
.rbm-live [data-rbm-step].is-done, .rbm-live [data-rbm-step].is-active { opacity: 1; }
.rbm-live [data-rbm-step]::before {
  content: ""; position: absolute; z-index: -1; inset: calc(-11 * var(--u)) 0; border-radius: calc(18 * var(--u));
  background: rgba(255, 255, 255, .08); border: 1px solid rgba(255, 255, 255, .14); box-shadow: 0 20px 40px -24px rgba(0, 0, 0, .6);
  opacity: 0; transition: opacity .35s ease;
}
.rbm-live [data-rbm-step="4"]::before { inset: 0; }
.rbm-live [data-rbm-step].is-active::before { opacity: 1; }
.rbm-live [data-rbm-confirm] { transition: scale .18s ease, filter .18s ease; }
.rbm-live [data-rbm-confirm].is-press { scale: .92; filter: brightness(.82); }
.rbm-live [data-rbm-typed].is-typing { color: var(--rb-ink) !important; }
.rbm-live [data-rbm-typed].is-typing::after { content: ""; display: inline-block; width: 1.5px; height: 1.1em; margin-left: 2px; vertical-align: -0.18em; background: var(--rb-primary); animation: rbm-caret 1s steps(1) infinite; }
@keyframes rbm-caret { 50% { opacity: 0; } }

/* ---- Caisse, reworked on the page (owner, 2026-11-11): the till is the central section ------------------------------
   No grid paper: a clean ground from the white of the section above to warm sand, with a soft red glow behind the
   tablet. On desktop the title sits on two lines with the sentence and the button beside it, and the tablet takes the
   whole text column, starting where the title starts. These rules override the generated inline styles. */
.rbm.rbm-caisse { background: linear-gradient(180deg, #FFFFFF 0%, #FBF6F0 34%, #F3EAE0 100%) !important; }
.rbm-caisse > .rbm-bg {
  background: radial-gradient(52% 44% at 50% 64%, rgba(224, 8, 0, .13) 0%, rgba(240, 144, 42, .07) 45%, rgba(240, 144, 42, 0) 72%) !important;
}
@media (min-width: 1100px) {
  .rbm-caisse .rbm-stage { --h: 1140 !important; }
  .rbm-caisse .rbm-n1 {
    width: calc(1200 * var(--u)) !important; display: grid !important; grid-template-columns: minmax(0, 1fr) calc(420 * var(--u));
    column-gap: calc(60 * var(--u)); row-gap: calc(18 * var(--u)) !important; align-items: end !important;
  }
  .rbm-caisse .rbm-n1 > :first-child { grid-column: 1; }
  .rbm-caisse .rbm-n1 > h2 { grid-column: 1; max-width: calc(700 * var(--u)); }
  .rbm-caisse .rbm-n1 > div { grid-column: 2; grid-row: 1 / 3; max-width: none !important; padding-bottom: calc(66 * var(--u)); }
  .rbm-caisse .rbm-n1 > div p { font-size: calc(18 * var(--u)) !important; }
  .rbm-caisse .rbm-n7 { left: calc(900 * var(--u)) !important; top: calc(225 * var(--u)) !important; }
  .rbm-caisse .rbm-n2 {
    left: calc(120 * var(--u)) !important; top: calc(337 * var(--u)) !important; width: calc(1200 * var(--u)) !important; height: calc(645 * var(--u)) !important;
    box-shadow: 0 calc(70 * var(--u)) calc(120 * var(--u)) calc(-56 * var(--u)) rgba(60, 14, 10, .6), 0 calc(12 * var(--u)) calc(34 * var(--u)) calc(-12 * var(--u)) rgba(40, 14, 20, .28) !important;
  }
  .rbm-caisse .rbm-n2 > div, .rbm-caisse .rbm-n2 img { width: 100% !important; height: 100% !important; }
  .rbm-caisse .rbm-n3 { left: calc(1120 * var(--u)) !important; top: calc(284 * var(--u)) !important; }
  .rbm-caisse .rbm-n4 { left: calc(24 * var(--u)) !important; top: calc(700 * var(--u)) !important; }
  .rbm-caisse .rbm-n5 { left: calc(1010 * var(--u)) !important; top: calc(1008 * var(--u)) !important; }
  .rbm-caisse .rbm-n6 { left: calc(1304 * var(--u)) !important; top: calc(914 * var(--u)) !important; }
}

/* Caisse, second pass (owner, 2026-11-11): the ground of "Pourquoi RestoBridge" (warm paper, a faint grid fading at the
   edges, a peach glow behind the picture), no button, more room below. */
.rbm.rbm-caisse { background: var(--rb-cream) !important; }
.rbm-caisse > .rbm-bg {
  background: none !important;
  background-image: linear-gradient(rgba(90, 50, 30, .07) 1.5px, transparent 1.5px), linear-gradient(90deg, rgba(90, 50, 30, .07) 1.5px, transparent 1.5px) !important;
  background-size: 72px 72px !important;
  -webkit-mask: radial-gradient(75% 62% at 50% 50%, #000 0%, transparent 82%); mask: radial-gradient(75% 62% at 50% 50%, #000 0%, transparent 82%);
}
.rbm-caisse::before {
  content: ""; position: absolute; z-index: 0; left: 50%; top: 58%; width: min(1100px, 96%); height: 74%; transform: translate(-50%, -50%); pointer-events: none;
  background: radial-gradient(closest-side, color-mix(in srgb, var(--rb-accent) 26%, transparent) 0%, color-mix(in srgb, var(--rb-accent) 10%, transparent) 55%, transparent 100%);
}
.rbm-caisse .rbm-n7 { display: none !important; }
@media (min-width: 1100px) {
  .rbm-caisse .rbm-stage { --h: 1200 !important; }
  .rbm-caisse .rbm-n1 > div { padding-bottom: calc(10 * var(--u)); }
}
@media (max-width: 1099px) { .rbm-caisse .rbm-stage { padding-bottom: calc(var(--rb-section) + 24px); } }

/* Caisse, third pass (owner, 2026-11-11): the sentence goes back under the title, on one line; everything below moves up */
@media (min-width: 1100px) {
  .rbm-caisse .rbm-n1 { display: flex !important; align-items: flex-start !important; }
  .rbm-caisse .rbm-n1 > h2 { max-width: none; }
  .rbm-caisse .rbm-n1 > div { padding-bottom: 0; }
  .rbm-caisse .rbm-n1 > div p { white-space: nowrap; font-size: calc(20 * var(--u)) !important; }
  .rbm-caisse .rbm-stage { --h: 1170 !important; }
  .rbm-caisse .rbm-n2 { top: calc(307 * var(--u)) !important; }
  .rbm-caisse .rbm-n3 { top: calc(254 * var(--u)) !important; }
  .rbm-caisse .rbm-n4 { top: calc(670 * var(--u)) !important; }
  .rbm-caisse .rbm-n5 { top: calc(978 * var(--u)) !important; }
  .rbm-caisse .rbm-n6 { top: calc(884 * var(--u)) !important; }
}
/* the title stays on two lines (owner); what is below moves down by one title line */
@media (min-width: 1100px) {
  .rbm-caisse .rbm-n1 > h2 { max-width: calc(700 * var(--u)); }
  .rbm-caisse .rbm-stage { --h: 1237 !important; }
  .rbm-caisse .rbm-n2 { top: calc(374 * var(--u)) !important; }
  .rbm-caisse .rbm-n3 { top: calc(321 * var(--u)) !important; }
  .rbm-caisse .rbm-n4 { top: calc(737 * var(--u)) !important; }
  .rbm-caisse .rbm-n5 { top: calc(1045 * var(--u)) !important; }
  .rbm-caisse .rbm-n6 { top: calc(951 * var(--u)) !important; }
}

/* ---- the page's changeable colours (window.RBTheme) ------------------------------------------------------------------
   The generator turns the boards' brand colours into the page tokens inside style attributes; drawings keep theirs in
   stroke and fill attributes, so they are mapped here. */
.rbm [stroke="#E00800"] { stroke: var(--rb-primary); }
.rbm [fill="#E00800"] { fill: var(--rb-primary); }
.rbm [stroke="#FF4A3D"] { stroke: var(--rb-accent); }
.rbm [fill="#FF4A3D"] { fill: var(--rb-accent); }
.rbm [stroke="#252525"] { stroke: var(--rb-ink); }
/* the warm end of the pills' edge: orange beside the default red, and the matching neighbour of any other primary */
.rbm { --rbm-warm: #F0902A; }
@supports (color: oklch(from red l c h)) { .rbm { --rbm-warm: oklch(from var(--rb-primary) .74 .16 calc(h + 34)); } }

/* ---- Arabic (right to left) --------------------------------------------------------------------------------------------
   The composition of each section stays as drawn (the screens in it are real, left-to-right screens); the text reads
   from the right, without the letter spacing that breaks Arabic joining, in the page's Arabic face. */
html[dir="rtl"] .rbm, html[dir="rtl"] .rbm h2 { font-family: 'Tajawal', 'Figtree', 'Segoe UI', Tahoma, Arial, sans-serif !important; }
html[dir="rtl"] .rbm * { letter-spacing: 0 !important; }
html[dir="rtl"] .rbm h2 { line-height: 1.18 !important; }
html[dir="rtl"] .rbm-cta svg { transform: scaleX(-1); }
html[dir="rtl"] .rbm-why span[style*="left: calc(15 * var(--u)); top: calc(34"] { left: auto !important; right: calc(15 * var(--u)); }
html[dir="rtl"] .rbm-gestion span[style*="right: calc(22 * var(--u)); top: calc(22"] { right: auto !important; left: calc(22 * var(--u)); transform: scaleX(-1); }

/* Arabic on desktop, mirrored: every placed part of a section sits at the same distance from the right as it had from
   the left (--l, written by the generator), so the title is on the right and what was beside it is on the left.
   Hand-drawn arrows are flipped. Inside a picture or a card nothing moves. */
@media (min-width: 1100px) {
  html[dir="rtl"] .rbm > .rbm-bg[style*="--l:"],
  html[dir="rtl"] .rbm-stage > [style*="--l:"],
  html[dir="rtl"] .rbm-art-in > [style*="--l:"],
  html[dir="rtl"] .rbm-w > [style*="--l:"] { left: auto !important; right: calc(var(--l) * var(--u)) !important; }
  html[dir="rtl"] .rbm-stage > svg, html[dir="rtl"] .rbm-art-in > svg { scale: -1 1 !important; }
  /* Caisse was re-placed by hand above: the same places, mirrored */
  html[dir="rtl"] .rbm-caisse .rbm-n2 { --l: 120 !important; }
  html[dir="rtl"] .rbm-caisse .rbm-n3 { --l: 1120 !important; }
  html[dir="rtl"] .rbm-caisse .rbm-n4 { --l: 24 !important; }
  /* these two point at the Commander button of the real screen, which stays on the right */
  html[dir="rtl"] .rbm-caisse .rbm-n5 { left: calc(1010 * var(--u)) !important; right: auto !important; }
  html[dir="rtl"] .rbm-caisse .rbm-n6 { left: calc(1304 * var(--u)) !important; right: auto !important; scale: none !important; }
  /* Équipe: the coloured cells lie on the planner's own columns, so the planner and its cells stay as drawn */
  html[dir="rtl"] .rbm-equipe .rbm-art-in > [style*="--l:"]:not(.rbm-pop) { left: calc(var(--l) * var(--u)) !important; right: auto !important; }
}

/* "Et aussi" in Arabic: each tile is mirrored inside too (text, UI card, photo, shade), on every screen size */
html[dir="rtl"] .rbm-gestion .rbm-art-in > div > [style*="--l:"] { left: auto !important; right: calc(var(--l) * var(--u)) !important; }
html[dir="rtl"] .rbm-gestion .rbm-art-in > div > [style*="z-index: 4"] { transform: rotate(2deg) !important; transform-origin: top right !important; }
html[dir="rtl"] .rbm-gestion .rbm-art-t1 .rbm-art-in > div > div[style*="left: 0; top: 0"],
html[dir="rtl"] .rbm-gestion .rbm-art-t1 .rbm-art-in > div > div[style*="inset: 0"] { scale: -1 1; }
html[dir="rtl"] .rbm-gestion .rbm-art-t4 .rbm-art-in > div > div[style*="left: 0; top: 0"] { left: auto !important; right: 0; }
@media (max-width: 1099px) {
  html[dir="rtl"] .rbm-gestion .rbm-art-t4 div[style*="z-index: 5"] { left: auto !important; right: calc(334 * var(--pu)) !important; }
}

/* ---- phone pass (owner, 2026-11-11: "fix the mobile responsiveness of every section") ---- */
@media (max-width: 1099px) {
  /* Agent IA: the steps start at the page margin instead of 18px before it */
  .rbm-agent div[style*="margin: calc(10 * var(--u)) 0 0 calc(-18 * var(--u))"] { margin-inline: 0 !important; }
  /* Et aussi, last tile: taller, so the reservation card is shown whole, and the label stops before the arrow */
  .rbm-gestion .rbm-art-t4 { --bh: 520; }
  .rbm-gestion .rbm-art-t4 .rbm-n5, .rbm-gestion .rbm-art-t4 .rbm-n5 > div[style*="left: 0; top: 0"] { height: calc(520 * var(--pu)) !important; }
  .rbm-gestion .rbm-art-t4 .rbm-n5 > div[style*="left: 0; top: 0"] img { width: calc(561 * var(--pu)) !important; left: calc(-34 * var(--pu)) !important; top: calc(-155 * var(--pu)) !important; }
  .rbm-gestion .rbm-art-t4 .rbm-art-in > div > div[style*="z-index: 4"] { --u: calc(var(--pu) * 1.2); top: calc(290 * var(--pu)) !important; }
  .rbm-gestion .rbm-art-t4 div[style*="z-index: 5"] { width: calc(292 * var(--pu)) !important; }
}
@media (max-width: 640px) {
  /* Agent IA: the five tabs share the card's width, in every language */
  .rbm-agent div[style*="align-items: flex-end"] > span { flex: 1 1 auto; min-width: 0; justify-content: center; white-space: nowrap; padding-inline: 4px !important; font-size: 13px !important; }
}

/* Écran cuisine and Équipe on a phone (owner, 2026-11-11: both pictures were cut off by the screen edge; they used to
   scroll sideways): the whole picture fits the column, like every other section. */
@media (max-width: 1099px) {
  /* kitchen: the picture is framed on the three tickets, the photo behind is cropped to that frame, and the three
     captions keep a readable size under their ticket */
  .rbm-cuisine .rbm-art { --bx: 206 !important; --bw: 1028 !important; height: calc(548 * var(--pu) + 76px); }
  .rbm-cuisine .rbm-n2, .rbm-cuisine .rbm-n3 { left: calc(206 * var(--pu)) !important; width: calc(1028 * var(--pu)) !important; }
  .rbm-cuisine .rbm-n7, .rbm-cuisine .rbm-n8, .rbm-cuisine .rbm-n9 {
    width: calc(318 * var(--pu)) !important; margin-left: calc(-23 * var(--pu)); font-size: clamp(11px, 3cqw, 15px) !important; line-height: 1.3 !important;
  }
}
@media (max-width: 640px) {
  /* team: the cost card sits above the planner instead of over its first rows */
  .rbm-equipe .rbm-art { margin-top: 118px; }
  .rbm-equipe .rbm-n12 { --fy: -.46; }
}
