.back {
  color: #ffffff;
  text-decoration: none;
  font-size: 1rem;
}

.search-icon {
  width: 18px;
  height: 18px;
  display: inline-block;
  background-image: url("data:image/svg+xml,%3Csvg width='18' height='18' viewBox='0 0 24 24' fill='none' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M21 21L16.65 16.65' stroke='%2394A3B8' stroke-width='2' stroke-linecap='round'/%3E%3Ccircle cx='11' cy='11' r='7' stroke='%2394A3B8' stroke-width='2'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: center;
  opacity: 0.8;
}

.filter-select {
  position: relative;
}

.filter-menu.hidden {
  display: none;
}

.filter-menu button:hover {
  background: #e0ebff;
}

.form-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 24px 26px rgba(37, 99, 235, 0.65);
}

.form-card-top {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 5px;
}

.status.published {
  background: #dcfce7;
  color: #15803d;
}

.status.draft {
  background: #f1f5f9;
  color: #475569;
}

.menu {
  position: relative;
}

.menu-dropdown.show {
  display: grid;
}

.empty-state p {
  color: var(--muted);
}

.results-kpis {
  display: grid;
  gap: 5px;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  margin-top: 6px;
}

.results-actions {
  display: flex;
  gap: 5px;
  align-items: center;
  flex-wrap: wrap;
  margin-top: 6px;
  margin-bottom: 22px;

}

.results-header {
  align-items: flex-start;
}

.results-charts {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 8px;
  margin-top: 12px;
  margin-bottom: 12px;

}

.chart-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 5px;
}

.icon-btn {
  width: 28px;
  height: 28px;
  display: grid;
  place-items: center;
  font-size: 1rem;
  background: transparent;
  padding: 0;
  border: none;
}

.icon-btn svg {
  width: 22px;
  height: 22px;
  stroke: #1d4ed8;
  stroke-width: 2;
  fill: none;
  display: block;
}

.icon-btn.plain {
  color: #1d4ed8;
  line-height: 1;
  cursor: pointer;
  transition: transform 0.15s ease, color 0.15s ease;
}

.icon-btn.plain:hover {
  transform: scale(1.08);
  color: #2563eb;
}

.chart-card canvas {
  width: 100%;
  max-width: 100%;
  border-radius: 16px;
  background: #f8fafc;
}

.chart-modal {
  position: fixed;
  inset: 0;
  background: rgba(15, 23, 42, 0.35);
  backdrop-filter: blur(6px);
  display: grid;
  place-items: center;
  z-index: 50;
  padding: 4vh 4vw;
}

.chart-modal.hidden {
  display: none;
}

.chart-modal-card {
  width: min(1600px, 92vw);
  height: min(80vh, 900px);
  background: #ffffff;
  border-radius: 20px;
  padding: 32px;
  box-shadow: 0 30px 80px rgba(15, 23, 42, 0.2);
  display: grid;
  gap: 20px;
  grid-template-rows: auto 1fr;
  overflow-x: auto;
}

.chart-modal-card canvas {
  display: block;
  min-width: 700px;   /* 🔥 clé du fix */
  height: auto;
}

.lang-switch {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-weight: 600;
}

