/* ==========================================================================
   Estimateur de projet — Modal Akinator
   ========================================================================== */

/* ---------- Overlay ---------- */
.ar-est-overlay {
  position: fixed;
  inset: 0;
  z-index: 9999;
  background: rgba(0, 0, 0, 0.7);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1rem;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.3s ease, visibility 0.3s ease;
}

.ar-est-overlay.ar-est-open {
  opacity: 1;
  visibility: visible;
}

/* ---------- Modal ---------- */
.ar-est-modal {
  background: var(--ar-bg-secondary);
  border: 1px solid var(--ar-border);
  border-radius: 24px;
  width: 100%;
  max-width: 700px;
  max-height: 85vh;
  overflow-y: auto;
  padding: 2.5rem;
  position: relative;
  transform: translateY(20px) scale(0.97);
  transition: transform 0.3s cubic-bezier(0.16, 1, 0.3, 1);
  box-shadow: 0 24px 80px rgba(0, 0, 0, 0.5);
}

.ar-est-open .ar-est-modal {
  transform: translateY(0) scale(1);
}

/* ---------- Close button ---------- */
.ar-est-close {
  position: absolute;
  top: 1rem;
  right: 1rem;
  background: none;
  border: none;
  color: var(--ar-text-muted);
  font-size: 1.75rem;
  cursor: pointer;
  width: 40px;
  height: 40px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 8px;
  transition: all 0.2s ease;
}

.ar-est-close:hover {
  background: rgba(255, 255, 255, 0.05);
  color: var(--ar-text-primary);
}

/* ---------- Step content ---------- */
.ar-est-step {
  animation: ar-est-fadein 0.35s ease;
}

@keyframes ar-est-fadein {
  from { opacity: 0; transform: translateY(10px); }
  to { opacity: 1; transform: translateY(0); }
}

.ar-est-question {
  text-align: center;
  margin: 0 0 2rem;
  font-size: 1.375rem;
  color: var(--ar-text-primary);
}

.ar-est-hint {
  text-align: center;
  font-size: 0.8125rem;
  color: var(--ar-text-muted);
  margin-top: 1.5rem;
}

/* ---------- Back button ---------- */
.ar-est-back {
  background: none;
  border: none;
  color: var(--ar-text-muted);
  font-size: 0.875rem;
  cursor: pointer;
  padding: 0;
  margin-bottom: 1.5rem;
  transition: color 0.2s ease;
}

.ar-est-back:hover {
  color: var(--ar-accent);
}

/* ---------- Step 1 — Category grid ---------- */
.ar-est-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 0.75rem;
}

@media (max-width: 500px) {
  .ar-est-grid {
    grid-template-columns: 1fr;
  }
}

.ar-est-choice {
  background: var(--ar-bg-primary);
  border: 1px solid var(--ar-border);
  border-radius: 16px;
  padding: 1.25rem;
  cursor: pointer;
  text-align: left;
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
  transition: all 0.25s ease;
  color: var(--ar-text-primary);
}

.ar-est-choice:hover {
  border-color: var(--ar-accent-border);
  background: rgba(212, 160, 55, 0.05);
  transform: translateY(-2px);
}

.ar-est-choice-icon {
  font-size: 1.5rem;
  margin-bottom: 0.25rem;
}

.ar-est-choice strong {
  font-size: 1rem;
  font-family: 'Outfit', sans-serif;
}

.ar-est-choice-sub {
  font-size: 0.8125rem;
  color: var(--ar-text-muted);
  line-height: 1.4;
}

/* ---------- Step 2 — Project list ---------- */
.ar-est-list {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

.ar-est-project {
  background: var(--ar-bg-primary);
  border: 1px solid var(--ar-border);
  border-radius: 16px;
  padding: 1.25rem;
  cursor: pointer;
  text-align: left;
  transition: all 0.25s ease;
  color: var(--ar-text-primary);
}

.ar-est-project:hover {
  border-color: var(--ar-accent-border);
  background: rgba(212, 160, 55, 0.05);
  transform: translateX(4px);
}

.ar-est-project-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  margin-bottom: 0.5rem;
}

.ar-est-project-header strong {
  font-family: 'Outfit', sans-serif;
  font-size: 1rem;
}

.ar-est-project p {
  margin: 0;
  font-size: 0.875rem;
  color: var(--ar-text-secondary);
  line-height: 1.5;
}

