:root{
  color-scheme:dark;
  --bg:#0b1017;
  --bg-deep:#06090e;
  --panel:#121a24;
  --panel-soft:#151f2b;
  --border:#263342;
  --text:#eef3f8;
  --muted:#91a0b2;
  --orange:#ff7a1a;
  --orange-soft:#ff9c20;
  --green:#4ee08b;
  --red:#ff6b76;
  --blue:#69b7ff;
  font-family:Inter,system-ui,-apple-system,BlinkMacSystemFont,"Segoe UI",sans-serif;
}

*{
  box-sizing:border-box;
}

html,
body{
  margin:0;
  min-height:100%;
}

body{
  background:
    radial-gradient(circle at top right,#162131 0,#0b1017 38%);
  color:var(--text);
}

button,
input{
  font:inherit;
}

button{
  cursor:pointer;
}

.site-shell{
  width:min(1180px,calc(100% - 32px));
  margin-inline:auto;
}

/* Loader exact issu du dashboard privé */

#ap-loading-screen{
  position:fixed;
  inset:0;
  z-index:99999;
  display:flex;
  align-items:center;
  justify-content:center;
  background:
    radial-gradient(
      circle at 50% 45%,
      #182636 0,
      #0c141e 42%,
      #06090e 100%
    );
  opacity:1;
  visibility:visible;
  transition:opacity .32s ease,visibility .32s ease;
  overflow:hidden;
}

#ap-loading-screen:before,
#ap-loading-screen:after{
  content:"";
  position:absolute;
  border-radius:50%;
  filter:blur(24px);
  pointer-events:none;
}

#ap-loading-screen:before{
  width:46vw;
  height:46vw;
  max-width:720px;
  max-height:720px;
  left:-18vw;
  bottom:-26vw;
  background:
    radial-gradient(
      circle,
      rgba(243,106,22,.28),
      rgba(243,106,22,0) 68%
    );
}

#ap-loading-screen:after{
  width:44vw;
  height:44vw;
  max-width:680px;
  max-height:680px;
  right:-17vw;
  bottom:-24vw;
  background:
    radial-gradient(
      circle,
      rgba(255,92,17,.23),
      rgba(255,92,17,0) 68%
    );
}

#ap-loading-screen.ap-loading-hide{
  opacity:0;
  visibility:hidden;
  pointer-events:none;
}

.ap-loading-inner{
  position:relative;
  z-index:1;
  width:min(900px,92vw);
  display:flex;
  flex-direction:column;
  align-items:center;
  text-align:center;
  padding:24px;
}

.ap-loading-logo{
  width:min(760px,86vw);
  height:auto;
  object-fit:contain;
  filter:drop-shadow(0 14px 30px rgba(0,0,0,.58));
  animation:apLogoIn .7s cubic-bezier(.2,.8,.2,1) both;
}

.ap-loading-title{
  margin-top:24px;
  color:#f7f9fb;
  font-size:clamp(18px,2.8vw,24px);
  font-weight:700;
  letter-spacing:.02em;
  text-shadow:0 2px 12px rgba(0,0,0,.35);
}

.ap-loading-track{
  position:relative;
  width:min(540px,80vw);
  height:12px;
  margin-top:18px;
  padding:2px;
  overflow:hidden;
  border:2px solid rgba(255,154,47,.9);
  border-radius:999px;
  background:rgba(0,0,0,.24);
  box-shadow:
    0 0 18px rgba(243,106,22,.16),
    inset 0 0 12px rgba(0,0,0,.45);
}

.ap-loading-bar{
  position:relative;
  height:100%;
  width:0;
  border-radius:inherit;
  background:
    linear-gradient(
      90deg,
      #ff6a00 0%,
      #ff9d19 45%,
      #ffd768 75%,
      #fff4c8 100%
    );
  box-shadow:0 0 18px rgba(255,125,20,.95);
  animation:apLoadProgress 3s linear forwards;
}

.ap-loading-bar:after{
  content:"";
  position:absolute;
  right:-5px;
  top:50%;
  width:14px;
  height:14px;
  border-radius:50%;
  transform:translateY(-50%);
  background:#fff7d1;
  box-shadow:
    0 0 14px #fff,
    0 0 22px #ff8a18;
}