.lang-switch .lang-btn {
  border: 1px solid var(--line, #e5e7eb);
  background: #ffffff;
  padding: 6px 10px;
  border-radius: 999px;
  cursor: pointer;
  font-size: 0.85rem;
  font-weight: 700;
}

.lang-switch .lang-btn.is-active {
  background: #2563eb;
  color: #ffffff;
  border-color: #2563eb;
}

.lang-switch .lang-sep {
  color: var(--muted, #64748b);
  font-weight: 700;
}

.auth-lang {
  position: fixed;
  top: 18px;
  right: 18px;
  z-index: 20;
}

.kpi {
  background: #ffffff;
  border-radius: 16px;
  padding: 6px;
  border: 1px solid var(--line);
  box-shadow: var(--shadow);
  display: grid;
  gap: 5px;
}

.kpi span {
  color: var(--muted);
}

.results-grid {
  margin-top: 6px;
  display: grid;
  gap: 8px;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
}

.results-filters {
  margin-top: 6px;
  display: flex;
  align-items: center;
  gap: 5px;
  flex-wrap: wrap;

  /* ❌ suppression du style "card" */
  background: transparent;
  border: none;
  padding: 0;
  box-shadow: none;
}

.results-filters label {
  display: grid;
  gap: 5px;
  font-size: var(--font-body);
  color: var(--muted);
}

.date-filter {
  position: relative;
}

.date-filter-trigger {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 4px 6px;
  border-radius: 10px;
  border: 1px solid #d4d4d8;
  background: #f8fafc;
  color: #3f3f46;
  font-weight: 600;
  cursor: pointer;
  transition: border-color 0.2s ease, background 0.2s ease, box-shadow 0.2s ease;
}

.date-filter-trigger:hover {
  background: #f1f5f9;
  border-color: #cbd5f5;
}

.date-filter-icon {
  width: 18px;
  height: 18px;
  display: inline-block;
  background-image: url("data:image/svg+xml,%3Csvg width='18' height='18' viewBox='0 0 20 20' fill='none' xmlns='http://www.w3.org/2000/svg'%3E%3Crect x='3' y='4.5' width='14' height='12' rx='2.5' stroke='%236B7280' stroke-width='1.5'/%3E%3Cpath d='M6 2.75V5.25M14 2.75V5.25' stroke='%236B7280' stroke-width='1.5' stroke-linecap='round'/%3E%3Cpath d='M3 7.5H17' stroke='%236B7280' stroke-width='1.5' stroke-linecap='round'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: center;
}

.date-filter-panel {
  position: absolute;
  top: calc(100% + 12px);
  left: 0;
  min-width: 620px;
  padding: 16px;
  background: #ffffff;
  border: 1px solid #e5e7eb;
  border-radius: 20px;
  box-shadow: 0 24px 60px rgba(15, 23, 42, 0.12);
  display: grid;
  grid-template-columns: 180px 1fr;
  grid-template-rows: auto auto;
  gap: 16px;
  opacity: 0;
  transform: translateY(6px);
  pointer-events: none;
  z-index: 20;
}

.date-filter.is-open .date-filter-panel {
  opacity: 1;
  transform: translateY(0);
  pointer-events: auto;
}

.date-filter-presets {
  display: grid;
  gap: 5px;
}

.preset-btn {
  border: none;
  background: #f8fafc;
  color: #3f3f46;
  padding: 4px 6px;
  border-radius: 12px;
  text-align: left;
  cursor: pointer;
  transition: background 0.2s ease, color 0.2s ease;
}

.preset-btn.is-active {
  background: #ede9fe;
  color: #4c1d95;
  font-weight: 600;
}

.date-filter-calendar {
  background: #fafafa;
  border-radius: 16px;
  padding: 6px;
}

.calendar-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  color: #3f3f46;
  font-weight: 600;
  margin-bottom: 12px;
  text-transform: capitalize;
}

.calendar-nav {
  border: none;
  background: #ffffff;
  width: 32px;
  height: 32px;
  border-radius: 10px;
  cursor: pointer;
  box-shadow: 0 8px 16px rgba(15, 23, 42, 0.08);
}

.calendar-weekdays {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  gap: 5px;
  font-size: 0.78rem;
  color: #6b7280;
  margin-bottom: 6px;
  text-align: center;
}

.calendar-grid {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  gap: 5px;
}

.calendar-day {
  border: none;
  background: #f3f4f6;
  border-radius: 10px;
  height: 36px;
  font-size: 0.9rem;
  color: #3f3f46;
  cursor: pointer;
}

.calendar-day.is-empty {
  background: transparent;
  cursor: default;
}

.calendar-day.is-in-range {
  background: #e5e7eb;
}

.calendar-day.is-start,
.calendar-day.is-end {
  background: #4b5563;
  color: #ffffff;
}

.date-filter-footer {
  grid-column: 1 / -1;
  display: flex;
  justify-content: flex-end;
  gap: 5px;
  padding-top: 12px;
  border-top: 1px solid #f1f5f9;
}

@media (max-width: 768px) {
  .date-filter-panel {
    position: fixed;
    top: auto;
    left: 12px;
    right: 12px;
    bottom: 12px;
    min-width: 0;
    width: auto;
    max-height: 82vh;
    overflow-y: auto;
    border-radius: 18px;
    grid-template-columns: 1fr;
    grid-template-rows: auto;
  }

  .date-filter-presets {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 8px;
  }

  .preset-btn {
    text-align: center;
  }

  .date-filter-calendar {
    padding: 8px;
  }

  .calendar-header {
    font-size: 0.95rem;
  }

  .calendar-grid {
    gap: 4px;
  }

  .calendar-day {
    height: 34px;
    font-size: 0.85rem;
  }

  .date-filter-footer {
    position: sticky;
    bottom: 0;
    background: #ffffff;
    padding: 10px 0 4px;
  }
}

.results-filters input,
.results-filters select {
  padding: 4px 6px;
  border-radius: 10px;
  border: 1px solid var(--line);
  background: #ffffff;
  font-size: var(--font-control);
  color: #0f172a;
  box-shadow: inset 0 1px 0 rgba(15, 23, 42, 0.04);
}

.results-filters input:focus,
.results-filters select:focus {
  outline: none;
  border-color: #4bc2fc;
  box-shadow: 0 0 0 3px rgba(75, 194, 252, 0.18);
}

.results-card {
  background: #ffffff;
  border-radius: 18px;
  padding: 6px;
  border: 1px solid var(--line);
  box-shadow: var(--shadow);
  display: grid;
  gap: 5px;
}

.results-list {
  display: grid;
  gap: 5px;
}

.result-row {
  display: grid;
  gap: 5px;
  padding: 4px 6px;
  border-radius: 12px;
  background: #f8fafc;
}

.result-card {
  border-radius: 12px;
  padding: 6px;
  background: #f8fafc;
  display: grid;
  gap: 5px;
}

.response-card {
  cursor: pointer;
  transition: background 0.2s ease, box-shadow 0.2s ease;
}

.response-card:hover {
  background: #f1f5f9;
}

.response-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 5px;
}

.response-header h4,
.response-header p {
  margin: 0;
}

.response-status {
  font-size: 0.8rem;
  padding: 4px 10px;
  border-radius: 999px;
  border: 1px solid transparent;
  font-weight: 600;
}

.response-status.status-complete {
  color: #065f46;
  background: #d1fae5;
  border-color: #a7f3d0;
}

.response-status.status-abandoned {
  color: #9a3412;
  background: #ffedd5;
  border-color: #fed7aa;
}

.response-details {
  max-height: 0;
  opacity: 0;
  overflow: hidden;
  transform: translateY(-4px);
  transition: max-height 0.25s ease, opacity 0.2s ease, transform 0.2s ease;
}

.response-card.is-open .response-details {
  max-height: 2000px;
  opacity: 1;
  transform: translateY(0);
}

.result-answers {
  display: grid;
  gap: 5px;
  color: var(--muted);
}

.pill {
  border: none;
  background: #ececec;
  padding: 14px 20px;
  border-radius: 999px;
  cursor: pointer;
}

.pill.active {
  background: #111827;
  color: #ffffff;
}

.btn {
  border: none;
  padding: 16px 24px;
  border-radius: 999px;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  text-decoration: none;
}

.btn.primary {
  background: var(--accent);
  color: #ffffff;
}

.btn.dark {
  background: #2b2f36;
  color: #ffffff;
}

.ghost {
  border: 1px solid var(--line);
  background: #ffffff;
  padding: 14px 20px;
  border-radius: 999px;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  text-decoration: none;
}

#publish-btn {
  background: #f97316;
  color: #ffffff;
  font-weight: 700;
  border: none;
  box-shadow: 0 14px 26px rgba(249, 115, 22, 0.28);
}

