/* forets.css — Dashboard Forêts */

/* ============================================
   KPIs
   ============================================ */
.foret-kpis {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 0.75rem;
  margin-bottom: 1.5rem;
}
.foret-kpi {
  display: flex;
  align-items: center;
  gap: 0.85rem;
  padding: 1rem 1.2rem;
  background: #fff;
  border-radius: 12px;
  border: 1px solid #e2e8f0;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.04);
  transition: all 0.2s ease;
}
.foret-kpi:hover {
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
  transform: translateY(-2px);
}
.foret-kpi-icon {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 44px;
  height: 44px;
  border-radius: 10px;
  background: linear-gradient(
    135deg,
    var(--fv-forest-500, #447240),
    var(--fv-forest-400, #5f8f5a)
  );
  color: #fff;
  font-size: 1.1rem;
  flex-shrink: 0;
}
.foret-kpi-icon--green {
  background: linear-gradient(
    135deg,
    var(--fv-forest-500, #447240),
    var(--fv-forest-400, #5f8f5a)
  );
}
.foret-kpi-icon--blue {
  background: linear-gradient(
    135deg,
    var(--fv-sky-500, #3d87c2),
    var(--fv-sky-500, #3d87c2)
  );
}
.foret-kpi-icon--amber {
  background: linear-gradient(135deg, #d97706, #f59e0b);
}
.foret-kpi-icon--emerald {
  background: linear-gradient(
    135deg,
    var(--fv-forest-700, #2a4828),
    var(--fv-forest-300, #82a87a)
  );
}

/* ============================================
   FILTRES ET RECHERCHE
   ============================================ */
.foret-filters {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  margin-bottom: 1rem;
  flex-wrap: wrap;
}
.foret-search-wrap {
  position: relative;
  flex: 1;
  min-width: 200px;
  max-width: 320px;
}
.foret-search-wrap i {
  position: absolute;
  left: 10px;
  top: 50%;
  transform: translateY(-50%);
  color: #94a3b8;
  font-size: 0.8rem;
}
.foret-search {
  width: 100%;
  padding: 0.5rem 0.6rem 0.5rem 2rem;
  border: 1px solid #e2e8f0;
  border-radius: 8px;
  font-size: 0.78rem;
  background: #fff;
  transition: border-color 0.2s;
}
.foret-search:focus {
  outline: none;
  border-color: var(--fv-forest-400, #5f8f5a);
  box-shadow: 0 0 0 3px rgba(16, 185, 129, 0.1);
}
.foret-filter-btns {
  display: flex;
  gap: 0.3rem;
  flex-wrap: wrap;
}
.foret-filter-btn {
  padding: 0.35rem 0.65rem;
  border: 1px solid #e2e8f0;
  border-radius: 20px;
  background: #fff;
  color: #475569;
  font-size: 0.68rem;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.15s ease;
  display: flex;
  align-items: center;
  gap: 0.25rem;
}
.foret-filter-btn:hover {
  border-color: #94a3b8;
  background: #f8fafc;
}
.foret-filter-btn--active {
  background: var(--fv-forest-500, #447240);
  color: #fff;
  border-color: var(--fv-forest-500, #447240);
}
.foret-filter-btn--active:hover {
  background: var(--fv-forest-700, #2a4828);
  border-color: var(--fv-forest-700, #2a4828);
}
.foret-kpi-content {
  display: flex;
  flex-direction: column;
}
.foret-kpi-value {
  font-size: 1.3rem;
  font-weight: 700;
  color: #0f172a;
  line-height: 1.2;
}
.foret-kpi-label {
  font-size: 0.72rem;
  color: #64748b;
  margin-top: 0.1rem;
}

/* ============================================
   TOOLBAR
   ============================================ */
.foret-toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 1rem;
  flex-wrap: wrap;
  gap: 0.5rem;
}
.foret-section-title {
  font-size: 1.05rem;
  font-weight: 700;
  color: #0f172a;
  margin: 0;
}

/* ============================================
   BOUTONS
   ============================================ */
.foret-btn {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  padding: 0.55rem 1rem;
  border-radius: 8px;
  border: none;
  font-size: 0.8rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s ease;
  text-decoration: none;
  line-height: 1.4;
}
.foret-btn--primary {
  background: linear-gradient(
    135deg,
    var(--fv-forest-500, #447240),
    var(--fv-forest-400, #5f8f5a)
  );
  color: #fff;
  box-shadow: 0 2px 8px rgba(68, 114, 64, 0.25);
}
.foret-btn--primary:hover {
  transform: translateY(-1px);
  box-shadow: 0 4px 14px rgba(68, 114, 64, 0.35);
}
.foret-btn--secondary {
  background: #f1f5f9;
  color: #334155;
  border: 1px solid #e2e8f0;
}
.foret-btn--secondary:hover {
  background: #e2e8f0;
}
.foret-btn--green {
  background: #ecfdf5;
  color: var(--fv-forest-500, #447240);
  border: 1px solid #a7f3d0;
}
.foret-btn--green:hover {
  background: #d1fae5;
}
.foret-btn--sm {
  padding: 0.4rem 0.75rem;
  font-size: 0.72rem;
}
.foret-btn--danger {
  background: #fef2f2;
  color: #dc2626;
  border: 1px solid #fecaca;
}
.foret-btn--danger:hover {
  background: #fee2e2;
}

/* ============================================
   CARDS
   ============================================ */
.foret-cards {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(360px, 1fr));
  gap: 1rem;
}
.foret-card {
  background: #fff;
  border-radius: 12px;
  border: 1px solid #e2e8f0;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.04);
  overflow: hidden;
  transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
}
.foret-card:hover {
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.1);
  transform: translateY(-3px);
}

/* Card header */
.foret-card-header {
  padding: 1rem 1.15rem 0.65rem;
  border-bottom: 1px solid #f1f5f9;
}
.foret-card-title-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.5rem;
  margin-bottom: 0.3rem;
}
.foret-card-title {
  margin: 0;
  font-size: 0.92rem;
  font-weight: 700;
  color: #0f172a;
}
.foret-card-title i {
  color: var(--fv-forest-500, #447240);
  margin-right: 0.3rem;
}
.foret-card-location {
  font-size: 0.72rem;
  color: #64748b;
}
.foret-card-location i {
  margin-right: 0.2rem;
  color: #94a3b8;
}

/* Badges */
.foret-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.25rem;
  font-size: 0.62rem;
  font-weight: 600;
  padding: 0.2rem 0.5rem;
  border-radius: 20px;
  white-space: nowrap;
}
.foret-badge--green {
  background: #ecfdf5;
  color: var(--fv-forest-500, #447240);
  border: 1px solid #a7f3d0;
}
.foret-badge--orange {
  background: #fffbeb;
  color: #d97706;
  border: 1px solid #fde68a;
}
.foret-badge--type {
  background: #eff6ff;
  color: var(--fv-sky-500, #3d87c2);
  border: 1px solid #bfdbfe;
}
.foret-card-badges {
  display: flex;
  gap: 0.3rem;
  flex-wrap: wrap;
  align-items: center;
}

/* Location badges */
.foret-badge--chasse {
  background: #fef3c7;
  color: #92400e;
  border: 1px solid #fde68a;
}
.foret-badge--peche {
  background: #e0f2fe;
  color: #075985;
  border: 1px solid #bae6fd;
}
.foret-badge--agricole {
  background: #ecfdf5;
  color: #065f46;
  border: 1px solid #a7f3d0;
}
.foret-badge--autre {
  background: #f3f4f6;
  color: #374151;
  border: 1px solid #d1d5db;
}
.foret-badge--np {
  background: #fdf2f8;
  color: #9d174d;
  border: 1px solid #fbcfe8;
  font-weight: 700;
  font-size: 0.58rem;
}
.foret-badge--usuf {
  background: #faf5ff;
  color: #7c3aed;
  border: 1px solid #e9d5ff;
  font-weight: 700;
  font-size: 0.58rem;
}

/* Location section in cards */
.foret-card-locations {
  margin-top: 0.5rem;
  padding-top: 0.5rem;
  border-top: 1px solid #f1f5f9;
}
.foret-card-loc-badges {
  display: flex;
  align-items: center;
  gap: 0.3rem;
  flex-wrap: wrap;
}
.foret-loc-revenu {
  font-size: 0.72rem;
  font-weight: 700;
  color: var(--fv-forest-500, #447240);
  margin-left: auto;
}

/* Amber button variant */
.foret-btn--amber {
  background: linear-gradient(135deg, #d97706, #f59e0b);
  color: #fff;
  border: none;
}
.foret-btn--amber:hover {
  background: linear-gradient(135deg, #b45309, #d97706);
}

/* Card body */
.foret-card-body {
  padding: 0.85rem 1.15rem;
}
.foret-card-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.55rem;
}
.foret-card-stat {
  display: flex;
  flex-direction: column;
  gap: 0.1rem;
}
.foret-card-stat-label {
  font-size: 0.62rem;
  font-weight: 600;
  color: #94a3b8;
  text-transform: uppercase;
  letter-spacing: 0.3px;
}
.foret-card-stat-value {
  font-size: 0.78rem;
  font-weight: 600;
  color: #334155;
}
.foret-card-prix {
  display: flex;
  align-items: baseline;
  gap: 0.5rem;
  margin-top: 0.65rem;
  padding-top: 0.65rem;
  border-top: 1px solid #f1f5f9;
}
.foret-card-date {
  font-size: 0.66rem;
  color: #94a3b8;
}
.foret-card-notes {
  margin-top: 0.55rem;
  padding: 0.45rem 0.6rem;
  background: #f8fafc;
  border-radius: 6px;
  font-size: 0.7rem;
  color: #64748b;
  line-height: 1.5;
}
.foret-card-notes i {
  color: #f59e0b;
  margin-right: 0.25rem;
}

/* Card footer */
.foret-card-footer {
  padding: 0.65rem 1.15rem;
  background: #f8fafc;
  border-top: 1px solid #f1f5f9;
  display: flex;
  gap: 0.5rem;
  justify-content: flex-end;
}

/* ============================================
   EMPTY STATE
   ============================================ */
.foret-empty {
  text-align: center;
  padding: 3rem 1rem;
  color: #94a3b8;
}
.foret-empty i {
  font-size: 3rem;
  margin-bottom: 1rem;
  opacity: 0.4;
}
.foret-empty p {
  font-size: 0.9rem;
  margin-bottom: 1.2rem;
}

/* ============================================
   MODAL
   ============================================ */
.foret-modal-overlay {
  position: fixed;
  inset: 0;
  z-index: 1000;
  background: rgba(15, 23, 42, 0.5);
  backdrop-filter: blur(4px);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1rem;
  animation: foretFadeIn 0.25s ease;
}
@keyframes foretFadeIn {
  from {
    opacity: 0;
  }
  to {
    opacity: 1;
  }
}
.foret-modal-panel {
  background: #fff;
  border-radius: 14px;
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.15);
  width: 100%;
  max-width: 680px;
  max-height: 90vh;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  animation: foretSlideUp 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}
@keyframes foretSlideUp {
  from {
    transform: translateY(20px);
    opacity: 0;
  }
  to {
    transform: translateY(0);
    opacity: 1;
  }
}

/* Modal header */
.foret-modal-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 1rem 1.25rem;
  border-bottom: 1px solid #e2e8f0;
  background: #f8fafc;
}
.foret-modal-header-left {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  color: var(--fv-forest-500, #447240);
}
.foret-modal-header-left h3 {
  margin: 0;
  font-size: 0.95rem;
  font-weight: 700;
  color: #0f172a;
}
.foret-modal-close {
  width: 32px;
  height: 32px;
  border: none;
  background: none;
  color: #94a3b8;
  font-size: 0.9rem;
  cursor: pointer;
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.15s ease;
}
.foret-modal-close:hover {
  background: #e2e8f0;
  color: #0f172a;
}

/* Modal body */
.foret-modal-body {
  padding: 1.25rem;
  overflow-y: auto;
  flex: 1;
}

/* ============================================
   FORM
   ============================================ */
.foret-form {
  display: flex;
  flex-direction: column;
  gap: 1.2rem;
}
.foret-form-section h4 {
  margin: 0 0 0.65rem;
  font-size: 0.82rem;
  font-weight: 700;
  color: #334155;
  padding-bottom: 0.4rem;
  border-bottom: 2px solid #e2e8f0;
}
.foret-form-section h4 i {
  color: var(--fv-forest-500, #447240);
  margin-right: 0.35rem;
}
.foret-form-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.75rem;
  margin-bottom: 0.5rem;
}
.foret-form-row--full {
  grid-template-columns: 1fr;
}
.foret-form-field {
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
}
.foret-form-field label {
  font-size: 0.7rem;
  font-weight: 600;
  color: #64748b;
}
.foret-input {
  padding: 0.5rem 0.7rem;
  border: 1.5px solid #e2e8f0;
  border-radius: 8px;
  font-size: 0.8rem;
  color: #0f172a;
  background: #fff;
  transition: all 0.2s ease;
  outline: none;
}
.foret-input:focus {
  border-color: var(--fv-forest-500, #447240);
  box-shadow: 0 0 0 3px rgba(68, 114, 64, 0.1);
}
.foret-textarea {
  resize: vertical;
  min-height: 70px;
  font-family: inherit;
}

/* Form actions */
.foret-form-actions {
  display: flex;
  gap: 0.6rem;
  justify-content: flex-end;
  padding-top: 0.8rem;
  border-top: 1px solid #e2e8f0;
}

/* ============================================
   MULTI-SELECT ESSENCES
   ============================================ */
.foret-multiselect {
  position: relative;
}
.foret-multiselect-btn {
  width: 100%;
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 0.5rem 0.7rem;
  border: 1.5px solid #e2e8f0;
  border-radius: 8px;
  background: #fff;
  cursor: pointer;
  font-size: 0.8rem;
  color: #0f172a;
  transition: border-color 0.2s ease;
}
.foret-multiselect-btn:hover {
  border-color: #94a3b8;
}
.foret-multiselect-btn i {
  font-size: 0.65rem;
  color: #94a3b8;
  transition: transform 0.2s ease;
}
.foret-multiselect-dropdown {
  position: absolute;
  z-index: 20;
  top: 100%;
  left: 0;
  right: 0;
  max-height: 220px;
  overflow-y: auto;
  background: #fff;
  border: 1.5px solid #e2e8f0;
  border-radius: 8px;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.12);
  margin-top: 4px;
}
.foret-multiselect-item {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.4rem 0.7rem;
  cursor: pointer;
  font-size: 0.78rem;
  color: #334155;
  transition: background 0.15s ease;
}
.foret-multiselect-item:hover {
  background: #f1f5f9;
}
.foret-multiselect-item input[type="checkbox"] {
  accent-color: var(--fv-forest-500, #447240);
  width: 15px;
  height: 15px;
}

/* ============================================
   PCT PREVIEW
   ============================================ */
.foret-pct-preview {
  display: flex;
  flex-direction: column;
  gap: 0.2rem;
  padding-top: 0.3rem;
}
.foret-pct-bar-item {
  display: flex;
  align-items: center;
  gap: 0.35rem;
  font-size: 0.7rem;
  color: #334155;
}
.foret-pct-bar-color {
  --dot-color: var(--fv-forest-500, #447240);
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: var(--dot-color);
  flex-shrink: 0;
}

/* ============================================
   COURS D'EAU
   ============================================ */
.foret-card-rivers {
  margin-top: 0.55rem;
}
.foret-rivers-loading {
  font-size: 0.66rem;
  color: #94a3b8;
  font-style: italic;
  padding: 0.3rem 0;
}
.foret-rivers-loading i {
  margin-right: 0.2rem;
  color: #60a5fa;
  animation: foretPulse 1.5s infinite;
}
.foret-rivers-retry {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  flex-wrap: wrap;
}
.foret-rivers-retry i {
  animation: none;
  color: #94a3b8;
}
.foret-rivers-retry-btn {
  display: inline-flex;
  align-items: center;
  gap: 0.25rem;
  padding: 0.2rem 0.5rem;
  border: 1px solid #e2e8f0;
  border-radius: 6px;
  background: #fff;
  color: var(--fv-sky-500, #3d87c2);
  font-size: 0.62rem;
  cursor: pointer;
  transition: all 0.15s ease;
}
.foret-rivers-retry-btn:hover {
  background: #eff6ff;
  border-color: #93c5fd;
}
@keyframes foretPulse {
  0%,
  100% {
    opacity: 0.4;
  }
  50% {
    opacity: 1;
  }
}
.foret-rivers-content {
  background: linear-gradient(135deg, #eff6ff, #f0f9ff);
  border: 1px solid #bfdbfe;
  border-radius: 8px;
  padding: 0.5rem 0.65rem;
}
.foret-rivers-header {
  font-size: 0.68rem;
  font-weight: 700;
  color: #1e40af;
  margin-bottom: 0.35rem;
}
.foret-rivers-header i {
  color: var(--fv-sky-500, #3d87c2);
  margin-right: 0.25rem;
}
.foret-river-item {
  display: flex;
  align-items: center;
  gap: 0.4rem;
  padding: 0.25rem 0;
  font-size: 0.72rem;
}
.foret-river-item + .foret-river-item {
  border-top: 1px solid rgba(61, 135, 194, 0.1);
}
.foret-river-icon {
  width: 18px;
  text-align: center;
  color: var(--fv-sky-500, #3d87c2);
  font-size: 0.65rem;
}
.foret-river-name {
  font-weight: 600;
  color: #1e40af;
  flex: 1;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.foret-river-badge {
  font-size: 0.58rem;
  font-weight: 600;
  padding: 0.1rem 0.35rem;
  border-radius: 10px;
  background: #dbeafe;
  color: #1d4ed8;
  white-space: nowrap;
}
.foret-river-length {
  font-size: 0.72rem;
  font-weight: 700;
  color: var(--fv-sky-500, #3d87c2);
  white-space: nowrap;
}
.foret-rivers-total {
  font-size: 0.62rem;
  color: #64748b;
  margin-top: 0.3rem;
  padding-top: 0.3rem;
  border-top: 1px solid rgba(61, 135, 194, 0.15);
  text-align: right;
}

/* ============================================
   LOCATION MODAL
   ============================================ */
.foret-input-group {
  display: flex;
  align-items: stretch;
}
.foret-input-group .foret-input {
  border-top-right-radius: 0;
  border-bottom-right-radius: 0;
  flex: 1;
}
.foret-input-suffix {
  display: flex;
  align-items: center;
  padding: 0 0.6rem;
  background: #f1f5f9;
  border: 1px solid #e2e8f0;
  border-left: none;
  border-radius: 0 8px 8px 0;
  font-size: 0.68rem;
  color: #64748b;
  white-space: nowrap;
}
.foret-loc-surface {
  margin-top: 0.4rem;
  font-size: 0.68rem;
  color: var(--fv-forest-500, #447240);
  font-weight: 600;
}
.foret-loc-surface i {
  margin-right: 0.2rem;
}
.foret-loc-rives {
  font-size: 0.72rem;
  color: var(--fv-sky-500, #3d87c2);
  padding: 0.5rem;
  background: #eff6ff;
  border-radius: 8px;
}
.foret-loc-rives i {
  margin-right: 0.25rem;
}
.foret-loc-prix-total {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0.65rem 0.85rem;
  background: linear-gradient(135deg, #ecfdf5, #f0fdf4);
  border: 1px solid #a7f3d0;
  border-radius: 10px;
}
.foret-loc-prix-label {
  font-size: 0.78rem;
  font-weight: 600;
  color: #065f46;
}
.foret-loc-prix-value {
  font-size: 1.2rem;
  font-weight: 800;
  color: var(--fv-forest-500, #447240);
}

/* Autocomplete locataire */
.foret-autocomplete {
  position: absolute;
  top: 100%;
  left: 0;
  right: 0;
  background: #fff;
  border: 1px solid #e2e8f0;
  border-radius: 8px;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
  z-index: 100;
  max-height: 240px;
  overflow-y: auto;
}
.foret-autocomplete-item {
  padding: 0.5rem 0.75rem;
  cursor: pointer;
  font-size: 0.75rem;
  display: flex;
  flex-direction: column;
  gap: 0.1rem;
  transition: background 0.1s;
}
.foret-autocomplete-item:hover {
  background: #f0fdf4;
}
.foret-autocomplete-item span {
  font-size: 0.65rem;
  color: #64748b;
}
.foret-autocomplete-new {
  border-top: 1px solid #e2e8f0;
  color: var(--fv-forest-500, #447240);
  font-weight: 600;
  flex-direction: row;
  gap: 0.4rem;
  align-items: center;
}
.foret-form-field--full {
  position: relative;
}

/* New locataire section */
.foret-loc-new-locataire {
  margin-top: 0.5rem;
  padding: 0.65rem;
  background: #f8fafc;
  border: 1px dashed #cbd5e1;
  border-radius: 8px;
}

/* Existing locations list */
.foret-loc-existing {
  margin-bottom: 0.75rem;
}
.foret-loc-empty {
  font-size: 0.75rem;
  color: #94a3b8;
  padding: 1rem;
  text-align: center;
}
.foret-loc-empty i {
  margin-right: 0.3rem;
  color: #cbd5e1;
}
.foret-loc-card {
  background: #fff;
  border: 1px solid #e2e8f0;
  border-radius: 10px;
  padding: 0.65rem 0.85rem;
  margin-bottom: 0.5rem;
  transition: box-shadow 0.15s;
}
.foret-loc-card:hover {
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.06);
}
.foret-loc-card-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 0.4rem;
}
.foret-loc-card-prix {
  font-size: 0.9rem;
  font-weight: 800;
  color: var(--fv-forest-500, #447240);
}
.foret-loc-card-body {
  font-size: 0.72rem;
  color: #475569;
}
.foret-loc-card-row {
  padding: 0.15rem 0;
}
.foret-loc-card-row i {
  width: 16px;
  text-align: center;
  color: #94a3b8;
  margin-right: 0.3rem;
  font-size: 0.65rem;
}
.foret-loc-card-actions {
  display: flex;
  gap: 0.3rem;
  margin-top: 0.4rem;
  padding-top: 0.4rem;
  border-top: 1px solid #f1f5f9;
  justify-content: flex-end;
}

/* Danger button */
.foret-btn--danger {
  background: #fee2e2;
  color: #dc2626;
  border: 1px solid #fecaca;
}
.foret-btn--danger:hover {
  background: #fecaca;
  border-color: #f87171;
}

/* Toggle form button */
.foret-loc-toggle-form {
  text-align: center;
  margin-bottom: 0.5rem;
}

/* ============================================
   SIM ESSENCES INFO
   ============================================ */
.foret-sim-essences-info {
  font-size: 0.72rem;
  color: var(--fv-forest-500, #447240);
  background: rgba(68, 114, 64, 0.08);
  border: 1px solid rgba(68, 114, 64, 0.2);
  border-radius: 6px;
  padding: 0.4rem 0.6rem;
  margin-top: 0.6rem;
  line-height: 1.5;
}
.foret-sim-essences-info i {
  margin-right: 0.2rem;
}

/* ============================================
   SIMULATEUR DE COUPE
   ============================================ */
.foret-modal-panel--wide {
  max-width: 780px;
}
.foret-btn--full {
  width: 100%;
  justify-content: center;
}
.foret-sim-toggle {
  display: flex;
  border: 1.5px solid #e2e8f0;
  border-radius: 8px;
  overflow: hidden;
}
.foret-sim-toggle-btn {
  flex: 1;
  padding: 0.45rem 0.6rem;
  border: none;
  background: #fff;
  color: #64748b;
  font-size: 0.75rem;
  font-weight: 500;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.35rem;
  transition: all 0.2s ease;
}
.foret-sim-toggle-btn:first-child {
  border-right: 1px solid #e2e8f0;
}
.foret-sim-toggle-btn--active {
  background: var(--fv-forest-500, #447240);
  color: #fff;
}
.foret-sim-results {
  margin-top: 1.2rem;
}
.foret-sim-header h4 {
  margin: 0 0 0.5rem;
  font-size: 0.95rem;
  font-weight: 700;
  color: #0f172a;
}
.foret-sim-header h4 i {
  color: var(--fv-forest-500, #447240);
  margin-right: 0.3rem;
}
.foret-sim-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin-bottom: 0.6rem;
}
.foret-sim-meta span {
  font-size: 0.7rem;
  color: #64748b;
  background: #f8fafc;
  padding: 0.2rem 0.5rem;
  border-radius: 12px;
  border: 1px solid #e2e8f0;
}
.foret-sim-meta span i {
  margin-right: 0.2rem;
  color: var(--fv-forest-500, #447240);
}
.foret-sim-correction {
  font-size: 0.7rem;
  color: var(--fv-forest-500, #447240);
  background: rgba(68, 114, 64, 0.08);
  border: 1px solid rgba(68, 114, 64, 0.2);
  border-radius: 6px;
  padding: 0.35rem 0.55rem;
  margin-bottom: 0.8rem;
}
.foret-sim-correction i {
  margin-right: 0.2rem;
}
.foret-sim-scenarios {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 0.75rem;
  margin-bottom: 1rem;
}
.foret-sim-scenario {
  --scenario-accent: #6366f1;
  border: 1.5px solid #e2e8f0;
  border-radius: 10px;
  padding: 0.85rem;
  background: #fff;
  border-top: 3px solid var(--scenario-accent);
  transition: all 0.2s ease;
}
.foret-sim-scenario:hover {
  box-shadow: 0 4px 14px rgba(0, 0, 0, 0.08);
  transform: translateY(-2px);
}
.foret-sim-scenario-head {
  display: flex;
  align-items: center;
  gap: 0.4rem;
  margin-bottom: 0.35rem;
}
.foret-sim-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 24px;
  height: 24px;
  border-radius: 50%;
  background: var(--scenario-accent);
  color: #fff;
  font-size: 0.68rem;
  font-weight: 700;
}
.foret-sim-scenario-title {
  font-size: 0.82rem;
  font-weight: 700;
  color: #0f172a;
}
.foret-sim-scenario-desc {
  font-size: 0.68rem;
  color: #64748b;
  margin: 0 0 0.55rem;
  line-height: 1.4;
}
.foret-sim-metrics {
  display: flex;
  flex-direction: column;
  gap: 0.3rem;
}
.foret-sim-metric {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  padding: 0.2rem 0;
  border-bottom: 1px solid #f1f5f9;
}
.foret-sim-metric:last-child {
  border-bottom: none;
}
.foret-sim-metric--total {
  margin-top: 0.15rem;
  padding-top: 0.35rem;
  border-top: 2px solid var(--scenario-accent);
  border-bottom: none;
}
.foret-sim-metric-lbl {
  font-size: 0.66rem;
  color: #94a3b8;
}
.foret-sim-metric-val {
  font-size: 0.78rem;
  font-weight: 700;
  color: #334155;
}
.foret-sim-neg {
  color: #ef4444;
}
.foret-sim-net {
  color: var(--scenario-accent);
  font-size: 0.88rem;
}
.foret-sim-note {
  margin: 0.5rem 0 0;
  padding: 0.35rem 0.5rem;
  background: #f8fafc;
  border-radius: 6px;
  font-size: 0.64rem;
  color: #64748b;
  line-height: 1.5;
}
.foret-sim-note i {
  color: var(--scenario-accent);
  margin-right: 0.2rem;
}
.foret-sim-aide {
  background: #f8fafc;
  border: 1px solid #e2e8f0;
  border-radius: 8px;
  padding: 0.7rem 0.85rem;
  margin-bottom: 0.75rem;
}
.foret-sim-aide h5 {
  margin: 0 0 0.35rem;
  font-size: 0.78rem;
  font-weight: 700;
  color: #0f172a;
}
.foret-sim-aide h5 i {
  color: #f59e0b;
  margin-right: 0.25rem;
}
.foret-sim-aide-item {
  font-size: 0.7rem;
  color: #64748b;
  padding: 0.2rem 0;
  line-height: 1.5;
}
.foret-sim-aide-item i {
  color: var(--fv-forest-500, #447240);
  margin-right: 0.2rem;
  font-size: 0.6rem;
}
.foret-sim-disclaimer {
  font-size: 0.64rem;
  color: #92400e;
  padding: 0.5rem 0.65rem;
  background: #fef3c7;
  border-radius: 6px;
  border: 1px solid #fde68a;
  line-height: 1.5;
}
.foret-sim-disclaimer i {
  color: #d97706;
  margin-right: 0.25rem;
}
.foret-sim-error {
  padding: 0.7rem;
  background: #fef2f2;
  border: 1px solid #fecaca;
  border-radius: 6px;
  color: #b91c1c;
  font-size: 0.78rem;
}
.foret-sim-error i {
  margin-right: 0.25rem;
}
.foret-form-hint {
  font-size: 0.62rem;
  color: #94a3b8;
  font-style: italic;
}

/* ============================================
   MULTI-SELECT DROPDOWN
   ============================================ */
.foret-multiselect {
  position: relative;
}
.foret-multiselect-btn {
  width: 100%;
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 0.5rem 0.7rem;
  border: 1.5px solid #e2e8f0;
  border-radius: 8px;
  background: #fff;
  cursor: pointer;
  font-size: 0.8rem;
  color: #0f172a;
  transition: border-color 0.2s ease;
}
.foret-multiselect-btn:hover {
  border-color: #94a3b8;
}
.foret-multiselect-btn i {
  color: #94a3b8;
  font-size: 0.7rem;
}
.foret-multiselect-dropdown {
  position: absolute;
  z-index: 10;
  top: 100%;
  left: 0;
  right: 0;
  max-height: 220px;
  overflow-y: auto;
  background: #fff;
  border: 1.5px solid #e2e8f0;
  border-radius: 8px;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.12);
  margin-top: 4px;
}
.foret-multiselect-item {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.4rem 0.7rem;
  cursor: pointer;
  font-size: 0.78rem;
  color: #334155;
  transition: background 0.15s ease;
}
.foret-multiselect-item:hover {
  background: #f1f5f9;
}
.foret-multiselect-item input[type="checkbox"] {
  accent-color: var(--fv-forest-500, #447240);
  width: 15px;
  height: 15px;
}

/* ============================================
   PCT PREVIEW
   ============================================ */
.foret-pct-preview {
  display: flex;
  flex-direction: column;
  gap: 0.2rem;
  padding-top: 1.4rem;
}
.foret-pct-bar-item {
  display: flex;
  align-items: center;
  gap: 0.35rem;
  font-size: 0.7rem;
  color: #334155;
  font-weight: 500;
}
.foret-pct-bar-color {
  --dot-color: var(--fv-forest-500, #447240);
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: var(--dot-color);
  flex-shrink: 0;
}

/* ============================================
   ESSENCES INFO (simulateur)
   ============================================ */
.foret-sim-essences-info {
  font-size: 0.72rem;
  color: var(--fv-forest-500, #447240);
  background: rgba(68, 114, 64, 0.08);
  border: 1px solid rgba(68, 114, 64, 0.2);
  border-radius: 6px;
  padding: 0.4rem 0.6rem;
  margin-top: 0.6rem;
  line-height: 1.5;
}
.foret-sim-essences-info i {
  margin-right: 0.2rem;
}
.foret-sim-essence-warning {
  font-size: 0.75rem;
  color: #92400e;
  background: #fffbeb;
  border: 1px solid #fde68a;
  border-radius: 8px;
  padding: 0.65rem 0.8rem;
  margin-top: 0.6rem;
  line-height: 1.5;
}
.foret-sim-essence-warning i {
  color: #d97706;
  margin-right: 0.3rem;
}
.foret-sim-pct-manual {
  margin-top: 0.5rem;
}
.foret-sim-pct-manual label {
  font-size: 0.7rem;
  font-weight: 600;
  color: #92400e;
}
.foret-sim-pct-manual .foret-input {
  max-width: 160px;
  border-color: #fde68a;
}
.foret-sim-pct-manual .foret-input:focus {
  border-color: #d97706;
  box-shadow: 0 0 0 3px rgba(217, 119, 6, 0.1);
}

/* ============================================
   RESPONSIVE
   ============================================ */
@media (max-width: 768px) {
  .foret-kpis {
    grid-template-columns: repeat(2, 1fr);
    gap: 0.6rem;
  }
  .foret-cards {
    grid-template-columns: 1fr;
  }
  .foret-toolbar {
    flex-direction: column;
    align-items: flex-start;
  }
  .foret-form-row {
    grid-template-columns: 1fr;
  }
  .foret-modal-panel {
    max-width: 100%;
  }
  .foret-sim-scenarios {
    grid-template-columns: 1fr;
  }
  .foret-sim-meta {
    flex-direction: column;
    gap: 0.3rem;
  }
  .foret-filters {
    flex-direction: column;
    align-items: stretch;
  }
  .foret-search-wrap {
    max-width: none;
  }
  .foret-filter-btns {
    justify-content: flex-start;
  }
}

@media (max-width: 480px) {
  .foret-kpis {
    grid-template-columns: 1fr;
  }
  .foret-kpi {
    padding: 0.75rem;
  }
  .foret-kpi-value {
    font-size: 1.1rem;
  }
  .foret-card-grid {
    grid-template-columns: 1fr;
  }
  .foret-modal-overlay {
    padding: 0;
    align-items: flex-end;
  }
  .foret-modal-panel {
    border-radius: 14px 14px 0 0;
    max-height: 95vh;
  }
  .foret-card-footer {
    flex-direction: column;
  }
  .foret-card-footer .foret-btn {
    width: 100%;
    justify-content: center;
  }
}
.foret-loc-revenu-detail {
  display: flex;
  flex-direction: column;
  gap: 2px;
  margin-top: 4px;
  font-size: 0.85rem;
}

.foret-loc-revenu-line {
  color: var(--text-secondary, #6b7280);
}

.foret-loc-revenu-total {
  font-weight: 600;
  color: var(--text-primary, #111827);
  border-top: 1px solid var(--border, #e5e7eb);
  margin-top: 2px;
  padding-top: 2px;
}
