/* ============================================================
   DOMO — démo domotique interactive + audit voltmètre
   Spécifique électricien (Atelier Volta).
   ============================================================ */

/* ═════════ DÉMO DOMOTIQUE ═════════ */
.domo {
  padding: clamp(80px, 10vw, 140px) var(--gutter);
  background: var(--paper);
  position: relative;
}
.domo .section-head { margin-left: auto; margin-right: auto; }

.domo-stage {
  max-width: var(--container);
  margin: 0 auto;
  display: grid;
  grid-template-columns: minmax(280px, 360px) 1fr;
  gap: clamp(28px, 4vw, 56px);
  align-items: stretch;
}

.domo-panel {
  background: var(--text);
  color: var(--paper);
  border-radius: var(--radius-lg);
  padding: 32px 28px;
  display: flex;
  flex-direction: column;
  gap: 4px;
  box-shadow: 0 40px 80px -40px rgba(0,0,0,.45);
}
.domo-panel-tag {
  display: inline-block;
  font-size: .7rem;
  letter-spacing: .25em;
  text-transform: uppercase;
  color: var(--accent-3);
  padding: 6px 12px;
  border: 1px solid var(--accent-3);
  border-radius: 999px;
  margin-bottom: 16px;
  align-self: flex-start;
}
.domo-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 16px 0;
  border-top: 1px solid rgba(255,255,255,.1);
}
.domo-row:first-of-type { border-top: 0; }
.domo-row-meta strong {
  display: block;
  font-family: 'Fraunces', serif;
  font-size: 1.05rem;
  font-weight: 600;
  margin-bottom: 2px;
}
.domo-row-meta span {
  font-size: .82rem;
  color: rgba(255,255,255,.55);
}

.domo-toggle {
  flex-shrink: 0;
  background: none; border: 0; padding: 0;
  cursor: pointer;
  --t-w: 56px; --t-h: 30px;
}
.toggle-track {
  display: block;
  width: var(--t-w);
  height: var(--t-h);
  background: rgba(255,255,255,.12);
  border: 1px solid rgba(255,255,255,.18);
  border-radius: 999px;
  position: relative;
  transition: background .35s ease, border-color .35s ease;
}
.toggle-thumb {
  position: absolute;
  top: 3px; left: 3px;
  width: calc(var(--t-h) - 8px);
  height: calc(var(--t-h) - 8px);
  background: #fff;
  border-radius: 50%;
  box-shadow: 0 4px 12px rgba(0,0,0,.4);
  transition: left .35s cubic-bezier(.5,.1,.2,1), background .35s;
}
.domo-toggle[aria-pressed="true"] .toggle-track {
  background: var(--accent);
  border-color: var(--accent);
}
.domo-toggle[aria-pressed="true"] .toggle-thumb {
  left: calc(var(--t-w) - var(--t-h) + 3px);
}