.avatar {
  width: 34px;
  height: 34px;
  border-radius: 50%;
  background: #dbeafe;
  color: #1d4ed8;
  display: grid;
  place-items: center;
  font-weight: 700;
  cursor: pointer;
}

.color-row {
  display: flex;
  gap: 5px;
  flex-wrap: wrap;
  margin: 16px 0;
}

.swatch {
  width: 44px;
  height: 44px;
  border-radius: 10px;
  border: none;
  cursor: pointer;
  box-shadow: 0 10px 20px rgba(15, 23, 42, 0.15);
  transition: transform 0.2s ease;
}

.swatch:hover {
  transform: translateY(-3px);
}

.color-picker {
  display: grid;
  grid-template-columns: 80px 1fr auto;
  gap: 5px;
  align-items: center;
  margin-bottom: 16px;
}

.color-picker input[type="text"] {
  padding: 6px;
  border-radius: 10px;
  border: 1px solid #e5e7eb;
}

.color-preview {
  display: flex;
  gap: 16px;
  align-items: center;
  padding: 6px;
  border-radius: 16px;
  background: #ffffff;
  border: 1px solid #e5e7eb;
}

.color-swatch {
  width: 60px;
  height: 60px;
  border-radius: 18px;
  background: #2563eb;
  box-shadow: inset 0 0 0 4px rgba(255, 255, 255, 0.6);
}

