/* Roof configurator — isolated stylesheet, reuses the site's design tokens from styles.css */

.roof-configurator {
  display: grid;
  grid-template-columns: 1.3fr 1fr;
  gap: 30px;
  margin-top: 10px;
}

.rc-canvas-wrap {
  position: relative;
  aspect-ratio: 4 / 3;
  border-radius: var(--radius);
  overflow: hidden;
  background: linear-gradient(180deg, #bcdcf5 0%, #e4f1fa 55%, #f7fbfd 100%);
  box-shadow: var(--shadow);
  border: 1px solid rgba(255, 255, 255, .08);
}

.rc-canvas {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
}
.rc-canvas canvas { display: block; width: 100% !important; height: 100% !important; }

.rc-loading {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-direction: column;
  gap: 10px;
  color: rgba(30, 40, 48, .65);
  font-family: var(--font-body);
  font-size: .9rem;
  font-weight: 500;
  background: transparent;
  pointer-events: none;
  transition: opacity .3s ease;
}
.rc-loading.is-hidden { opacity: 0; }

.rc-spinner {
  width: 30px;
  height: 30px;
  border-radius: 50%;
  border: 3px solid rgba(255, 212, 71, .25);
  border-top-color: var(--gold);
  animation: rc-spin 0.8s linear infinite;
}
@keyframes rc-spin { to { transform: rotate(360deg); } }

/* Panel */
.rc-panel { display: flex; flex-direction: column; gap: 22px; }

.rc-materials { display: flex; flex-wrap: wrap; gap: 10px; }

.rc-material-btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 10px 18px;
  border-radius: 999px;
  font-family: var(--font-body);
  font-weight: 600;
  font-size: .88rem;
  color: var(--text-dark);
  background: #fff;
  border: 1.5px solid var(--gray-200);
  cursor: pointer;
  transition: transform .15s ease, box-shadow .15s ease, border-color .15s ease, background .15s ease, color .15s ease;
}
.rc-material-btn:hover { border-color: var(--gold-deep); transform: translateY(-1px); }
.rc-material-btn:disabled { opacity: .55; cursor: default; transform: none; }

.rc-material-btn .rc-swatch {
  width: 12px;
  height: 12px;
  border-radius: 50%;
  flex-shrink: 0;
  box-shadow: inset 0 0 0 1px rgba(0, 0, 0, .15);
}

.rc-material-btn.is-active {
  background: var(--gradient-brand);
  border-color: transparent;
  color: #17181c;
  box-shadow: 0 8px 20px -8px rgba(232, 98, 44, .5);
}

.rc-material-info {
  background: var(--gray-50);
  border: 1px solid var(--gray-200);
  border-radius: var(--radius);
  padding: 24px 26px;
}
.rc-material-info h3 {
  font-family: var(--font-head);
  font-size: 1.15rem;
  margin: 0 0 8px;
  color: var(--text-dark);
}
.rc-material-info p {
  margin: 0 0 18px;
  font-size: .92rem;
  color: var(--text-muted);
}
.rc-devis-btn { width: 100%; }

@media (max-width: 860px) {
  .roof-configurator { grid-template-columns: 1fr; }
  .rc-canvas-wrap { aspect-ratio: 4 / 3.4; }
}

@media (max-width: 480px) {
  .rc-material-btn { padding: 9px 14px; font-size: .82rem; }
}
