/* ============================================================
   39. OUTILS
   ============================================================ */

/* Index — grille cartes verticales */
.tools-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 16px;
}

.tool-card {
  display: flex;
  flex-direction: column;
  padding: 28px 24px;
  text-decoration: none;
  color: inherit;
  border-radius: 16px;
  background: #fff;
  border: 1px solid var(--gray-200);
  box-shadow: none;
  transition: transform 0.2s ease, box-shadow 0.2s ease, border-color 0.2s ease;
  min-height: 200px;
}

.tool-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 12px 32px rgba(0, 0, 0, 0.08);
  border-color: var(--gray-300);
}

.tool-card-icon {
  width: 44px;
  height: 44px;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 20px;
  color: var(--gray-900);
}

.tool-card-title {
  font-size: 0.9375rem;
  font-weight: 600;
  color: var(--gray-900);
  margin-bottom: auto;
}

.tool-card-desc {
  font-size: 0.8125rem;
  color: var(--gray-500);
  line-height: 1.55;
  margin-top: 16px;
}

@media (max-width: 900px) {
  .tools-grid { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 600px) {
  .tools-grid { grid-template-columns: 1fr; }
}

/* Layout commun (2 colonnes) */
.tool-layout {
  display: grid;
  grid-template-columns: 320px 1fr;
  gap: 24px;
  align-items: start;
}

.tool-params-panel {
  padding: 28px;
  transition: box-shadow 0.3s cubic-bezier(0.16, 1, 0.3, 1),
              border-color 0.3s ease;
}

.tool-params-panel:hover {
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.05);
  border-color: var(--gray-300);
}
.tool-results-col  { display: flex; flex-direction: column; gap: 0; }

/* Slider */
.tool-slider-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 8px;
}

.tool-slider-value {
  font-size: 0.9375rem;
  font-weight: 700;
  color: var(--primary-gold-dark);
}

.tool-slider {
  width: 100%;
  height: 6px;
  border-radius: 3px;
  appearance: none;
  background: var(--gray-200);
  outline: none;
  cursor: pointer;
  accent-color: var(--primary-gold);
  transition: background 0.2s ease;
}

.tool-slider:hover {
  background: var(--gray-300);
}

.tool-slider::-webkit-slider-thumb {
  appearance: none;
  width: 18px;
  height: 18px;
  border-radius: 50%;
  background: var(--primary-gold);
  cursor: pointer;
  box-shadow: 0 1px 4px rgba(0,0,0,0.2);
  transition: transform 0.2s cubic-bezier(0.16, 1, 0.3, 1),
              box-shadow 0.2s ease;
}

.tool-slider:hover::-webkit-slider-thumb {
  transform: scale(1.2);
  box-shadow: 0 2px 8px rgba(212, 168, 67, 0.4);
}

.tool-slider:active::-webkit-slider-thumb {
  transform: scale(1.1);
  box-shadow: 0 0 0 6px rgba(212, 168, 67, 0.15);
}

.tool-slider::-moz-range-thumb {
  width: 18px;
  height: 18px;
  border-radius: 50%;
  background: var(--primary-gold);
  cursor: pointer;
  border: none;
  box-shadow: 0 1px 4px rgba(0,0,0,0.2);
  transition: transform 0.2s cubic-bezier(0.16, 1, 0.3, 1),
              box-shadow 0.2s ease;
}

.tool-slider:hover::-moz-range-thumb {
  transform: scale(1.2);
  box-shadow: 0 2px 8px rgba(212, 168, 67, 0.4);
}

.tool-slider:active::-moz-range-thumb {
  transform: scale(1.1);
  box-shadow: 0 0 0 6px rgba(212, 168, 67, 0.15);
}

.tool-slider-bounds {
  display: flex;
  justify-content: space-between;
  font-size: 0.75rem;
  color: var(--gray-400);
  margin-top: 4px;
}

/* Résultat principal (fond doré) */
.tool-result-highlight {
  background: var(--primary-gold-light);
  border: 1px solid var(--primary-gold);
  border-radius: var(--radius-lg);
  padding: 16px 20px;
  transition: transform 0.25s cubic-bezier(0.16, 1, 0.3, 1),
              box-shadow 0.25s cubic-bezier(0.16, 1, 0.3, 1);
}

.tool-result-highlight:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(212, 168, 67, 0.2);
}

.tool-result-label {
  font-size: 0.8125rem;
  font-weight: 600;
  color: var(--primary-gold-dark);
  margin-bottom: 4px;
}

.tool-result-value {
  font-size: 1.5rem;
  font-weight: 800;
  color: var(--primary-gold-dark);
}

/* Donuts */
.tool-donuts-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
}

.tool-donut-legend {
  font-size: 0.8125rem;
  color: var(--gray-600);
  text-align: center;
  margin-top: 8px;
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 8px;
}

.donut-dot {
  display: inline-block;
  width: 10px;
  height: 10px;
  border-radius: 50%;
  margin-right: 3px;
  vertical-align: middle;
}

/* ─ Énergie ─ */
.dpe-selector {
  display: flex;
  gap: 6px;
}