.idea-card {
  padding: 6px;
  border-radius: 18px;
  background: linear-gradient(135deg, rgba(37, 99, 235, 0.08), rgba(249, 115, 22, 0.08));
  border: 1px dashed rgba(37, 99, 235, 0.3);
}

.view-btn.active {
  background: #111827;
  color: #ffffff;
}

.dropdown {
  padding: 6px 10px;
  border-radius: 999px;
  background: #f0f0f0;
  border: 1px solid var(--line);
}

.panel-title {
  font-weight: 600;
  margin-bottom: 12px;
}

.editable-title {
  width: 100%;
  text-align: left;
  border: none;
  background: transparent;
  font: inherit;
  cursor: pointer;
}

.type-badge {
  display: inline-flex;
  align-self: center;
  background: #e7efff;
  color: #1d4ed8;
  padding: 6px 12px;
  border-radius: 999px;
  font-size: 0.8rem;
}

.editable {
  outline: none;
  border-radius: 8px;
  padding: 2px 4px;
}

.editable:focus {
  background: #fff7ed;
  box-shadow: 0 0 0 2px rgba(251, 146, 60, 0.35);
}

.editable-btn {
  border-radius: 999px;
}

.question-list {
  display: grid;
  gap: 5px;
}

.q-item {
  display: flex;
  gap: 5px;
  align-items: center;
  padding: 16px;
  border-radius: 12px;
  background: #f7f7f7;
  cursor: pointer;
  position: relative;
}

.q-item.dragging {
  opacity: 0.5;
}

.q-delete {
  margin-left: auto;
  border: none;
  background: transparent;
  color: #9ca3af;
  cursor: pointer;
  font-size: 0.9rem;
}

.q-item.active {
  background: #e7efff;
  border: 1px solid #c7d8ff;
}

.q-icon {
  background: #e5e7eb;
  width: 36px;
  height: 36px;
  border-radius: 8px;
  display: grid;
  place-items: center;
  font-size: 1rem;
}

.left-footer {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin: 20px 0 10px;
  color: var(--muted);
}

.ending-list {
  display: grid;
  gap: 5px;
}

.floating-input {
  background: var(--card);
  border-radius: 16px;
  border: 1px solid #d9c6ff;
  padding: 10px 14px;
  display: flex;
  gap: 5px;
  align-items: center;
  box-shadow: 0 10px 30px rgba(146, 100, 255, 0.15);
}

.floating-input input {
  border: none;
  outline: none;
  flex: 1;
}

.meta-badges {
  display: flex;
  justify-content: center;
  gap: 5px;
  flex-wrap: wrap;
}

.meta-badge {
  background: #f1f5f9;
  color: #475569;
  padding: 6px 12px;
  border-radius: 999px;
  font-size: 0.8rem;
}

.toggle {
  display: flex;
  justify-content: space-between;
  align-items: center;
  color: var(--muted);
}

