/* ==========================================================================
   AXOLOTL — diagnostic.css : Diagnostic de marque en 2 minutes
   Design asymétrique, anneau 360°, silhouette interactive, transitions douces.
   ========================================================================== */

.diag-hero {
  position: relative;
  padding: clamp(90px, 14vw, 150px) 0 clamp(40px, 8vw, 80px);
  min-height: 85vh;
  display: flex;
  flex-direction: column;
  justify-content: center;
  transition: background-color 0.7s var(--ease), color 0.7s var(--ease);
}

.diag-wrap {
  width: min(1080px, 100%);
  margin: 0 auto;
}

/* En-tête du Quiz */
.diag-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: clamp(24px, 4vw, 36px);
}

.diag-progress-wrap {
  display: flex;
  align-items: center;
  gap: 14px;
}

.diag-ring {
  width: 44px;
  height: 44px;
  transform: rotate(-90deg);
  flex: 0 0 auto;
}

.diag-ring .ring-bg {
  fill: none;
  stroke: color-mix(in srgb, var(--pg-ink) 14%, transparent);
  stroke-width: 4;
}

.diag-ring .ring-fg {
  fill: none;
  stroke: var(--pg-acc, #FF6FA8);
  stroke-width: 4;
  stroke-linecap: round;
  stroke-dasharray: 113.1;
  stroke-dashoffset: 94.2; /* (113.1 - 113.1 * 1/6) */
  transition: stroke-dashoffset 0.5s var(--ease), stroke 0.4s var(--ease);
}

.diag-step-count {
  font-size: 0.95rem;
  font-weight: 700;
  color: var(--pg-mute);
  letter-spacing: -0.01em;
}

.diag-prev-btn {
  padding: 6px 14px;
  font-size: 0.85rem;
}

/* Carte de Question */
.diag-q-card {
  position: relative;
  transition: opacity 0.4s var(--ease), transform 0.4s var(--ease);
}

.diag-q-card.is-changing {
  opacity: 0;
  transform: translateY(16px);
}

.diag-kicker {
  display: inline-block;
  font-size: 0.85rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--pg-mute);
  margin-bottom: 8px;
}

.diag-q-title {
  font-family: var(--f-display);
  font-weight: 800;
  font-variation-settings: "wdth" 95;
  font-size: clamp(2rem, 5.2vw, 3.6rem);
  line-height: 1.05;
  letter-spacing: -0.04em;
  margin-bottom: clamp(24px, 4vw, 40px);
  color: var(--pg-ink);
  outline: none;
}

/* Grille de 4 Tuiles asymétriques */
.diag-tiles {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: clamp(14px, 2.5vw, 24px);
}

@media (max-width: 680px) {
  .diag-tiles {
    grid-template-columns: 1fr;
  }
}

.diag-tile {
  position: relative;
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding: clamp(22px, 3.5vw, 34px);
  border-radius: 20px;
  background: color-mix(in srgb, var(--pg-ink) 5%, transparent);
  border: 2px solid color-mix(in srgb, var(--pg-ink) 12%, transparent);
  color: var(--pg-ink);
  cursor: pointer;
  text-align: left;
  font-family: var(--f-body);
  font-size: clamp(1.05rem, 1.8vw, 1.25rem);
  font-weight: 600;
  line-height: 1.35;
  transition: transform 0.35s var(--ease), background 0.35s var(--ease), border-color 0.35s var(--ease), color 0.35s var(--ease), box-shadow 0.35s var(--ease);
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.03);
}

/* Inclinaisons asymétriques légères (4° à 6° max sur hover / état naturel très léger) */
.diag-tile:nth-child(1) { transform: rotate(-0.8deg); }
.diag-tile:nth-child(2) { transform: rotate(0.9deg); }
.diag-tile:nth-child(3) { transform: rotate(0.6deg); }
.diag-tile:nth-child(4) { transform: rotate(-0.7deg); }

.diag-tile:hover,
.diag-tile:focus-visible {
  outline: none;
  box-shadow: 0 12px 32px rgba(0, 0, 0, 0.08);
}

