/* page CSS: only what sits inside a visual, and one --p-h per card group (system.md) */

/* the hero frame: the open receipt on the silk ground */
.qt-stage { isolation: isolate; }
.qt-stage > .qt {
  position: absolute; z-index: 1; left: 50%; top: var(--s-7); transform: translateX(-50%);
  width: min(440px, calc(100% - 2 * var(--s-6)));
  background: #fff; color: #232323; border-radius: var(--r-md);
  border: 1px solid rgb(35 35 35 / .12); box-shadow: 0 24px 48px -24px rgb(37 48 58 / .35);
  padding: var(--s-6); display: grid; gap: var(--s-3); font-size: 14px; line-height: 1.5;
}
.qt__top { display: flex; justify-content: space-between; align-items: center; gap: var(--s-3); color: #5c5c5c; font-size: 13px; }
.qt__chip { padding: 2px 10px; border-radius: 999px; background: #a1ffcb; color: #232323; font-weight: 500; }
.qt__title { font: 500 24px/1.2 var(--font-display); letter-spacing: -0.02em; margin-top: var(--s-2); }
.qt__period { color: #5c5c5c; }
.qt__parties { display: grid; grid-template-columns: 1fr 1fr; gap: var(--s-4); padding: var(--s-4) 0; border-block: 1px solid rgb(35 35 35 / .1); }
.qt__parties > div { display: grid; gap: 2px; }
.qt__k { font-size: 13px; color: #5c5c5c; }
.qt__rows > div { display: flex; justify-content: space-between; padding: 6px 0; font-variant-numeric: tabular-nums; }
.qt__rows dd { margin: 0; }
.qt__total { border-top: 1px solid rgb(35 35 35 / .12); margin-top: 4px; padding-top: 10px !important; font-weight: 500; font-size: 16px; }
.qt__text { color: #3b3b3b; }
.qt__sign { display: flex; justify-content: space-between; align-items: end; color: #5c5c5c; font-size: 13px; }
.qt__signature { font: italic 500 22px/1 var(--font-display); color: #25303a; }
@media (max-width: 1023px) {
  .qt-stage > .qt { top: var(--s-5); padding: var(--s-5); }
  .qt__text, .qt__sign { display: none; }
}
@media (max-width: 639px) {
  .qt-stage > .qt { width: calc(100% - 2 * var(--s-4)); top: var(--s-4); gap: var(--s-2); }
  .qt__parties { display: none; }
}

/* app-frame (sections-library.md, the whole recipe) */
.app.ui { display: grid; grid-template-columns: minmax(0, 5fr) minmax(0, 7fr); margin-top: var(--s-7); background: var(--u-bg); border: 1px solid var(--u-border); border-radius: var(--u-r); box-shadow: var(--u-shadow); }
.app > .app__pane { position: relative; min-width: 0; min-height: 0; overflow: hidden; }
.app > .app__pane + .app__pane { border-left: 1px solid var(--u-line); }
.app > .app__pane > .ui-panel { width: 100%; border: 0; border-radius: 0; box-shadow: none; }
.app > .app__pane > .ui-doc { max-width: none; }
.app > .app__pane::after { content: ""; position: absolute; inset: auto 0 0 0; height: 64px; background: linear-gradient(transparent, var(--u-bg)); pointer-events: none; }
@media (min-width: 1024px) and (max-width: 1279px) { .app.ui { grid-template-columns: minmax(0, 4fr) minmax(0, 8fr); } }
@media (max-width: 1023px) {
  .app.ui { grid-template-columns: minmax(0, 1fr); grid-template-rows: auto minmax(0, 1fr); }
  .app > .app__pane--list { max-height: 252px; }
  .app > .app__pane--list::after { display: none; }
  .app .ui-win__side { display: none; }
  .app .ui-win__body { grid-template-columns: minmax(0, 1fr); }
  .app > .app__pane + .app__pane { border-left: 0; border-top: 1px solid var(--u-line); }
}
@media (max-width: 639px) {
  .app.ui { grid-template-rows: minmax(0, 1fr); }
  .app > .app__pane--list { display: none; }
  .app > .app__pane + .app__pane { border-top: 0; }
}

/* features: one panel height for the group */
#fonctions .panel { --p-h: 264px; }
@media (max-width: 639px) { #fonctions .panel { --p-h: 168px; } #fonctions .stage { --fade-h: 40px; } }

/* the mail inside the #envoi frame */
.mail { display: grid; font-size: 14px; line-height: 1.5; }
.mail__bar { display: flex; justify-content: space-between; padding: 12px 16px; border-bottom: 1px solid var(--u-line); }
.mail__sent { color: var(--u-muted, #686868); }
.mail__row { display: grid; grid-template-columns: 56px 1fr; padding: 8px 16px; border-bottom: 1px solid var(--u-line); }
.mail__row > span { color: var(--u-muted, #686868); }
.mail__body { padding: 16px; display: grid; gap: 10px; }
.mail__file { display: flex; gap: 12px; align-items: center; margin: 0 16px 16px; padding: 10px 12px; border: 1px solid var(--u-line); border-radius: 10px; }
.mail__file b { display: block; font-weight: 500; }
.mail__file small { color: var(--u-muted, #686868); font-size: 13px; }
.mail__icon { width: 28px; height: 28px; display: grid; place-items: center; }
.mail__icon svg { width: 24px; height: 24px; fill: none; stroke: currentColor; stroke-width: 1.4; }

/* plain fact lines beside a heading */
.facts { display: grid; gap: var(--s-2); padding: 0; margin: 0; list-style: none; }

/* the open receipt fills its pane, its note on the right */
.app > .app__pane--open > .ui-doc { width: 100%; padding: var(--s-6) 256px 0 var(--s-6); }
.app > .app__pane--open .ui-doc__page { box-shadow: none; }
.app > .app__pane--open .ui-doc__note { right: var(--s-6); width: 208px; }
@media (max-width: 1279px) { .app > .app__pane--open > .ui-doc { padding-right: 232px; } .app > .app__pane--open .ui-doc__note { width: 192px; } }
@media (max-width: 639px) { .app > .app__pane--open > .ui-doc { padding: var(--s-4) var(--s-4) 0; } .app > .app__pane--open .ui-doc__note { display: none; } }
.facts { margin-top: var(--s-6) !important; }

/* legal pages: one plain reading column */
.section.legal { height: auto; min-height: 100svh; }
.legal__h { font-size: var(--t-h3); }

/* the consent row beside the questions */
.consent { display: grid; gap: var(--s-3); padding: var(--s-5); margin-top: var(--s-6) !important; font-size: 14px; }
.consent__row { display: flex; gap: var(--s-3); align-items: center; }
.consent__row b { display: block; font-weight: 500; }
.consent__row small { color: var(--u-muted, #5c5c5c); font-size: 13px; }
.consent__check { display: flex; gap: var(--s-2); align-items: center; padding: var(--s-3); border-radius: 8px; background: var(--u-tint-1, #f3f3f3); }
.consent__check .ui-check__box { flex: none; }
.consent__meta { color: var(--u-muted, #5c5c5c); font-size: 13px; }
#tarifs .tarifs__frame { height: 440px; margin-top: var(--s-6) !important; }
@media (max-width: 639px) { #tarifs .tarifs__frame { height: 340px; } }

/* the name across the close: Plex's capitals need a full line box, or overflow: clip cuts their tops */
.close__word { line-height: 1.02; }