.toggle input[type="checkbox"] {
  appearance: none;
  width: 46px;
  height: 26px;
  border-radius: 999px;
  background: #e2e8f0;
  border: 1px solid #cbd5f5;
  position: relative;
  cursor: pointer;
  transition: background 0.2s ease, border-color 0.2s ease;
}

.toggle input[type="checkbox"]::after {
  content: "";
  position: absolute;
  top: 3px;
  left: 4px;
  width: 18px;
  height: 18px;
  border-radius: 50%;
  background: #ffffff;
  box-shadow: 0 6px 16px rgba(15, 23, 42, 0.2);
  transition: transform 0.2s ease;
}

.toggle input[type="checkbox"]:checked {
  background: #2563eb;
  border-color: #1d4ed8;
}

.toggle input[type="checkbox"]:checked::after {
  transform: translateX(20px);
}

.field {
  display: grid;
  gap: 5px;
  color: var(--muted);
}

.field input {
  padding: 4px 6px;
  border-radius: 10px;
  border: 1px solid var(--line);
}

.field-help {
  font-size: var(--font-body);
  color: var(--muted);
}

.option-row {
  display: flex;
  align-items: center;
  gap: 5px;
}

.option-row input {
  flex: 1;
  padding: 4px 6px;
  border-radius: 10px;
  border: 1px solid var(--line);
}

.option-row button {
  border: none;
  background: transparent;
  color: #9ca3af;
  cursor: pointer;
}

.options-add {
  display: flex;
  gap: 5px;
  margin-top: 6px;
}

.options-add input {
  flex: 1;
  padding: 4px 6px;
  border-radius: 10px;
  border: 1px solid var(--line);
}

.required-star {
  color: #ef4444;
  margin-left: 4px;
}

.validation-error {
  color: #dc2626;
  font-size: 0.85rem;
}

.end-settings {
  display: grid;
  gap: 16px;
}

.end-settings.hidden {
  display: none;
}

.social-inputs {
  display: grid;
  gap: 5px;
}

.answer-select {
  background: #f8fafc;
  border: 1px solid var(--line);
  padding: 4px 6px;
  border-radius: 12px;
  font-size: var(--font-control);
}

.phone-row {
  display: flex;
  gap: 5px;
  align-items: center;
  position: relative;
}

.flag {
  border: 1px solid #e5e7eb;
  border-radius: 8px;
  padding: 4px 6px;
  font-size: 0.85rem;
  color: var(--muted);
  background: #ffffff;
}

.country-btn {
  cursor: pointer;
  min-width: 44px;
  text-align: center;
}

.country-menu {
  position: absolute;
  top: 44px;
  left: 0;
  background: #ffffff;
  border: 1px solid var(--line);
  border-radius: 12px;
  box-shadow: var(--shadow);
  display: grid;
  gap: 5px;
  padding: 6px;
  z-index: 5;
  max-height: 160px;
  overflow-y: auto;
}

.country-menu button {
  border: none;
  background: #f8fafc;
  padding: 4px 6px;
  border-radius: 8px;
  text-align: left;
  cursor: pointer;
}

.choice-item.selected {
  background: #c7d8ff;
  border-color: #8fb0ff;
}

.choice-add {
  color: #2563eb;
  text-decoration: none;
  font-size: 0.9rem;
}

.coord-row {
  display: grid;
  gap: 5px;
  grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
}

.check-item input {
  accent-color: var(--accent);
  width: 16px;
  height: 16px;
}

select.canvas-input {
  border: 1px solid var(--line);
  border-radius: 10px;
  padding: 4px 6px;
  background: #ffffff;
  appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='20' height='20' viewBox='0 0 20 20'%3E%3Cpath d='M6 8l4 4 4-4' fill='none' stroke='%236b7280' stroke-width='2' stroke-linecap='round'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 10px center;
  padding-right: 36px;
}

.yesno {
  display: flex;
  gap: 5px;
}

.yesno button {
  border: 1px solid #c7d8ff;
  background: #eef4ff;
  padding: 6px 10px;
  border-radius: 10px;
  cursor: pointer;
}

.scale {
  display: flex;
  gap: 5px;
}