/* ---------- Badges ---------- */
.ar-est-badge {
  display: inline-block;
  padding: 0.2rem 0.6rem;
  border-radius: 6px;
  font-size: 0.7rem;
  font-weight: 700;
  color: #0f172a;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  white-space: nowrap;
  flex-shrink: 0;
}

.ar-est-badge-lg {
  font-size: 0.8rem;
  padding: 0.3rem 0.8rem;
}

/* ---------- Step 3 — Result ---------- */
.ar-est-result-header {
  display: flex;
  align-items: center;
  gap: 1rem;
  margin-bottom: 0.75rem;
}

.ar-est-result-header h3 {
  margin: 0;
  font-size: 1.375rem;
  color: var(--ar-accent);
}

.ar-est-result-desc {
  color: var(--ar-text-secondary);
  font-size: 0.9375rem;
  line-height: 1.6;
  margin: 0 0 1.5rem;
}

/* Comparison columns */
.ar-est-comparison {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1rem;
  margin-bottom: 1.5rem;
}

.ar-est-col {
  border-radius: 16px;
  padding: 1.25rem;
  text-align: center;
}

.ar-est-col-trad {
  background: rgba(239, 68, 68, 0.08);
  border: 1px solid rgba(239, 68, 68, 0.2);
}

.ar-est-col-ia {
  background: rgba(34, 197, 94, 0.08);
  border: 1px solid rgba(34, 197, 94, 0.2);
}

.ar-est-col-label {
  font-size: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--ar-text-muted);
  margin-bottom: 0.5rem;
}

.ar-est-col-trad .ar-est-col-price {
  font-family: 'Outfit', sans-serif;
  font-size: 1.5rem;
  font-weight: 700;
  color: #ef4444;
  text-decoration: line-through;
  opacity: 0.7;
}

.ar-est-col-ia .ar-est-col-price {
  font-family: 'Outfit', sans-serif;
  font-size: 1.75rem;
  font-weight: 700;
  color: #22c55e;
}

/* Stats row */
.ar-est-stats {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 0.75rem;
  margin-bottom: 1.5rem;
}

.ar-est-stat {
  text-align: center;
  padding: 1rem 0.5rem;
  background: var(--ar-bg-primary);
  border-radius: 12px;
  border: 1px solid var(--ar-border);
}

.ar-est-stat-value {
  display: block;
  font-family: 'Outfit', sans-serif;
  font-weight: 700;
  font-size: 1.25rem;
  color: var(--ar-accent);
  margin-bottom: 0.25rem;
}

.ar-est-stat-label {
  font-size: 0.75rem;
  color: var(--ar-text-muted);
}

/* POC badge */
.ar-est-poc {
  text-align: center;
  padding: 0.75rem 1rem;
  border-radius: 12px;
  font-size: 0.9375rem;
  font-weight: 600;
  margin-bottom: 1.5rem;
  background: rgba(34, 197, 94, 0.1);
  border: 1px solid rgba(34, 197, 94, 0.25);
  color: #22c55e;
}

.ar-est-poc-devis {
  background: rgba(212, 160, 55, 0.1);
  border: 1px solid rgba(212, 160, 55, 0.25);
  color: var(--ar-accent);
}

/* Actions */
.ar-est-actions {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.75rem;
  margin-bottom: 1rem;
}

.ar-est-cta {
  width: 100%;
  justify-content: center;
}

.ar-est-restart {
  background: none;
  border: none;
  color: var(--ar-text-muted);
  font-size: 0.875rem;
  cursor: pointer;
  text-decoration: underline;
  transition: color 0.2s ease;
}

.ar-est-restart:hover {
  color: var(--ar-text-primary);
}

/* Disclaimer */
.ar-est-disclaimer {
  font-size: 0.7rem;
  color: var(--ar-text-muted);
  text-align: center;
  line-height: 1.5;
  opacity: 0.7;
  margin: 0;
}

/* ---------- Scrollbar modal ---------- */
.ar-est-modal::-webkit-scrollbar {
  width: 6px;
}

.ar-est-modal::-webkit-scrollbar-track {
  background: transparent;
}

.ar-est-modal::-webkit-scrollbar-thumb {
  background: var(--ar-border);
  border-radius: 3px;
}
