/* ─── Fraîcheur — même gabarit / look que Pilotage ─────────────────────────── */

#fraicheur-view {
  display: none;
  flex: 1;
  overflow-y: auto;
  padding: 24px 32px 48px;
  background:
    radial-gradient(ellipse 80% 50% at 50% -20%, var(--orange-dim), transparent 55%),
    var(--bg-base);
  position: relative;
  width: 100%;
  min-width: 0;
}

#fraicheur-view.visible {
  display: block;
}

#fraicheur-view-content {
  max-width: 1440px;
  margin: 0 auto;
  width: 100%;
}

#main-layout:has(#fraicheur-view.visible) #session-panel,
#main-layout:has(#fraicheur-view.visible) #right-panel {
  display: none !important;
}

#app:has(#fraicheur-view.visible) #topbar-filters {
  display: none !important;
}

#app:has(#fraicheur-view.visible) #topbar {
  justify-content: flex-start;
}

#app:has(#fraicheur-view.visible) #topbar-right {
  margin-left: auto;
}

#main-layout.sessions-mode.sessions-mode-solo #fraicheur-view-content {
  max-width: 1440px;
}

.fraicheur-app {
  width: 100%;
  display: flex;
  flex-direction: column;
  gap: 22px;
}

/* Header — aligné Pilotage */
.fraicheur-header {
  display: flex;
  flex-wrap: wrap;
  gap: 16px 24px;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 4px;
}

.fraicheur-header-main {
  min-width: 0;
  flex: 1;
}

.fraicheur-header-title-row {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  min-width: 0;
}

.fraicheur-header-titles {
  min-width: 0;
  flex: 1;
}

.fraicheur-back {
  width: 30px;
  height: 30px;
  margin-top: 0;
  padding: 0;
  border: 1px solid var(--border);
  border-radius: 8px;
  background: var(--bg-card);
  color: var(--text-secondary);
  display: grid;
  place-items: center;
  cursor: pointer;
  flex-shrink: 0;
  transition: background var(--transition), border-color var(--transition), color var(--transition);
}

.fraicheur-back:hover {
  background: var(--bg-card-hover);
  border-color: var(--text-muted);
  color: var(--text-primary);
}

.fraicheur-header h1 {
  font-size: 1.75rem;
  font-weight: 800;
  letter-spacing: -0.03em;
  color: var(--text-primary);
  margin: 0;
}

.fraicheur-sub {
  color: var(--text-secondary);
  font-size: 0.9rem;
  margin: 6px 0 0;
  max-width: 42rem;
  line-height: 1.45;
}

.fraicheur-header-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 4px 8px;
  align-items: center;
}

.fraicheur-header-count {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 1.4em;
  height: 1.4em;
  padding: 0 6px;
  margin-left: 4px;
  border-radius: 999px;
  font-size: 0.72rem;
  font-weight: 750;
  line-height: 1;
  background: color-mix(in srgb, var(--orange) 18%, transparent);
  color: var(--orange);
  vertical-align: middle;
}

.fraicheur-header-actions .btn {
  white-space: nowrap;
}

.fraicheur-header-actions .btn[hidden] {
  display: none !important;
}

.fraicheur-review-link {
  white-space: nowrap;
}

.fraicheur-nightline {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 12px 20px;
  padding: 14px 18px;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
}

.fraicheur-nightline.is-on {
  border-color: color-mix(in srgb, #0f9d58 28%, var(--border));
}

.fraicheur-nightline-copy {
  display: flex;
  flex-direction: column;
  gap: 4px;
  min-width: 0;
  flex: 1 1 16rem;
}

.fraicheur-nightline-kicker {
  font-size: 0.72rem;
  font-weight: 750;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--text-muted);
}

.fraicheur-nightline-phrase {
  margin: 0;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.3em 0.4em;
  font-size: 1.02rem;
  font-weight: 600;
  color: var(--text-primary);
  line-height: 1.35;
  min-width: 0;
}

.fraicheur-nightline-select {
  appearance: none;
  font: inherit;
  font-weight: 800;
  color: var(--text-primary);
  background:
    var(--bg-base)
    url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 24 24' fill='none' stroke='%235b6570' stroke-width='2.5'><path d='M6 9l6 6 6-6'/></svg>")
    no-repeat right 8px center;
  border: none;
  border-radius: 8px;
  padding: 4px 28px 4px 10px;
  max-width: min(100%, 28rem);
  cursor: pointer;
  box-shadow: inset 0 0 0 1px var(--border);
}

