/* Adaptation progressive : navigation, formulaires et atelier sur téléphone. */
body > header {height:auto;min-height:76px;gap:20px;}
body > header .brand {flex-shrink:0;white-space:nowrap;}
body > header nav {flex-wrap:wrap;justify-content:flex-end;gap:12px 18px;padding:12px 0;}
body > header > .cart {flex-shrink:0;white-space:nowrap;}
.menu-toggle {display:none;}
:focus-visible {outline:3px solid #ff9b70;outline-offset:3px;}
img {max-width:100%;}
.panel, .quote, form, .config-grid > *, .cart-layout > *, .admin-grid > *,
.account-grid > *, .two > *, .orders > *, .cart-item > *, .sign-material-row > * {min-width:0;}
.panel {overflow-wrap:anywhere;}
.panel textarea {display:block;width:100%;max-width:100%;min-height:100px;padding:12px;border:1px solid #c7c7c2;background:#fafafa;font:inherit;resize:vertical;}
.panel input, .panel select {max-width:100%;min-width:0;}
.panel input[type=checkbox], .panel input[type=radio] {display:inline-block;width:20px;height:20px;vertical-align:middle;flex-shrink:0;}
.panel .cgv-check {display:flex;align-items:flex-start;}
.panel input[type=file] {overflow:hidden;}
.config-grid {grid-template-columns:minmax(0,1.25fr) minmax(0,.75fr);}
.cart-layout {grid-template-columns:minmax(0,1fr) 360px;}
.admin-grid {grid-template-columns:minmax(0,400px) minmax(0,1fr);}
.account-grid, .two {grid-template-columns:repeat(2,minmax(0,1fr));}
.thickness-editor form {grid-template-columns:55px minmax(0,1fr) minmax(0,1fr) auto auto;}
.button {text-align:center;white-space:normal;}
@media(max-width:1200px) {
  body > header {padding:12px 20px;flex-wrap:wrap;align-items:center;gap:10px;}
  body > header .brand {margin-right:auto;font-size:18px;}
  body > header .menu-toggle {order:2;}
  body > header > .cart {order:3;min-height:44px;display:flex;align-items:center;}
  body > header nav {order:4;width:100%;flex-direction:column;align-items:stretch;gap:4px;padding:8px 0;}
  body > header nav > a, body > header nav form {display:block;}
  body > header nav a, body > header nav .link {display:block;width:100%;padding:12px;text-align:left;min-height:44px;}
  body > header nav a:hover {background:#292929;}
  body > header.nav-ready .menu-toggle {display:inline-flex;align-items:center;justify-content:center;min-height:44px;padding:8px 12px;border:1px solid #777;background:transparent;color:white;font:inherit;border-radius:4px;cursor:pointer;}
  body > header.nav-ready nav {display:none;}
  body > header.nav-ready.menu-open nav {display:flex;max-height:calc(100dvh - 90px);overflow-y:auto;overscroll-behavior:contain;}
  .admin-grid {grid-template-columns:minmax(0,1fr);}
  .sign-material-row {grid-template-columns:repeat(2,minmax(0,1fr));}
}
@media(max-width:850px) {
  .config-grid, .cart-layout, .account-grid, .two {grid-template-columns:minmax(0,1fr);}
  .page, .config {padding:36px 16px;}
  .panel, .quote {padding:22px;}
  .page h1 {font-size:clamp(28px,7vw,42px);line-height:1.15;overflow-wrap:anywhere;}
  h2 {font-size:23px;line-height:1.25;}
  .hero {min-height:0;padding:44px 20px;gap:24px;}
  .hero h1 {font-size:clamp(35px,9vw,52px);}
  .hero p:not(.eyebrow) {font-size:18px;}
  .hero-art {height:280px;}
  .steel-card {width:min(260px,72vw);padding:24px;}
  .steel-card b {font-size:36px;}
  .section-title {margin-bottom:24px;}
  .features div {padding:32px 20px;}
  .quote, .summary {position:static;min-height:0;}
  .quote h3 {margin-top:24px;}
  .quote strong, .sign-quote h3 {font-size:42px;}
  .panel input, .panel select, .panel textarea {font-size:16px;}
  .button, .panel select, .panel input:not([type=checkbox]):not([type=radio]) {min-height:44px;}
  .panel .button {max-width:100%;}
  .sign-options, .sign-validation, .sign-material-row {grid-template-columns:minmax(0,1fr);}
  .material-price-form, .work-time-form, .shipping-rates form {grid-template-columns:minmax(0,1fr);}
  .thickness-editor form {grid-template-columns:repeat(2,minmax(0,1fr));}
  .thickness-editor form > b {grid-column:1/-1;}
  .thickness-editor label {font-size:13px;}
  .thickness-editor .button {padding:12px 8px;}
  .traffic-cards {grid-template-columns:minmax(0,1fr);}
  .traffic-chart-panel {overflow-x:auto;}
  .traffic-chart {min-width:720px;}
  .traffic-chart.hourly-chart {min-width:620px;}
  .chart-heading {align-items:flex-start;flex-direction:column;gap:0;}
  .recent-visits {overflow-x:auto;}
  .recent-visits > div {min-width:650px;}
  .customer-table > a {grid-template-columns:minmax(0,1fr);gap:8px;padding:16px 0;}
  .customer-table > a span:nth-child(2), .customer-table > a span:nth-child(3) {display:block;}
  .customer-table > a span:nth-child(2)::before {content:'Société : ';}
  .customer-table > a span:nth-child(3)::before {content:'Inscription : ';}
  .customer-table > a span:nth-child(4)::before {content:'Commandes : ';}
  .customer-table > a > strong::before {content:'Total : ';}
  .message {max-width:95%;}
  .message p, .file-download, .production-list p {overflow-wrap:anywhere;}
  .profit-grid {grid-template-columns:minmax(0,1fr) auto;gap:10px 12px;font-size:14px;}
  .profit-grid b {white-space:nowrap;}
  .profit-grid strong:nth-last-child(2) {text-align:left;}
  .production-list .order-admin-actions, .order-admin-actions, .order-status-form {align-items:stretch;flex-direction:column;}
  .order-admin-actions > *, .order-admin-actions .button, .order-status-form select, .order-status-form .button {width:100%;min-width:0;}
  .payment-actions {flex-direction:column;}
  .payment-actions .button, .message-form .button {width:100%;}
  footer {padding:32px 20px;gap:24px;}
  #locker-dialog {width:calc(100vw - 16px);max-width:none;max-height:calc(100dvh - 16px);padding:12px;}
  #mr-map {min-height:360px;max-width:100%;overflow-x:auto;}
  #close-locker-map {position:sticky;top:0;z-index:1100;}
}
@media(max-width:480px) {
  body > header {padding:10px 12px;gap:8px;}
  body > header .brand {font-size:15px;letter-spacing:.08em;}
  .brand span {width:28px;height:30px;margin-right:4px;}
  body > header > .cart {padding:8px;font-size:14px;}
  body > header .cart b {margin-left:4px;padding:2px 6px;}
  body > header.nav-ready .menu-toggle {font-size:14px;padding:8px;}
  .page, .config {padding:28px 12px;}
  .panel, .quote {padding:16px;}
  .cart-item {grid-template-columns:minmax(0,1fr) auto;gap:12px;}
  .cart-item > div {grid-column:1/-1;}
  .cart-item > button {width:44px;height:44px;justify-self:end;}
  .orders > a, .orders > div, .orders-list .orders > a {grid-template-columns:minmax(0,1fr);gap:8px;}
  .orders-list .orders > a b {grid-column:auto;}
  .stat-row {grid-template-columns:minmax(0,1fr) auto;gap:8px;}
  .stat-row > :first-child {grid-column:1/-1;}
  .auth {min-height:0;padding:28px 12px;}
  .auth h1 {font-size:28px;}
  .sign-request-list article {grid-template-columns:minmax(0,1fr);gap:12px;}
  .summary .total {font-size:19px;}
}
@media(prefers-reduced-motion:reduce) {html{scroll-behavior:auto;} .chart-column i{transition:none;}}

#demandes, #commandes, [id^="demande-"] {scroll-margin-top:100px;}

#planning {scroll-margin-top:100px;margin-bottom:24px;}

#rentabilite {scroll-margin-top:100px;}
/* Sendcloud locker selector */
#locker-dialog {width:min(900px,94vw);max-height:90vh;overflow:auto;padding:20px;border:0;border-radius:8px}
#locker-dialog::backdrop{background:#0008}
#locker-dialog #mr-map{height:300px;width:100%;margin:16px 0}
.locker-result{border-top:1px solid #ddd;padding:12px 0;display:flex;gap:12px;align-items:center;justify-content:space-between}
.locker-result p{margin:0}.locker-result button{flex-shrink:0}
@media(max-width:600px){.locker-result{display:block}.locker-result button{margin-top:10px;width:100%}#locker-dialog #mr-map{height:230px}}
.notification-badge{display:inline-block;background:#c52e12;color:#fff;border-radius:999px;padding:3px 8px;font-size:12px;font-weight:700;line-height:1.4;vertical-align:middle;min-width:20px;text-align:center}

/* Statistiques détaillées v28 */
.traffic-filters {display:flex;flex-wrap:wrap;align-items:end;gap:16px;}
.traffic-filters label {display:grid;gap:8px;flex:1;min-width:180px;}
.traffic-detail {overflow-x:auto;}
.traffic-detail > div {display:grid;grid-template-columns:90px 65px 130px 150px minmax(180px,1fr) 150px;gap:12px;min-width:860px;}
.traffic-detail span {overflow-wrap:anywhere;}
.traffic-chart {overflow-x:auto;}
.chart-column {min-width:17px;}

/* Correctif menu mobile */
@media(max-width:850px){
  body > header.nav-ready.menu-open #site-nav > a,
  body > header.nav-ready.menu-open #site-nav > form {
    display:block;
  }
}