.ap-loading-countdown{
  position:relative;
  width:82px;
  height:82px;
  margin-top:18px;
  display:grid;
  place-items:center;
  border-radius:50%;
  background:
    radial-gradient(circle,#27150b 0,#100c0b 62%,#08090b 100%);
  box-shadow:
    0 0 0 2px rgba(255,147,38,.65),
    0 0 24px rgba(243,106,22,.35);
}

.ap-loading-countdown:before{
  content:"";
  position:absolute;
  inset:-7px;
  border-radius:50%;
  border:5px solid rgba(255,146,40,.25);
  border-top-color:#ff9a2a;
  border-right-color:#ffd267;
  animation:apSpin 1s linear infinite;
}

.ap-loading-count{
  color:#ffbf55;
  font-size:32px;
  font-weight:900;
  line-height:1;
}

.ap-loading-sec{
  display:block;
  margin-top:-20px;
  color:#fff;
  font-size:10px;
  font-weight:800;
  letter-spacing:.12em;
}

.ap-loading-status{
  margin-top:14px;
  color:#ffae45;
  font-size:14px;
  font-weight:700;
  letter-spacing:.04em;
}

.ap-loading-powered{
  margin-top:24px;
  color:#d5dbe2;
  font-size:16px;
  font-style:italic;
  letter-spacing:.03em;
}

.ap-loading-powered strong{
  color:#ff9c20;
  font-weight:800;
  font-style:normal;
}

@keyframes apLoadProgress{
  from{width:0}
  to{width:100%}
}

@keyframes apSpin{
  to{transform:rotate(360deg)}
}

@keyframes apLogoIn{
  from{
    opacity:0;
    transform:translateY(8px) scale(.985)
  }
  to{
    opacity:1;
    transform:none
  }
}

/* Site public */

.site-header{
  border-bottom:1px solid rgba(38,51,66,.8);
  background:rgba(11,16,23,.9);
  backdrop-filter:blur(14px);
}

.header-inner{
  min-height:78px;
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:20px;
}

.site-logo{
  width:220px;
  max-width:50vw;
}

.header-actions{
  display:flex;
  align-items:center;
  gap:10px;
}

.primary-button,
.ghost-button,
.location-button,
.filter-button{
  border-radius:12px;
  padding:11px 16px;
  border:1px solid var(--border);
  font-weight:800;
}

.primary-button{
  background:var(--orange);
  border-color:var(--orange);
  color:#fff;
  box-shadow:0 7px 22px rgba(255,122,26,.23);
}

.primary-button.large{
  padding:14px 20px;
}

.ghost-button,
.filter-button{
  background:var(--panel-soft);
  color:#d8e1eb;
}

.location-button{
  border-color:#3a526a;
  background:#1b2a39;
  color:#fff;
}

.hero{
  padding:56px 0 34px;
}

.hero-grid{
  display:grid;
  grid-template-columns:minmax(0,1.5fr) minmax(260px,.65fr);
  gap:28px;
  align-items:stretch;
}

.hero-copy,
.hero-summary{
  border:1px solid var(--border);
  border-radius:24px;
  background:rgba(18,26,36,.92);
  box-shadow:0 18px 55px rgba(0,0,0,.22);
}

.hero-copy{
  padding:38px;
}

.hero-summary{
  padding:34px;
  display:flex;
  flex-direction:column;
  justify-content:center;
  text-align:center;
}

.eyebrow{
  color:#ff8a32;
  text-transform:uppercase;
  letter-spacing:.09em;
  font-size:12px;
  font-weight:900;
}

.hero h1{
  max-width:780px;
  margin:12px 0 14px;
  font-size:clamp(38px,5vw,68px);
  line-height:.98;
  letter-spacing:-.04em;
}

.hero h1 span{
  color:var(--orange);
}

.hero p{
  max-width:720px;
  color:#b1bdca;
  line-height:1.6;
  font-size:17px;
}

.location-panel{
  margin-top:28px;
}

.search-row{
  display:grid;
  grid-template-columns:1fr auto;
  gap:10px;
}

.search-row input{
  min-width:0;
  padding:15px 16px;
  border:1px solid #334155;
  border-radius:13px;
  outline:none;
  background:#0c141e;
  color:#fff;
}

.search-row input:focus{
  border-color:var(--orange);
  box-shadow:0 0 0 3px rgba(255,122,26,.13);
}

.filters{
  display:flex;
  flex-wrap:wrap;
  gap:8px;
  margin-top:12px;
}

.filter-button{
  padding:8px 12px;
  font-size:13px;
}

.filter-button.active{
  background:var(--orange);
  border-color:var(--orange);
  color:#fff;
}

.summary-label,
.summary-copy,
.summary-updated{
  color:var(--muted);
}

.summary-value{
  margin:10px 0 0;
  color:#fff;
  font-size:68px;
  line-height:1;
  font-weight:900;
}

.summary-copy{
  margin-top:4px;
  font-weight:700;
}

.summary-updated{
  margin-top:24px;
  font-size:12px;
}

.stats-grid{
  display:grid;
  grid-template-columns:repeat(4,1fr);
  gap:14px;
  margin-bottom:28px;
}

.stat-card{
  padding:20px;
  border:1px solid var(--border);
  border-radius:17px;
  background:rgba(18,26,36,.94);
}

.stat-card span{
  color:var(--muted);
  font-size:12px;
  text-transform:uppercase;
  letter-spacing:.07em;
}

.stat-card strong{
  display:block;
  margin-top:8px;
  font-size:28px;
}

.content-section{
  margin-top:34px;
}

.section-heading{
  display:flex;
  justify-content:space-between;
  align-items:flex-end;
  gap:20px;
  margin-bottom:14px;
}

.section-heading h2,
.alert-cta h2{
  margin:5px 0 0;
}

.section-note{
  color:var(--muted);
  font-size:13px;
}

.retailer-strip{
  display:grid;
  grid-template-columns:repeat(auto-fit,minmax(180px,1fr));
  gap:12px;
}

.retailer-card{
  min-height:100px;
  display:flex;
  align-items:center;
  gap:14px;
  padding:16px;
  border:1px solid var(--border);
  border-radius:16px;
  background:rgba(18,26,36,.94);
}

.retailer-logo-wrap{
  width:64px;
  height:54px;
  display:flex;
  align-items:center;
  justify-content:center;
}

.retailer-logo{
  max-width:100%;
  max-height:100%;
  object-fit:contain;
}

.retailer-card strong{
  display:block;
}

.retailer-card span{
  display:block;
  margin-top:4px;
  color:var(--muted);
  font-size:12px;
}

.map-placeholder{
  min-height:340px;
  border:1px solid var(--border);
  border-radius:20px;
  display:flex;
  flex-direction:column;
  justify-content:center;
  align-items:center;
  text-align:center;
  padding:30px;
  background:
    radial-gradient(circle at center,#162131 0,#101923 45%,#0b1118 100%);
}

.map-placeholder-icon{
  font-size:50px;
}

.map-placeholder p{
  max-width:600px;
  color:var(--muted);
  line-height:1.55;
}

.offers-grid{
  display:grid;
  grid-template-columns:repeat(auto-fit,minmax(310px,1fr));
  gap:14px;
}

.offer-card{
  display:grid;
  grid-template-columns:82px minmax(0,1fr);
  gap:15px;
  min-height:170px;
  padding:17px;
  border:1px solid var(--border);
  border-radius:18px;
  background:rgba(18,26,36,.94);
}

.product-image-wrap{
  width:82px;
  height:104px;
  display:flex;
  align-items:center;
  justify-content:center;
}

.product-image{
  max-width:100%;
  max-height:100%;
  object-fit:contain;
}

.offer-retailer{
  color:#ff8a32;
  font-size:12px;
  font-weight:900;
  text-transform:uppercase;
  letter-spacing:.07em;
}

.offer-name{
  margin-top:5px;
  font-size:17px;
  line-height:1.25;
  font-weight:800;
}

.offer-store{
  margin-top:5px;
  color:var(--muted);
  font-size:13px;
}

.offer-meta{
  display:flex;
  flex-wrap:wrap;
  align-items:center;
  gap:8px;
  margin-top:13px;
}

.status{
  border-radius:999px;
  padding:5px 9px;
  font-size:12px;
  font-weight:900;
}

.status.in{
  color:#082b17;
  background:var(--green);
}

.status.out{
  color:#3a060b;
  background:var(--red);
}

.status.other{
  color:#1b2733;
  background:#aeb9c6;
}

.price{
  font-size:18px;
  font-weight:900;
}

.quantity{
  color:var(--muted);
  font-size:12px;
}

.offer-link{
  display:inline-flex;
  margin-top:13px;
  color:var(--blue);
  font-size:13px;
  font-weight:800;
  text-decoration:none;
}

.alert-cta{
  margin-top:44px;
  margin-bottom:44px;
  padding:28px;
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:24px;
  border:1px solid rgba(255,122,26,.4);
  border-radius:22px;
  background:
    linear-gradient(
      135deg,
      rgba(255,122,26,.14),
      rgba(18,26,36,.96) 55%
    );
}

.alert-cta p{
  color:var(--muted);
  margin-bottom:0;
}

.site-footer{
  padding:28px 0 34px;
  border-top:1px solid var(--border);
  color:var(--muted);
  text-align:center;
  font-size:13px;
}

.site-footer strong{
  color:var(--orange);
}

.empty-state{
  grid-column:1/-1;
  padding:30px;
  color:var(--muted);
  text-align:center;
  border:1px dashed #334155;
  border-radius:16px;
}

@media(max-width:800px){
  .hero-grid{
    grid-template-columns:1fr;
  }

  .stats-grid{
    grid-template-columns:repeat(2,1fr);
  }

  .header-actions .ghost-button{
    display:none;
  }

  .hero-copy{
    padding:26px;
  }

  .alert-cta{
    align-items:flex-start;
    flex-direction:column;
  }
}

@media(max-width:600px){
  .site-shell{
    width:min(100% - 20px,1180px);
  }

  .header-inner{
    min-height:66px;
  }

  .site-logo{
    width:180px;
  }

  .header-actions .primary-button{
    padding:9px 11px;
    font-size:12px;
  }

  .hero{
    padding-top:24px;
  }

  .hero-copy{
    padding:21px;
  }

  .hero h1{
    font-size:39px;
  }

  .search-row{
    grid-template-columns:1fr;
  }

  .stats-grid{
    grid-template-columns:1fr 1fr;
    gap:9px;
  }

  .stat-card{
    padding:15px;
  }

  .stat-card strong{
    font-size:24px;
  }

  .section-heading{
    align-items:flex-start;
    flex-direction:column;
    gap:7px;
  }

  .offers-grid{
    grid-template-columns:1fr;
  }

  .offer-card{
    grid-template-columns:70px minmax(0,1fr);
  }

  .product-image-wrap{
    width:70px;
    height:90px;
  }

  .map-placeholder{
    min-height:260px;
  }

  .ap-loading-inner{
    padding:16px;
  }

  .ap-loading-logo{
    width:94vw;
  }

  .ap-loading-title{
    margin-top:18px;
  }

  .ap-loading-track{
    width:84vw;
  }

  .ap-loading-countdown{
    width:72px;
    height:72px;
  }

  .ap-loading-count{
    font-size:28px;
  }

  .ap-loading-powered{
    margin-top:20px;
    font-size:14px;
  }
}

@media(prefers-reduced-motion:reduce){
  .ap-loading-logo,
  .ap-loading-countdown:before{
    animation:none;
  }

  .ap-loading-bar{
    animation-timing-function:linear;
  }
}

.hero-banner{
  display:block;
  width:100%;
  height:auto;
  margin:16px 0 0;
  border-radius:18px;
  object-fit:contain;
  box-shadow:
    0 14px 34px rgba(0,0,0,.34),
    0 0 0 1px rgba(255,122,26,.12);
}