.scale button {
  border: 1px solid #c7d8ff;
  background: #eef4ff;
  padding: 10px 14px;
  border-radius: 10px;
}

.end-screen {
  text-align: center;
  display: grid;
  gap: 5px;
  margin-top: 12px;
}

.end-socials {
  display: flex;
  gap: 5px;
  justify-content: center;
  flex-wrap: wrap;
}

.end-socials a {
  background: #f3f4f6;
  border-radius: 999px;
  padding: 6px 12px;
  text-decoration: none;
  color: #111827;
  font-size: 0.85rem;
}

.search {
  display: flex;
  gap: 5px;
  align-items: center;
  border: 1px solid #e0e7ff;
  padding: 6px 10px;
  border-radius: 12px;
  background: #f8fafc;
}

.search input {
  border: none;
  outline: none;
  flex: 1;
}

.app-list {
  display: grid;
  gap: 5px;
}

.app-card {
  padding: 4px 6px;
  border-radius: 12px;
  border: 1px solid #e0e7ff;
  background: #eef2ff;
  font-size: 0.9rem;
}

.element {
  text-align: left;
  border: none;
  background: #f8fafc;
  padding: 4px 6px;
  border-radius: 10px;
  cursor: pointer;
  font-size: 0.9rem;
}

/* === SELECT PAYS (SIDEBAR) === */

.field select {
  appearance: none;
  -webkit-appearance: none;
  -moz-appearance: none;

  padding: 4px 6px;
  border-radius: 12px;
  border: 1px solid var(--line);
  background: #ffffff;

  font-size: var(--font-control);
  cursor: pointer;

  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='18' height='18' viewBox='0 0 24 24'%3E%3Cpath d='M7 10l5 5 5-5' fill='none' stroke='%236b7280' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 12px center;
  background-size: 18px;

  padding-right: 42px;
}

.field select:hover {
  border-color: #c7d8ff;
}

.field select:focus {
  outline: none;
  border-color: var(--accent);
  box-shadow: 0 0 0 2px rgba(47, 107, 255, 0.15);
}

/* ===== OPTIONS SIDEBAR ===== */

.options-list {
  display: flex;
  flex-direction: column;
  gap: 5px;
  max-height: 160px;
  overflow-y: auto;
  overflow-x: hidden;
  padding-right: 4px;
}

/* Carte option */
.option-row {
  display: flex;
  align-items: flex-start;
  gap: 5px;
  padding: 4px 6px;
  background: #ffffff;
  border: 1px solid #e5e7eb;
  border-radius: 10px;
  cursor: grab;
}

/* Texte option */
.option-row span {
  flex: 1;
  font-size: 14px;
  line-height: 1.4;
  color: #111827;

  /* 🔥 FIX TEXTE LONG */
  word-break: break-word;
  overflow-wrap: anywhere;
  white-space: normal;
}

/* Bouton suppression */
.option-remove {
  border: none;
  background: transparent;
  color: #9ca3af;
  font-size: 14px;
  cursor: pointer;
  padding: 0;
}

.option-remove:hover {
  color: #ef4444;
}

/* Feedback drag */
.option-row.dragging {
  opacity: 0.5;
}

/* ===== DRAG DROP INDICATOR (OPTIONS SIDEBAR) ===== */

.option-row {
  position: relative;
}

/* Ligne indicatrice */
.option-row.drop-before::before,
.option-row.drop-after::after {
  content: "";
  position: absolute;
  left: 6px;
  right: 6px;
  height: 3px;
  background: #2563eb;
  border-radius: 999px;
}

/* Ligne au-dessus */
.option-row.drop-before::before {
  top: -6px;
}

/* Ligne en-dessous */
.option-row.drop-after::after {
  bottom: -6px;
}

/* Option en cours de drag */
.option-row.dragging {
  opacity: 0.4;
  background: #f8fafc;
  cursor: grabbing;
}

.plan-card {
  background: #ffffff;
  border-radius: 26px;
  border: 1px solid #e5e7eb;
  padding: 22px;
  display: grid;
  gap: 8px;
  box-shadow: 0 18px 40px rgba(15, 23, 42, 0.08);
}