.fraicheur-nightline-select:hover,
.fraicheur-nightline-select:focus {
  outline: none;
  box-shadow: inset 0 0 0 1.5px var(--orange, #e9530d);
}

.fraicheur-switch {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  margin: 0;
  padding: 6px 12px 6px 8px;
  border: 1px solid var(--border);
  border-radius: 999px;
  background: var(--bg-base);
  color: var(--text-secondary);
  font: inherit;
  font-size: 0.84rem;
  font-weight: 650;
  line-height: 1;
  cursor: pointer;
  flex-shrink: 0;
  appearance: none;
  -webkit-appearance: none;
}

.fraicheur-switch:hover:not(:disabled) {
  border-color: color-mix(in srgb, var(--text-muted) 45%, var(--border));
}

.fraicheur-switch:focus-visible {
  outline: 2px solid color-mix(in srgb, var(--orange, #e9530d) 55%, transparent);
  outline-offset: 2px;
}

.fraicheur-switch:disabled {
  opacity: 0.7;
  cursor: not-allowed;
}

.fraicheur-nightline.is-blocked {
  border-color: color-mix(in srgb, #c47a12 35%, var(--border));
}

.fraicheur-nightline.is-blocked .fraicheur-switch {
  color: #8a5a10;
  border-color: color-mix(in srgb, #c47a12 40%, var(--border));
  background: color-mix(in srgb, #c47a12 8%, var(--bg-base));
}

.fraicheur-switch-track {
  display: block;
  position: relative;
  width: 44px;
  height: 26px;
  border-radius: 999px;
  background: #c5ccd3;
  flex-shrink: 0;
  overflow: hidden;
  transition: background 0.15s ease;
}

.fraicheur-switch-knob {
  position: absolute;
  top: 3px;
  left: 3px;
  width: 20px;
  height: 20px;
  border-radius: 50%;
  background: #fff;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.18);
  transition: left 0.15s ease;
  pointer-events: none;
}

.fraicheur-switch-label {
  white-space: nowrap;
  min-width: 4.5rem;
}

.fraicheur-switch.is-on {
  color: #0b7a44;
  border-color: color-mix(in srgb, #0f9d58 35%, var(--border));
  background: color-mix(in srgb, #0f9d58 8%, var(--bg-base));
}

.fraicheur-switch.is-on .fraicheur-switch-track {
  background: #0f9d58;
}

.fraicheur-switch.is-on .fraicheur-switch-knob {
  left: 21px;
}

.fraicheur-switch.is-live .fraicheur-switch-track {
  animation: fraicheur-home-pulse 1.6s ease-in-out infinite;
}

/* Carte chantier */
.fraicheur-campaign {
  background:
    linear-gradient(
      165deg,
      color-mix(in srgb, var(--orange, #e9530d) 7%, var(--bg-card)) 0%,
      var(--bg-card) 42%
    );
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 12px 14px 16px;
  display: flex;
  flex-direction: column;
  gap: 16px;
  box-shadow: 0 10px 36px color-mix(in srgb, var(--orange, #e9530d) 6%, transparent);
}

.fraicheur-campaign.is-collapsed {
  padding-bottom: 12px;
  gap: 0;
}

.fraicheur-camp-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  min-width: 0;
}

.fraicheur-camp-bar-main {
  min-width: 0;
  flex: 1;
}

.fraicheur-camp-bar-aside {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-shrink: 0;
}

.fraicheur-camp-body {
  display: flex;
  flex-direction: column;
  gap: 16px;
  min-width: 0;
}

.fraicheur-campaign.is-collapsed .fraicheur-camp-body {
  display: none;
}

.fraicheur-campaign[data-camp-state="idle"] .fraicheur-status {
  display: none;
}

.fr-camp-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
}

.fr-camp-head-main {
  min-width: 0;
  flex: 1;
}

.fr-camp-head-aside {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-shrink: 0;
}

.fr-camp-toggle {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 34px;
  height: 34px;
  padding: 0;
  border: 1.5px solid var(--border);
  border-radius: 50%;
  background: color-mix(in srgb, var(--bg-card) 80%, transparent);
  color: var(--text-secondary);
  cursor: pointer;
  flex-shrink: 0;
  transition:
    border-color 0.15s ease,
    color 0.15s ease,
    background 0.15s ease,
    transform 0.12s ease;
}

.fr-camp-toggle:hover {
  border-color: color-mix(in srgb, var(--orange, #e9530d) 45%, var(--border));
  color: var(--orange, #e9530d);
  background: color-mix(in srgb, var(--orange, #e9530d) 10%, var(--bg-card));
}

.fr-camp-toggle:focus-visible {
  outline: 2px solid var(--orange, #e9530d);
  outline-offset: 2px;
}

.fr-camp-toggle:active {
  transform: scale(0.96);
}

.fr-camp-toggle--play {
  border-color: color-mix(in srgb, var(--orange, #e9530d) 40%, var(--border));
  color: var(--orange, #e9530d);
  background: color-mix(in srgb, var(--orange, #e9530d) 12%, var(--bg-card));
}

.fr-camp-toggle--play:hover {
  border-color: var(--orange, #e9530d);
  background: color-mix(in srgb, var(--orange, #e9530d) 18%, var(--bg-card));
}

.fr-camp-toggle[hidden] {
  display: none;
}

.fraicheur-campaign-title {
  display: flex;
  align-items: center;
  gap: 10px;
  margin: 0;
  font-size: 1.05rem;
  font-weight: 750;
  letter-spacing: -0.01em;
  color: var(--text-primary);
}

.fr-camp-pct {
  display: flex;
  align-items: baseline;
  gap: 2px;
  line-height: 1;
  font-variant-numeric: tabular-nums;
  flex-shrink: 0;
}

.fr-camp-pct[hidden] {
  display: none !important;
}

.fr-camp-pct-num {
  font-size: 2.35rem;
  font-weight: 800;
  letter-spacing: -0.04em;
  color: var(--text-primary);
}

.fr-camp-pct-unit {
  font-size: 0.95rem;
  font-weight: 700;
  color: var(--text-muted);
}

.fraicheur-status {
  font-size: 0.68rem;
  font-weight: 800;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  padding: 4px 10px;
  border-radius: 999px;
  background: color-mix(in srgb, var(--text-muted) 14%, transparent);
  color: var(--text-secondary);
  border: none;
}

.fraicheur-status[data-status="running"] {
  color: #16a34a;
  background: color-mix(in srgb, #16a34a 14%, transparent);
}

.fraicheur-status[data-status="paused"] {
  color: #c27803;
  background: color-mix(in srgb, #c27803 14%, transparent);
}

.fraicheur-status[data-status="completed"] {
  color: var(--orange, #e9530d);
  background: color-mix(in srgb, var(--orange, #e9530d) 14%, transparent);
}

.fr-camp-progress {
  display: flex;
  flex-direction: column;
  gap: 0;
}

.fr-camp-progress-track {
  position: relative;
  height: 16px;
  border-radius: 999px;
  background: #eceae4;
  overflow: hidden;
  box-shadow: inset 0 1px 2px rgba(0, 0, 0, 0.06);
}

.fr-camp-progress-fill {
  height: 100%;
  width: 0%;
  border-radius: 999px;
  background: linear-gradient(90deg, #ea580c 0%, #f59e0b 55%, #fb923c 100%);
  box-shadow:
    0 0 18px rgba(245, 158, 11, 0.45),
    inset 0 1px 0 rgba(255, 255, 255, 0.35);
  transition: width 0.55s cubic-bezier(0.22, 1, 0.36, 1);
  position: relative;
  min-width: 0;
}

.fr-camp-progress.is-completed .fr-camp-progress-fill {
  width: 100% !important;
  background: linear-gradient(90deg, #ea580c, #f97316);
}

.fr-camp-progress-fill.is-active::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(
    105deg,
    transparent 30%,
    color-mix(in srgb, #fff 38%, transparent) 50%,
    transparent 70%
  );
  background-size: 220% 100%;
  animation: fr-camp-sheen 1.6s linear infinite;
}

.fr-camp-progress-fill.is-indeterminate {
  width: 32% !important;
  transition: none;
  animation: fr-camp-indeterminate 1.15s ease-in-out infinite;
}

.fr-camp-progress.is-paused .fr-camp-progress-fill {
  filter: saturate(0.7);
  box-shadow: none;
}

@keyframes fr-camp-sheen {
  0% { background-position: 120% 0; }
  100% { background-position: -40% 0; }
}

@keyframes fr-camp-indeterminate {
  0% { transform: translateX(-110%); }
  100% { transform: translateX(340%); }
}

.fraicheur-message {
  margin: 0;
  font-size: 0.88rem;
  color: var(--text-secondary);
  min-height: 1.2em;
  line-height: 1.4;
}

.fr-camp-meta {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 10px;
}

.fr-camp-meta-item {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 6px;
  min-width: 0;
  padding: 12px 14px;
  border-radius: 12px;
  background: var(--bg-base, #f7f7f5);
  border: 1px solid var(--border, #e5e2dc);
}

.fr-camp-meta-label {
  display: block;
  font-size: 0.68rem;
  font-weight: 700;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  color: var(--text-muted, #8a857c);
  line-height: 1.2;
}

.fr-camp-meta-value {
  display: block;
  font-size: 1.05rem;
  font-weight: 750;
  color: var(--text-primary, #1a1a1a);
  font-variant-numeric: tabular-nums;
  letter-spacing: -0.015em;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  line-height: 1.2;
}

.fr-camp-current {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 14px;
  border-radius: 14px;
  border: 1px solid color-mix(in srgb, var(--orange, #e9530d) 28%, var(--border));
  background:
    linear-gradient(
      105deg,
      color-mix(in srgb, var(--orange, #e9530d) 10%, transparent),
      color-mix(in srgb, #f59e0b 6%, transparent)
    );
}

.fr-camp-current[hidden] {
  display: none !important;
}

.fr-camp-current-pulse {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: #16a34a;
  box-shadow: 0 0 0 0 color-mix(in srgb, #16a34a 55%, transparent);
  animation: fr-camp-pulse 1.4s ease-out infinite;
  flex-shrink: 0;
}

@keyframes fr-camp-pulse {
  0% { box-shadow: 0 0 0 0 color-mix(in srgb, #16a34a 45%, transparent); }
  70% { box-shadow: 0 0 0 10px transparent; }
  100% { box-shadow: 0 0 0 0 transparent; }
}

.fr-camp-current-text {
  display: flex;
  flex-direction: column;
  gap: 2px;
  min-width: 0;
}

.fr-camp-current-kicker {
  font-size: 0.68rem;
  font-weight: 750;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--text-muted);
}

.fr-camp-current-text strong {
  font-size: 0.98rem;
  font-weight: 750;
  color: var(--text-primary);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

/* Pages Fraîcheur (main / historique) */
.fraicheur-page[hidden] {
  display: none !important;
}

.fraicheur-page--main,
.fraicheur-page--history {
  display: flex;
  flex-direction: column;
  gap: 22px;
}

/* État vide chantier */
.fr-camp-idle {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  gap: 8px;
  padding: 12px 16px 8px;
}

.fr-camp-idle[hidden] {
  display: none !important;
}

.fr-camp-idle-icon {
  width: 48px;
  height: 48px;
  border-radius: 14px;
  display: grid;
  place-items: center;
  margin-bottom: 4px;
  background: color-mix(in srgb, var(--orange) 10%, transparent);
  color: var(--orange, #e9530d);
  font-size: 1.25rem;
}

.fr-camp-idle strong {
  font-size: 1.05rem;
  font-weight: 750;
  color: var(--text-primary);
}

.fr-camp-idle span {
  font-size: 0.9rem;
  color: var(--text-muted);
  max-width: 28rem;
  line-height: 1.45;
}

.fr-camp-live[hidden] {
  display: none !important;
}

.fr-camp-live {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.fraicheur-campaign[data-camp-state="idle"] {
  box-shadow: none;
  background: var(--bg-card);
}

.fraicheur-campaign[data-camp-state="completed"] {
  background:
    linear-gradient(
      165deg,
      color-mix(in srgb, var(--orange, #e9530d) 5%, var(--bg-card)) 0%,
      var(--bg-card) 50%
    );
}

/* Historique des chantiers */
.fr-hist-list {
  display: flex;
  flex-direction: column;
  gap: 22px;
}

.fr-hist-day-title {
  margin: 0 0 10px;
  font-size: 0.82rem;
  font-weight: 650;
  letter-spacing: 0.02em;
  text-transform: capitalize;
  color: var(--text-muted);
  display: flex;
  align-items: baseline;
  gap: 8px;
}

.fr-hist-day-title span {
  font-weight: 550;
  text-transform: none;
  letter-spacing: 0;
  opacity: 0.85;
}

.fr-hist-day-list {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.fr-hist-loading {
  margin: 0;
  padding: 32px 16px;
  text-align: center;
  color: var(--text-muted);
  font-size: 0.92rem;
}

.fr-hist-card {
  background:
    linear-gradient(
      165deg,
      color-mix(in srgb, var(--orange, #e9530d) 6%, var(--bg-card)) 0%,
      var(--bg-card) 42%
    );
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 0;
  display: flex;
  flex-direction: column;
  box-shadow: 0 8px 28px color-mix(in srgb, var(--orange, #e9530d) 5%, transparent);
}

.fr-hist-card-summary {
  list-style: none;
  cursor: pointer;
  display: flex;
  flex-direction: column;
  gap: 4px;
  padding: 12px 16px;
}

.fr-hist-card-summary::-webkit-details-marker {
  display: none;
}

.fr-hist-card-summary::before {
  content: "";
  float: right;
  width: 8px;
  height: 8px;
  margin-top: 6px;
  border-right: 2px solid var(--text-muted);
  border-bottom: 2px solid var(--text-muted);
  transform: rotate(-45deg);
  transition: transform 0.15s ease;
}

.fr-hist-card[open] > .fr-hist-card-summary::before {
  transform: rotate(45deg);
}

.fr-hist-card-summary-main {
  display: flex;
  align-items: center;
  gap: 8px;
  min-width: 0;
  flex-wrap: wrap;
}

.fr-hist-card-summary .fr-hist-card-title {
  margin: 0;
  font-size: 0.95rem;
}

.fr-hist-card-summary-time {
  margin-left: auto;
  font-size: 0.8rem;
  color: var(--text-muted);
  font-variant-numeric: tabular-nums;
}

.fr-hist-card-summary-kpis {
  margin: 0;
  font-size: 0.8rem;
  color: var(--text-muted);
}

.fr-hist-card-body {
  display: flex;
  flex-direction: column;
  gap: 14px;
  padding: 0 16px 16px;
}

.fr-hist-card-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
}

.fr-hist-card-main {
  min-width: 0;
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 6px;
  align-items: flex-start;
}

.fr-hist-card-title {
  margin: 0;
  font-size: 1.05rem;
  font-weight: 750;
  letter-spacing: -0.01em;
  color: var(--text-primary);
  line-height: 1.25;
}

.fr-hist-card-sub {
  margin: 0;
  font-size: 0.88rem;
  color: var(--text-secondary);
  line-height: 1.4;
}

.fr-hist-contacts {
  margin: 2px 0 0;
  border-top: 1px solid var(--border);
  padding-top: 12px;
}

.fr-hist-contacts summary {
  cursor: pointer;
  font-size: 0.88rem;
  font-weight: 700;
  color: var(--text-primary);
  list-style: none;
  display: flex;
  align-items: center;
  gap: 8px;
}

.fr-hist-contacts summary::-webkit-details-marker {
  display: none;
}

.fr-hist-contacts summary::before {
  content: "";
  width: 0;
  height: 0;
  border-left: 5px solid var(--text-muted);
  border-top: 4px solid transparent;
  border-bottom: 4px solid transparent;
  transition: transform 0.12s ease;
}

.fr-hist-contacts[open] summary::before {
  transform: rotate(90deg);
}

.fr-hist-contacts-empty {
  margin: 4px 0 0;
  font-size: 0.84rem;
  color: var(--text-muted);
}

.fr-hist-contacts-body {
  display: flex;
  flex-direction: column;
  gap: 14px;
  margin-top: 12px;
}

.fr-hist-group-title {
  margin: 0 0 8px;
  font-size: 0.72rem;
  font-weight: 750;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  color: var(--text-muted);
  display: flex;
  align-items: center;
  gap: 6px;
}

.fr-hist-group-title span {
  font-variant-numeric: tabular-nums;
  color: var(--orange, #e9530d);
}

.fr-hist-group[data-state="done"] .fr-hist-group-title span {
  color: #16a34a;
}

.fr-hist-group[data-state="dismissed"] .fr-hist-group-title span {
  color: var(--text-secondary);
}

.fr-hist-contact-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.fr-hist-contact-btn {
  width: 100%;
  display: grid;
  grid-template-columns: minmax(0, 1.2fr) minmax(0, 1.4fr) auto;
  gap: 8px 12px;
  align-items: baseline;
  text-align: left;
  padding: 8px 10px;
  border: 1px solid var(--border);
  border-radius: 10px;
  background: var(--bg-surface, var(--bg-card));
  color: var(--text-primary);
  cursor: pointer;
  font: inherit;
  transition: border-color 0.12s ease, background 0.12s ease;
}

.fr-hist-contact-btn:hover {
  border-color: color-mix(in srgb, var(--orange) 40%, var(--border));
  background: color-mix(in srgb, var(--orange) 5%, var(--bg-card));
}

.fr-hist-contact-name {
  font-size: 0.9rem;
  font-weight: 700;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.fr-hist-contact-sub {
  font-size: 0.8rem;
  color: var(--text-secondary);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.fr-hist-contact-status {
  font-size: 0.72rem;
  font-weight: 700;
  color: var(--text-muted);
  white-space: nowrap;
}

@media (max-width: 700px) {
  .fr-hist-contact-btn {
    grid-template-columns: 1fr;
    gap: 2px;
  }
}

.fraicheur-metrics {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(110px, 1fr));
  gap: 10px;
}

.fraicheur-metric {
  display: flex;
  flex-direction: column;
  gap: 4px;
  padding: 12px 14px;
  border-radius: 14px;
  border: 1px solid var(--border);
  background:
    linear-gradient(
      180deg,
      color-mix(in srgb, var(--orange) 6%, transparent) 0%,
      var(--bg-surface) 55%
    );
}

.fraicheur-metric-value {
  font-size: 1.35rem;
  font-weight: 800;
  letter-spacing: -0.03em;
  color: var(--text-primary);
  font-variant-numeric: tabular-nums;
  line-height: 1.1;
}

.fraicheur-metric-label {
  font-size: 0.72rem;
  font-weight: 650;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.fraicheur-metric--accent .fraicheur-metric-value {
  color: var(--orange, #e9530d);
}

.fraicheur-metric--ok .fraicheur-metric-value {
  color: #16a34a;
}

.fraicheur-metric--warn .fraicheur-metric-value {
  color: #c27803;
}

@media (max-width: 820px) {
  .fr-camp-meta {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .fr-camp-pct-num {
    font-size: 1.85rem;
  }
}

/* legacy aliases kept for older markup if shell not refreshed */
.fraicheur-progress-track {
  height: 8px;
  border-radius: 999px;
  background: color-mix(in srgb, var(--border) 80%, var(--bg-base));
  overflow: hidden;
}

.fraicheur-progress-bar {
  height: 100%;
  border-radius: 999px;
  background: linear-gradient(90deg, var(--orange, #e9530d), color-mix(in srgb, var(--orange, #e9530d) 55%, #f59e0b));
  transition: width 0.4s ease;
}

.fraicheur-hint {
  margin: 0;
  font-size: 0.82rem;
  line-height: 1.45;
  color: var(--text-muted);
}

.fraicheur-errors {
  font-size: 0.82rem;
  color: var(--text-secondary);
  background: color-mix(in srgb, #dc2626 6%, var(--bg-surface));
  border: 1px solid color-mix(in srgb, #dc2626 18%, var(--border));
  border-radius: 12px;
  padding: 10px 12px;
}

.fraicheur-errors ul {
  margin: 6px 0 0;
  padding-left: 1.1em;
}

.fraicheur-errors code {
  font-size: 0.75rem;
  opacity: 0.85;
}

/* File de revue */
.fraicheur-review {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 20px 22px 18px;
  display: flex;
  flex-direction: column;
  gap: 14px;
  min-height: 320px;
}

.fraicheur-review-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
}

.fraicheur-review-head h2 {
  margin: 0;
  font-size: 1.15rem;
  font-weight: 750;
  letter-spacing: -0.02em;
  color: var(--text-primary);
}

.fraicheur-review-head-actions {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
  margin-left: auto;
}

.fraicheur-row--new td {
  background: color-mix(in srgb, var(--orange) 5%, transparent);
}

.fraicheur-row--new:hover td {
  background: color-mix(in srgb, var(--orange) 9%, transparent);
}

.fraicheur-row--scanning td {
  background: color-mix(in srgb, var(--orange) 8%, transparent);
  animation: fraicheur-scan-row 1.4s ease-in-out infinite;
}

.fraicheur-scan-now {
  display: inline-flex;
  align-items: center;
  font-size: 0.72rem;
  font-weight: 750;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--orange);
}

.fraicheur-scan-dot {
  display: inline-block;
  width: 8px;
  height: 8px;
  margin: 0 6px;
  border-radius: 50%;
  background: var(--orange);
  animation: fraicheur-scan-dot 1s ease-in-out infinite;
}

@keyframes fraicheur-scan-row {
  0%,
  100% {
    background: color-mix(in srgb, var(--orange) 6%, transparent);
  }
  50% {
    background: color-mix(in srgb, var(--orange) 14%, transparent);
  }
}

@keyframes fraicheur-scan-dot {
  0%,
  100% {
    opacity: 0.35;
    transform: scale(0.85);
  }
  50% {
    opacity: 1;
    transform: scale(1.15);
  }
}

.fraicheur-bulk-bar {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
  padding: 8px 12px;
  border-radius: 10px;
  border: 1px solid color-mix(in srgb, var(--orange) 28%, var(--border));
  background: color-mix(in srgb, var(--orange) 8%, var(--bg-surface));
}

.fraicheur-bulk-bar[hidden] {
  display: none !important;
}

.fraicheur-bulk-count {
  font-size: 0.82rem;
  font-weight: 650;
  color: var(--text-primary);
  margin-right: auto;
}

.fraicheur-bulk-bar .btn {
  height: 30px;
  padding: 0 12px;
  font-size: 0.8rem;
  margin: 0;
}

.fraicheur-bulk-bar .btn[hidden] {
  display: none !important;
}

.fraicheur-check-col {
  width: 36px;
  padding-left: 8px !important;
  padding-right: 4px !important;
  text-align: center;
  vertical-align: middle;
}

.fraicheur-check-col[hidden] {
  display: none !important;
}

.fraicheur-check-label {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 28px;
  height: 28px;
  margin: 0;
  cursor: pointer;
  border-radius: 8px;
}

.fraicheur-check-label:hover {
  background: color-mix(in srgb, var(--orange) 12%, transparent);
}

.fraicheur-check-label input {
  width: 15px;
  height: 15px;
  margin: 0;
  accent-color: var(--orange);
  cursor: pointer;
}

.fraicheur-table.is-selecting tbody tr:has(.fraicheur-review-check:not(:checked)) td {
  opacity: 0.72;
}

.fraicheur-review-seg {
  display: inline-flex;
  align-items: stretch;
  flex-wrap: wrap;
  min-height: 30px;
  height: auto;
  padding: 2px;
  border-radius: 999px;
  border: 1px solid var(--border);
  background: color-mix(in srgb, var(--bg-muted, #f4f4f5) 80%, transparent);
  flex: 0 1 auto;
  max-width: 100%;
}

.fraicheur-review-seg-btn {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  height: 26px;
  padding: 0 9px;
  border: none;
  border-radius: 999px;
  background: transparent;
  color: var(--text-secondary);
  font-size: 0.72rem;
  font-weight: 650;
  cursor: pointer;
  white-space: nowrap;
  transition: background 0.12s ease, color 0.12s ease;
}

.fraicheur-review-seg-btn:hover {
  color: var(--text-primary);
}

.fraicheur-review-seg-btn.is-active {
  background: var(--bg-card, #fff);
  color: var(--text-primary);
  box-shadow: 0 1px 2px color-mix(in srgb, var(--text-primary) 8%, transparent);
}

.fraicheur-seg-count {
  font-variant-numeric: tabular-nums;
  font-weight: 800;
  opacity: 0.75;
}

.fraicheur-review-seg-btn.is-active .fraicheur-seg-count {
  opacity: 1;
  color: var(--orange, #e9530d);
}

.fraicheur-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 1.75rem;
  min-height: 1.75rem;
  padding: 0 8px;
  border-radius: 999px;
  font-size: 0.8rem;
  font-weight: 800;
  background: color-mix(in srgb, var(--orange) 14%, transparent);
  color: var(--orange, #e9530d);
  border: none;
}

.fraicheur-table-wrap {
  border: 1px solid var(--border);
  border-radius: 14px;
  overflow: hidden;
  overflow-x: hidden;
  background: var(--bg-surface);
}

.fraicheur-table {
  width: 100%;
  table-layout: fixed;
  border-collapse: collapse;
  font-size: 0.86rem;
}

.fraicheur-table th {
  text-align: left;
  font-size: 0.68rem;
  font-weight: 750;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  color: var(--text-muted);
  background: color-mix(in srgb, var(--bg-card) 70%, var(--bg-surface));
  border-bottom: 1px solid var(--border);
  padding: 8px 12px;
  white-space: nowrap;
}

.fraicheur-table td {
  padding: 6px 12px;
  border-bottom: 1px solid var(--border);
  vertical-align: middle;
  color: var(--text-primary);
  line-height: 1.25;
}

.fraicheur-table tr:last-child td {
  border-bottom: none;
}

.fraicheur-table tbody tr {
  transition: background var(--transition);
  height: 40px;
}

.fraicheur-table tbody tr:hover td {
  background: color-mix(in srgb, var(--orange) 4%, transparent);
}

.fraicheur-col-name {
  font-weight: 700;
  letter-spacing: -0.01em;
  color: var(--text-primary);
  width: 16%;
  min-width: 0;
  overflow: hidden;
}

.fraicheur-col-job,
.fraicheur-col-company,
.fraicheur-col-detected {
  color: var(--text-secondary);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-size: 0.82rem;
}

.fraicheur-table th.fraicheur-col-job,
.fraicheur-table td.fraicheur-col-job {
  width: 24%;
}

.fraicheur-table th.fraicheur-col-company,
.fraicheur-table td.fraicheur-col-company {
  width: 18%;
}

.fraicheur-table th.fraicheur-col-detected,
.fraicheur-table td.fraicheur-col-detected {
  width: 14%;
}

.fraicheur-col-detected.is-delta {
  color: var(--orange, #e9530d);
  font-weight: 700;
}

.fraicheur-col-status {
  width: 7.5rem;
  overflow: hidden;
}

.fraicheur-col-checked {
  color: var(--text-secondary);
  font-size: 0.76rem;
  white-space: nowrap;
  width: 6.75rem;
  overflow: hidden;
  text-overflow: ellipsis;
}

.fraicheur-pill {
  display: inline-flex;
  align-items: center;
  max-width: 100%;
  padding: 2px 7px;
  border-radius: 999px;
  font-size: 0.64rem;
  font-weight: 750;
  background: color-mix(in srgb, #c27803 12%, transparent);
  color: #c27803;
  line-height: 1.2;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.fraicheur-pill[data-status="still_current"],
.fraicheur-pill--ok {
  background: color-mix(in srgb, var(--green) 16%, transparent);
  color: var(--green);
  gap: 4px;
  overflow: visible;
}

.fraicheur-pill--ok .freshness-ok {
  font-size: 13px;
}

.fraicheur-pill[data-status="job_change"],
.fraicheur-pill[data-status="company_change"] {
  background: color-mix(in srgb, var(--orange) 12%, transparent);
  color: var(--orange, #e9530d);
}

.fraicheur-pill[data-status="email_invalid"] {
  background: color-mix(in srgb, #dc2626 12%, transparent);
  color: #dc2626;
}

.fraicheur-pill[data-status="insufficient"] {
  background: color-mix(in srgb, var(--text-muted) 14%, transparent);
  color: var(--text-secondary);
}

.fraicheur-col-summary {
  color: var(--text-secondary);
  line-height: 1.25;
  width: 8.25rem;
  font-size: 0.78rem;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.fraicheur-table th.fraicheur-col-summary {
  overflow: visible;
  text-overflow: unset;
}

.fraicheur-col-icp {
  width: 8.25rem;
  overflow: visible;
  text-overflow: unset;
}

.fraicheur-icp {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  font-size: 0.68rem;
  font-weight: 750;
  line-height: 1;
  white-space: nowrap;
}

.fraicheur-icp svg {
  display: block;
  flex-shrink: 0;
}

.fraicheur-icp--keep {
  color: var(--green);
}

.fraicheur-icp--out {
  color: #dc2626;
}

.fraicheur-icp--na,
.fraicheur-icp--unknown {
  color: var(--text-muted);
  font-weight: 650;
}

.fraicheur-name-row {
  display: flex;
  align-items: center;
  gap: 8px;
  width: 100%;
  max-width: 100%;
  height: 28px;
  min-width: 0;
}

.fraicheur-name-btn {
  background: none;
  border: none;
  padding: 0;
  margin: 0;
  font: inherit;
  font-size: 0.86rem;
  font-weight: 700;
  color: var(--text-primary);
  cursor: pointer;
  text-align: left;
  min-width: 0;
  flex: 1 1 auto;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  line-height: 28px;
  height: 28px;
}

.fraicheur-name-btn:hover {
  color: var(--orange);
  text-decoration: underline;
  text-underline-offset: 2px;
}

.fraicheur-li {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 22px;
  height: 22px;
  border-radius: 6px;
  color: #0a66c2;
  background: color-mix(in srgb, #0a66c2 10%, transparent);
  flex: 0 0 22px;
  text-decoration: none;
  line-height: 0;
}

.fraicheur-name-row .fraicheur-li {
  margin-left: auto;
}

.fraicheur-li--slot {
  visibility: hidden;
  pointer-events: none;
  background: none;
}

.fraicheur-li svg {
  display: block;
}

.fraicheur-li:hover {
  background: color-mix(in srgb, #0a66c2 18%, transparent);
}

.fraicheur-col-actions {
  width: 6rem;
  white-space: nowrap;
  text-align: right;
  padding-left: 8px !important;
  padding-right: 10px !important;
}

.fraicheur-table:has(.fraicheur-actions .btn + .btn) .fraicheur-col-actions {
  width: 11rem;
}

.fraicheur-actions {
  display: inline-flex;
  align-items: center;
  justify-content: flex-end;
  gap: 6px;
  height: 28px;
  width: 100%;
}

.fraicheur-actions .btn {
  height: 28px;
  padding: 0 10px;
  font-size: 0.78rem;
  margin: 0;
  line-height: 1;
}

.fraicheur-icon-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 28px;
  height: 28px;
  padding: 0;
  margin: 0;
  border: 1px solid var(--border);
  border-radius: 7px;
  background: var(--bg-surface);
  color: var(--green, #16a34a);
  cursor: pointer;
  flex-shrink: 0;
  line-height: 0;
  transition: background 0.12s ease, border-color 0.12s ease, color 0.12s ease;
}

.fraicheur-icon-btn svg {
  display: block;
}

.fraicheur-icon-btn:hover {
  border-color: color-mix(in srgb, var(--green, #16a34a) 40%, var(--border));
  background: color-mix(in srgb, var(--green, #16a34a) 10%, transparent);
}

.fraicheur-icon-btn--mute {
  color: var(--text-muted);
}

.fraicheur-icon-btn--mute:hover {
  color: var(--text-secondary);
  border-color: var(--border);
  background: var(--bg-card-hover, var(--bg-surface));
}

.fraicheur-empty[hidden] {
  display: none !important;
}

.fraicheur-table[hidden] {
  display: none !important;
}

.fraicheur-empty {
  margin: 0;
  padding: 48px 24px;
  text-align: center;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
}

.fraicheur-empty-icon {
  width: 48px;
  height: 48px;
  border-radius: 14px;
  display: grid;
  place-items: center;
  margin-bottom: 6px;
  background: color-mix(in srgb, var(--orange) 10%, transparent);
  color: var(--orange, #e9530d);
  font-size: 1.25rem;
}

.fraicheur-empty strong {
  font-size: 1rem;
  font-weight: 750;
  color: var(--text-primary);
}

.fraicheur-empty span {
  font-size: 0.88rem;
  color: var(--text-muted);
  max-width: 28rem;
  line-height: 1.45;
}

.btn-sm {
  padding: 5px 11px;
  font-size: 0.78rem;
  font-weight: 650;
}

#home-fraicheur-btn {
  position: relative;
}

#home-fraicheur-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 1.15rem;
  height: 1.15rem;
  margin-left: 6px;
  padding: 0 5px;
  border-radius: 999px;
  font-size: 10px;
  font-weight: 700;
  background: var(--orange, #e9530d);
  color: #fff;
  line-height: 1;
}

#home-fraicheur-badge.is-live {
  background: #0f9d58;
  min-width: auto;
  padding: 0 7px;
  animation: fraicheur-home-pulse 1.6s ease-in-out infinite;
}

#home-fraicheur-badge.is-paused {
  background: #5b6570;
  min-width: auto;
  padding: 0 7px;
}

@keyframes fraicheur-home-pulse {
  0%,
  100% {
    opacity: 1;
  }
  50% {
    opacity: 0.72;
  }
}

#home-fraicheur-badge[hidden] {
  display: none !important;
}

@media (max-width: 900px) {
  #fraicheur-view {
    padding: 16px 16px 32px;
  }

  .fraicheur-metrics {
    grid-template-columns: repeat(3, 1fr);
  }

  .fraicheur-col-checked {
    display: none;
  }
}

/* Point d’entrée / filtres — barre compacte alignée */
.fraicheur-entry {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 12px 14px;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.fraicheur-entry.is-collapsed {
  gap: 0;
}

.fraicheur-entry-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  min-height: 1.2em;
}

.fraicheur-entry-bar h2 {
  margin: 0;
  font-size: 0.95rem;
  font-weight: 750;
  letter-spacing: -0.01em;
  color: var(--text-primary);
  flex-shrink: 0;
}

.fraicheur-entry-hint {
  font-size: 0.8rem;
  font-weight: 650;
  color: var(--text-muted);
  text-align: right;
  flex: 1;
  min-width: 0;
}

.fraicheur-entry-body {
  display: flex;
  flex-direction: column;
  gap: 10px;
  min-width: 0;
}

.fraicheur-entry.is-collapsed .fraicheur-entry-body {
  display: none;
}

.fraicheur-collapse-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 28px;
  height: 28px;
  padding: 0;
  border: 1px solid var(--border);
  border-radius: 8px;
  background: var(--bg-card);
  color: var(--text-muted);
  cursor: pointer;
  flex-shrink: 0;
  transition:
    border-color 0.15s ease,
    color 0.15s ease,
    background 0.15s ease;
}

.fraicheur-collapse-btn:hover {
  border-color: color-mix(in srgb, var(--orange, #e9530d) 45%, var(--border));
  color: var(--text-primary);
  background: var(--bg-card-hover);
}

.fraicheur-collapse-btn:focus-visible {
  outline: 2px solid var(--orange, #e9530d);
  outline-offset: 2px;
}

.fraicheur-collapse-chevron {
  display: block;
  transition: transform 0.18s ease;
}

.fraicheur-entry.is-collapsed .fraicheur-collapse-chevron,
.fraicheur-campaign.is-collapsed .fraicheur-collapse-chevron {
  transform: rotate(-90deg);
}

.fraicheur-filters {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.fraicheur-fg {
  display: grid;
  grid-template-columns: 72px 1fr;
  gap: 10px 12px;
  align-items: center;
}

.fraicheur-fg-label {
  font-size: 0.72rem;
  font-weight: 750;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--text-muted);
  line-height: 1.2;
}

.fraicheur-fg-fields {
  display: flex;
  align-items: center;
  gap: 8px;
  min-width: 0;
}

.fraicheur-fg-fields--wrap {
  flex-wrap: wrap;
}

.fraicheur-field {
  height: 34px;
  padding: 0 10px;
  border: 1px solid var(--border);
  border-radius: 8px;
  background: var(--bg-surface);
  color: var(--text-primary);
  font-size: 0.84rem;
  min-width: 0;
  box-sizing: border-box;
}

.fraicheur-field--q {
  flex: 1 1 220px;
  min-width: 160px;
  max-width: 360px;
}

.fraicheur-field--job {
  flex: 0 1 180px;
  min-width: 140px;
  max-width: 220px;
}

.fraicheur-field--fresh {
  flex: 1 1 240px;
  min-width: 200px;
  max-width: 340px;
}

.fraicheur-field--auto-apply {
  flex: 1 1 260px;
  min-width: 220px;
  max-width: 380px;
}

.fraicheur-auto-providers {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-end;
  gap: 10px 14px;
  width: 100%;
  flex: 1 1 100%;
}

.fraicheur-auto-provider {
  display: flex;
  flex-direction: column;
  gap: 4px;
  font-size: 0.75rem;
  font-weight: 650;
  color: var(--text-muted);
}

.fraicheur-auto-provider .fraicheur-field {
  min-width: 120px;
}

.fraicheur-auto-hint {
  margin: 0;
  flex: 1 1 100%;
  font-size: 0.75rem;
  line-height: 1.35;
  color: var(--text-muted);
  font-weight: 500;
}

.fraicheur-auto-hint--always {
  margin-top: 2px;
}

.fraicheur-fg-fields--wrap > select.fraicheur-field:not(.fraicheur-field--fresh):not(.fraicheur-field--auto-apply):not(.fraicheur-field--created-source):not(.fraicheur-field--combine):not(.fraicheur-field--unit) {
  flex: 0 1 140px;
  min-width: 120px;
  max-width: 180px;
}

.fraicheur-field:focus {
  outline: none;
  border-color: var(--orange);
}

select.fraicheur-field {
  appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 24 24' fill='none' stroke='%23888' stroke-width='2.4'%3E%3Cpath d='M6 9l6 6 6-6'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 8px center;
  padding-right: 26px;
}

.fraicheur-days {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  color: var(--text-muted);
  font-size: 0.8rem;
  font-weight: 650;
  flex: 0 0 auto;
}

.fraicheur-days[hidden] {
  display: none;
}

.fraicheur-age {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  color: var(--text-muted);
  font-size: 0.8rem;
  font-weight: 650;
  flex: 0 1 auto;
  flex-wrap: wrap;
}

.fraicheur-days-prefix {
  white-space: nowrap;
}

.fraicheur-field--days {
  width: 56px;
  min-width: 56px;
  text-align: center;
  padding: 0 4px;
}

.fraicheur-field--unit {
  width: auto;
  min-width: 72px;
  max-width: 88px;
  flex: 0 0 auto;
  padding-left: 8px;
  padding-right: 24px;
}

.fraicheur-field--created-source {
  flex: 0 0 auto;
  width: 11.5rem;
  min-width: 11.5rem;
  max-width: none;
}

.fraicheur-field--combine {
  flex: 0 0 auto;
  width: 4.5rem;
  min-width: 4.5rem;
  max-width: 4.5rem;
}

.fraicheur-check {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 0.82rem;
  font-weight: 650;
  color: var(--text-secondary);
  user-select: none;
  white-space: nowrap;
  cursor: pointer;
  height: 34px;
  padding: 0 8px;
  border: 1px solid var(--border);
  border-radius: 8px;
  background: var(--bg-surface);
}

.fraicheur-filters-actions {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-left: auto;
  flex: 0 0 auto;
}

.fraicheur-entry-foot {
  display: flex;
  flex-direction: column;
  gap: 10px;
  margin-top: 4px;
  padding-top: 12px;
  border-top: 1px solid var(--border);
}

.fraicheur-entry-actions {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 8px;
  flex-wrap: wrap;
}

.fraicheur-entry-actions-label {
  margin-right: auto;
  font-size: 0.72rem;
  font-weight: 750;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--text-muted);
}

.fraicheur-entry-foot:not(.has-draft) .fraicheur-entry-actions-label {
  display: none;
}

.fraicheur-entry-foot.has-draft .fraicheur-entry-actions {
  display: none !important;
}

.fraicheur-entry-actions .btn {
  height: 40px;
  min-height: 40px;
  padding: 0 18px;
  font-size: 0.9rem;
  font-weight: 700;
  white-space: nowrap;
  border-radius: 10px;
}

#fraicheur-preview-btn {
  min-width: 148px;
}

.fraicheur-filters-actions .btn {
  height: 40px;
  min-height: 40px;
  padding: 0 18px;
  font-size: 0.9rem;
  font-weight: 700;
  white-space: nowrap;
  border-radius: 10px;
}

#fraicheur-preview-btn {
  min-width: 148px;
}

.fraicheur-btn-dangerish {
  color: #b45309 !important;
}

.fraicheur-btn-dangerish:hover {
  color: #92400e !important;
  border-color: color-mix(in srgb, #b45309 35%, var(--border)) !important;
}

@media (max-width: 900px) {
  .fraicheur-fg {
    grid-template-columns: 1fr;
    gap: 6px;
  }

  .fraicheur-filters-actions {
    margin-left: 0;
    width: 100%;
  }
}

/* Modale aperçu (gabarit Premiers RDV) */
body.fr-preview-open {
  overflow: hidden;
}

.fr-preview-root[hidden] {
  display: none !important;
}

.fr-preview-root {
  position: fixed;
  inset: 0;
  z-index: 120;
  display: grid;
  place-items: center;
  padding: 24px;
}

.fr-preview-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(10, 9, 8, 0.62);
  backdrop-filter: blur(4px);
}

.fr-preview-modal {
  position: relative;
  z-index: 1;
  width: min(1360px, calc(100vw - 24px));
  height: min(860px, calc(100vh - 40px));
  display: flex;
  flex-direction: column;
  border-radius: 18px;
  border: 1px solid var(--border);
  background:
    radial-gradient(ellipse 70% 45% at 0% 0%, var(--orange-dim), transparent 55%),
    var(--bg-surface);
  box-shadow: 0 28px 80px rgba(0, 0, 0, 0.4);
  overflow: hidden;
}

.fr-preview-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
  padding: 20px 22px 16px;
  border-bottom: 1px solid var(--border);
  flex-shrink: 0;
}

.fr-preview-head h3 {
  margin: 0;
  font-size: 1.35rem;
  font-weight: 800;
  letter-spacing: -0.03em;
  color: var(--text-primary);
}

.fr-preview-sub {
  margin: 6px 0 0;
  font-size: 0.92rem;
  color: var(--text-muted);
  line-height: 1.4;
}

.fr-preview-close {
  width: 40px;
  height: 40px;
  border: 1px solid var(--border);
  border-radius: 12px;
  background: var(--bg-card);
  color: var(--text-secondary);
  font-size: 1.15rem;
  cursor: pointer;
  flex-shrink: 0;
}

.fr-preview-close:hover {
  color: var(--text-primary);
  border-color: var(--orange);
}

.fr-preview-body {
  flex: 1;
  min-height: 0;
  padding: 12px 14px;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.fr-preview-scroll {
  flex: 1;
  min-height: 0;
  overflow: auto;
  -webkit-overflow-scrolling: touch;
  border: 1px solid var(--border);
  border-radius: 14px;
  background: var(--bg-card);
}

.fr-preview-tools {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
  flex-shrink: 0;
}

.fr-preview-tools #fr-preview-filter {
  flex: 1 1 220px;
  min-width: 180px;
  margin: 0;
}

.fr-preview-filter-seg {
  display: inline-flex;
  align-items: center;
  gap: 2px;
  padding: 3px;
  border-radius: 10px;
  background: var(--bg-muted, color-mix(in srgb, var(--border) 35%, transparent));
  flex-shrink: 0;
}

.fr-preview-filter-btn {
  appearance: none;
  border: 0;
  background: transparent;
  color: var(--text-muted);
  font: inherit;
  font-size: 0.75rem;
  font-weight: 700;
  padding: 6px 10px;
  border-radius: 8px;
  cursor: pointer;
}

.fr-preview-filter-btn.is-active {
  background: var(--bg-card);
  color: var(--text);
  box-shadow: 0 0 0 1px var(--border);
}

.fr-preview-table tbody tr[hidden] {
  display: none;
}

.fr-preview-pager {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
  flex-shrink: 0;
  padding: 2px 2px 0;
}

.fr-preview-pager-meta {
  font-size: 0.78rem;
  font-weight: 650;
  color: var(--text-muted);
}

#fr-preview-more[hidden],
#fr-preview-more-all[hidden] {
  display: none !important;
}

.fr-preview-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.88rem;
}

.fr-preview-table th {
  position: sticky;
  top: 0;
  z-index: 1;
  text-align: left;
  font-size: 0.68rem;
  font-weight: 750;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  color: var(--text-muted);
  background: var(--bg-surface);
  border-bottom: 1px solid var(--border);
  padding: 10px 12px;
}

.fr-preview-check-col {
  width: 44px;
  padding-left: 4px !important;
  padding-right: 14px !important;
  text-align: center;
  vertical-align: middle;
}

.fr-preview-check-label {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 28px;
  height: 28px;
  margin: 0;
  cursor: pointer;
  border-radius: 8px;
}

.fr-preview-check-label:hover {
  background: color-mix(in srgb, var(--orange) 12%, transparent);
}

.fr-preview-check-label input {
  width: 16px;
  height: 16px;
  margin: 0;
  accent-color: var(--orange);
  cursor: pointer;
}

.fr-preview-table tbody tr:has(.fr-preview-check:not(:checked)) td {
  opacity: 0.55;
}

.fr-preview-table td {
  padding: 11px 12px;
  border-bottom: 1px solid var(--border);
  color: var(--text-secondary);
  vertical-align: middle;
}

.fr-preview-table tr:last-child td {
  border-bottom: none;
}

.fr-preview-table tbody tr:hover td {
  background: color-mix(in srgb, var(--orange) 4%, transparent);
}

.fr-preview-name {
  font-weight: 700;
  color: var(--text-primary) !important;
}

.fr-preview-links-cell {
  width: 1%;
  white-space: nowrap;
  vertical-align: middle;
}

.fr-preview-links {
  display: inline-flex;
  align-items: center;
  gap: 8px;
}

.fr-preview-fiche {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  height: 26px;
  padding: 0 10px;
  border: 1px solid var(--border);
  border-radius: 8px;
  background: var(--bg-card, #fff);
  color: var(--text-secondary);
  font-size: 0.78rem;
  font-weight: 650;
  text-decoration: none;
  line-height: 1;
  white-space: nowrap;
  cursor: pointer;
  box-sizing: border-box;
}

.fr-preview-fiche:hover {
  background: var(--bg-card-hover, var(--bg-surface));
  color: var(--text-primary);
  border-color: color-mix(in srgb, var(--text-primary) 18%, var(--border));
  text-decoration: none;
}

.fraicheur-draft {
  display: flex;
  flex-direction: column;
  gap: 8px;
  width: 100%;
  padding: 12px 14px;
  border-radius: 12px;
  border: 1px solid color-mix(in srgb, var(--orange) 32%, var(--border));
  background: color-mix(in srgb, var(--orange) 8%, var(--bg-surface));
}

.fraicheur-draft[hidden] {
  display: none !important;
}

.fraicheur-draft-kicker {
  font-size: 0.72rem;
  font-weight: 750;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--orange);
}

.fraicheur-draft-main {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
}

.fraicheur-draft-text {
  display: flex;
  flex-direction: column;
  gap: 2px;
  min-width: 0;
}

.fraicheur-draft-text strong {
  font-size: 0.95rem;
  font-weight: 750;
  color: var(--text-primary);
}

.fraicheur-draft-text span {
  font-size: 0.8rem;
  color: var(--text-secondary);
}

.fraicheur-draft-actions {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}

.fraicheur-draft-actions .btn {
  height: 40px;
  min-height: 40px;
  padding: 0 16px;
  font-size: 0.9rem;
  font-weight: 700;
  white-space: nowrap;
  border-radius: 10px;
  margin: 0;
}

#fraicheur-draft-launch {
  min-width: 148px;
}

.fr-preview-foot {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  padding: 16px 20px 18px;
  border-top: 1px solid var(--border);
  flex-shrink: 0;
  background: color-mix(in srgb, var(--bg-card) 70%, transparent);
}

.fr-preview-sel {
  font-size: 0.88rem;
  font-weight: 600;
  color: var(--text-muted);
  min-width: 0;
}

.fr-preview-foot-actions {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-left: auto;
}

.fr-preview-foot .btn {
  flex: 0 0 auto;
  min-width: 132px;
  min-height: 44px;
  padding: 0 18px;
  font-size: 14px;
  font-weight: 700;
  border-radius: 12px;
}

/* ═══════════════════════════════════════════════════════════════════════════
   Modale détail Fraîcheur — même langage que l’encart Chantier
   Échelle : titre 18 · corps 14 · meta 12 · boutons H40
   ═══════════════════════════════════════════════════════════════════════════ */
body.fr-detail-open {
  overflow: hidden;
}

.fr-detail-root[hidden] {
  display: none !important;
}

.fr-detail-root {
  position: fixed;
  inset: 0;
  z-index: 1200;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
}

.fr-detail-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(15, 23, 42, 0.48);
  backdrop-filter: blur(4px);
}

.fr-detail-modal {
  --fr-btn-h: 40px;
  --fr-pad-x: 26px;
  --fr-radius: 12px;
  position: relative;
  z-index: 1;
  width: min(860px, calc(100% - 40px));
  max-height: min(90vh, 860px);
  display: flex;
  flex-direction: column;
  background:
    linear-gradient(
      165deg,
      color-mix(in srgb, var(--orange, #e9530d) 7%, var(--bg-card, #fff)) 0%,
      var(--bg-card, #fff) 38%
    );
  border: 1px solid var(--border);
  border-radius: 18px;
  box-shadow:
    0 10px 36px color-mix(in srgb, var(--orange, #e9530d) 8%, transparent),
    0 28px 72px rgba(15, 23, 42, 0.22);
  overflow: hidden;
  animation: fr-detail-in 0.28s cubic-bezier(0.22, 1, 0.36, 1);
}

@keyframes fr-detail-in {
  from {
    opacity: 0;
    transform: translateY(10px) scale(0.985);
  }
  to {
    opacity: 1;
    transform: none;
  }
}

/* ── Header ─────────────────────────────────────────────────────────────── */
.fr-detail-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 14px;
  padding: 20px var(--fr-pad-x) 12px;
  flex-shrink: 0;
}

.fr-detail-head-main {
  min-width: 0;
  flex: 1;
}

.fr-detail-head h3 {
  margin: 0;
  font-size: 1.125rem;
  font-weight: 800;
  letter-spacing: -0.025em;
  color: var(--text-primary);
  line-height: 1.25;
}

.fr-detail-sub {
  margin: 4px 0 0;
  font-size: 0.8125rem;
  font-weight: 500;
  color: var(--text-muted);
  line-height: 1.4;
}

.fr-detail-head-actions {
  display: flex;
  align-items: center;
  gap: 6px;
  flex-shrink: 0;
}

.fr-detail-tool {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  height: var(--fr-btn-h);
  padding: 0 12px;
  border: 1px solid var(--border);
  border-radius: 10px;
  background: color-mix(in srgb, var(--bg-card, #fff) 70%, transparent);
  color: var(--text-secondary);
  font-size: 0.8125rem;
  font-weight: 650;
  text-decoration: none;
  cursor: pointer;
  white-space: nowrap;
  box-sizing: border-box;
  transition:
    border-color 0.15s ease,
    color 0.15s ease,
    background 0.15s ease,
    transform 0.15s ease;
}

.fr-detail-tool:hover {
  border-color: color-mix(in srgb, var(--text-primary) 18%, var(--border));
  color: var(--text-primary);
  background: var(--bg-card, #fff);
  transform: translateY(-1px);
}

.fr-detail-tool[hidden] {
  display: none !important;
}

.fr-detail-tool.is-li-ok {
  box-shadow: inset 0 -2px 0 color-mix(in srgb, #16a34a 70%, transparent);
}

.fr-detail-tool.is-li-dead {
  box-shadow: inset 0 -2px 0 color-mix(in srgb, var(--orange) 70%, transparent);
}

.fr-detail-tool.is-li-pending {
  opacity: 0.78;
}

.fr-detail-close {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: var(--fr-btn-h);
  height: var(--fr-btn-h);
  padding: 0;
  border: 1px solid var(--border);
  border-radius: 10px;
  background: color-mix(in srgb, var(--bg-card, #fff) 70%, transparent);
  color: var(--text-muted);
  font-size: 16px;
  line-height: 1;
  cursor: pointer;
  flex-shrink: 0;
  transition: border-color 0.15s ease, color 0.15s ease, background 0.15s ease;
}

.fr-detail-close:hover {
  color: var(--text-primary);
  border-color: color-mix(in srgb, var(--text-primary) 18%, var(--border));
  background: var(--bg-card, #fff);
}

/* ── Toolbar (revérifier + meta) ────────────────────────────────────────── */
.fr-detail-toolbar {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 0 var(--fr-pad-x) 14px;
  flex-shrink: 0;
}

.fr-detail-recheck {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
  height: 34px;
  padding: 0 12px;
  border: 1px solid color-mix(in srgb, var(--orange) 32%, var(--border));
  border-radius: 999px;
  background: color-mix(in srgb, var(--orange) 10%, transparent);
  color: var(--orange);
  font-size: 0.78rem;
  font-weight: 750;
  letter-spacing: 0.01em;
  cursor: pointer;
  flex-shrink: 0;
  box-sizing: border-box;
  transition: background 0.15s ease, border-color 0.15s ease, transform 0.15s ease;
}

.fr-detail-recheck:hover:not(:disabled) {
  background: color-mix(in srgb, var(--orange) 16%, transparent);
  border-color: var(--orange);
  transform: translateY(-1px);
}

.fr-detail-recheck:disabled,
.fr-detail-recheck.is-loading {
  opacity: 0.55;
  cursor: wait;
  transform: none;
}

.fr-detail-recheck svg {
  width: 14px;
  height: 14px;
}

.fr-detail-meta {
  font-size: 0.75rem;
  font-weight: 500;
  color: var(--text-muted);
  line-height: 1.35;
  min-width: 0;
}

/* ── Body / verdict ─────────────────────────────────────────────────────── */
.fr-detail-body {
  flex: 1;
  min-height: 0;
  overflow: auto;
  padding: 4px var(--fr-pad-x) 10px;
}

.fr-detail-body .contact-freshness-result,
.fr-detail-body .fr-detail-verdict {
  margin: 0;
  padding: 16px 16px 14px;
  border: 1px solid var(--border);
  border-radius: 14px;
  background: var(--bg-card, #fff);
  box-shadow: 0 1px 0 color-mix(in srgb, var(--text-primary) 3%, transparent);
  display: flex;
  flex-direction: column;
  gap: 0;
}

.fr-detail-body .contact-freshness-result[hidden] {
  display: flex !important;
}

.fr-detail-body .contact-freshness-result.is-ok {
  border-color: color-mix(in srgb, #16a34a 28%, var(--border));
  background:
    linear-gradient(
      160deg,
      color-mix(in srgb, #16a34a 8%, var(--bg-card)) 0%,
      var(--bg-card) 55%
    );
}

.fr-detail-body .contact-freshness-result.is-warn {
  border-color: color-mix(in srgb, #c27803 30%, var(--border));
  background:
    linear-gradient(
      160deg,
      color-mix(in srgb, #c27803 9%, var(--bg-card)) 0%,
      var(--bg-card) 55%
    );
}

.fr-detail-body .contact-freshness-result.is-alert {
  border-color: color-mix(in srgb, var(--orange, #e9530d) 32%, var(--border));
  background:
    linear-gradient(
      160deg,
      color-mix(in srgb, var(--orange, #e9530d) 9%, var(--bg-card)) 0%,
      var(--bg-card) 55%
    );
}

.fr-detail-body .contact-freshness-result.is-muted,
.fr-detail-body .contact-freshness-result.is-loading {
  border-color: var(--border);
  background:
    linear-gradient(
      160deg,
      color-mix(in srgb, var(--text-muted) 6%, var(--bg-card)) 0%,
      var(--bg-card) 55%
    );
}

.fr-detail-body .contact-freshness-status {
  margin: 0 0 10px;
}

.fr-detail-body .contact-freshness-pill {
  font-size: 0.68rem;
  font-weight: 800;
  padding: 4px 10px;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  border-radius: 999px;
}

.fr-detail-body .contact-freshness-summary {
  margin: 0 0 14px;
  font-size: 0.9rem;
  font-weight: 650;
  letter-spacing: -0.015em;
  line-height: 1.45;
  color: var(--text-primary);
}

.fr-detail-body .cf-snapshot {
  margin: 0;
  gap: 8px;
  padding: 12px 14px;
  border-radius: 12px;
  border: 1px solid var(--border, #e5e2dc);
  background: var(--bg-base, #f7f7f5);
}

.fr-detail-body .cf-snapshot-line {
  grid-template-columns: 6.75rem minmax(0, 1fr);
  font-size: 0.875rem;
  gap: 6px 12px;
}

.fr-detail-body .cf-snapshot-k {
  font-size: 0.68rem;
  font-weight: 750;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--text-muted, #8a857c);
}

.fr-detail-body .cf-snapshot-v {
  font-size: 0.875rem;
  font-weight: 700;
  letter-spacing: -0.01em;
  color: var(--text-primary);
}

.fr-detail-body .cf-snapshot-foot:empty {
  display: none;
}

.fr-detail-body .cf-simple-details {
  margin: 8px 0 0;
  font-size: 0.78rem;
  color: var(--text-secondary);
}

.fr-detail-body .cf-simple-details summary {
  font-size: 0.78rem;
  font-weight: 650;
  color: var(--text-muted);
  padding: 2px 0;
}

.fr-detail-body .cf-simple-details ul {
  margin: 6px 0 0;
  padding-left: 1.15em;
  line-height: 1.45;
  color: var(--text-secondary);
  font-size: 0.78rem;
}

/* Décision Oui / Non — encart dynamique façon « contact en cours » */
.fr-detail-body .contact-freshness-manual {
  margin-top: 14px;
  padding: 0;
  border: none;
}

.fr-detail-body .contact-freshness-choice {
  padding: 14px 14px 12px;
  border-radius: 14px;
  border: 1px solid color-mix(in srgb, var(--orange, #e9530d) 28%, var(--border));
  background:
    linear-gradient(
      105deg,
      color-mix(in srgb, var(--orange, #e9530d) 10%, transparent),
      color-mix(in srgb, #f59e0b 6%, transparent)
    );
}

.fr-detail-body .contact-freshness-choice-kicker {
  margin: 0 0 2px;
}

.fr-detail-body .contact-freshness-choice-label {
  margin: 0 0 12px;
  font-size: 0.9rem;
  font-weight: 750;
  letter-spacing: -0.015em;
  color: var(--text-primary);
}

.fr-detail-body .contact-freshness-actions--row {
  gap: 10px;
}

.fr-detail-body .contact-freshness-actions--solo {
  width: 100%;
}

.fr-detail-body .contact-freshness-actions--solo .contact-freshness-apply {
  min-height: 48px;
  font-size: 14px;
  font-weight: 750;
}

.fr-detail-body .contact-freshness-remove {
  margin-top: 12px;
  padding-top: 12px;
}

.fr-detail-body .contact-freshness-apply--remove {
  min-height: 42px;
  font-size: 0.84rem;
  border-radius: 11px;
}

.fr-detail-body .contact-freshness-actions--row .contact-freshness-apply {
  height: var(--fr-btn-h);
  min-height: var(--fr-btn-h);
  padding: 0 14px;
  font-size: 0.84rem;
  font-weight: 750;
  border-radius: 11px;
  gap: 7px;
  transition:
    background 0.15s ease,
    border-color 0.15s ease,
    color 0.15s ease,
    transform 0.15s ease,
    box-shadow 0.15s ease;
}

.fr-detail-body .contact-freshness-actions--row .contact-freshness-apply:hover:not(:disabled) {
  transform: translateY(-1px);
}

.fr-detail-body .contact-freshness-actions--row .contact-freshness-apply--primary {
  box-shadow: 0 6px 16px color-mix(in srgb, var(--orange, #e9530d) 28%, transparent);
}

.fr-detail-body .contact-freshness-actions--row .contact-freshness-apply--primary:hover:not(:disabled) {
  color: #fff;
  background: color-mix(in srgb, var(--orange) 86%, #000);
  border-color: color-mix(in srgb, var(--orange) 86%, #000);
  box-shadow: 0 8px 20px color-mix(in srgb, var(--orange, #e9530d) 34%, transparent);
}

.fr-detail-body .contact-freshness-apply-form {
  margin-top: 14px;
  padding: 14px;
  border: 1px solid color-mix(in srgb, var(--orange, #e9530d) 22%, var(--border));
  border-radius: 14px;
  background:
    linear-gradient(
      105deg,
      color-mix(in srgb, var(--orange, #e9530d) 8%, transparent),
      color-mix(in srgb, #f59e0b 5%, transparent)
    );
  gap: 10px;
}

.fr-detail-body .contact-freshness-apply-form > .contact-freshness-apply--primary {
  height: var(--fr-btn-h);
  min-height: var(--fr-btn-h);
  font-size: 0.84rem;
  border-radius: 11px;
}

.fr-detail-body .contact-freshness-field input {
  height: var(--fr-btn-h);
  min-height: var(--fr-btn-h);
  font-size: 0.875rem;
  border-radius: 10px;
}

.fr-detail-body .contact-freshness-tools-label {
  font-size: 0.78rem;
  margin: 6px 0 6px;
}

.fr-detail-body .contact-freshness-tool {
  height: 34px;
  font-size: 0.78rem;
  border-radius: 10px;
}

.fr-detail-body .contact-freshness-icp {
  margin: 10px 0 0;
  padding: 10px 12px;
  border-radius: 10px;
}

.fr-detail-body .contact-freshness-icp--keep {
  padding: 8px 10px;
}

.fr-detail-body .contact-freshness-icp .contact-freshness-apply--danger {
  height: var(--fr-btn-h);
  min-height: var(--fr-btn-h);
  font-size: 0.84rem;
  border-radius: 11px;
}

/* ── Footer ─────────────────────────────────────────────────────────────── */
.fr-detail-foot {
  display: flex;
  justify-content: flex-end;
  align-items: center;
  gap: 10px;
  padding: 12px var(--fr-pad-x) 16px;
  border-top: 1px solid color-mix(in srgb, var(--border) 80%, transparent);
  flex-shrink: 0;
  background: color-mix(in srgb, var(--bg-base, #f7f7f5) 65%, var(--bg-card));
}

.fr-detail-snooze {
  position: relative;
}

.fr-snooze-popover {
  position: fixed;
  min-width: 160px;
  padding: 6px;
  border-radius: 12px;
  border: 1px solid color-mix(in srgb, var(--border) 85%, transparent);
  background: var(--bg-card, #fff);
  box-shadow: 0 10px 28px color-mix(in srgb, #000 12%, transparent);
  display: flex;
  flex-direction: column;
  gap: 2px;
  z-index: 1300;
}

.fr-snooze-popover[hidden] {
  display: none !important;
}

.fr-snooze-popover button {
  appearance: none;
  border: 0;
  background: transparent;
  text-align: left;
  padding: 8px 12px;
  border-radius: 8px;
  font-size: 0.84rem;
  font-weight: 650;
  color: var(--text);
  cursor: pointer;
}

.fr-snooze-popover button:hover {
  background: color-mix(in srgb, var(--accent, #2f6fed) 12%, transparent);
}

.fr-detail-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  height: var(--fr-btn-h);
  min-width: 112px;
  padding: 0 16px;
  border-radius: 11px;
  font-size: 0.84rem;
  font-weight: 750;
  cursor: pointer;
  border: 1px solid transparent;
  box-sizing: border-box;
  transition:
    background 0.15s ease,
    border-color 0.15s ease,
    color 0.15s ease,
    filter 0.15s ease,
    transform 0.15s ease,
    box-shadow 0.15s ease;
}

.fr-detail-foot[hidden] {
  display: none !important;
}

.fr-detail-btn--ghost {
  background: var(--bg-card, #fff);
  border-color: var(--border);
  color: var(--text-secondary);
}

.fr-detail-btn--ghost:hover {
  color: var(--text-primary);
  border-color: color-mix(in srgb, var(--text-primary) 18%, var(--border));
  transform: translateY(-1px);
}

.fr-detail-btn--primary {
  background: var(--orange);
  border-color: var(--orange);
  color: #fff;
  min-width: 148px;
  box-shadow: 0 6px 16px color-mix(in srgb, var(--orange, #e9530d) 26%, transparent);
}

.fr-detail-btn--primary:hover {
  color: #fff;
  filter: brightness(1.05);
  transform: translateY(-1px);
  box-shadow: 0 8px 20px color-mix(in srgb, var(--orange, #e9530d) 32%, transparent);
}

/* LI status sur la liste Fraîcheur (hors modale) */
.fraicheur-li.is-li-pending,
.contact-freshness-li-link.is-li-pending {
  opacity: 0.72;
}

.fraicheur-li.is-li-ok,
.contact-freshness-li-link.is-li-ok {
  box-shadow: inset 0 -2px 0 color-mix(in srgb, #16a34a 70%, transparent);
}

.fraicheur-li.is-li-dead,
.contact-freshness-li-link.is-li-search.is-li-dead {
  box-shadow: inset 0 -2px 0 color-mix(in srgb, var(--orange, #e67e22) 70%, transparent);
}

.fraicheur-li.is-li-ok {
  color: #0a66c2;
}

.fraicheur-li.is-li-search {
  opacity: 0.85;
}
