:root {
  --hippo-paper: #f5eee5;
  --hippo-card: #fffbf5;
  --hippo-line: #e5dbd0;
  --hippo-ink: #191716;
  --hippo-red: #4b72ae;
  --hippo-black: #191919;
}
body.logged {
  background: var(--hippo-paper) !important;
  color: var(--hippo-ink);
}
body.logged nav {
  background: var(--hippo-black) !important;
  --icon-bg: var(--hippo-black);
}
body.logged nav button { color: #fff7ef; }
body.logged nav button.active { background: var(--hippo-red) !important; --icon-bg: var(--hippo-red); }
body.logged nav button:focus-visible { outline-offset: -3px; }
body.logged .card, body.logged .panel {
  background: var(--hippo-card) !important;
  border-color: var(--hippo-line) !important;
}
body.logged .mini-head, body.logged .cloud-bar { background: var(--hippo-card) !important; }
#inventory-finish, .inventory-controls #next {
  background: var(--hippo-red);
}
body.logged .secondary {
  background: #efe6dc;
  color: #2a211c;
}
.hippo-topbar, .hippo-sync, .hippo-account {
  display: flex;
  align-items: center;
  gap: 9px;
}
.hippo-topbar {
  justify-content: space-between;
  margin-bottom: 12px;
  flex-wrap: wrap;
  font-size: 12px;
  color: #49413c;
}
.hippo-account { font-weight: 750; }
.hippo-sync button { display: grid; place-items: center; }
.hippo-sync .hi { width: 16px; height: 16px; }
.hippo-hero {
  position: relative;
  overflow: hidden;
  min-height: 268px;
  margin-bottom: 20px;
  border: 1px solid var(--hippo-line);
  border-radius: 20px;
  background: #fcf5eb;
}
.hippo-hero-copy {
  position: relative;
  padding: 26px 28px 25px;
  z-index: 1;
  width: max-content;
  max-width: 100%;
}
.hippo-location {
  display: block;
  margin-bottom: 8px;
  text-transform: uppercase;
  letter-spacing: .11em;
  font-weight: 800;
  font-size: clamp(10px, 1.15vw, 15px);
}
.hippo-location::before { content: '/'; color: var(--hippo-red); margin-right: 8px; font-weight: 950; }
.hippo-wordmark {
  margin: 0;
  text-transform: uppercase;
  font-size: clamp(48px, 6.2vw, 99px);
  font-weight: 950;
  letter-spacing: -.058em;
  line-height: .87;
}
.hippo-wordmark strong { color: var(--hippo-red); display: block; font-weight: inherit; }
.hippo-hero-copy p { margin: 13px 0 0; font-size: clamp(11px, 1.25vw, 16px); font-weight: 650; }
.hippo-hero-copy::after {
  content: '';
  display: block;
  background: var(--hippo-red);
  width: 57px;
  height: 6px;
  border-radius: 10px;
  margin-top: 14px;
}
.hippo-photo {
  position: absolute;
  inset: 0 0 0 auto;
  width: 52%;
  overflow: hidden;
  background: #201711;
  clip-path: polygon(19% 0, 100% 0, 100% 100%, 0 100%);
}
.hippo-photo img {
  position: absolute;
  width: 781.3%;
  max-width: none;
  left: -406.5%;
  top: 0;
}
.hippo-photo::after {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(90deg, transparent 58%, #1e1611 100%);
  border-left: 22px solid var(--hippo-red);
  transform: skewX(-19deg);
  transform-origin: bottom left;
}
.hippo-dashboard {
  display: grid;
  grid-template-columns: minmax(0, 1.45fr) minmax(290px, 1fr);
  gap: 18px;
  align-items: start;
}
.hippo-dashboard-side { display: grid; gap: 12px; scroll-margin-top: 14px; }
.hippo-dashboard-side:focus-visible { outline: 2px solid var(--hippo-red); outline-offset: 4px; border-radius: 18px; }
.hippo-shortcuts { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 8px; }
.hippo-shortcut {
  position: relative;
  min-width: 0;
  min-height: 130px;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  text-align: left;
  gap: 5px;
  padding: 12px 8px;
  border: 1px solid #dfd2c5;
  border-radius: 15px;
  background: var(--hippo-card);
  color: var(--hippo-ink);
  --icon-bg: var(--hippo-card);
}
.hippo-shortcut-primary {
  background: var(--hippo-red);
  border-color: var(--hippo-red);
  color: #fff;
  --icon-bg: var(--hippo-red);
}
.hippo-shortcut:hover { border-color: var(--hippo-red); box-shadow: 0 4px 14px #2a180d16; }
.hippo-shortcut b { font-size: clamp(12px, 1.2vw, 18px); letter-spacing: -.035em; }
.hippo-shortcut strong { font-size: clamp(24px, 2.8vw, 42px); line-height: 1; }
.hippo-shortcut small { font-size: 11px; font-weight: 600; line-height: 1.2; padding-right: 14px; }
.shortcut-arrow { position: absolute; right: 6px; bottom: 9px; width: 14px; height: 14px; }
.hippo-section-title { margin: 0 0 10px; font-size: 26px; letter-spacing: -.045em; }
.hippo-section-title::before { content: '/'; color: var(--hippo-red); margin-right: 9px; }
body.logged .premium-supplier-grid { grid-template-columns: 1fr !important; gap: 7px !important; }
body.logged .premium-supplier-tile {
  display: grid !important;
  grid-template-columns: auto minmax(0,1fr) auto;
  align-items: center !important;
  gap: 13px !important;
  min-height: 66px !important;
  padding: 6px 12px 6px 7px !important;
  background: var(--hippo-card) !important;
  border-color: var(--hippo-line) !important;
  color: var(--hippo-ink) !important;
}
body.logged .premium-supplier-tile:hover { transform: none; border-color: var(--hippo-red) !important; }
body.logged .premium-supplier-tile .supplier-copy { margin: 0; padding: 0; gap: 1px; }
body.logged .premium-supplier-tile .supplier-copy b { font-size: clamp(16px, 2.1vw, 22px) !important; overflow-wrap: anywhere; }
body.logged .premium-supplier-tile .supplier-copy small { font-size: 12px !important; color: #504842 !important; }
body.logged .premium-supplier-tile .supplier-chevron { position: static; }
body.logged .supplier-logo-frame { width: 105px; height: 48px; padding: 4px; border-radius: 9px; }
.hippo-dashboard-side .panel { min-width: 0; }
.hippo-dashboard-side .panel-title h2 { color: var(--hippo-ink) !important; }
.hippo-dashboard-side .health-layout { grid-template-columns: minmax(78px,.75fr) minmax(105px,1fr); gap: 12px; }
.hippo-dashboard-side .health-ring { max-width: 141px; padding: 10px; }
.inventory-heading {
  background: var(--hippo-card);
  border: 1px solid var(--hippo-line);
  padding: 16px;
  border-radius: 17px;
  margin: 12px 0;
}
.inventory-kicker { font-size: 19px; font-weight: 850; }
.inventory-heading .title {
  font-size: clamp(24px, 4.5vw, 52px);
  font-weight: 950;
  line-height: 1.05;
  letter-spacing: -.04em;
  color: var(--hippo-red);
  text-transform: uppercase;
  overflow-wrap: anywhere;
  margin: 3px 0;
}
.inventory-search { position: relative; margin: 10px 0; }
.inventory-search > .hi { position: absolute; left: 13px; top: 50%; transform: translateY(-50%); }
.inventory-search input {
  width: 100%;
  min-height: 46px;
  padding: 8px 14px 8px 43px;
  background: var(--hippo-card);
  border: 1px solid var(--hippo-line);
  border-radius: 12px;
}
.inv[hidden], .inventory-zone[hidden] { display: none !important; }
.inventory-zone > summary, .inventory-zone[open] > summary { background: #f2e8de; color: var(--hippo-ink); }
.inventory-primary-actions { background: var(--hippo-card); border-color: var(--hippo-line); }
body:not(.logged) main, body:not(.logged) .login { background: var(--hippo-black) !important; }
body:not(.logged) .login .hero {
  background: radial-gradient(ellipse at bottom, #21314a, #201c1c 70%) !important;
  padding-bottom: 55px !important;
}
body:not(.logged) .login .hero::after { display: none; }
body:not(.logged) .login .hero h1.hippo-wordmark {
  color: #fff7ef !important;
  font-family: inherit !important;
  font-size: clamp(50px, 8vw, 112px) !important;
  font-weight: 950 !important;
  line-height: .9 !important;
  letter-spacing: -.058em !important;
  transform: none !important;
}
body:not(.logged) .login .hero .hippo-wordmark strong { color: #f34e59; }
body:not(.logged) .login .hero .hippo-wordmark::after { display: none; }
body:not(.logged) .login .card { background: var(--hippo-card) !important; }
body:not(.logged) #login-submit { background: var(--hippo-red) !important; }
@media (min-width: 1050px) {
  body.logged main { margin-left: 226px; padding: 18px 19px 45px; }
  body.logged nav::before { box-shadow: none; }
  body.logged nav::after { content: 'AB Shopping · V11.4 TEST 21'; top: auto; bottom: 79px; font: 12px system-ui, sans-serif; color: #e8ddd5; }
  .hippo-account button { display: none; }
}
@media (max-width: 1180px) {
  .hippo-dashboard { grid-template-columns: minmax(0, 1.25fr) minmax(255px, 1fr); }
}
@media (max-width: 850px) {
  .hippo-dashboard { grid-template-columns: 1fr; }
  .hippo-hero { min-height: 203px; }
  .hippo-hero-copy { padding: 20px; }
}
@media (max-width: 550px) {
  .hippo-topbar { gap: 5px; }
  .hippo-account { gap: 5px; }
  .hippo-topbar button { padding: 6px 8px; }
  .hippo-hero { min-height: 171px; margin-bottom: 12px; }
  .hippo-hero-copy { padding: 16px 12px; }
  .hippo-wordmark { font-size: clamp(32px, 11vw, 57px); }
  .hippo-photo { width: 42%; opacity: .8; }
  .hippo-photo::after { border-left-width: 10px; }
  .hippo-hero-copy p { background: #fcf5eb; border-radius: 4px; width: max-content; max-width: 100%; }
  .hippo-section-title { font-size: 23px; }
  .inventory-heading { gap: 8px; }
}

/* L’accueil sert de point de départ sur tous les formats. */
body.logged[data-screen="home"] nav,
body.logged[data-screen="home"] #sidebar-logout { display: none !important; }
body.logged[data-screen="home"] main {
  max-width: 1530px;
  margin: 0 auto;
  padding-bottom: 27px !important;
}
body.logged[data-screen="home"] .hippo-account button { display: inline-flex; }
.hippo-topbar button { min-height: 40px; }
.hippo-today::first-letter { text-transform: uppercase; }
.hippo-shortcuts { margin-bottom: 19px; gap: 12px; }
.hippo-shortcut { padding: 15px; min-height: 120px; }
.hippo-shortcut .shortcut-arrow { right: 12px; bottom: 12px; }
@media (max-width: 600px) {
  .hippo-shortcuts { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; }
  .hippo-shortcut { padding: 11px; min-height: 100px; }
  .hippo-shortcut b { font-size: 15px; }
}

body.logged .account-icon,
body.logged .mini-head #logout-top.account-icon {
  min-width: 44px;
  min-height: 44px;
  justify-content: center;
  align-items: center;
  padding: 8px !important;
}
body.logged #sidebar-logout { justify-content: center; }
body.logged #nav-admin .hi { display: block; }
@media (min-width: 1050px) {
  body.logged .mini-head #logout-top.account-icon { display: none !important; }
}
@media (max-width: 1049px) {
  body.logged #nav-admin .hi { margin-inline: auto; }
}

.login-supplier-logos {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  align-items: center;
  gap: 11px;
  width: min(100%, 470px);
  margin-top: 23px;
}
.login-supplier-logos span {
  width: clamp(62px, 9vw, 99px);
  height: clamp(39px, 5.2vw, 58px);
  padding: 5px 7px;
  display: grid;
  place-items: center;
  border-radius: 9px;
  background: #fffaf3;
  box-shadow: 0 4px 10px #080c1250;
  transform: translateY(var(--drop, 0)) rotate(var(--tilt, 0deg));
}
.login-supplier-logos span:nth-child(3n+1) { --tilt: -6deg; --drop: 2px; }
.login-supplier-logos span:nth-child(3n+2) { --tilt: 5deg; --drop: -3px; }
.login-supplier-logos span:nth-child(3n) { --tilt: -2deg; --drop: 4px; }
.login-supplier-logos img {
  display: block;
  width: 100%;
  height: 100%;
  min-height: 0;
  object-fit: contain;
}
@media (max-width: 550px) {
  .login-supplier-logos { gap: 8px; width: min(100%,350px); margin-top: 15px; }
  .login-supplier-logos span { padding: 4px 5px; }
}

.home-task-grid { margin-bottom: 20px; }
.home-task-panel { padding: 13px; min-width: 0; }
.home-task-panel h2 { margin: 0 0 5px; font-size: 19px; }
.home-task-panel p { margin: 9px 0 3px; font-size: 13px; }
.home-task-panel summary { cursor: pointer; padding: 10px 0 0; color: var(--hippo-red); font-weight: 700; }
.home-task {
  display: flex; align-items: center; gap: 10px; width: 100%; min-height: 48px;
  padding: 8px 2px; border-top: 1px solid var(--hippo-line); border-radius: 0;
  background: transparent; color: var(--hippo-ink); text-align: left;
}
.home-task:hover { background: #f4ece4; }
.home-task span { flex: 1; min-width: 0; }
.home-task small { display: block; margin-top: 2px; font-weight: 500; }
.home-task .hi { flex: none; width: 17px; height: 17px; color: var(--hippo-red); }
body.logged #home-suppliers .premium-supplier-tile {
  grid-template-columns: auto minmax(0,1fr) minmax(0,auto) auto;
}
body.logged #home-suppliers .supplier-copy b { overflow-wrap: normal; font-size: clamp(18px,2.5vw,25px) !important; }
body.logged #home-suppliers .supplier-logo-frame { width: 119px; height: 58px; }
body.logged #home-suppliers .order-reminder {
  max-width: 12rem;
  font-size: 12px;
  font-weight: 750;
  text-align: right;
  color: #605148;
  line-height: 1.2;
}
body.logged #home-suppliers .order-reminder.due-today { color: var(--hippo-red); }
body:not(.logged) .login .hero {
  background: linear-gradient(0deg,#181c23ee,#191e25b8), url('steakhouse.webp') center / cover no-repeat !important;
}
@media (max-width: 600px) {
  body.logged #home-suppliers .premium-supplier-tile { gap: 7px !important; }
  body.logged #home-suppliers .supplier-logo-frame { width: clamp(54px,19vw,85px); height: 49px; }
  body.logged #home-suppliers .order-reminder { max-width: 76px; font-size: 11px; }
  body.logged #home-suppliers .supplier-chevron svg { width: 15px; }
  .hippo-shortcut { min-height: 94px; }
}

.login-keypad { display: none; }
@media (any-pointer: coarse) {
  .login-keypad {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 8px;
    max-width: 320px;
    margin: 0 auto 14px;
  }
  .login-keypad button {
    min-height: 48px;
    padding: 6px;
    border: 1px solid var(--hippo-line);
    border-radius: 10px;
    background: #fff;
    color: var(--hippo-ink);
    font-size: 21px;
    touch-action: manipulation;
  }
  .login-keypad button[data-pin-key="clear"] { font-size: 13px; }
  .login-keypad button:active { background: #f2e8de; }
}

.inventory-keypad { display: none; }
@media (any-pointer: coarse) and (min-width: 700px) {
  .inventory-workspace {
    display: grid;
    grid-template-columns: minmax(0, 1fr) clamp(188px, 25%, 255px);
    align-items: start;
    gap: 12px;
    min-height: calc(100vh - 32px);
  }
  .inventory-list { min-width: 0; }
  .inventory-keypad {
    display: grid;
    position: sticky;
    top: 12px;
    gap: 8px;
    padding: 12px;
    background: var(--hippo-card);
    border: 1px solid var(--hippo-line);
    border-radius: 14px;
  }
  .inventory-keypad-product {
    font-size: 14px;
    font-weight: 800;
    overflow-wrap: anywhere;
  }
  .inventory-keypad-value {
    min-height: 32px;
    padding: 3px 8px;
    border-radius: 8px;
    background: #f2e8de;
    text-align: right;
    font-size: 20px;
    font-variant-numeric: tabular-nums;
    overflow-wrap: anywhere;
  }
  .inventory-keypad-keys {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 6px;
  }
  .inventory-keypad button {
    min-height: 44px;
    padding: 4px;
    touch-action: manipulation;
  }
  .inventory-keypad-keys button {
    background: white;
    color: var(--hippo-ink);
    border: 1px solid var(--hippo-line);
    border-radius: 8px;
    font-size: 19px;
  }
  .inventory-keypad-keys button:active { background: #f2e8de; }
  .inventory-keypad button:disabled { opacity: .46; }
  input.inventory-keypad-active {
    outline: 2px solid var(--hippo-red);
    outline-offset: 1px;
  }
}

:root { --hippo-red: #527dbe; }
body:not(.logged), body:not(.logged) main, body:not(.logged) .login {
  background: #172335 !important;
}
body:not(.logged) .login .hippo-facade-login {
  display: flex !important;
  flex-direction: column;
  align-items: center;
  justify-content: end;
  text-align: center;
  gap: 10px;
  min-height: clamp(250px, 34vw, 360px);
  padding: 24px 16px !important;
  background: linear-gradient(0deg,#0f1824f5 3%,#0f182438 63%,transparent),
    url('facade-hippopotamus-morlaix.jpeg') center 41% / cover no-repeat !important;
}
body:not(.logged) .login .hippo-facade-login h1.hippo-wordmark {
  font-size: clamp(28px, 5vw, 47px) !important;
  line-height: 1.05;
  text-shadow: 0 2px 8px #0c121b;
}
body:not(.logged) .login .hippo-facade-login .hippo-wordmark strong {
  display: inline;
  color: #fff7ef;
}
.hippo-facade-login .login-logo, .hippo-facade-logo {
  display: block;
  width: clamp(110px, 18vw, 160px);
  height: auto;
}
.hippo-facade-logo { margin-bottom: 12px; }
body:not(.logged) #login-submit,
body.logged .hippo-shortcut-primary {
  background: #527dbe !important;
  border-color: #527dbe !important;
  color: #fff !important;
}
body.logged .hippo-shortcut-primary small { color: #fff !important; }
body.logged .hippo-hero {
  background: #162132 !important;
  min-height: 0 !important;
}
body.logged .hippo-hero .hippo-hero-copy {
  color: #fff7ef !important;
}
body.logged .hippo-hero .hippo-wordmark {
  color: #fff7ef !important;
  font-size: clamp(29px, 5.5vw, 66px) !important;
}
body.logged .hippo-hero .hippo-wordmark strong { color: #fff7ef !important; }
.hippo-hero .hippo-facade-photo {
  opacity: 1;
  background: url('facade-hippopotamus-morlaix.jpeg') 68% 39% / cover no-repeat;
}
body.logged #home-suppliers .order-reminder.due-today { color: #527dbe; }

.purchase-head,.purchase-line summary,.purchase-detail{display:grid;grid-template-columns:minmax(0,1fr) 78px 65px;gap:8px;align-items:center;padding:10px 4px;border-bottom:1px solid #e5ded6}.purchase-line summary{cursor:pointer}.purchase-line small{display:block;color:#666}.purchase-detail{font-size:12px;padding-left:12px}.purchase-head{font-size:12px}.purchase-line summary>span:first-child{overflow-wrap:anywhere}

/* V11 TEST 05 : navigation et contraste */
body.logged .mini-head .mobile-brand b {color:var(--hippo-red)!important;}
body.logged .mini-head .mini-account {color:#292522!important;}
body.logged .mini-head .mobile-admin {display:none!important;}
@media(max-width:1049px){
 body.logged #nav-admin {display:none!important;}
 body.logged nav {grid-template-columns:repeat(5,minmax(0,1fr))!important;grid-template-rows:auto!important;min-height:0!important;height:auto!important;padding:5px 5px calc(5px + env(safe-area-inset-bottom))!important;gap:3px!important;}
 body.logged nav:has(#nav-purchases[style*="none"]) {grid-template-columns:repeat(4,minmax(0,1fr))!important;}
 body.logged nav button {display:flex;flex-direction:column!important;justify-content:center;align-items:center;gap:4px!important;min-height:52px!important;padding:5px 1px!important;font-size:clamp(9px,2.5vw,12px)!important;line-height:1.1;}
 body.logged nav button span {white-space:nowrap;}
 body.logged .mini-head .mobile-admin {display:inline-flex!important;background:#ebe4da!important;color:#292522!important;border:1px solid #ded5ca!important;}
 body.logged .mini-head {gap:6px;padding:8px!important;}
 body.logged .mini-head .mobile-brand {min-width:0;gap:5px;}
 body.logged .mini-head .mobile-brand img {width:68px;height:32px;}
 body.logged .mini-head .mobile-brand b {font-size:11px;line-height:1.1;}
 body.logged .mini-head .mini-account {gap:5px;font-size:12px;}
 body.logged .mini-head .account-icon {min-width:40px;min-height:40px;padding:6px!important;}
 body.logged main {padding-bottom:calc(75px + env(safe-area-inset-bottom))!important;}
 body.logged[data-screen="home"] main {padding-bottom:27px!important;}
}

.u-stats{display:flex;flex-wrap:wrap;gap:8px;margin:10px 0}.u-stats span{background:#eee7dc;border-radius:8px;padding:8px 12px}.u-line[hidden]{display:none!important}.u-line summary span[data-status="ready"]{color:#176b47}.u-line summary span[data-status="variation"]{color:#945400}.u-line summary span[data-status="unknown"]{color:#476da5}