.plan-card.highlight {
  border: 2px solid #111827;
  position: relative;
  transform: translateY(-6px);
}

.plan-badge {
  position: absolute;
  top: 18px;
  right: 18px;
  padding: 6px 12px;
  border-radius: 999px;
  background: #111827;
  color: #ffffff;
  font-size: 0.75rem;
  font-weight: 700;
}

.plan-name {
  font-weight: 700;
  font-size: 1.05rem;
}

.plan-price {
  display: flex;
  align-items: baseline;
  gap: 5px;
  font-weight: 700;
}

.price-amount {
  font-size: 2.2rem;
}

.price-cycle {
  color: #6b7280;
  font-size: 0.95rem;
}

.plan-note {
  color: #6b7280;
  font-size: 0.95rem;
}

.plan-features {
  list-style: none;
  display: grid;
  gap: 5px;
  color: #374151;
}

.plan-features li {
  display: flex;
  align-items: flex-start;
  gap: 5px;
}

.feature-dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: #111827;
  flex: 0 0 10px;
  margin-top: 6px;
}

.plan-cta {
  width: 100%;
}

.image-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(140px, 1fr));
  gap: 16px;
  margin-top: 6px;
}

.image-choice {
  border: 2px solid #c7d8ff;
  border-radius: 10px;
  overflow: visible;
  background: #fff;
}

.image-choice img {
  width: 100%;
  height: 140px;
  object-fit: cover;
  display: block;
}

.image-empty {
  color: #6b7280;
  font-size: 14px;
}

.image-upload-list {
  display: grid;
  gap: 5px;
  margin-top: 6px;
  max-width: 100%;
}

.image-upload-row {
  display: grid;
  grid-template-columns: 48px minmax(0, 1fr);
  align-items: center;
  gap: 5px;
  padding: 6px;
  border-radius: 12px;
  border: 1px solid var(--line);
  background: #ffffff;
  max-width: 100%;
  overflow: visible;
}

.image-upload-row img {
  width: 48px;
  height: 48px;
  border-radius: 8px;
  object-fit: cover;
}

.image-upload-empty {
  color: #6b7280;
  font-size: 0.9rem;
}

#image-input {
  width: 100%;
  max-width: 100%;
  border: 1px dashed #cbd5f5;
  border-radius: 10px;
  padding: 6px;
  background: #f8faff;
  font-size: var(--font-control);
  color: #4b5563;
  cursor: pointer;
}

.image-upload-row .image-remove {
  justify-self: end;
  white-space: nowrap;
}

#image-input::file-selector-button {
  border: none;
  border-radius: 999px;
  padding: 10px 14px;
  margin-right: 10px;
  background: #111827;
  color: #ffffff;
  font-weight: 600;
  cursor: pointer;
}

#image-input::file-selector-button:hover {
  background: #1f2937;
}

#image-input::file-selector-button:active {
  transform: translateY(1px);
}

.kpi-responses {
  display: flex;
  flex-direction: column;
  gap: 5px;
}

.kpi-main {
  font-size: 32px;
  font-weight: 700;
  color: #0f172a;
}

.kpi-sub {
  font-size: 13px;
  color: #64748b;
  display: flex;
  align-items: center;
  gap: 5px;
}

.kpi-completed {
  color: #16a34a; /* vert */
  font-weight: 500;
}

.kpi-abandoned {
  color: #ea580c; /* orange */
  font-weight: 500;
}

/* === STATUS FILTER === */

.status-filter {
  position: relative;
}

.status-filter-trigger {
  display: inline-flex;
  align-items: center;
  padding: 4px 6px;
  border-radius: 10px;
  border: 1px solid #d4d4d8;
  background: #f8fafc;
  color: #3f3f46;
  font-weight: 600;
  cursor: pointer;
  min-width: 88px;
  transition: background 0.2s ease, border-color 0.2s ease;
}

.status-filter-trigger:hover {
  background: #f1f5f9;
  border-color: #cbd5f5;
}

