/* ============================================================================
   HyrePad v2 — Onglet Boolean (CSS)
   Pattern : utilise les CSS vars globales (--logo-blue, --font, --font-mono…)
   On NE rajoute PAS de padding ni de background ici.
   Cohérent avec le pattern .reponses-tab et .fp-wrap.
   ============================================================================ */

.bool-wrap {
  display: flex;
  flex-direction: column;
  gap: 16px;
  max-width: 900px;
  margin: 0 auto;
}

/* ─── SECTIONS COMMUNES ──────────────────────────────────────────────── */
.bool-section {
  background: #fff;
  border: 0.5px solid rgba(0, 0, 0, 0.08);
  border-radius: 10px;
  padding: 18px 20px;
}

/* ─── EMPTY STATE ────────────────────────────────────────────────────── */
.bool-empty {
  text-align: center;
  padding: 36px 24px;
}
.bool-empty-icon {
  font-size: 32px;
  margin-bottom: 14px;
  opacity: 0.6;
}
.bool-empty-title {
  font-size: 16px;
  font-weight: 600;
  color: rgba(0, 0, 0, 0.7);
  margin: 0 0 8px;
  letter-spacing: -0.2px;
}
.bool-empty-desc {
  font-size: 13px;
  color: rgba(0, 0, 0, 0.55);
  margin: 0 0 18px;
  line-height: 1.55;
}

/* ─── HEADER (stats + régénérer all) ──────────────────────────────────── */
.bool-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
  flex-wrap: wrap;
}
.bool-header-info {
  flex: 1;
  min-width: 0;
}
.bool-header-stats {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 13px;
  color: rgba(0, 0, 0, 0.65);
  margin-bottom: 6px;
  flex-wrap: wrap;
}
.bool-stat {
  font-weight: 500;
}
.bool-stat strong {
  color: var(--logo-blue);
  font-weight: 600;
}
.bool-sep {
  color: rgba(0, 0, 0, 0.25);
}
.bool-stale-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 6px 10px;
  background: #fbf2e0;
  border: 0.5px solid #e2c478;
  border-radius: 6px;
  color: #5c4214;
  font-size: 12px;
  font-weight: 500;
  margin-top: 8px;
  flex-wrap: wrap;
}
.bool-stale-hint {
  font-weight: 400;
  color: #6e5320;
  font-size: 11px;
}
.bool-header-actions {
  flex-shrink: 0;
}

/* ─── PLATFORM CARDS ──────────────────────────────────────────────────── */
.bool-card {
  display: flex;
  flex-direction: column;
  gap: 12px;
  padding: 16px 20px;
}

.bool-card-header {
  display: flex;
  flex-direction: column;
  gap: 4px;
}
.bool-card-title {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}
.bool-card-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  flex-shrink: 0;
}
.bool-card-name {
  font-size: 14px;
  font-weight: 600;
  color: #1a1a1a;
  letter-spacing: -0.1px;
}
.bool-saved-badge {
  font-size: 10px;
  font-weight: 500;
  padding: 2px 7px;
  border-radius: 100px;
  background: #e8f3ed;
  color: #2d7a5f;
  letter-spacing: 0.2px;
}
.bool-draft-badge {
  font-size: 10px;
  font-weight: 500;
  padding: 2px 7px;
  border-radius: 100px;
  background: #f1efe8;
  color: rgba(0, 0, 0, 0.5);
  letter-spacing: 0.2px;
}
.bool-changed-badge {
  font-size: 10px;
  font-weight: 500;
  padding: 2px 7px;
  border-radius: 100px;
  background: #fbf2e0;
  color: #b8761f;
  letter-spacing: 0.2px;
}
.bool-card-desc {
  font-size: 11px;
  color: rgba(0, 0, 0, 0.45);
  letter-spacing: 0.1px;
}

/* ─── TEXTAREA ─────────────────────────────────────────────────────────── */
.bool-card-body {
  position: relative;
}
.bool-textarea {
  font-family: var(--font-mono, 'JetBrains Mono', ui-monospace, monospace);
  font-size: 12.5px;
  line-height: 1.6;
  color: #1a1a1a;
  background: #f4f6fb;
  border: 0.5px solid rgba(0, 0, 0, 0.08);
  border-radius: 6px;
  padding: 10px 12px;
  width: 100%;
  resize: vertical;
  min-height: 64px;
  outline: none;
  transition: all 0.15s ease;
  letter-spacing: 0.1px;
}
.bool-textarea:focus {
  background: #fff;
  border-color: var(--logo-blue);
  box-shadow: 0 0 0 2px rgba(29, 78, 216, 0.1);
}
.bool-textarea::placeholder {
  color: rgba(0, 0, 0, 0.3);
  font-style: italic;
}

/* ─── ACTIONS BUTTONS ──────────────────────────────────────────────────── */
.bool-card-actions {
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
  justify-content: flex-end;
}

.bool-btn {
  font-family: var(--font, inherit);
  font-size: 12px;
  font-weight: 500;
  padding: 6px 11px;
  border-radius: 6px;
  cursor: pointer;
  transition: all 0.15s ease;
  display: inline-flex;
  align-items: center;
  gap: 5px;
  border: 0.5px solid transparent;
  white-space: nowrap;
}

.bool-btn svg {
  width: 13px;
  height: 13px;
  flex-shrink: 0;
}

.bool-btn--ghost {
  color: rgba(0, 0, 0, 0.6);
  background: transparent;
  border-color: rgba(0, 0, 0, 0.12);
}
.bool-btn--ghost:hover {
  color: var(--logo-blue);
  border-color: rgba(29, 78, 216, 0.3);
  background: rgba(29, 78, 216, 0.04);
}