/* ═════════ Salon stylisé ═════════ */
.domo-room {
  position: relative;
  border-radius: var(--radius-lg);
  overflow: hidden;
  background: linear-gradient(180deg, #1f2937 0%, #0f172a 100%);
  min-height: 460px;
  isolation: isolate;
  box-shadow: 0 40px 80px -40px rgba(0,0,0,.5);
}
.domo-room::before {
  content: '';
  position: absolute;
  inset: 0;
  background: radial-gradient(ellipse at 50% 30%, rgba(255,200,80,0) 0%, transparent 60%);
  transition: background 1s ease;
  pointer-events: none;
  z-index: 5;
}
.domo-room.lights-on::before {
  background: radial-gradient(ellipse at 50% 30%, rgba(255,200,80,.45) 0%, rgba(255,180,60,.18) 35%, transparent 70%);
}

.room-floor {
  position: absolute;
  left: 0; right: 0; bottom: 0;
  height: 28%;
  background: linear-gradient(180deg, #2a3441 0%, #1a2330 100%);
  border-top: 1px solid rgba(255,255,255,.04);
}
.room-wall {
  position: absolute;
  inset: 0;
  background-image:
    linear-gradient(90deg, rgba(255,255,255,.02) 1px, transparent 1px),
    linear-gradient(0deg, rgba(255,255,255,.02) 1px, transparent 1px);
  background-size: 40px 40px;
  pointer-events: none;
}

.room-window {
  position: absolute;
  top: 18%;
  right: 12%;
  width: 28%;
  height: 42%;
  background: linear-gradient(180deg, #1e2a3a 0%, #0a0f1a 100%);
  border: 4px solid #3a4858;
  border-radius: 4px;
  overflow: hidden;
}
.room-window-light {
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, rgba(255,200,140,.45), rgba(180,120,80,.2));
  opacity: .85;
  transition: opacity .8s ease;
}
.room-blind {
  position: absolute;
  top: -100%;
  left: 0; right: 0;
  height: 100%;
  background: repeating-linear-gradient(0deg, #4a5663 0 8px, #2a3441 8px 10px);
  border-bottom: 2px solid #6b7686;
  transition: top 1.2s cubic-bezier(.5,.1,.2,1);
  z-index: 2;
}
.domo-room.blinds-down .room-blind { top: 0; }
.domo-room.blinds-down .room-window-light { opacity: .15; }

.room-lamp { position: absolute; }
.room-lamp-ceiling {
  top: 4%;
  left: 22%;
  width: 80px;
  height: 64px;
}
.room-lamp-ceiling::before {
  content: '';
  position: absolute;
  top: 0; left: 50%;
  width: 2px; height: 16px;
  background: #4a5663;
  transform: translateX(-50%);
}
.room-lamp-ceiling::after {
  content: '';
  position: absolute;
  top: 14px; left: 50%;
  width: 80px; height: 30px;
  background: linear-gradient(180deg, #6b7686, #3a4858);
  border-radius: 0 0 50% 50% / 0 0 100% 100%;
  transform: translateX(-50%);
}
.lamp-bulb {
  position: absolute;
  top: 36px; left: 50%;
  transform: translateX(-50%);
  width: 22px; height: 22px;
  background: #2a3441;
  border-radius: 50%;
  box-shadow: 0 0 0 0 transparent;
  transition: background .4s ease, box-shadow .4s ease;
  z-index: 4;
}
.room-lamp-floor {
  bottom: 28%;
  left: 8%;
  width: 24px;
  height: 100px;
}
.room-lamp-floor::before {
  content: '';
  position: absolute;
  bottom: 0; left: 50%;
  width: 2px; height: 80px;
  background: #4a5663;
  transform: translateX(-50%);
}
.room-lamp-floor::after {
  content: '';
  position: absolute;
  top: 0; left: 50%;
  width: 28px; height: 22px;
  background: linear-gradient(180deg, #6b7686, #3a4858);
  border-radius: 50% 50% 8px 8px;
  transform: translateX(-50%);
}
.room-lamp-floor .lamp-bulb {
  top: 6px;
  width: 18px; height: 14px;
  border-radius: 50%;
}
.domo-room.lights-on .lamp-bulb {
  background: #ffd97a;
  box-shadow: 0 0 24px 8px rgba(255,200,80,.7), 0 0 60px 20px rgba(255,200,80,.35);
}

.room-led-strip {
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 4px;
  background: rgba(255,255,255,.08);
  transition: background .5s ease, box-shadow .5s ease;
}
.domo-room.lights-on .room-led-strip {
  background: linear-gradient(90deg, #fbbf24, #f97316, #ec4899, #8b5cf6, #06b6d4);
  background-size: 200% 100%;
  animation: ledFlow 4s linear infinite;
  box-shadow: 0 4px 20px rgba(255,200,80,.4);
}
@keyframes ledFlow { to { background-position: 200% 0; } }

.room-sofa {
  position: absolute;
  bottom: 18%;
  left: 30%;
  width: 38%;
  height: 24%;
  background: linear-gradient(180deg, #5a6878 0%, #3a4858 100%);
  border-radius: 12px 12px 4px 4px;
}
.room-sofa::before, .room-sofa::after {
  content: '';
  position: absolute;
  top: 6px; bottom: 30%;
  width: 18%;
  background: linear-gradient(180deg, #6b7686 0%, #4a5663 100%);
  border-radius: 8px;
}
.room-sofa::before { left: 4%; }
.room-sofa::after { right: 4%; }

.room-speaker {
  position: absolute;
  bottom: 30%;
  right: 8%;
  width: 30px; height: 56px;
  background: linear-gradient(180deg, #3a4858, #1a2330);
  border-radius: 4px;
}
.room-speaker::before, .room-speaker::after {
  content: '';
  position: absolute;
  left: 50%;
  width: 14px; height: 14px;
  border-radius: 50%;
  background: #1a2330;
  transform: translateX(-50%);
}
.room-speaker::before { top: 6px; }
.room-speaker::after { bottom: 6px; }
.sound-wave {
  position: absolute;
  top: 50%; left: 100%;
  border-right: 2px solid var(--accent-3);
  border-top: 2px solid var(--accent-3);
  border-bottom: 2px solid var(--accent-3);
  border-radius: 0 50% 50% 0 / 0 100% 100% 0;
  transform: translateY(-50%);
  opacity: 0;
}
.sound-wave.w1 { width: 8px; height: 16px; }
.sound-wave.w2 { width: 16px; height: 28px; }
.sound-wave.w3 { width: 24px; height: 40px; }
.domo-room.music-on .sound-wave {
  animation: soundPulse 1.6s ease-in-out infinite;
}
.domo-room.music-on .sound-wave.w1 { animation-delay: 0s; }
.domo-room.music-on .sound-wave.w2 { animation-delay: .2s; }
.domo-room.music-on .sound-wave.w3 { animation-delay: .4s; }
@keyframes soundPulse {
  0%, 100% { opacity: 0; transform: translateY(-50%) scaleX(.5); }
  50% { opacity: .9; transform: translateY(-50%) scaleX(1); }
}

.room-thermostat {
  position: absolute;
  bottom: 32%;
  right: 30%;
  width: 56px; height: 56px;
  border-radius: 50%;
  background: radial-gradient(circle at 30% 30%, #4a5663, #1a2330);
  display: grid;
  place-items: center;
  border: 2px solid #5a6878;
  box-shadow: inset 0 2px 4px rgba(0,0,0,.4);
  transition: box-shadow .4s ease, border-color .4s ease;
}
.thermo-temp {
  font-family: 'Major Mono Display', monospace;
  font-size: .8rem;
  color: var(--accent-3);
  font-weight: 700;
  letter-spacing: .05em;
}
.domo-room.heat-on .room-thermostat {
  border-color: #ef4444;
  box-shadow: inset 0 2px 4px rgba(0,0,0,.4), 0 0 24px rgba(239,68,68,.5);
}
.domo-room.heat-on .thermo-temp { color: #f87171; }

.domo-foot {
  max-width: var(--container);
  margin: 28px auto 0;
  text-align: center;
  font-size: .92rem;
  color: var(--muted);
}
.domo-foot a { color: var(--accent); font-weight: 600; }

@media (max-width: 920px) { .domo-stage { grid-template-columns: 1fr; } }

/* ═════════ AUDIT ÉCLAIR — voltmètre ═════════ */
.audit-questions {
  display: flex;
  flex-direction: column;
  gap: 14px;
  margin-bottom: 22px;
}
.audit-q {
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.q-text {
  font-size: .78rem;
  letter-spacing: .15em;
  text-transform: uppercase;
  color: rgba(255,255,255,.6);
  font-weight: 600;
}
.audit-yn {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 6px;
  background: rgba(255,255,255,.06);
  padding: 4px;
  border-radius: 12px;
  border: 1px solid rgba(255,255,255,.1);
}
.audit-q .audit-yn:has(button:nth-child(2):last-child) { grid-template-columns: repeat(2, 1fr); }
.audit-yn button {
  padding: 10px;
  border-radius: 8px;
  font-size: .85rem;
  font-weight: 600;
  color: rgba(255,255,255,.7);
  transition: background .3s, color .3s, transform .25s;
}
.audit-yn button:hover { color: #fff; transform: translateY(-1px); }
.audit-yn button.is-active {
  background: var(--accent-3);
  color: var(--text);
}

.volt-meter {
  margin: 24px 0;
  padding: 22px;
  border-radius: 14px;
  background: rgba(0,0,0,.25);
  border: 1px dashed rgba(255,255,255,.18);
  text-align: center;
}
.volt-svg { width: 100%; max-width: 260px; height: auto; margin: 0 auto; display: block; }
#volt-needle {
  transition: transform 1s cubic-bezier(.5,.1,.2,1);
  filter: drop-shadow(0 0 6px rgba(255,255,255,.4));
}
#volt-arc { transition: stroke-dashoffset 1.2s cubic-bezier(.5,.1,.2,1); }
.volt-readout {
  margin-top: 10px;
  display: flex;
  flex-direction: column;
  gap: 4px;
}
.volt-value {
  font-family: 'Fraunces', serif;
  font-size: 2.4rem;
  font-weight: 600;
  letter-spacing: -.02em;
  color: var(--accent-3);
  line-height: 1;
}
.volt-label {
  font-size: .76rem;
  color: rgba(255,255,255,.6);
  text-transform: uppercase;
  letter-spacing: .15em;
}
