* { box-sizing: border-box; }
:root {
    --bg: #121212;
    --card: #1c1c1e;
    --line: #2c2c2e;
    --text: #f2f2f7;
    --muted: #8e8e93;
}
html, body {
    margin: 0;
    background: var(--bg);
    color: var(--text);
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
    overscroll-behavior: none;
    -webkit-tap-highlight-color: transparent;
}
body {
    padding: 16px;
    padding-top: calc(16px + env(safe-area-inset-top));
    padding-bottom: calc(16px + env(safe-area-inset-bottom));
    padding-left: calc(16px + env(safe-area-inset-left));
    padding-right: calc(16px + env(safe-area-inset-right));
}
.app { max-width: 1000px; margin: 0 auto; display: flex; flex-direction: column; gap: 14px; }
.hidden { display: none !important; }

.card { background: var(--card); border-radius: 22px; padding: 20px; box-shadow: 0 4px 16px rgba(0,0,0,.35); min-width: 0; }
.title { margin: 0 0 16px; text-align: center; color: #4ade80; font-size: 1.7rem; font-weight: 700; }
h2 { margin: 0; font-size: 1.4rem; font-weight: 700; }

.actions { display: flex; flex-wrap: wrap; gap: 12px; }
.btn { border: none; color: #fff; font-weight: 700; font-size: 1rem; padding: 14px 20px; border-radius: 12px; cursor: pointer; transition: filter .15s; }
.btn:active, .btn:hover { filter: brightness(1.12); }
.btn-gray { background: #3a3a3c; }
.btn-green { background: #10b981; }
.btn-red { background: #ef4444; }

.dropzone { position: relative; margin-top: 16px; border: 2px dashed #48484a; border-radius: 16px; padding: 40px 16px; text-align: center; color: #a1a1a6; font-size: 1.1rem; transition: border-color .2s, background-color .2s; }
.dropzone.drag { border-color: #4ade80; background: #232325; }
.dropzone input { position: absolute; inset: 0; width: 100%; height: 100%; opacity: 0; cursor: pointer; }
.ocr-status { margin: 12px 0 0; text-align: center; font-size: .9rem; color: var(--muted); }
.ocr-status.ok { color: #4ade80; }
.ocr-status.err { color: #f87171; }

.card-head { display: flex; justify-content: space-between; align-items: center; gap: 12px; margin-bottom: 16px; flex-wrap: wrap; }
.badge { background: #3b82f6; color: #fff; padding: 8px 18px; border-radius: 999px; font-size: .95rem; }

.search { position: relative; margin-bottom: 16px; }
.search svg { position: absolute; left: 14px; top: 50%; transform: translateY(-50%); color: var(--muted); pointer-events: none; }
.search input { width: 100%; background: var(--bg); border: 1px solid var(--line); color: var(--text); border-radius: 12px; padding: 13px 40px 13px 42px; font-size: 16px; outline: none; }
.search input:focus { border-color: #4ade80; }
.search button { position: absolute; right: 8px; top: 50%; transform: translateY(-50%); background: none; border: none; color: var(--muted); font-size: 16px; padding: 8px; cursor: pointer; }

.table-wrap { overflow-x: auto; -webkit-overflow-scrolling: touch; }
table { width: 100%; min-width: 1360px; border-collapse: collapse; table-layout: fixed; }
th, td { border: 1px solid var(--line); text-align: center; }
th { padding: 16px 8px; font-size: .95rem; letter-spacing: .02em; text-transform: uppercase; background: var(--card); white-space: nowrap; }
.h-client, .h-wb { color: #38bdf8; }
.h-prospect { color: #fbbf24; }
.h-non { color: #f87171; }
.h-comm { color: #d1d5db; }
td { padding: 4px; height: 60px; }
td input { width: 100%; background: transparent; border: none; outline: none; color: var(--text); text-align: center; font-size: 16px; padding: 12px 6px; border-radius: 8px; }
td input:focus { background: #2c2c2e; }
td input[data-field="prospect"] { color: #fbbf24; font-weight: 600; }
td input[data-field="wb_prix"] { color: #38bdf8; }
td input[data-field="non_reponse"] { color: #f87171; font-weight: 600; }
td input[data-field="commentaire"] { text-align: left; color: #d1d5db; padding-left: 10px; }
td input::placeholder { color: #48484a; }
.delete-btn { background: none; border: none; color: #6b7280; font-size: 16px; padding: 10px; cursor: pointer; }
.delete-btn:hover { color: #f87171; }
.empty { text-align: center; color: var(--muted); font-size: .9rem; padding: 24px 0 4px; margin: 0; }

.toast { position: fixed; left: 50%; bottom: calc(24px + env(safe-area-inset-bottom)); transform: translateX(-50%); background: #10b981; color: #fff; font-size: .9rem; padding: 10px 18px; border-radius: 12px; box-shadow: 0 6px 20px rgba(0,0,0,.4); z-index: 50; max-width: 90vw; text-align: center; }

@media (min-width: 900px) { table { min-width: 0; } }


/* Nouveaux styles ajoutés */
.contact-actions {
  display: flex;
  align-items: center;
  gap: 4px;
}
.action-btn {
  text-decoration: none;
  font-size: 1.2rem;
  transition: transform 0.2s ease;
}
.action-btn:hover {
  transform: scale(1.2);
}
.phone-text {
  font-weight: 500;
}
.phone-text input {
  margin: 0;
  width: 175px;
}
.comment-section {
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.category-select {
  padding: 6px;
  border-radius: 6px;
  border: 1px solid #ddd;
  background-color: #f9f9f9;
  font-size: 0.9rem;
  cursor: pointer;
}
.category-select:focus {
  outline: none;
  border-color: #007bff;
}
