/* ==========================================================================
   AD COUVERTURE — Module « Couvertures en 3D » (page toiture-3d.html)
   Reprend les couleurs du site : rouge #DC2626, bleu nuit #0F172A / #1E293B
   ========================================================================== */

.adc3d-section {
  padding: 80px 0;
  background: var(--ast-global-color-5, #F8FAFC);
  scroll-margin-top: 90px;
}

.adc3d {
  --adc-bg: #0F172A;
  --adc-panel: #1E293B;
  --adc-line: rgba(148, 163, 184, 0.18);
  --adc-text: #F8FAFC;
  --adc-muted: #94A3B8;
  --adc-accent: var(--ast-global-color-0, #DC2626);
  display: grid;
  grid-template-columns: 330px 1fr;
  background: var(--adc-bg);
  color: var(--adc-text);
  border-radius: 24px;
  overflow: hidden;
  box-shadow: 0 30px 60px rgba(15, 23, 42, 0.22);
  font-family: var(--ast-font-body, 'Inter', system-ui, sans-serif);
  text-align: left;
}
#adc3d { scroll-margin-top: 100px; }
.adc3d *, .adc3d *::before, .adc3d *::after { box-sizing: border-box; }
.adc3d [hidden] { display: none !important; }

/* ---- Panneau de gauche ---- */
.adc3d__panel {
  background: var(--adc-panel);
  padding: 28px 22px;
  border-right: 1px solid var(--adc-line);
  display: flex;
  flex-direction: column;
  gap: 16px;
}
.adc3d__eyebrow {
  margin: 0;
  font-size: 0.75rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: #F87171;
  font-weight: 700;
}
.adc3d__title {
  margin: 0;
  font-family: var(--ast-font-heading, 'Plus Jakarta Sans', sans-serif);
  font-size: 1.4rem;
  line-height: 1.25;
  font-weight: 800;
  color: #FFFFFF;
}
.adc3d__list { list-style: none; margin: 0; padding: 0; display: grid; gap: 8px; }
.adc3d__item {
  width: 100%;
  display: flex; align-items: center; gap: 12px;
  padding: 12px 14px;
  background: rgba(15, 23, 42, 0.35);
  border: 1px solid var(--adc-line);
  border-radius: 12px;
  color: var(--adc-text);
  cursor: pointer;
  text-align: left;
  font: inherit;
  transition: border-color .2s, background .2s, transform .2s;
}
.adc3d__item:hover { border-color: rgba(248, 113, 113, 0.5); transform: translateX(2px); }
.adc3d__item:focus-visible { outline: 2px solid #F87171; outline-offset: 2px; }
.adc3d__item.is-active { border-color: var(--adc-accent); background: rgba(220, 38, 38, 0.14); }
.adc3d__swatch { width: 16px; height: 16px; border-radius: 4px; flex: none; box-shadow: inset 0 0 0 1px rgba(255,255,255,.15); }
.adc3d__name { display: block; font-weight: 700; font-size: 0.95rem; color: #FFFFFF; }
.adc3d__zone { display: block; font-size: 0.78rem; color: var(--adc-muted); margin-top: 2px; }

.adc3d__card {
  margin-top: auto;
  padding: 16px;
  border-radius: 14px;
  background: rgba(15, 23, 42, 0.55);
  border: 1px solid var(--adc-line);
  animation: adc3dFade .4s ease;
}
.adc3d__card h3 {
  margin: 0 0 8px;
  font-family: var(--ast-font-heading, 'Plus Jakarta Sans', sans-serif);
  font-size: 1.05rem; color: #FFFFFF;
}
.adc3d__card p { margin: 0 0 12px; font-size: 0.88rem; line-height: 1.55; color: #CBD5E1; }
.adc3d__facts { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin: 0; }
.adc3d__facts div { font-size: 0.75rem; }
.adc3d__facts dt { color: var(--adc-muted); margin-bottom: 2px; }
.adc3d__facts dd { margin: 0; font-weight: 700; font-size: 0.82rem; color: #FFFFFF; }
@keyframes adc3dFade { from { opacity: 0; transform: translateY(6px); } to { opacity: 1; transform: none; } }

/* ---- Scène 3D ---- */
.adc3d__stage {
  position: relative;
  min-height: 580px;
  background: radial-gradient(ellipse at 60% 35%, #334155 0%, #0F172A 72%);
}
.adc3d__stage canvas { position: absolute; inset: 0; width: 100%; height: 100%; display: block; cursor: grab; touch-action: pan-y; }
.adc3d__stage canvas:active { cursor: grabbing; }
.adc3d__loading {
  position: absolute; inset: 0; z-index: 1; display: grid; place-items: center; padding: 24px;
  text-align: center; color: var(--adc-muted); font-size: 0.9rem; pointer-events: none;
}
.adc3d__pitch {
  position: absolute; top: 18px; left: 50%; transform: translateX(-50%);
  z-index: 2; pointer-events: none; text-align: center; line-height: 1;
  font-family: var(--ast-font-heading, 'Plus Jakarta Sans', sans-serif);
  font-size: 2.5rem; font-weight: 800; letter-spacing: -.02em; color: #FFFFFF;
}
.adc3d__pitch small {
  display: block; font-family: var(--ast-font-body, 'Inter', sans-serif);
  font-size: 0.7rem; font-weight: 600; letter-spacing: .14em;
  text-transform: uppercase; color: var(--adc-muted); margin-top: 4px;
}
.adc3d__toolbar {
  position: absolute; left: 16px; right: 16px; bottom: 16px; z-index: 2;
  display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap;
}
.adc3d__replay {
  display: inline-flex; align-items: center; gap: 8px;
  background: var(--ast-red-gradient, #DC2626); color: #FFFFFF; border: 0; border-radius: 9999px;
  padding: 10px 18px; font: inherit; font-weight: 700; font-size: 0.88rem; cursor: pointer;
  box-shadow: var(--ast-red-glow, 0 10px 25px rgba(220, 38, 38, 0.35));
  transition: transform .2s, filter .2s;
}
.adc3d__replay:hover { transform: translateY(-2px); filter: brightness(1.08); }
.adc3d__hint { font-size: 0.75rem; color: var(--adc-muted); }

/* ---- Bandeau d'appel vers la page 3D (accueil, page toiture) ---- */
.adc3d-teaser { padding: 80px 0; background: #FFFFFF; }
.adc3d-teaser__box {
  display: grid; grid-template-columns: 1.05fr 1fr; align-items: center; gap: 32px;
  padding: 44px 48px; border-radius: 24px; overflow: hidden; position: relative;
  background: radial-gradient(ellipse at 80% 40%, #334155 0%, #0F172A 70%);
  color: #FFFFFF; box-shadow: 0 30px 60px rgba(15, 23, 42, 0.18);
}
.adc3d-teaser__box .ast-badge-tag {
  margin-bottom: 14px; color: #FCA5A5;
  background: rgba(220, 38, 38, 0.16); border-color: rgba(248, 113, 113, 0.35);
}
.adc3d-teaser__title {
  font-family: var(--ast-font-heading, 'Plus Jakarta Sans', sans-serif);
  font-size: clamp(1.6rem, 3vw, 2.3rem); line-height: 1.15; font-weight: 800; margin: 0 0 14px; color: #FFFFFF;
}
.adc3d-teaser__text { color: #CBD5E1; margin: 0 0 24px; max-width: 52ch; }
.adc3d-teaser__chips { display: flex; flex-wrap: wrap; gap: 8px; margin: 0 0 26px; padding: 0; list-style: none; }
.adc3d-teaser__chips li {
  display: inline-flex; align-items: center; gap: 8px; padding: 6px 12px; border-radius: 9999px;
  background: rgba(255,255,255,.06); border: 1px solid rgba(148,163,184,.25); font-size: 0.82rem; color: #E2E8F0;
}
.adc3d-teaser__chips span { width: 10px; height: 10px; border-radius: 3px; display: inline-block; }
.adc3d-teaser__img { width: 100%; height: auto; display: block; filter: drop-shadow(0 30px 40px rgba(0,0,0,.45)); }

/* ---- Responsive ---- */
@media (max-width: 900px) {
  .adc3d { grid-template-columns: 1fr; border-radius: 18px; }
  .adc3d__panel { border-right: 0; border-bottom: 1px solid var(--adc-line); padding: 20px 16px; }
  .adc3d__list { grid-template-columns: 1fr 1fr; }
  .adc3d__stage { min-height: 440px; }
  .adc3d__hint { display: none; }
  .adc3d-section, .adc3d-teaser { padding: 56px 0; }
  .adc3d-teaser__box { grid-template-columns: 1fr; padding: 32px 22px; gap: 8px; }
  .adc3d-teaser__media { order: -1; }
}
@media (max-width: 480px) {
  .adc3d__item { padding: 10px 10px; gap: 8px; }
  .adc3d__name { font-size: 0.88rem; }
  .adc3d__stage { min-height: 400px; }
  .adc3d__pitch { font-size: 2rem; }
}
