/* Sections interactives Antigravity (Offline/Online, ROI, Devis) — extraites de
   la référence sombre ; TOUT est scopé .ag-scope (zéro fuite sur la page light). */
.ag-scope{
  /* Colors */
  --bg-deep: #08090C;
  --bg-surface: #111318;
  --bg-surface-elevated: #1a1d24;
  --accent-ruby: #8E2342;
  --accent-ruby-glow: rgba(142, 35, 66, 0.45);
  --accent-gold: #C5A880;
  --accent-gold-l: #E5C28F;
  --accent-gold-deep: #A9823C;
  --accent-gold-glow: rgba(197, 168, 128, 0.3);
  
  --text-primary: #FFFFFF;
  --text-secondary: #9FA6B2;
  --text-muted: #626975;
  --border-color: rgba(255, 255, 255, 0.08);
  --border-gold: rgba(197, 168, 128, 0.25);
  
  --green: #10B981;
  --green-glow: rgba(16, 185, 129, 0.35);
  --red: #EF4444;
  --red-glow: rgba(239, 68, 68, 0.35);
  
  /* Typography */
  --ff-primary: 'Outfit', system-ui, -apple-system, sans-serif;
  --ff-mono: 'Space Grotesk', monospace;
  --ff-arabic: 'Cairo', sans-serif;
  
  /* Layout & Speeds */
  --radius-lg: 24px;
  --radius-md: 16px;
  --radius-sm: 8px;
  --transition-smooth: 0.35s cubic-bezier(0.25, 0.8, 0.25, 1);
  --transition-fast: 0.2s ease;
  --max-w: 1200px;
}
section.ag-scope{background:var(--bg-deep);color:var(--text-primary)}
.ag-scope /* Glassmorphism Cards */
.glass-card{
  background: rgba(26, 29, 36, 0.5);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-lg);
  padding: 30px;
  box-shadow: 0 20px 50px rgba(0, 0, 0, 0.35);
  transition: var(--transition-smooth);
}
.ag-scope .gold-border{
  border-color: var(--border-gold);
}
.ag-scope .glass-card:hover{
  border-color: rgba(255, 255, 255, 0.15);
}
.ag-scope /* Section Header styling */
.center-header{
  text-align: center;
  margin-bottom: 50px;
}
.ag-scope .section-divider{
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 16px;
  margin-bottom: 20px;
  color: var(--accent-gold);
}
.ag-scope .div-line{
  height: 1px;
  width: 80px;
  background: linear-gradient(90deg, transparent, var(--accent-gold));
}
.ag-scope [dir="rtl"] .div-line{
  background: linear-gradient(270deg, transparent, var(--accent-gold));
}
.ag-scope .section-divider span:last-child{
  transform: scaleX(-1);
}
.ag-scope .div-star{
  font-size: 14px;
}
.ag-scope .section-title{
  font-size: clamp(28px, 4vw, 42px);
  font-weight: 800;
  letter-spacing: -0.5px;
  line-height: 1.15;
}
.ag-scope .section-desc{
  max-width: 620px;
  margin: 14px auto 0;
  color: var(--text-secondary);
  font-size: 16px;
}
.ag-scope /* Zellige styling */
.zellige{
  background-image: repeating-conic-gradient(from 0deg at 50% 50%, rgba(197, 168, 128, 0.03) 0deg 22.5deg, transparent 22.5deg 45deg);
  background-size: 48px 48px;
}
.ag-scope .tag-badge{
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: rgba(142, 35, 66, 0.15);
  border: 1px solid rgba(142, 35, 66, 0.3);
  color: var(--accent-gold-l);
  padding: 6px 14px;
  border-radius: 99px;
  font-family: var(--ff-mono);
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.5px;
  text-transform: uppercase;
  margin-bottom: 24px;
}
.ag-scope /* ---------- OFFLINE/ONLINE SHOWCASE ---------- */
.sync-grid{
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 50px;
  align-items: center;
}
.ag-scope .sync-info{
  display: flex;
  flex-direction: column;
  align-items: flex-start;
}
.ag-scope .section-title{
  margin-top: 10px;
}
.ag-scope .network-control-panel{
  width: 100%;
  max-width: 460px;
  background: var(--bg-surface);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  padding: 24px;
  margin-top: 30px;
  box-shadow: 0 10px 30px rgba(0,0,0,0.2);
}
.ag-scope .network-header{
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 20px;
}
.ag-scope .control-label{
  font-weight: 700;
  font-size: 13.5px;
  text-transform: uppercase;
  color: var(--text-muted);
  letter-spacing: 0.5px;
  font-family: var(--ff-mono);
}
.ag-scope .status-indicator-badge{
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: rgba(255, 255, 255, 0.05);
  padding: 4px 12px;
  border-radius: 30px;
  font-size: 12px;
  font-weight: 700;
}
.ag-scope .status-circle{
  width: 7px;
  height: 7px;
  border-radius: 50%;
}
.ag-scope .status-green{
  background: var(--green);
  box-shadow: 0 0 6px var(--green-glow);
}
.ag-scope .status-red{
  background: var(--red);
  box-shadow: 0 0 6px var(--red-glow);
}
.ag-scope .toggle-control-wrapper{
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 16px;
  background: rgba(255, 255, 255, 0.02);
  padding: 14px;
  border-radius: var(--radius-sm);
  margin-bottom: 24px;
}
.ag-scope .toggle-side-label{
  font-size: 14px;
  font-weight: 600;
  color: var(--text-secondary);
}
.ag-scope .switch{
  position: relative;
  display: inline-block;
  width: 50px;
  height: 28px;
}
.ag-scope .switch input{
  opacity: 0;
  width: 0;
  height: 0;
}
.ag-scope .switch .slider{
  position: absolute;
  cursor: pointer;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background-color: var(--red);
  transition: 0.4s;
  box-shadow: inset 0 2px 4px rgba(0, 0, 0, 0.3);
}
.ag-scope .switch .slider:before{
  position: absolute;
  content: "";
  height: 20px;
  width: 20px;
  left: 4px;
  bottom: 4px;
  background-color: white;
  transition: 0.4s;
  border-radius: 50%;
}
.ag-scope .switch input:checked + .slider{
  background-color: var(--green);
}
.ag-scope .switch input:checked + .slider:before{
  transform: translateX(22px);
}
.ag-scope .switch .slider.round{
  border-radius: 34px;
}
.ag-scope .sync-process-visualizer{
  display: flex;
  align-items: center;
  justify-content: space-between;
  background: rgba(0, 0, 0, 0.15);
  border-radius: var(--radius-sm);
  padding: 16px 24px;
  margin-bottom: 20px;
}
.ag-scope .vis-node{
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
}
.ag-scope .vis-node .node-icon{
  font-size: 26px;
}
.ag-scope .vis-node .node-label{
  font-size: 11px;
  font-weight: 600;
  color: var(--text-secondary);
}
.ag-scope .vis-pipe{
  flex: 1;
  height: 3px;
  background: rgba(255, 255, 255, 0.1);
  margin: 0 15px;
  position: relative;
  overflow: hidden;
}
.ag-scope .sync-pulse{
  position: absolute;
  width: 30px;
  height: 100%;
  background: linear-gradient(90deg, transparent, var(--green), transparent);
  animation: pulse-stream 1.5s infinite linear;
}
.ag-scope .vis-pipe.offline .sync-pulse{
  display: none;
}
.ag-scope .sync-message-alert{
  font-size: 13px;
  color: var(--text-secondary);
  background: rgba(255, 255, 255, 0.03);
  padding: 10px 14px;
  border-radius: var(--radius-sm);
  text-align: center;
  border-left: 3px solid var(--accent-gold);
}
.ag-scope .sync-stat-item{
  display: flex;
  flex-direction: column;
  gap: 4px;
}
.ag-scope .sync-stat-item .stat-lbl{
  font-size: 11px;
  color: var(--text-muted);
  font-weight: 600;
  text-transform: uppercase;
}
.ag-scope .sync-stat-item .stat-val{
  font-size: 13.5px;
  font-weight: 700;
}
.ag-scope .text-green{ color: var(--green); }
.ag-scope .text-red{ color: var(--red); }
.ag-scope .live-activity-feed{
  margin-top: 20px;
}
.ag-scope .live-activity-feed .feed-header{
  font-size: 12px;
  font-weight: 700;
  color: var(--text-secondary);
  margin-bottom: 10px;
  text-transform: uppercase;
}
.ag-scope .feed-lines{
  height: 100px;
  overflow-y: auto;
  display: flex;
  flex-direction: column;
  gap: 6px;
  font-family: var(--ff-mono);
  font-size: 11.5px;
}
.ag-scope .feed-line{
  line-height: 1.4;
  border-bottom: 1px dashed rgba(255, 255, 255, 0.02);
  padding-bottom: 4px;
}
.ag-scope .feed-line .time{
  color: var(--accent-gold-l);
}
.ag-scope .feed-line .txt{
  color: var(--text-secondary);
}
.ag-scope /* ---------- ROI PROFITABILITY CALCULATOR ---------- */
.roi-calculator-grid{
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 30px;
  margin-top: 30px;
}
.ag-scope .roi-metric-showcase{
  display: flex;
  flex-direction: column;
  gap: 20px;
  margin-bottom: 24px;
}
.ag-scope .roi-metric-item{
  border-bottom: 1px dashed rgba(255,255,255,0.05);
  padding-bottom: 12px;
}
.ag-scope .roi-metric-item:last-child{
  border-bottom: 0;
  padding-bottom: 0;
}
.ag-scope .roi-metric-item .lbl{
  font-size: 12.5px;
  color: var(--text-muted);
  font-weight: 700;
  text-transform: uppercase;
}
.ag-scope .roi-metric-item .val{
  font-size: 26px;
  font-weight: 800;
  margin-top: 4px;
}
.ag-scope .text-gold{ color: var(--accent-gold-l); }
.ag-scope .roi-summary-alert{
  background: rgba(197, 168, 128, 0.05);
  border-left: 3px solid var(--accent-gold-l);
  padding: 12px 16px;
  border-radius: var(--radius-sm);
  font-size: 13.5px;
  color: var(--text-secondary);
}
.ag-scope /* ---------- PRICING CALCULATOR SECTION ---------- */
.pricing-calc-grid{
  display: grid;
  grid-template-columns: 1.25fr 0.75fr;
  gap: 30px;
  align-items: stretch;
  margin-top: 30px;
}
.ag-scope .calc-title{
  font-size: 19px;
  font-weight: 700;
  margin-bottom: 24px;
  border-bottom: 1px solid var(--border-color);
  padding-bottom: 12px;
}
.ag-scope .control-group{
  margin-bottom: 28px;
}
.ag-scope .control-group:last-child{
  margin-bottom: 0;
}
.ag-scope /* Buttons group toggle version */
.btn-group-toggle{
  display: flex;
  gap: 12px;
}
.ag-scope .btn-toggle-option{
  flex: 1;
  background: rgba(255, 255, 255, 0.02);
  border: 1.5px solid var(--border-color);
  border-radius: var(--radius-md);
  padding: 16px;
  cursor: pointer;
  text-align: left;
  transition: var(--transition-smooth);
  color: var(--text-primary);
}
.ag-scope [dir="rtl"] .btn-toggle-option{
  text-align: right;
}
.ag-scope .btn-toggle-option.active{
  background: rgba(197, 168, 128, 0.06);
  border-color: var(--accent-gold-l);
  box-shadow: 0 4px 20px rgba(197, 168, 128, 0.1);
}
.ag-scope .btn-toggle-option b{
  display: block;
  font-size: 15px;
  font-weight: 700;
  margin-bottom: 4px;
}
.ag-scope .btn-toggle-option .desc-span{
  display: block;
  font-size: 12.5px;
  color: var(--text-secondary);
  font-weight: 400;
  line-height: 1.35;
}
.ag-scope /* Slider header styling */
.slider-header{
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 12px;
}
.ag-scope .slider-val{
  font-family: var(--ff-mono);
  font-size: 16px;
  font-weight: 700;
  color: var(--accent-gold-l);
}
.ag-scope /* Styling Range Sliders */
input[type=range]{
  -webkit-appearance: none;
  width: 100%;
  background: transparent;
}
.ag-scope input[type=range]:focus{
  outline: none;
}
.ag-scope input[type=range]::-webkit-slider-runnable-track{
  width: 100%;
  height: 6px;
  cursor: pointer;
  background: rgba(255, 255, 255, 0.08);
  border-radius: 3px;
}
.ag-scope input[type=range]::-webkit-slider-thumb{
  height: 20px;
  width: 20px;
  border-radius: 50%;
  background: var(--accent-gold-l);
  cursor: pointer;
  -webkit-appearance: none;
  margin-top: -7px;
  box-shadow: 0 0 10px rgba(0,0,0,0.5);
  transition: transform var(--transition-fast);
}
.ag-scope input[type=range]::-webkit-slider-thumb:hover{
  transform: scale(1.15);
}
.ag-scope .slider-hint{
  display: block;
  font-size: 12px;
  color: var(--text-muted);
  margin-top: 8px;
}
.ag-scope .hidden{
  display: none !important;
}
.ag-scope /* Custom Checkboxes */
.hardware-checkboxes{
  display: grid;
  gap: 12px;
}
.ag-scope .checkbox-container{
  display: block;
  position: relative;
  padding-left: 32px;
  cursor: pointer;
  font-size: 14.5px;
  color: var(--text-secondary);
  user-select: none;
}
.ag-scope [dir="rtl"] .checkbox-container{
  padding-left: 0;
  padding-right: 32px;
}
.ag-scope .checkbox-container input{
  position: absolute;
  opacity: 0;
  cursor: pointer;
  height: 0;
  width: 0;
}
.ag-scope .checkmark{
  position: absolute;
  top: 2px;
  left: 0;
  height: 20px;
  width: 20px;
  background-color: rgba(255, 255, 255, 0.04);
  border: 1.5px solid var(--border-color);
  border-radius: 6px;
  transition: var(--transition-fast);
}
.ag-scope [dir="rtl"] .checkmark{
  left: auto;
  right: 0;
}
.ag-scope .checkbox-container:hover input ~ .checkmark{
  border-color: rgba(255, 255, 255, 0.2);
}
.ag-scope .checkbox-container input:checked ~ .checkmark{
  background-color: var(--accent-gold);
  border-color: var(--accent-gold);
}
.ag-scope .checkmark:after{
  content: "";
  position: absolute;
  display: none;
}
.ag-scope .checkbox-container input:checked ~ .checkmark:after{
  display: block;
}
.ag-scope .checkbox-container .checkmark:after{
  left: 6px;
  top: 2px;
  width: 5px;
  height: 10px;
  border: stroke white;
  border-width: 0 2px 2px 0;
  transform: rotate(45deg);
  border-style: solid;
}
.ag-scope /* Summary Card */
.receipt-simulator-breakdown{
  display: flex;
  flex-direction: column;
  gap: 14px;
  font-size: 14.5px;
}
.ag-scope .breakdown-row{
  display: flex;
  justify-content: space-between;
  color: var(--text-secondary);
  border-bottom: 1px dashed rgba(255, 255, 255, 0.05);
  padding-bottom: 10px;
}
.ag-scope .breakdown-row span:last-child{
  font-family: var(--ff-mono);
  font-weight: 600;
  color: var(--text-primary);
}
.ag-scope .breakdown-total{
  margin-top: 10px;
  padding-top: 20px;
  border-top: 1px solid var(--border-color);
  text-align: center;
}
.ag-scope .total-main-lbl{
  font-size: 13.5px;
  color: var(--text-muted);
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}
.ag-scope .total-price-value{
  font-family: var(--ff-mono);
  font-size: 38px;
  font-weight: 800;
  color: var(--text-primary);
  margin: 6px 0;
}
.ag-scope .total-sub-lbl{
  font-size: 13px;
  color: var(--accent-gold-l);
  font-weight: 600;
}
.ag-scope .calc-actions{
  margin-top: 30px;
  display: flex;
  flex-direction: column;
  gap: 12px;
}
.ag-scope .calc-actions .btn{
  width: 100%;
}
.ag-scope .estimate-note{
  display: block;
  text-align: center;
  font-size: 11.5px;
  color: var(--text-muted);
}
@keyframes pulse-stream{
  0% { left: -30px; }
  100% { left: 100%; }
}
/* intégration light : titres clairs dans les bandes sombres */
.ag-scope .section-title{color:var(--text-primary)}
.ag-scope .section-desc{color:var(--text-secondary)}
.ag-scope .btn-primary{background:linear-gradient(135deg,var(--accent-ruby),#631227)}

/* ── bandes BORDEAUX + zellige BLANC (demande owner — remplace le noir) ────
   Surfaces re-mappées vers la profondeur bordeaux validée (--esp #2A0813). */
.ag-scope{--bg-deep:#2A0813;--bg-surface:#3F0D1C;--bg-surface-elevated:#551126;--border-color:rgba(255,255,255,.10)}
section.ag-scope,section.block.ag-scope,section.block.zellige.ag-scope{position:relative;background:radial-gradient(110% 130% at 50% -10%,#4A1122 0%,#2A0813 55%,#1E060D 100%)}
section.ag-scope::before,section.block.ag-scope::before,section.block.zellige.ag-scope::before{content:"";position:absolute;inset:0;pointer-events:none;opacity:.45;mix-blend-mode:screen;background-image:repeating-conic-gradient(from 0deg at 50% 50%, rgba(255,255,255,.05) 0deg 22.5deg, transparent 22.5deg 45deg);background-size:60px 60px}
section.ag-scope>.wrap{position:relative;z-index:1}
.ag-scope .glass-card{background:rgba(255,255,255,.05);border-color:rgba(255,255,255,.12)}

/* responsive : grilles en 1 colonne sur mobile/tablette */
@media(max-width:860px){
  .ag-scope .roi-calculator-grid,.ag-scope .pricing-calc-grid,.ag-scope .sync-grid{grid-template-columns:1fr;gap:22px}
  .ag-scope .sync-process-visualizer{margin:18px 0}
}

/* mobile : cartes des sections interactives moins paddées (écrans ≤640px) */
@media(max-width:640px){
  .ag-scope .glass-card{padding:20px 16px}
  .ag-scope .calc-title{font-size:15px}
}

/* ── V3 a11y : focus clavier VISIBLE sur les contrôles custom (or clair sur
   bordeaux) + contrastes AA + reduced-motion pour toutes les sections. ── */
.ag-scope .slider-hint{color:rgba(247,239,223,.66)}
.ag-scope .estimate-note{color:rgba(247,239,223,.72)}
.ag-scope input[type="range"]:focus-visible{outline:2px solid #E5C28F;outline-offset:3px;border-radius:4px}
.ag-scope .checkbox-container input:focus-visible ~ .checkmark{outline:2px solid #E5C28F;outline-offset:2px}
.ag-scope .switch input:focus-visible + .slider{outline:2px solid #E5C28F;outline-offset:3px}
.ag-scope .btn-toggle-option:focus-visible,.ag-scope .btn:focus-visible{outline:2px solid #E5C28F;outline-offset:2px}
@media(prefers-reduced-motion:reduce){
  .ag-scope *,.ag-scope *::before,.ag-scope *::after{animation-duration:.01ms !important;animation-iteration-count:1 !important;transition-duration:.01ms !important}
}