.status-filter-panel {
  position: absolute;
  top: calc(100% + 10px);
  left: 0;
  background: #ffffff;
  border-radius: 10px;
  border: 1px solid #e5e7eb;
  box-shadow: 0 20px 50px rgba(15, 23, 42, 0.12);
  padding: 6px;
  display: grid;
  gap: 5px;
  min-width: 88px;
  z-index: 20;
}

.status-filter-panel.hidden {
  display: none;
}

.status-filter-panel button {
  border: none;
  background: #f8fafc;
  padding: 4px 6px;
  border-radius: 10px;
  font-weight: 600;
  text-align: left;
  cursor: pointer;
}

.status-filter-panel button:hover {
  background: #e0ebff;
}

.chart-card {
  cursor: pointer;
  transition: box-shadow 0.25s ease, transform 0.2s ease;
}

.chart-card:hover {
  transform: translateY(-4px);
  box-shadow:
    0 30px 60px -6px var(--chart-glow);
}

.chart-card.is-active {
  box-shadow: 0 18px 40px -12px var(--chart-glow);
}

/* ===== RÉPONSES PAR UTILISATEUR – AMÉLIORATION UI ===== */

/* Conteneur des réponses d’un utilisateur */
.response-details {
  padding-top: 12px;
}

/* Liste des réponses (questions) */
.result-answers {
  display: grid;
  gap: 5px; /* 🔥 espace entre chaque question */
}

.result-answers > div strong {
  font-size: 0.8rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: #64748b;
}

.result-answers > div a,
.result-answers > div code {
  font-size: 0.85rem;
  color: #2563eb;
  word-break: break-all;
}

.answer-image {
  max-width: 140px;
  max-height: 100px;
  object-fit: cover;
  border-radius: 8px;
  margin-top: 6px;
  margin-right: 8px;
  display: inline-block;
  cursor: zoom-in;
}

/* === DASHBOARD COMPACT === */
.dash-page {
  font-size: 12px;
}

.form-card h3 {
  font-size: 14px;
}

/* ============================= */
/* GLOBAL FOUNDATION – FLOWLY */
/* ============================= */

html {
  font-size: 100%;
  -webkit-text-size-adjust: 100%;
}

/* TYPO SYSTEM */
h1 {
  font-size: 28px;
  line-height: 1.25;
  margin-bottom: 6px;
}

h2 {
  font-size: 22px;
  line-height: 1.3;
}

h3 {
  font-size: 18px;
}

p {
  font-size: 15px;
  color: #6b7280;
}

small {
  font-size: 13px;
}

/* DASHBOARD CONTROLS FIX */

.dash-controls {
  gap: 12px;
  padding: 16px;
}

/* MOBILE */
@media (max-width: 480px) {
  h1 { font-size: 22px; }
  h2 { font-size: 18px; }

  .dash-topbar {
    padding: 12px;
  }

 
  .form-card {
    padding: 14px;
  }
}

/* TABLET */
@media (max-width: 900px) {
  h1 { font-size: 24px; }
}


.dash-actions-mobile {
  position: absolute;
  top: 64px;
  right: 16px;

  display: flex;
  flex-direction: column;
  gap: 18px;

  background: #fff;
  border: 1px solid var(--line);
  border-radius: 16px;
  padding: 12px;
  box-shadow: 0 20px 50px rgba(0,0,0,.18);

  opacity: 0;
  pointer-events: none;
  transform: translateY(-8px);
  transition: .15s ease;

  z-index: 100;
}

.dash-actions-mobile.open {
  opacity: 1;
  pointer-events: auto;
  transform: translateY(0);
}


/* ===============================
   Slide reorder arrows (mobile + tablet)
   =============================== */

@media (max-width: 1366px) and (orientation: landscape),
       (hover: none) and (pointer: coarse) {

  .q-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
  }

  .mobile-move-controls {
    display: flex;
    gap: 6px;
    margin-left: auto;
  }

  .mobile-move-controls button {
    border: none;
    background: #f1f5f9;
    border-radius: 6px;
    padding: 4px 8px;
    font-size: 14px;
    cursor: pointer;
  }

  .mobile-move-controls button:active {
    background: #e2e8f0;
  }
}


#kpi-time {
  font-size: 30px;
  font-weight: 700;
}
