:root {
  --paper: #f6f3ed;
  --surface: #fffdfa;
  --ink: #23251d;
  --muted: #58594f;
  --line: #d9d7cc;
  --copper: #a75130;
  --copper-soft: #f4e4d8;
  --dark: #242c21;
  font: 16px/1.45 'Avenir Next', Avenir, 'Segoe UI', Arial, sans-serif;
  color: var(--ink);
  background: var(--paper);
  color-scheme: light;
}

* { box-sizing: border-box; }
body { margin: 0; min-width: 280px; }
a { color: inherit; }
button, input { font: inherit; color: inherit; }
button { cursor: pointer; }
:where(button, a, input, [tabindex]):focus-visible { outline: 3px solid var(--copper); outline-offset: 3px; }
h1, h2, h3, p { margin: 0; }
h1 { font-size: clamp(2.6rem, 5.7vw, 5.4rem); letter-spacing: -.075em; line-height: .98; }
h1 span { color: var(--copper); }
.eyebrow { color: var(--copper); font-size: .79rem; font-weight: 750; letter-spacing: .11em; text-transform: uppercase; }

.page-header, .page-footer, .gallery-main, .single-main {
  max-width: 1480px;
  margin-inline: auto;
  padding-inline: clamp(1rem, 3.5vw, 3.4rem);
}

.page-header, .page-footer {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 12px 22px;
}

.page-header { min-height: 77px; border-bottom: 1px solid var(--line); }
.gallery-brand img { display: block; max-width: 176px; height: auto; }
.page-header nav { display: flex; align-items: center; gap: 20px; font-size: .9rem; }
.page-header a, .page-footer a, .card-heading a { text-decoration: none; }
.page-header a:hover, .page-footer a:hover, .card-heading a:hover { text-decoration: underline; text-underline-offset: 4px; }
.text-link { color: var(--copper); font-weight: 700; }
.page-intro { padding-block: clamp(2rem, 5vw, 4.5rem) 2.5rem; }
.page-intro h1, .single-heading h1 { margin-block: 12px; }
.page-intro > p:last-child, .single-heading > p:last-child { color: var(--muted); }

