/* Only public candidate profiles carry this marker. Campaign images keep their own identity. */
.fl-candidate-profile-tools { margin: 12px 0 20px; }
.fl-candidate-shortcuts { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; padding: 10px; border: 1px solid #dce2e7; border-radius: 16px; background: #fff; }
.fl-candidate-shortcuts a { display: flex; align-items: center; justify-content: center; gap: 10px; min-height: 48px; padding: 8px 12px; border-radius: 10px; color: #283746; font-weight: 600; text-decoration: none; }
.fl-candidate-shortcuts a:hover, .fl-candidate-shortcuts a[aria-current] { color: #fff; background: var(--fl-candidate-dark, #55524e); }
.fl-candidate-shortcuts a span { font-size: 22px; line-height: 1; }
.fl-candidate-owner-tools { display: flex; justify-content: flex-end; align-items: center; flex-wrap: wrap; gap: 8px 16px; margin-top: 12px; }
.fl-candidate-owner-tools a { color: inherit; text-decoration: underline; text-underline-offset: 3px; }
.fl-candidate-owner-tools button, .fl-candidate-visitor-dialog button { min-height: 44px; padding: 9px 14px; border: 1px solid #b9c5cd; border-radius: 9px; color: #283746; background: #fff; font: inherit; cursor: pointer; }
.fl-candidate-profile-tools :is(a, button):focus-visible { outline: 3px solid var(--fl-candidate-accent, #55524e); outline-offset: 3px; }
.fl-candidate-visitor-dialog { width: min(1480px, calc(100vw - 32px)); max-width: none; height: calc(100dvh - 32px); max-height: none; margin: auto; padding: 20px; border: 1px solid #dce2e7; border-radius: 18px; color: #283746; background: #f4f6f7; }
.fl-candidate-visitor-dialog[open] { display: flex; flex-direction: column; gap: 12px; }
.fl-candidate-visitor-dialog::backdrop { background: #14202bc9; }
.fl-candidate-visitor-dialog header, .fl-candidate-visitor-toolbar { display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap; }
.fl-candidate-visitor-dialog h2 { margin: 0 0 6px; font-size: 20px; }
.fl-candidate-visitor-dialog p { margin: 0; font-size: 14px; }
.fl-candidate-visitor-toolbar [role='group'] { display: flex; gap: 6px; }
.fl-candidate-visitor-toolbar [aria-pressed='true'] { color: #fff; background: var(--fl-candidate-dark, #55524e); border-color: var(--fl-candidate-dark, #55524e); }
.fl-candidate-visitor-viewport { flex: 1; min-height: 180px; display: flex; justify-content: center; overflow: auto; background: #dce2e7; border-radius: 10px; }
.fl-candidate-visitor-viewport iframe { width: 100%; height: 100%; min-height: 180px; border: 0; background: #fff; }
.fl-candidate-visitor-viewport[data-size='mobile'] iframe { width: min(390px, 100%); }
.fl-candidate-visitor-note { color: #52626d; }
.fl-candidate-block-edit { display: inline-flex; align-items: center; gap: 8px; margin-top: 12px; font-weight: 600; text-decoration: underline; text-underline-offset: 3px; }
.fl-candidate-editable-card { display: flex; flex-direction: column; min-width: 0; }
.fl-candidate-editable-card[hidden] { display: none; }
.fl-candidate-editable-card > .prg-demo-card { flex: 1; }
[data-rubric-variant='mosaique-rythme'] .fl-candidate-editable-card:nth-child(6n+1) { grid-column: span 2; }
[data-rubric-variant='mosaique-ouverture'] .fl-candidate-editable-card:nth-child(5n+1) { grid-column: 1 / -1; }
.prg-demo-grid[data-columns='1'] .fl-candidate-editable-card { grid-column: auto; }
@media (min-width: 768px) { [data-rubric-variant='grand-angle-alternance'] .prg-demo-grid[data-columns='1'] .fl-candidate-editable-card:nth-child(even) .prg-demo-card__visual { order: 0; } }
@container programme (max-width:650px) { .prg-reader .fl-candidate-editable-card { grid-column: auto; } }
@media (max-width: 760px) { .prg-demo-grid .fl-candidate-editable-card { grid-column: auto; } }
.night-mode :is(.fl-candidate-shortcuts, .fl-candidate-visitor-dialog) { background: #242d35; border-color: #47535f; color: #edf2f5; }
.night-mode .fl-candidate-shortcuts a { color: #edf2f5; }
.night-mode .fl-candidate-visitor-note { color: #bdcbd3; }
@media (max-width: 575px) {
  .fl-candidate-shortcuts { gap: 4px; padding: 6px; border-radius: 12px; }
  .fl-candidate-shortcuts a { flex-direction: column; gap: 6px; padding: 10px 4px; font-size: 13px; }
  .fl-candidate-owner-tools { justify-content: center; }
  .fl-candidate-visitor-dialog { width: calc(100vw - 12px); height: calc(100dvh - 12px); padding: 12px; border-radius: 12px; gap: 8px; }
  .fl-candidate-visitor-dialog h2 { font-size: 18px; }
  .fl-candidate-visitor-dialog p { font-size: 12px; }
  .fl-candidate-visitor-dialog button { font-size: 13px; padding: 8px 10px; }
}

body[data-fl-candidate-profile] .fl-profile-particulier-shell {
  --fl-profile-entity-action-hover: color-mix(in srgb, var(--fl-candidate-dark) 84%, #000);
}

@media (min-width: 1200px) {
  body[data-fl-candidate-profile] .main-wrapper,
  body[data-fl-candidate-profile] .top-bar,
  body[data-fl-candidate-profile] .main-header {
    padding-right: 0;
  }
}

.fl-cover-v5-actions.fl-cover-v5-actions--breadcrumb {
  padding-left: 15px;
}

.fl-campaign-breadcrumb {
  min-width: 0;
  margin-right: auto;
  font-size: 13px;
  line-height: 1.5;
}

.fl-campaign-breadcrumb ol {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 6px 8px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.fl-campaign-breadcrumb li {
  min-width: 0;
  overflow-wrap: anywhere;
}

.fl-campaign-breadcrumb li + li::before {
  content: '›';
  margin-right: 8px;
}

.fl-campaign-breadcrumb a {
  color: inherit;
  text-decoration: none;
}

.fl-campaign-breadcrumb a:hover {
  text-decoration: underline;
}

.fl-campaign-breadcrumb [aria-current='page'] {
  font-weight: 600;
}

/* Keep white navigation labels on the darker part of the candidate palette. */
body[data-fl-candidate-profile] .profil-menu {
  background: linear-gradient(180deg, color-mix(in srgb, var(--fl-candidate-dark) 84%, #000), var(--fl-candidate-dark));
}

/* Identical icon slots and label line boxes keep every menu label aligned. */
body[data-fl-candidate-profile] .profile-nav .profile-tab {
  padding-top: 6px;
  padding-bottom: 4px;
  margin-bottom: 0;
}

body[data-fl-candidate-profile] .profile-nav .profile-tab > .tab-icon {
  display: flex;
  align-items: center;
  justify-content: center;
  flex: 0 0 24px;
  width: 24px;
  height: 24px;
  margin-top: 0 !important;
}

body[data-fl-candidate-profile] .profile-nav .profile-tab > .tab-label {
  flex: 0 0 20px;
  height: 20px;
  line-height: 20px;
  margin-top: 4px;
}

body[data-fl-candidate-profile] .fl-campaign-nav__toggle {
  color: #fff;
}

body[data-fl-candidate-profile] .fl-campaign-nav > .profile-tab:is(.active, :hover) + .fl-campaign-nav__toggle {
  color: var(--fl-candidate-accent);
}

body[data-fl-candidate-profile] .profile-tab:is(.active, :hover) {
  color: var(--fl-candidate-accent);
  border-bottom-color: var(--fl-candidate-accent);
  background: var(--fl-color-surface, #fff);
}

body.night-mode[data-fl-candidate-profile] .profile-tab:is(.active, :hover) {
  background: var(--fl-color-dark-surface, #262d34);
}

body[data-fl-candidate-profile] .profile-tab:is(.active, :hover) .tab-icon svg {
  fill: var(--fl-candidate-accent) !important;
}

body[data-fl-candidate-profile] .profile-tab:is(.active, :hover) .tab-icon i {
  color: var(--fl-candidate-accent) !important;
}

body[data-fl-candidate-profile] .fl-election-scope {
  --fl-election-accent: var(--fl-candidate-accent);
  --fl-election-light: var(--fl-candidate-light);
}

body[data-fl-candidate-profile] .fl-election-badge {
  color: var(--fl-election-text);
}

body.night-mode[data-fl-candidate-profile] .fl-header-guest-actions .user-menu {
  color: var(--fl-candidate-light);
}

body[data-fl-candidate-profile] #fl-pro-network {
  --fl-pro-network-accent: var(--fl-candidate-dark);
  --fl-pro-network-accent-dark: var(--fl-candidate-accent);
  --fl-pro-network-accent-soft: color-mix(in srgb, var(--fl-candidate-accent) 10%, var(--fl-pro-network-surface));
}

body[data-fl-candidate-profile] #fl-pro-network .fl-pro-network-hero {
  background: var(--fl-pro-network-surface);
}

body[data-fl-candidate-profile] #fl-pro-network .fl-pro-network-button--primary:is(:hover, :focus) {
  background: color-mix(in srgb, var(--fl-candidate-dark) 84%, #000);
}

body[data-fl-candidate-profile] #fl-pro-network .fl-pro-network-button--secondary:is(:hover, :focus) {
  background: var(--fl-pro-network-accent-soft);
}