.dpe-btn {
  flex: 1;
  padding: 10px 4px;
  border: 2px solid transparent;
  border-radius: var(--radius-md);
  font-size: 1rem;
  font-weight: 700;
  cursor: pointer;
  transition: all 0.15s;
  color: white;
}

.dpe-btn-a { background: #319753; }
.dpe-btn-b { background: #51b351; }
.dpe-btn-c { background: #aacf37; }
.dpe-btn-d { background: #f0c730; color: #333; }
.dpe-btn-e { background: #e98a12; }
.dpe-btn-f { background: #d84c1a; }
.dpe-btn-g { background: #c0392b; }

.dpe-btn.active { border-color: var(--gray-900); box-shadow: 0 0 0 2px var(--gray-900); }

.energie-result-card { padding: 24px; }

.energie-dpe-visual {
  display: flex;
  align-items: center;
  gap: 20px;
}

.energie-class-badge {
  width: 64px;
  height: 64px;
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 2rem;
  font-weight: 800;
  color: white;
  flex-shrink: 0;
}

.dpe-color-a { background: #319753; }
.dpe-color-b { background: #51b351; }
.dpe-color-c { background: #aacf37; }
.dpe-color-d { background: #f0c730; color: #333; }
.dpe-color-e { background: #e98a12; }
.dpe-color-f { background: #d84c1a; }
.dpe-color-g { background: #c0392b; }

.energie-conso-label { font-size: 0.8125rem; color: var(--gray-400); margin-bottom: 4px; }
.energie-conso-value { font-size: 1.25rem; font-weight: 700; color: var(--gray-900); }
.energie-conso-sub   { font-size: 0.875rem; color: var(--gray-500); margin-top: 2px; }

.dpe-bareme { display: flex; flex-direction: column; gap: 6px; }

.dpe-bareme-row {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 4px 8px;
  border-radius: 6px;
  transition: background 0.15s;
}

.dpe-bareme-row.active { background: var(--gray-100); }

.dpe-bareme-badge {
  width: 28px;
  height: 28px;
  border-radius: 6px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  font-size: 0.875rem;
  color: white;
  flex-shrink: 0;
}

.dpe-bareme-bar-wrap {
  flex: 1;
  height: 12px;
  background: var(--gray-100);
  border-radius: 6px;
  overflow: hidden;
}

.dpe-bareme-bar {
  height: 100%;
  border-radius: 6px;
  min-width: 10%;
}

.dpe-bareme-range {
  font-size: 0.8125rem;
  color: var(--gray-500);
  white-space: nowrap;
  width: 80px;
  text-align: right;
}

/* ─ Occupation ─ */
.occ-map-card { padding: 24px; }

.occ-map-wrap {
  display: flex;
  justify-content: center;
}

.occ-map-svg {
  width: 100%;
  max-width: 340px;
}

.occ-region {
  fill: var(--gray-200);
  stroke: white;
  stroke-width: 9;
  cursor: pointer;
  transition: fill 0.15s;
  fill-rule: evenodd;
}

.occ-region:hover   { fill: var(--primary-gold-light); }
.occ-region.selected { fill: var(--primary-gold); }

.occ-right-col { display: flex; flex-direction: column; }

.occ-detail-card { padding: 24px; }

.occ-detail-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.occ-detail-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
}

.occ-context {
  font-size: 0.875rem;
  color: var(--gray-500);
  line-height: 1.6;
  background: var(--gray-50);
  padding: 12px 16px;
  border-radius: var(--radius-md);
}

.occ-rate-badge {
  padding: 4px 12px;
  border-radius: 20px;
  font-size: 1rem;
  font-weight: 700;
}

.occ-rate-high { background: #DCFCE7; color: #16A34A; }
.occ-rate-mid  { background: var(--primary-gold-light); color: var(--primary-gold-dark); }
.occ-rate-low  { background: #FEE2E2; color: var(--red-500); }

.occ-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.875rem;
}

.occ-table th {
  text-align: left;
  padding: 10px 12px;
  font-size: 0.75rem;
  font-weight: 600;
  color: var(--gray-400);
  text-transform: uppercase;
  letter-spacing: 0.5px;
  border-bottom: 1px solid var(--gray-100);
}

.occ-table td {
  padding: 10px 12px;
  border-bottom: 1px solid var(--gray-50);
  color: var(--gray-700);
}

.occ-table tr.active td { background: var(--primary-gold-light); }
.occ-table tr:hover td  { background: var(--gray-50); }

.occ-rate-pill {
  display: inline-block;
  padding: 2px 10px;
  border-radius: 20px;
  font-weight: 600;
  font-size: 0.8125rem;
}

/* ─ LMNP ─ */
.lmnp-params-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 20px;
}

.lmnp-right-charts { display: flex; flex-direction: column; }

.lmnp-revente-results { display: flex; flex-direction: column; }

.lmnp-table td, .lmnp-table th { font-size: 0.8125rem; }

.lmnp-row-pos td { background: rgba(34,197,94,0.04); }
.lmnp-row-neg td { background: rgba(239,68,68,0.04); }