.diag-tile:nth-child(1):hover { transform: rotate(-2.5deg) scale(1.02); }
.diag-tile:nth-child(2):hover { transform: rotate(2.8deg) scale(1.02); }
.diag-tile:nth-child(3):hover { transform: rotate(2.2deg) scale(1.02); }
.diag-tile:nth-child(4):hover { transform: rotate(-2.4deg) scale(1.02); }

.diag-tile:active {
  transform: scale(0.98);
}

/* Coloration dynamique au survol et à la sélection selon le morphe */
.diag-tile[data-morph-c]:hover,
.diag-tile[data-morph-c]:focus-visible,
.diag-tile.is-selected {
  background: var(--tile-bg, var(--pg-acc, #FF6FA8)) !important;
  border-color: var(--tile-bg, var(--pg-acc, #FF6FA8)) !important;
  color: var(--tile-fg, var(--pg-ink, #1B1233)) !important;
}

/* ==========================================================================
   ÉCRAN DE RÉSULTAT
   ========================================================================== */
.diag-result-card {
  outline: none;
  animation: diagResFade 0.6s var(--ease) forwards;
}

@keyframes diagResFade {
  from { opacity: 0; transform: translateY(20px); }
  to { opacity: 1; transform: none; }
}

.diag-res-grid {
  display: grid;
  grid-template-columns: 1.15fr 0.85fr;
  gap: clamp(32px, 5vw, 64px);
  align-items: center;
}

@media (max-width: 900px) {
  .diag-res-grid {
    grid-template-columns: 1fr;
  }
}

.diag-res-tag {
  display: inline-block;
  font-size: 0.85rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  padding: 5px 12px;
  border-radius: 999px;
  background: color-mix(in srgb, var(--res-ink, #1B1233) 12%, transparent);
  color: var(--res-ink, #1B1233);
  margin-bottom: 12px;
}

.diag-res-title {
  font-family: var(--f-display);
  font-weight: 800;
  font-variation-settings: "wdth" 95;
  font-size: clamp(2.4rem, 5.5vw, 4.2rem);
  line-height: 1.05;
  letter-spacing: -0.04em;
  color: var(--res-ink, #1B1233);
  margin-bottom: 18px;
}

.diag-res-desc {
  font-size: clamp(1.1rem, 1.8vw, 1.35rem);
  line-height: 1.45;
  color: var(--res-ink, #1B1233);
  margin-bottom: 24px;
  max-width: 58ch;
}

.diag-res-sec {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 8px 16px;
  border-radius: 12px;
  background: color-mix(in srgb, var(--res-ink, #1B1233) 8%, transparent);
  color: var(--res-ink, #1B1233);
  font-size: 0.95rem;
  margin-bottom: 28px;
}

.diag-res-sec .diag-sec-label {
  color: color-mix(in srgb, var(--res-ink, #1B1233) 70%, transparent);
}

.diag-res-tracks {
  margin-bottom: 24px;
}

.diag-res-tracks h3 {
  font-size: 1.1rem;
  font-weight: 800;
  color: var(--res-ink, #1B1233);
  margin-bottom: 12px;
}

.diag-res-tracks ol {
  padding-left: 20px;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.diag-res-tracks li {
  font-size: 1rem;
  line-height: 1.4;
  color: var(--res-ink, #1B1233);
}

.diag-disclaimer {
  font-size: 0.85rem;
  color: color-mix(in srgb, var(--res-ink, #1B1233) 65%, transparent);
  margin-bottom: 28px;
  font-style: italic;
}

.diag-res-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  align-items: center;
  margin-bottom: 24px;
}

.diag-booking-wrap {
  margin-top: 16px;
  padding-top: 20px;
  border-top: 1px solid color-mix(in srgb, var(--res-ink, #1B1233) 14%, transparent);
}

/* Silhouette interactive */
.diag-silhouette-wrap {
  position: relative;
  width: 100%;
  max-width: 500px;
  margin: 0 auto;
  display: flex;
  justify-content: center;
  align-items: center;
}

.axo-diag-full {
  width: 100%;
  height: auto;
  max-height: 440px;
  overflow: visible;
  filter: drop-shadow(0 12px 28px rgba(0, 0, 0, 0.08));
}

.axo-diag-full .axo-group {
  transition: opacity 0.4s var(--ease), filter 0.4s var(--ease);
}

/* Mise en évidence selon la partie */
.highlight-visage #axo-head,
.highlight-cerveau #axo-head {
  filter: drop-shadow(0 0 14px var(--res-c, #FF6FA8));
}

.highlight-pattes .axo-limb {
  filter: drop-shadow(0 0 14px var(--res-c, #C0703A));
}

.highlight-branchies #axo-gills {
  filter: drop-shadow(0 0 14px var(--res-c, #1C1C24));
}

.highlight-peau .axo-skin {
  filter: drop-shadow(0 0 14px var(--res-c, #B9A6D9));
}

.highlight-queue .axo-tail {
  filter: drop-shadow(0 0 14px var(--res-c, #7CFF6B));
}

.highlight-coeur .axo-skin {
  filter: drop-shadow(0 0 14px var(--res-c, #5E6340));
}

/* Point pulsant de repère */
.diag-pin-pulse {
  position: absolute;
  width: 22px;
  height: 22px;
  border-radius: 50%;
  background: var(--res-c, #FF6FA8);
  border: 3px solid #fff;
  box-shadow: 0 0 0 0 rgba(255, 111, 168, 0.7);
  animation: pinPulse 2s infinite;
  pointer-events: none;
  transform: translate(-50%, -50%);
}

@keyframes pinPulse {
  0% { transform: translate(-50%, -50%) scale(0.95); box-shadow: 0 0 0 0 rgba(255, 111, 168, 0.7); }
  70% { transform: translate(-50%, -50%) scale(1.15); box-shadow: 0 0 0 16px rgba(255, 111, 168, 0); }
  100% { transform: translate(-50%, -50%) scale(0.95); box-shadow: 0 0 0 0 rgba(255, 111, 168, 0); }
}

/* ==========================================================================
   LES 7 PARTIES STATIQUES (SEO & REPLI)
   ========================================================================== */
.diag-parts-sec {
  background: var(--pg-bg);
  padding: clamp(60px, 10vw, 110px) 0;
  border-top: 1px solid color-mix(in srgb, var(--pg-ink) 10%, transparent);
}

.diag-parts-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: clamp(16px, 2.5vw, 24px);
  margin-top: 40px;
}

.diag-part-card {
  display: flex;
  flex-direction: column;
  padding: 28px;
  border-radius: 20px;
  background: color-mix(in srgb, var(--pg-ink) 4%, transparent);
  border: 1px solid color-mix(in srgb, var(--pg-ink) 10%, transparent);
  color: var(--pg-ink);
  transition: transform 0.35s var(--ease), border-color 0.35s var(--ease), box-shadow 0.35s var(--ease);
}

.diag-part-card:hover {
  transform: translateY(-4px);
  border-color: var(--pc);
  box-shadow: 0 12px 28px rgba(0, 0, 0, 0.06);
}

.dp-badge {
  display: inline-block;
  align-self: flex-start;
  font-size: 0.75rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  padding: 4px 10px;
  border-radius: 999px;
  background: var(--pc);
  color: var(--pfg);
  margin-bottom: 14px;
}

.diag-part-card h3 {
  font-family: var(--f-display);
  font-size: 1.45rem;
  font-weight: 800;
  letter-spacing: -0.02em;
  margin-bottom: 8px;
}

.diag-part-card p {
  font-size: 0.95rem;
  line-height: 1.45;
  color: var(--pg-mute);
  margin-bottom: 18px;
  flex: 1;
}

.dp-link {
  font-size: 0.9rem;
  font-weight: 700;
  color: var(--pg-link, var(--rose));
}

/* Mode prefers-reduced-motion */
@media (prefers-reduced-motion: reduce) {
  .diag-tile, .diag-q-card, .diag-result-card, .diag-hero {
    transition: none !important;
    animation: none !important;
    transform: none !important;
  }
  .diag-pin-pulse {
    animation: none !important;
  }
}