.bool-btn--primary {
  color: #fff;
  background: var(--logo-blue);
  border-color: var(--logo-blue);
}
.bool-btn--primary:hover:not(:disabled) {
  background: #1740b8;
  border-color: #1740b8;
  transform: translateY(-1px);
  box-shadow: 0 2px 6px rgba(29, 78, 216, 0.25);
}
.bool-btn--primary:disabled {
  opacity: 0.5;
  cursor: default;
}

/* ─── BOUTON AFFINER IA (style premium or/jaune) ──────────────────────── */
.bool-btn--ai {
  color: #5c4214;
  background: linear-gradient(135deg, #fef3c7 0%, #fde68a 50%, #fbbf24 100%);
  border-color: #d4a017;
  font-weight: 600;
  position: relative;
  overflow: hidden;
}
.bool-btn--ai svg {
  fill: #b8761f;
  stroke: #6e5320;
  stroke-width: 1.5;
}
.bool-btn--ai:hover:not(:disabled) {
  background: linear-gradient(135deg, #fde68a 0%, #fbbf24 50%, #f59e0b 100%);
  border-color: #b8761f;
  color: #3d2c0e;
  transform: translateY(-1px);
  box-shadow: 0 2px 8px rgba(251, 191, 36, 0.4);
}
.bool-btn--ai:disabled {
  opacity: 0.6;
  cursor: wait;
  background: linear-gradient(135deg, #f3f4f6 0%, #e5e7eb 100%);
  color: rgba(0, 0, 0, 0.4);
  border-color: rgba(0, 0, 0, 0.12);
  transform: none;
  box-shadow: none;
}
.bool-btn--ai:disabled svg {
  fill: rgba(0, 0, 0, 0.3);
  stroke: rgba(0, 0, 0, 0.4);
  animation: bool-ai-pulse 1.2s ease-in-out infinite;
}
@keyframes bool-ai-pulse {
  0%, 100% { opacity: 0.5; }
  50%      { opacity: 1; }
}

/* ─── TOAST ──────────────────────────────────────────────────────────── */
.bool-toast {
  position: fixed;
  bottom: 24px;
  left: 50%;
  transform: translateX(-50%) translateY(20px);
  font-size: 13px;
  font-weight: 500;
  padding: 10px 18px;
  border-radius: 8px;
  background: #1a1a1a;
  color: #ffffff;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.15);
  opacity: 0;
  transition: all 0.25s ease;
  z-index: 9999;
  pointer-events: none;
}
.bool-toast--show {
  opacity: 1;
  transform: translateX(-50%) translateY(0);
}
.bool-toast--success {
  background: #0f6e56;
}
.bool-toast--error {
  background: #a8392e;
}

/* ─────────────────────────────────────────────────────────────────────────────
 * Hints de localisation enrichie (Livraison 4 Boolean)
 * Affichés dans le header, sous forme de badge contextuel
 * ───────────────────────────────────────────────────────────────────────────── */

.bool-loc-hint {
  display: inline-flex;
  align-items: center;
  padding: 3px 10px;
  border-radius: 6px;
  font-size: 12px;
  font-weight: 500;
  letter-spacing: 0.1px;
  border: 1px solid transparent;
  transition: all 0.15s ease;
  cursor: help;
}

/* Site client connu (Châtillon, Massy, Issy…) → bleu HyrePad */
.bool-loc-hint--site_client {
  background: rgba(29, 78, 216, 0.08);
  color: var(--logo-blue, #1d4ed8);
  border-color: rgba(29, 78, 216, 0.18);
}

/* IDF générique → vert doux */
.bool-loc-hint--idf {
  background: rgba(45, 122, 95, 0.08);
  color: var(--success, #2d7a5f);
  border-color: rgba(45, 122, 95, 0.18);
}

/* France entière → indigo */
.bool-loc-hint--france_entiere {
  background: rgba(99, 102, 241, 0.08);
  color: var(--indigo, #6366f1);
  border-color: rgba(99, 102, 241, 0.18);
}

/* Remote / TAD → violet */
.bool-loc-hint--remote_only {
  background: rgba(139, 92, 246, 0.08);
  color: #8b5cf6;
  border-color: rgba(139, 92, 246, 0.18);
}

/* Province (Lyon, Bordeaux…) → ambre */
.bool-loc-hint--province {
  background: rgba(184, 118, 31, 0.08);
  color: var(--warn, #b8761f);
  border-color: rgba(184, 118, 31, 0.18);
}

/* NearShore → gris (pas de filtre) */
.bool-loc-hint--nearshore {
  background: rgba(120, 120, 130, 0.08);
  color: var(--text2, #6b7280);
  border-color: rgba(120, 120, 130, 0.2);
  font-style: italic;
}

/* Inconnu / lieu non précisé → gris discret */
.bool-loc-hint--unknown {
  background: transparent;
  color: var(--text3, #9ca3af);
  border-color: var(--border, rgba(0,0,0,0.08));
  font-style: italic;
}

/* ─── MOBILE (≤ 768px) ─────────────────────────────────────────────────── */
@media (max-width: 768px) {
  .bool-wrap {
    gap: 12px;
  }
  .bool-section {
    padding: 14px;
  }
  .bool-header {
    flex-direction: column;
    gap: 12px;
  }
  .bool-header-actions {
    width: 100%;
  }
  .bool-card-actions {
    justify-content: stretch;
    gap: 6px;
  }
  .bool-btn {
    flex: 1;
    justify-content: center;
    font-size: 11px;
    padding: 7px 8px;
  }
  /* Sur mobile, on cache les icônes pour gagner de la place */
  .bool-btn svg {
    display: none;
  }
  .bool-textarea {
    font-size: 11.5px;
  }
  .bool-card-name {
    font-size: 13px;
  }
}