.role-picker { display: none; }
.device-gallery {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: clamp(14px, 2.3vw, 34px);
  align-items: start;
}
.device-card { min-width: 0; display: grid; gap: 11px; }
.card-heading { display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.card-heading h2 { font-size: 1.2rem; letter-spacing: -.025em; }
.card-heading p { font-size: .8rem; color: var(--muted); }
.card-heading a { color: var(--copper); font-size: .77rem; font-weight: 720; text-align: right; }
.page-footer { padding-block: 26px; margin-block-start: 18px; border-top: 1px solid var(--line); font-size: .86rem; color: var(--muted); }

.handset {
  --app-ink: #23251d;
  --app-accent: #a75130;
  --app-quiet: #f7f2e8;
  --app-tint: #f4e4d8;
  --app-cover: #372e24;
  display: grid;
  grid-template-rows: 34px auto minmax(0, 1fr) auto;
  min-height: 500px;
  height: min(72vw, 720px);
  border: 7px solid #242820;
  border-radius: 32px;
  background: var(--surface);
  color: var(--app-ink);
  box-shadow: 0 18px 34px #28271d12;
  overflow: hidden;
}
.handset[data-demo-role="equipe"] {
  --app-accent: #3f674c;
  --app-tint: #e1ecde;
  --app-cover: #304638;
}
.handset[data-demo-role="logistique"] {
  --app-accent: #69572c;
  --app-tint: #eee9d9;
  --app-cover: #44412e;
}
.phone-chrome { display: grid; grid-template-columns: 1fr auto 1fr; align-items: center; gap: 10px; padding-inline: 16px; font-size: .68rem; font-weight: 750; }
.camera { width: 69px; height: 15px; border-radius: 99px; background: #242820; }
.phone-chrome span:last-child { justify-self: end; letter-spacing: .15em; }
.app-head { display: flex; align-items: center; gap: 10px; padding: 10px 13px 14px; border-bottom: 1px solid var(--line); }
.app-mark, .row-symbol { display: grid; place-items: center; flex: none; width: 35px; height: 35px; border-radius: 10px; background: var(--app-tint); color: var(--app-accent); font-size: 1rem; font-weight: 800; }
.app-heading { display: grid; min-width: 0; line-height: 1.35; }
.app-heading strong { font-size: .94rem; }
.app-heading small { color: var(--muted); font-size: .73rem; }
.app-screen { min-width: 0; overflow-y: auto; padding: 14px 12px; scroll-padding: 14px; }
.app-screen:focus-visible { outline-offset: -4px; }
.app-cover { display: grid; gap: 8px; padding: 18px 15px; border-radius: 14px; background: var(--app-cover); color: #fffdfa; margin-bottom: 12px; }
.app-cover > span { font-size: .67rem; text-transform: uppercase; letter-spacing: .1em; font-weight: 650; }
.app-cover h3 { font-size: clamp(1.23rem, 2.2vw, 1.7rem); line-height: 1.05; letter-spacing: -.025em; }
.app-cover p { font-size: .84rem; line-height: 1.35; }
.screen-heading { margin-bottom: 12px; }
.screen-heading h3 { font-size: 1.45rem; letter-spacing: -.04em; line-height: 1.1; }
.screen-heading p, .detail-text { margin-top: 7px; font-size: .83rem; color: var(--muted); }
.mobile-list { display: grid; gap: 7px; }
.app-row, .product-preview {
  display: flex;
  align-items: center;
  gap: 8px;
  text-align: left;
  padding: 8px;
  width: 100%;
  min-width: 0;
  min-height: 56px;
  color: var(--app-ink);
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 10px;
}
.app-row:hover, .product-preview:hover { background: var(--app-quiet); }
.row-copy, .product-preview > span:last-child { min-width: 0; flex: 1 1 auto; overflow-wrap: anywhere; display: grid; gap: 3px; }
.app-row strong, .product-preview strong { font-size: .88rem; line-height: 1.17; }
.app-row small, .product-preview small { color: var(--muted); font-size: .72rem; line-height: 1.22; }
.row-chevron { font-size: 1.15rem; flex: none; padding-right: 3px; }
.row-badge { flex: 0 0 auto; max-width: 80px; padding: 4px 6px; border-radius: 6px; font-weight: 700; font-size: .65rem; background: var(--app-tint); color: var(--app-accent); text-align: center; }
.app-nav { display: grid; grid-template-columns: repeat(4,minmax(0,1fr)); gap: 3px; align-items: stretch; padding: 6px 4px 9px; border-top: 1px solid var(--line); background: var(--surface); }
.app-tab { display: grid; justify-items: center; padding: 5px 1px; min-height: 48px; border: 0; background: transparent; border-radius: 7px; font-size: .65rem; font-weight: 700; }
.app-tab > span:first-child { font-size: 1.1rem; line-height: 1.16; }
.app-tab[aria-current="page"], .app-tab:hover { background: var(--app-tint); color: var(--app-accent); }
.search-label { display: grid; gap: 4px; font-size: .76rem; font-weight: 700; }
.search-label input { width: 100%; min-width: 0; min-height: 43px; padding: 8px; background: var(--surface); border: 1px solid var(--line); border-radius: 8px; font-size: .83rem; }
.app-status { margin-block: 8px; color: var(--muted); font-size: .74rem; }
.product-preview img, .detail-photo { object-fit: contain; background: #fff; border-radius: 6px; }
.product-preview img { flex: 0 0 56px; width: 56px; height: 55px; }
.product-preview .product-preview-price { color: var(--app-accent); font-weight: 750; }
.detail-photo { display: block; width: 100%; height: 160px; margin: 10px 0 0; }
.screen-back { border: 0; background: var(--app-tint); color: var(--app-accent); border-radius: 7px; padding: 7px 10px; margin-bottom: 14px; font-weight: 700; font-size: .77rem; }
.app-source { display: block; color: var(--app-accent); font-weight: 700; margin-top: 10px; font-size: .79rem; }

.single-main { max-width: 610px; padding-block: 25px 0; }
.single-heading { margin-bottom: 15px; }
.single-heading h1 { font-size: clamp(2rem,5vw,3.4rem); }
.preview-single .handset { height: max(515px, 73svh); }

@media (max-width: 860px) {
  .page-intro { padding-bottom: 1.4rem; }
  .role-picker { display: flex; gap: 6px; margin-bottom: 14px; }
  .role-picker button {
    background: var(--surface);
    border: 1px solid var(--line);
    border-radius: 8px;
    min-height: 44px;
    padding: 6px 10px;
    font-weight: 700;
  }
  .role-picker button[aria-pressed="true"] { background: var(--dark); border-color: var(--dark); color: white; }
  .device-gallery { grid-template-columns: minmax(0, 510px); }
  [data-active-role="clients"] [data-preview-card]:not([data-preview-card="clients"]),
  [data-active-role="equipe"] [data-preview-card]:not([data-preview-card="equipe"]),
  [data-active-role="logistique"] [data-preview-card]:not([data-preview-card="logistique"]) { display: none; }
  .handset { height: max(525px, 68svh); }
}
@media (max-width: 490px) {
  .page-header { padding-block: 12px; align-items: start; }
  .page-header nav { width: 100%; justify-content: space-between; gap: 10px; font-size: .81rem; }
  .page-intro h1 { max-width: 12ch; }
  .card-heading p { max-width: 23ch; }
  .preview-single .single-main { padding-inline: 10px; }
  .preview-single .single-heading { padding-inline: 4px; }
  .preview-single .handset { height: max(490px, 72svh); border-width: 4px; border-radius: 23px; }
}
