/* ============================================================
   dashboard_v2.css — FellFlow PC Wizard v4 PREMIUM
   Design: glassmorphism + neumorphisme doux + micro-interactions
   Architecture: scroll naturel, split-screen sticky
   Scope: .wfpc-* uniquement
   ============================================================ */

@import url('https://fonts.googleapis.com/css2?family=Plus+Jakarta+Sans:ital,wght@0,400;0,500;0,600;0,700;0,800;1,400&display=swap');

/* ── Design Tokens ──────────────────────────────────────────── */
:root {
  --wf-primary:        #6366f1;
  --wf-primary-light:  #818cf8;
  --wf-primary-dark:   #4f46e5;
  --wf-primary-end:    #8b5cf6;
  --wf-accent:         #10b981;
  --wf-accent-end:     #059669;
  --wf-danger:         #ef4444;
  --wf-warning:        #f59e0b;

  --wf-surface:        #ffffff;
  --wf-surface-2:      #f8fafc;
  --wf-surface-3:      #f1f5f9;
  --wf-bg:             #eef2f8;
  --wf-border:         #e2e8f0;
  --wf-border-light:   #f1f5f9;

  --wf-text:           #0f172a;
  --wf-text-2:         #334155;
  --wf-muted:          #64748b;
  --wf-muted-light:    #94a3b8;

  --wf-shadow-xs:      0 1px 3px rgba(0,0,0,.06), 0 1px 2px rgba(0,0,0,.04);
  --wf-shadow:         0 4px 16px rgba(0,0,0,.07);
  --wf-shadow-md:      0 8px 30px rgba(0,0,0,.09);
  --wf-shadow-lg:      0 16px 48px rgba(0,0,0,.12);
  --wf-shadow-xl:      0 28px 72px rgba(0,0,0,.16);
  --wf-shadow-accent:  0 4px 20px rgba(99,102,241,.35);
  --wf-shadow-glow:    0 0 40px rgba(99,102,241,.18);

  --wf-grad:           linear-gradient(135deg, #6366f1 0%, #8b5cf6 100%);
  --wf-grad-green:     linear-gradient(135deg, #10b981 0%, #059669 100%);
  --wf-grad-hero:      linear-gradient(150deg, #080d1a 0%, #160f38 35%, #0b1d38 70%, #080d1a 100%);

  --wf-radius-sm:      10px;
  --wf-radius:         16px;
  --wf-radius-lg:      22px;
  --wf-radius-xl:      28px;

  --wf-ease:           cubic-bezier(.4, 0, .2, 1);
  --wf-ease-out:       cubic-bezier(0, 0, .2, 1);
  --wf-ease-spring:    cubic-bezier(.34, 1.56, .64, 1);
  --wf-dur:            .22s;

  --wf-wizard-w:       490px;
}


/* ═══════════════════════════════════════════════════════════════
   BASE BODY
   ═══════════════════════════════════════════════════════════════ */
body.wfpc-body {
  overflow: auto !important;
  height: auto !important;
  display: block !important;
  background: var(--wf-bg) !important;
  font-family: 'Plus Jakarta Sans', 'Poppins', system-ui, sans-serif;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

body.wfpc-body .main-footer {
  display: block !important;
  margin-top: 80px;
}

body.wfpc-body main.main-content {
  padding: 0 !important;
  min-height: 0 !important;
}

.wfpc-shell { display: block; }


/* ═══════════════════════════════════════════════════════════════
   HERO — barre de navigation avec pills
   ═══════════════════════════════════════════════════════════════ */
.wfpc-hero {
  background: var(--wf-grad-hero);
  position: relative;
  overflow: hidden;
  border-bottom: 1px solid rgba(255,255,255,.04);
}

/* Orbes décoratifs */
.wfpc-hero::before {
  content: '';
  position: absolute;
  top: -120px; right: -80px;
  width: 520px; height: 520px;
  background: radial-gradient(circle, rgba(99,102,241,.22) 0%, transparent 65%);
  pointer-events: none;
}

.wfpc-hero::after {
  content: '';
  position: absolute;
  bottom: -40px; left: 15%;
  width: 300px; height: 300px;
  background: radial-gradient(circle, rgba(139,92,246,.12) 0%, transparent 65%);
  pointer-events: none;
}

.wfpc-hero-inner {
  max-width: 1500px;
  margin: 0 auto;
  padding: 0 36px;
  position: relative;
  z-index: 2;
}

/* Partie haute : titre + compteur */
.wfpc-hero-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  padding: 22px 0 18px;
}

.wfpc-hero-left {
  display: flex;
  flex-direction: column;
  gap: 3px;
}

.wfpc-hero-title {
  font-size: 1.4rem;
  font-weight: 800;
  color: #fff;
  display: flex;
  align-items: center;
  gap: 12px;
  letter-spacing: -.5px;
  text-shadow: 0 2px 24px rgba(0,0,0,.4);
}

.wfpc-hero-icon {
  width: 38px; height: 38px;
  background: rgba(255,255,255,.1);
  border: 1px solid rgba(255,255,255,.18);
  border-radius: 11px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.1rem;
  flex-shrink: 0;
  backdrop-filter: blur(10px);
}

.wfpc-hero-subtitle {
  color: rgba(255,255,255,.38);
  font-size: .78rem;
  font-weight: 500;
  padding-left: 2px;
}

.wfpc-step-counter {
  background: rgba(255,255,255,.07);
  border: 1px solid rgba(255,255,255,.11);
  border-radius: 14px;
  padding: 9px 20px;
  color: rgba(255,255,255,.55);
  font-size: .75rem;
  font-weight: 700;
  white-space: nowrap;
  backdrop-filter: blur(12px);
  letter-spacing: .03em;
  flex-shrink: 0;
}

.wfpc-step-counter strong {
  color: #a5b4fc;
  font-size: 1.05rem;
  font-weight: 800;
}

/* Bandeau visiteur */
.wfpc-guest-banner {
  background: linear-gradient(90deg, rgba(99,102,241,.18), rgba(139,92,246,.1));
  border: 1px solid rgba(99,102,241,.28);
  border-radius: var(--wf-radius-sm);
  color: #c7d2fe;
  padding: 12px 20px;
  display: flex;
  align-items: center;
  gap: 14px;
  flex-wrap: wrap;
  margin-bottom: 16px;
  backdrop-filter: blur(8px);
}

.wfpc-guest-title {
  font-weight: 800;
  font-size: .84rem;
  color: #e0e7ff;
  white-space: nowrap;
}

.wfpc-guest-text {
  font-size: .77rem;
  opacity: .85;
  flex: 1;
  min-width: 0;
}

.wfpc-guest-cta {
  padding: 7px 18px;
  background: var(--wf-grad);
  color: #fff;
  border-radius: 9px;
  font-weight: 700;
  font-size: .77rem;
  text-decoration: none;
  white-space: nowrap;
  box-shadow: var(--wf-shadow-accent);
  transition: all var(--wf-dur) var(--wf-ease);
  flex-shrink: 0;
}

.wfpc-guest-cta:hover {
  transform: translateY(-1px);
  box-shadow: 0 6px 24px rgba(99,102,241,.5);
}

/* ── Pills ──────────────────────────────────────────────────── */
.wfpc-steps-pills {
  display: flex;
  overflow-x: auto;
  scrollbar-width: none;
  gap: 0;
}

.wfpc-steps-pills::-webkit-scrollbar { display: none; }

.wfpc-pill {
  display: flex;
  align-items: center;
  gap: 7px;
  padding: 12px 15px 14px;
  border: none;
  background: none;
  cursor: pointer;
  color: rgba(255,255,255,.28);
  font-size: .73rem;
  font-weight: 600;
  white-space: nowrap;
  position: relative;
  transition: color var(--wf-dur) var(--wf-ease);
  font-family: inherit;
}

/* Barre active sous la pill */
.wfpc-pill::after {
  content: '';
  position: absolute;
  bottom: 0; left: 6px; right: 6px;
  height: 3px;
  background: var(--wf-grad);
  border-radius: 3px 3px 0 0;
  opacity: 0;
  transform: scaleX(.5);
  transform-origin: center;
  transition: opacity var(--wf-dur), transform var(--wf-dur) var(--wf-ease-spring);
}

.wfpc-pill-num {
  width: 22px; height: 22px;
  border-radius: 50%;
  background: rgba(255,255,255,.08);
  border: 1px solid rgba(255,255,255,.1);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: .63rem;
  font-weight: 800;
  flex-shrink: 0;
  transition: all var(--wf-dur) var(--wf-ease-spring);
}

.wfpc-pill:hover { color: rgba(255,255,255,.65); }
.wfpc-pill:hover .wfpc-pill-num { background: rgba(255,255,255,.14); }

/* Done */
.wfpc-pill.is-done { color: rgba(255,255,255,.45); }
.wfpc-pill.is-done .wfpc-pill-num {
  background: rgba(16,185,129,.22);
  border-color: rgba(16,185,129,.4);
  color: #6ee7b7;
  font-size: 0; /* masque le chiffre */
}
.wfpc-pill.is-done .wfpc-pill-num::before {
  content: '✓';
  font-size: .6rem;
  color: #6ee7b7;
}
/* Barre verte sous l'étape complétée */
.wfpc-pill.is-done::after {
  opacity: 1;
  transform: scaleX(1);
  background: linear-gradient(90deg, #10b981, #34d399);
}

/* Incomplet : étape visitée mais champs requis non remplis */
.wfpc-pill.is-incomplete { color: rgba(255,255,255,.5); }
.wfpc-pill.is-incomplete .wfpc-pill-num {
  background: rgba(245,158,11,.22);
  border-color: rgba(245,158,11,.5);
  color: #fcd34d;
  font-size: 0;
}
.wfpc-pill.is-incomplete .wfpc-pill-num::before {
  content: '!';
  font-size: .65rem;
  font-weight: 900;
  color: #fbbf24;
}
/* Barre orange sous l'étape incomplète */
.wfpc-pill.is-incomplete::after {
  opacity: 1;
  transform: scaleX(1);
  background: linear-gradient(90deg, #f59e0b, #fbbf24);
}

/* Active */
.wfpc-pill.is-active { color: #fff; }
.wfpc-pill.is-active::after { opacity: 1; transform: scaleX(1); }
.wfpc-pill.is-active .wfpc-pill-num {
  background: var(--wf-grad);
  border-color: transparent;
  color: #fff;
  box-shadow: 0 3px 12px rgba(99,102,241,.55);
  transform: scale(1.12);
}


/* ═══════════════════════════════════════════════════════════════
   GRID PRINCIPALE
   ═══════════════════════════════════════════════════════════════ */
.wfpc-main {
  max-width: 1500px;
  margin: 0 auto;
  padding: 32px 36px 80px;
  display: grid;
  grid-template-columns: var(--wf-wizard-w) 1fr;
  gap: 28px;
  align-items: start;
}


/* ═══════════════════════════════════════════════════════════════
   PANNEAU GAUCHE — Wizard
   ═══════════════════════════════════════════════════════════════ */
.wfpc-wizard-panel {
  position: sticky;
  top: 20px;
  background: var(--wf-surface);
  border-radius: var(--wf-radius-lg);
  box-shadow: var(--wf-shadow-lg), 0 0 0 1px rgba(0,0,0,.04);
  border: 1px solid var(--wf-border);
  overflow: visible;
  transition: box-shadow .4s var(--wf-ease);
}

.wfpc-wizard-panel:focus-within {
  box-shadow: var(--wf-shadow-xl), var(--wf-shadow-glow), 0 0 0 1px rgba(99,102,241,.1);
}

/* Barre de progression */
.wfpc-progress-wrap {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 15px 24px;
  border-bottom: 1px solid var(--wf-border-light);
  background: linear-gradient(135deg, #fafbff, #f8fafc);
  border-radius: var(--wf-radius-lg) var(--wf-radius-lg) 0 0;
}

.wfpc-progress-bar-track {
  flex: 1;
  height: 6px;
  background: var(--wf-border);
  border-radius: 99px;
  overflow: hidden;
  position: relative;
}

.wfpc-progress-bar-fill {
  height: 100%;
  background: var(--wf-grad);
  border-radius: 99px;
  transition: width .5s var(--wf-ease);
  position: relative;
  overflow: hidden;
}

/* Shimmer animé */
.wfpc-progress-bar-fill::after {
  content: '';
  position: absolute;
  top: 0; left: -100%;
  width: 100%; height: 100%;
  background: linear-gradient(90deg, transparent, rgba(255,255,255,.45), transparent);
  animation: wfpc-shimmer 2.2s infinite;
}

@keyframes wfpc-shimmer { to { left: 200%; } }

.wfpc-progress-label {
  font-size: .69rem;
  font-weight: 800;
  color: var(--wf-primary);
  white-space: nowrap;
  min-width: 32px;
  text-align: right;
}

/* Titre étape */
.wfpc-step-label-bar {
  padding: 13px 24px;
  border-bottom: 1px solid var(--wf-border-light);
  display: flex;
  align-items: center;
  gap: 10px;
}

.wfpc-step-badge {
  width: 28px; height: 28px;
  background: var(--wf-grad);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: .64rem;
  font-weight: 800;
  color: #fff;
  flex-shrink: 0;
  box-shadow: 0 3px 10px rgba(99,102,241,.4);
}

.wfpc-step-title {
  font-size: .9rem;
  font-weight: 800;
  color: var(--wf-text);
  letter-spacing: -.2px;
}

/* Alertes */
.wfpc-alerts { padding: 0 24px; }

.wfpc-alert {
  padding: 10px 14px;
  border-radius: 10px;
  font-size: .79rem;
  font-weight: 600;
  margin: 8px 0 0;
  display: none;
  border-left: 3px solid;
  gap: 8px;
}

.wfpc-alert.is-visible { display: flex; align-items: center; animation: wfpc-fadein .2s var(--wf-ease); }
.wfpc-alert-danger  { background: #fff1f2; color: #be123c; border-color: #fb7185; }
.wfpc-alert-success { background: #f0fdf4; color: #166534; border-color: #4ade80; }
.wfpc-alert-info    { background: #eff6ff; color: #1d4ed8; border-color: #60a5fa; }

/* Steps form */
.wfpc-steps-wrap { display: block; }

.wfpc-step {
  display: none;
  padding: 24px;
  animation: wfpc-fadein .22s var(--wf-ease);
}

.wfpc-step.is-active { display: block; }

@keyframes wfpc-fadein {
  from { opacity: 0; transform: translateY(6px); }
  to   { opacity: 1; transform: none; }
}

/* Navigation prev/next/save */
.wfpc-nav {
  display: flex;
  gap: 10px;
  padding: 16px 24px;
  border-top: 1px solid var(--wf-border-light);
  background: linear-gradient(135deg, #fafbff, #f8fafc);
  border-radius: 0 0 var(--wf-radius-lg) var(--wf-radius-lg);
}


/* ═══════════════════════════════════════════════════════════════
   BOUTONS
   ═══════════════════════════════════════════════════════════════ */
.wfpc-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 11px 22px;
  border-radius: var(--wf-radius-sm);
  font-size: .875rem;
  font-weight: 700;
  cursor: pointer;
  border: none;
  transition: all var(--wf-dur) var(--wf-ease);
  text-decoration: none;
  font-family: inherit;
  white-space: nowrap;
  letter-spacing: -.1px;
  position: relative;
  overflow: hidden;
}

.wfpc-btn:disabled {
  opacity: .4;
  cursor: not-allowed;
  transform: none !important;
  box-shadow: none !important;
  filter: grayscale(.3);
}

.wfpc-btn-ghost {
  background: var(--wf-surface-3);
  color: var(--wf-text-2);
  border: 1.5px solid var(--wf-border);
}

.wfpc-btn-ghost:hover:not(:disabled) {
  background: var(--wf-border);
  border-color: #cbd5e1;
  color: var(--wf-text);
  transform: translateY(-1px);
}

.wfpc-btn-primary {
  flex: 1;
  background: var(--wf-grad);
  color: #fff;
  box-shadow: var(--wf-shadow-accent);
}

.wfpc-btn-primary:hover:not(:disabled) {
  transform: translateY(-2px);
  box-shadow: 0 8px 28px rgba(99,102,241,.52);
}

.wfpc-btn-primary:active:not(:disabled) { transform: translateY(0); }

.wfpc-btn-save {
  flex: 1;
  background: var(--wf-grad-green);
  color: #fff;
  box-shadow: 0 4px 16px rgba(16,185,129,.35);
}

.wfpc-btn-save:hover:not(:disabled) {
  transform: translateY(-2px);
  box-shadow: 0 8px 28px rgba(16,185,129,.52);
}

.wfpc-btn-danger {
  background: #fff1f2;
  color: #be123c;
  border: 1.5px solid #fecdd3;
}

.wfpc-btn-danger:hover:not(:disabled) {
  background: #ffe4e6;
  border-color: #fb7185;
  transform: translateY(-1px);
}


/* ═══════════════════════════════════════════════════════════════
   FORMULAIRE
   ═══════════════════════════════════════════════════════════════ */
.wfpc-label {
  display: block;
  font-size: .71rem;
  font-weight: 700;
  color: var(--wf-muted);
  margin-bottom: 6px;
  text-transform: uppercase;
  letter-spacing: .07em;
}

.wfpc-input {
  display: block;
  width: 100%;
  padding: 11px 14px;
  border: 2px solid var(--wf-border);
  border-radius: var(--wf-radius-sm);
  background: #fff;
  color: var(--wf-text);
  font-size: .9rem;
  font-family: inherit;
  transition: border-color var(--wf-dur), box-shadow var(--wf-dur), background var(--wf-dur);
  box-sizing: border-box;
  margin-bottom: 16px;
}

.wfpc-input:hover { border-color: #c7d2fe; background: #fafbff; }

.wfpc-input:focus {
  outline: none;
  border-color: var(--wf-primary);
  box-shadow: 0 0 0 4px rgba(99,102,241,.1);
  background: #fff;
}

/* Groupes côte à côte */
.wfpc-input-group {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
}

/* Titres de sections */
.wfpc-section-title {
  font-size: .68rem;
  font-weight: 800;
  color: var(--wf-muted);
  text-transform: uppercase;
  letter-spacing: .1em;
  margin: 18px 0 10px;
  display: flex;
  align-items: center;
  gap: 9px;
}

.wfpc-section-title::after {
  content: '';
  flex: 1;
  height: 1px;
  background: var(--wf-border-light);
}

.wfpc-section-title:first-child { margin-top: 0; }

/* Chips radiogroup */
.wfpc-chip-row {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 16px;
}

.wfpc-chip {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 8px 16px;
  border-radius: 99px;
  border: 2px solid var(--wf-border);
  background: var(--wf-surface);
  color: var(--wf-muted);
  font-size: .78rem;
  font-weight: 600;
  cursor: pointer;
  transition: all var(--wf-dur) var(--wf-ease);
  font-family: inherit;
  box-shadow: var(--wf-shadow-xs);
}

.wfpc-chip:hover:not(:disabled) {
  border-color: var(--wf-primary-light);
  color: var(--wf-primary);
  background: rgba(99,102,241,.05);
  box-shadow: 0 3px 10px rgba(99,102,241,.15);
  transform: translateY(-1px);
}

.wfpc-chip.is-on {
  border-color: var(--wf-primary);
  background: linear-gradient(135deg, rgba(99,102,241,.12), rgba(139,92,246,.07));
  color: var(--wf-primary);
  box-shadow: 0 3px 14px rgba(99,102,241,.22), inset 0 0 0 1px rgba(99,102,241,.1);
  font-weight: 700;
}

.wfpc-chip.is-locked {
  opacity: .38;
  cursor: not-allowed;
  filter: grayscale(.3);
}

.wfpc-chip-ic { font-size: 1.05rem; line-height: 1; }


/* ── Grille thèmes ───────────────────────────────────────────── */
.wfpc-theme-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(82px, 1fr));
  gap: 9px;
  margin-bottom: 16px;
}

.wfpc-theme-btn {
  border: 2.5px solid var(--wf-border);
  border-radius: var(--wf-radius-sm);
  background: var(--wf-surface);
  cursor: pointer;
  padding: 0;
  overflow: hidden;
  transition: all var(--wf-dur) var(--wf-ease-spring);
  display: flex;
  flex-direction: column;
  box-shadow: var(--wf-shadow-xs);
  position: relative;
}

.wfpc-theme-btn:hover:not(:disabled) {
  border-color: var(--wf-primary);
  transform: translateY(-3px) scale(1.02);
  box-shadow: 0 8px 22px rgba(99,102,241,.25);
}

.wfpc-theme-btn.is-on {
  border-color: var(--wf-primary);
  box-shadow: 0 0 0 3px rgba(99,102,241,.22), 0 6px 20px rgba(99,102,241,.28);
  transform: translateY(-1px);
}

/* Coche selected */
.wfpc-theme-btn.is-on::after {
  content: '✓';
  position: absolute;
  top: 4px; right: 4px;
  width: 17px; height: 17px;
  background: var(--wf-grad);
  border-radius: 50%;
  color: #fff;
  font-size: .58rem;
  font-weight: 800;
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 5;
  line-height: 17px;
  text-align: center;
  box-shadow: 0 2px 6px rgba(99,102,241,.4);
}

.wfpc-theme-btn.is-locked { opacity: .4; cursor: not-allowed; filter: grayscale(.4); }

.wfpc-theme-iframe {
  width: 100%;
  height: 58px;
  border: none;
  pointer-events: none;
  display: block;
}

.wfpc-theme-name {
  font-size: .59rem;
  font-weight: 700;
  color: var(--wf-muted);
  text-align: center;
  padding: 4px 5px 6px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  background: var(--wf-surface);
  border-top: 1px solid var(--wf-border-light);
}

.wfpc-lock-badge { font-size: .7rem; vertical-align: middle; opacity: .7; }


/* ── Événements ──────────────────────────────────────────────── */
.wfpc-ev-group { margin-bottom: 16px; }

.wfpc-ev-group-title {
  font-size: .64rem;
  font-weight: 800;
  color: var(--wf-muted);
  text-transform: uppercase;
  letter-spacing: .1em;
  margin-bottom: 8px;
  display: flex;
  align-items: center;
  gap: 8px;
}

.wfpc-ev-group-title::after {
  content: '';
  flex: 1;
  height: 1px;
  background: var(--wf-border-light);
}

.wfpc-ev-row { display: flex; flex-wrap: wrap; gap: 6px; }

.wfpc-ev-chip {
  padding: 9px 18px;
  border-radius: 99px;
  border: 2px solid var(--wf-border);
  background: linear-gradient(135deg, #f8faff 0%, #f0f4ff 100%);
  color: var(--wf-text-2);
  font-size: .78rem;
  font-weight: 600;
  cursor: pointer;
  transition: all var(--wf-dur) var(--wf-ease);
  font-family: inherit;
  box-shadow: var(--wf-shadow-xs);
}

.wfpc-ev-chip:hover {
  border-color: var(--wf-primary-light);
  color: var(--wf-primary);
  background: linear-gradient(135deg, rgba(99,102,241,.1) 0%, rgba(139,92,246,.08) 100%);
  transform: translateY(-2px);
  box-shadow: 0 4px 14px rgba(99,102,241,.22);
}

.wfpc-ev-chip.is-on {
  border-color: var(--wf-primary);
  background: var(--wf-grad);
  color: #fff;
  font-weight: 700;
  box-shadow: 0 4px 16px rgba(99,102,241,.4);
  transform: translateY(-1px);
}


/* ── Box IA ──────────────────────────────────────────────────── */
.wfpc-ai-box {
  background: linear-gradient(145deg, #f4f3ff 0%, #faf0ff 60%, #eff6ff 100%);
  border: 1.5px solid #ddd6fe;
  border-radius: var(--wf-radius);
  padding: 18px;
  margin-top: 16px;
  position: relative;
  overflow: hidden;
}

.wfpc-ai-box::before {
  content: '✨';
  position: absolute;
  top: -15px; right: -10px;
  font-size: 6rem;
  opacity: .05;
  pointer-events: none;
  user-select: none;
}

.wfpc-ai-hint {
  font-size: .76rem;
  color: var(--wf-muted);
  margin-bottom: 12px;
  line-height: 1.65;
}

.wfpc-ai-preview {
  margin-top: 12px;
  font-size: .83rem;
  color: var(--wf-text);
  line-height: 1.75;
  max-height: 150px;
  overflow-y: auto;
  background: rgba(255,255,255,.75);
  border-radius: 9px;
  padding: 10px 13px;
  border: 1px solid rgba(99,102,241,.12);
  backdrop-filter: blur(4px);
}

.wfpc-ai-actions { display: flex; gap: 8px; margin-top: 10px; }


/* ── Toolbar éditeur ─────────────────────────────────────────── */
.wfpc-toolbar {
  background: var(--wf-surface-2);
  border: 2px solid var(--wf-border);
  border-radius: var(--wf-radius-sm) var(--wf-radius-sm) 0 0;
  border-bottom: 1.5px solid var(--wf-border-light);
  padding: 6px 10px;
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.wfpc-toolbar-row { display: flex; align-items: center; gap: 2px; flex-wrap: wrap; }

.wfpc-tb {
  width: 30px; height: 30px;
  border: none;
  background: none;
  cursor: pointer;
  border-radius: 7px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: .82rem;
  color: var(--wf-muted);
  transition: all .14s;
  flex-shrink: 0;
}

.wfpc-tb:hover {
  background: var(--wf-border);
  color: var(--wf-primary);
  transform: scale(1.06);
}

.wfpc-divider {
  width: 1px; height: 20px;
  background: var(--wf-border);
  margin: 0 4px;
  border-radius: 1px;
}

.wfpc-color {
  width: 30px; height: 30px;
  border: 2px solid var(--wf-border);
  border-radius: 7px;
  padding: 2px;
  cursor: pointer;
  background: none;
  transition: border-color .14s;
}

.wfpc-color:hover { border-color: var(--wf-primary); }

.wfpc-select-font,
.wfpc-select-size {
  padding: 4px 7px;
  border-radius: 7px;
  border: 1.5px solid var(--wf-border);
  font-size: .74rem;
  background: var(--wf-surface);
  color: var(--wf-text);
  cursor: pointer;
  font-family: inherit;
  transition: border-color .14s;
}

.wfpc-select-font:hover, .wfpc-select-size:hover { border-color: var(--wf-primary-light); }
.wfpc-select-font { max-width: 155px; }
.wfpc-select-size { width: 56px; }

.wfpc-editor {
  min-height: 110px;
  max-height: 200px;
  padding: 13px 15px;
  border: 2px solid var(--wf-border);
  border-top: none;
  border-radius: 0 0 var(--wf-radius-sm) var(--wf-radius-sm);
  background: #fff;
  color: var(--wf-text);
  font-size: 14px;
  line-height: 1.65;
  overflow-y: auto;
  outline: none;
  transition: border-color var(--wf-dur), box-shadow var(--wf-dur);
}

.wfpc-editor:focus {
  border-color: var(--wf-primary);
  box-shadow: -2px 0 0 var(--wf-primary), 2px 0 0 var(--wf-primary), 0 2px 0 var(--wf-primary);
}

.wfpc-editor[data-placeholder]:empty:before {
  content: attr(data-placeholder);
  color: var(--wf-muted-light, #aaa);
  pointer-events: none;
  font-style: italic;
}

.wfpc-editor-long { min-height: 150px; max-height: 240px; }

.wfpc-count {
  font-size: .67rem;
  font-weight: 800;
  color: var(--wf-muted-light);
  margin-left: auto;
  background: var(--wf-border-light);
  padding: 2px 8px;
  border-radius: 99px;
}
.wfpc-count.is-limit {
  color: #dc2626;
  background: #fee2e2;
}

.wfpc-emoji-panel {
  background: var(--wf-surface);
  border: 1.5px solid var(--wf-border);
  border-radius: var(--wf-radius-sm);
  padding: 8px;
  display: flex;
  flex-wrap: wrap;
  gap: 3px;
  max-height: 130px;
  overflow-y: auto;
  margin-top: 6px;
  box-shadow: var(--wf-shadow);
}

.wfpc-emoji-panel button {
  font-size: 1.15rem;
  width: 32px; height: 32px;
  border: none;
  background: none;
  cursor: pointer;
  border-radius: 6px;
  transition: background .12s, transform .12s;
}

.wfpc-emoji-panel button:hover { background: var(--wf-surface-3); transform: scale(1.22); }


/* ── Zone Média ──────────────────────────────────────────────── */
.wfpc-media-preview {
  width: 100%;
  min-height: 130px;
  max-height: 200px;
  border-radius: var(--wf-radius);
  border: 2px dashed #c7d2fe;
  background: linear-gradient(145deg, #f0f4ff 0%, #faf5ff 100%);
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  margin-bottom: 14px;
  box-sizing: border-box;
  transition: border-color var(--wf-dur), background var(--wf-dur);
  cursor: default;
}

.wfpc-media-preview:hover {
  border-color: var(--wf-primary-light);
  background: linear-gradient(145deg, #ede9fe 0%, #f0f4ff 100%);
}

.wfpc-media-preview img,
.wfpc-media-preview video {
  width: 100%;
  max-height: 198px;
  object-fit: contain;
  display: block;
}

.wfpc-media-placeholder {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  color: var(--wf-muted-light);
  font-size: .78rem;
  font-weight: 500;
}

.wfpc-media-placeholder span { font-size: 2.2rem; opacity: .6; }

.wfpc-media-actions { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 8px; }

.wfpc-media-group {
  display: flex;
  flex-direction: column;
  gap: 5px;
  flex: 1;
  min-width: 120px;
}

.wfpc-media-group-title {
  font-size: .64rem;
  font-weight: 800;
  color: var(--wf-muted);
  text-transform: uppercase;
  letter-spacing: .07em;
}

.wfpc-media-group-row { display: flex; gap: 6px; flex-wrap: wrap; }

/* Slider image */
.wfpc-img-slider-wrap {
  margin-top: 12px;
  padding: 10px 14px;
  background: var(--wf-surface-2);
  border-radius: var(--wf-radius-sm);
  border: 1px solid var(--wf-border-light);
}

.wfpc-img-slider {
  width: 100%;
  accent-color: var(--wf-primary);
  margin-top: 5px;
  cursor: pointer;
}

/* Zone enregistrement */
.wfpc-rec-box {
  background: #080d1a;
  border-radius: var(--wf-radius);
  padding: 16px;
  margin-top: 12px;
  border: 1px solid rgba(255,255,255,.07);
}

.wfpc-rec-top { display: flex; justify-content: space-between; align-items: center; margin-bottom: 10px; }

.wfpc-rec-counter {
  font-size: 1rem;
  font-weight: 800;
  color: #fff;
  font-variant-numeric: tabular-nums;
  letter-spacing: .06em;
  display: flex;
  align-items: center;
  gap: 7px;
}

.wfpc-rec-counter::before {
  content: '';
  width: 7px; height: 7px;
  background: #ef4444;
  border-radius: 50%;
  flex-shrink: 0;
  display: none;
}

.is-recording .wfpc-rec-counter::before {
  display: block;
  animation: wfpc-pulse-rec 1.1s infinite;
}

@keyframes wfpc-pulse-rec {
  0%, 100% { opacity: 1; transform: scale(1); }
  50% { opacity: .3; transform: scale(.75); }
}

.wfpc-rec-limit { font-size: .71rem; color: #f87171; font-weight: 600; }

.wfpc-rec-video {
  width: 100%;
  border-radius: 8px;
  background: #000;
  max-height: 160px;
  object-fit: contain;
  display: block;
}

.wfpc-rec-actions { display: flex; gap: 8px; margin-top: 10px; flex-wrap: wrap; }

/* Checkboxes */
.wfpc-check {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 11px 0;
  cursor: pointer;
  font-size: .84rem;
  font-weight: 600;
  color: var(--wf-text);
  border-bottom: 1px solid var(--wf-border-light);
  transition: color .14s;
}

.wfpc-check:last-of-type { border-bottom: none; }
.wfpc-check:hover { color: var(--wf-primary); }

.wfpc-check input[type=checkbox] {
  width: 18px; height: 18px;
  accent-color: var(--wf-primary);
  cursor: pointer;
  flex-shrink: 0;
  border-radius: 5px;
}

.wfpc-check.is-locked { opacity: .38; cursor: not-allowed; filter: grayscale(.3); }

.wfpc-gb-dates { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; margin: 12px 0; }
.wfpc-gb-dates .wfpc-label { font-size: .64rem; }
.wfpc-gb-dates .wfpc-input { margin-bottom: 0; }

/* Box privée */
.wfpc-private-box {
  background: linear-gradient(145deg, #fff7ed, #fffbeb);
  border: 1.5px solid #fde68a;
  border-radius: var(--wf-radius);
  padding: 16px;
  margin-top: 10px;
}

.wfpc-private-alert {
  color: #b91c1c;
  font-size: .75rem;
  font-weight: 600;
  margin-top: 6px;
  display: none;
  align-items: center;
  gap: 5px;
}

/* Notes */
.wfpc-note {
  font-size: .74rem;
  color: var(--wf-muted);
  line-height: 1.6;
  margin: 6px 0;
  background: var(--wf-surface-2);
  border-left: 3px solid #c7d2fe;
  padding: 8px 12px;
  border-radius: 0 9px 9px 0;
}

/* File inputs cachés */
.wfpc-file { display: none; }


/* ═══════════════════════════════════════════════════════════════
   PANNEAU DROIT — Aperçu + Mes cartes
   ═══════════════════════════════════════════════════════════════ */
.wfpc-right-panel {
  display: flex;
  flex-direction: column;
  gap: 24px;
  position: sticky;
  top: 20px;
}

/* Zone aperçu carte */
.wfpc-preview-card {
  background: var(--wf-grad-hero);
  border-radius: var(--wf-radius-xl);
  padding: 24px 22px 32px;
  position: relative;
  overflow: hidden;
  min-height: 560px;
  display: flex;
  flex-direction: column;
  align-items: stretch;
  box-shadow: var(--wf-shadow-xl);
  border: 1px solid rgba(255,255,255,.05);
}

/* Orbes dans la zone aperçu */
.wfpc-preview-card::before {
  content: '';
  position: absolute;
  top: -90px; right: -70px;
  width: 320px; height: 320px;
  background: radial-gradient(circle, rgba(99,102,241,.24) 0%, transparent 70%);
  pointer-events: none;
}

.wfpc-preview-card::after {
  content: '';
  position: absolute;
  bottom: -50px; left: -30px;
  width: 250px; height: 250px;
  background: radial-gradient(circle, rgba(139,92,246,.14) 0%, transparent 70%);
  pointer-events: none;
}

/* Badge "EN DIRECT" */
.wfpc-preview-label {
  position: absolute;
  top: 16px;
  left: 50%;
  transform: translateX(-50%);
  background: rgba(255,255,255,.07);
  border: 1px solid rgba(255,255,255,.11);
  backdrop-filter: blur(12px);
  color: rgba(255,255,255,.48);
  font-size: .62rem;
  font-weight: 700;
  letter-spacing: .16em;
  text-transform: uppercase;
  padding: 5px 14px;
  border-radius: 99px;
  white-space: nowrap;
  z-index: 10;
  display: flex;
  align-items: center;
  gap: 6px;
}

/* Dot "live" vert */
.wfpc-preview-label::before {
  content: '';
  width: 5px; height: 5px;
  background: #4ade80;
  border-radius: 50%;
  box-shadow: 0 0 6px rgba(74,222,128,.6);
  animation: wfpc-pulse-live 2s infinite;
}

@keyframes wfpc-pulse-live {
  0%, 100% { opacity: 1; box-shadow: 0 0 6px rgba(74,222,128,.6); }
  50% { opacity: .4; box-shadow: none; }
}

/* Conteneur de la carte */
.wfpc-preview-wrap {
  position: relative;
  z-index: 2;
  width: 100%;
  display: flex;
  align-items: flex-start;
  justify-content: center;
  padding-top: 30px;
  min-height: 440px;
}

#wfpcPreviewCard {
  width: 100%;
  max-width: 100%;
  filter: drop-shadow(0 20px 50px rgba(0,0,0,.55));
  transition: all .4s var(--wf-ease);
}

#wfpcPreviewCard:hover {
  filter: drop-shadow(0 28px 60px rgba(0,0,0,.68));
  /* transform retiré : causait la disparition des blocs au survol */
}

#wfpcPreviewCard .card-frame { margin: 0 auto; }
#wfpcPreviewCard .wf-card-stack { display: flex; flex-direction: column; position: relative; }
#wfpcPreviewCard .wf-block { position: relative; }
#wfpcPreviewCard .card-header-overlay {
  position: relative; z-index: 10;
  display: flex; justify-content: space-between;
  padding: 10px 16px; flex-wrap: wrap; gap: 4px;
}

/* Spinner */
.wfpc-preview-spinner {
  display: none;
  position: absolute;
  inset: 0;
  background: rgba(8,13,26,.65);
  z-index: 20;
  align-items: center;
  justify-content: center;
  border-radius: inherit;
  backdrop-filter: blur(4px);
}

.wfpc-preview-spinner.is-loading { display: flex; }

.wfpc-spinner-ring {
  width: 40px; height: 40px;
  border: 3px solid rgba(255,255,255,.1);
  border-top-color: #818cf8;
  border-radius: 50%;
  animation: wfpc-spin .7s linear infinite;
}

@keyframes wfpc-spin { to { transform: rotate(360deg); } }


/* ═══════════════════════════════════════════════════════════════
   MES CARTES / PDFs
   ═══════════════════════════════════════════════════════════════ */
.wfpc-carousel-panel {
  background: var(--wf-surface);
  border-radius: var(--wf-radius-lg);
  box-shadow: var(--wf-shadow);
  border: 1px solid var(--wf-border);
  overflow: hidden;
}

.wfpc-mini { background: var(--wf-surface); }

.wfpc-mini-tabs {
  display: flex;
  padding: 0 20px;
  border-bottom: 1px solid var(--wf-border);
  background: var(--wf-surface-2);
}

.wfpc-mini-tab {
  padding: 12px 18px;
  font-size: .77rem;
  font-weight: 700;
  color: var(--wf-muted);
  border: none;
  background: none;
  cursor: pointer;
  border-bottom: 2.5px solid transparent;
  margin-bottom: -1px;
  transition: all var(--wf-dur);
  font-family: inherit;
  letter-spacing: -.1px;
}

.wfpc-mini-tab:hover { color: var(--wf-text); }
.wfpc-mini-tab.is-on { color: var(--wf-primary); border-bottom-color: var(--wf-primary); }

.wfpc-mini-panel {
  display: none;
  overflow-x: auto;
  scrollbar-width: thin;
  scrollbar-color: #c7d2fe #f8fafc;
}

.wfpc-mini-panel::-webkit-scrollbar { height: 4px; }
.wfpc-mini-panel::-webkit-scrollbar-thumb { background: #c7d2fe; border-radius: 2px; }

.wfpc-mini-panel.is-on {
  display: flex;
  padding: 16px 20px;
  gap: 12px;
  min-height: 120px;
  align-items: flex-start;
}

.wfpc-mini-card { flex-shrink: 0; width: 104px; display: flex; flex-direction: column; gap: 5px; }

.wfpc-mini-prev {
  width: 104px; height: 72px;
  border-radius: 10px;
  overflow: hidden;
  background: var(--wf-surface-3);
  position: relative;
  border: 2px solid var(--wf-border);
  transition: all var(--wf-dur) var(--wf-ease);
  cursor: pointer;
}

.wfpc-mini-prev:hover {
  border-color: var(--wf-primary);
  box-shadow: 0 4px 14px rgba(99,102,241,.25);
  transform: translateY(-2px);
}

.wfpc-mini-prev img,
.wfpc-mini-prev video { width: 100%; height: 100%; object-fit: cover; }

.wfpc-mini-badge {
  position: absolute; inset: 0;
  display: flex; align-items: center; justify-content: center;
  font-size: 1.2rem;
  background: rgba(0,0,0,.3);
  backdrop-filter: blur(2px);
}

.wfpc-mini-meta { font-size: .6rem; color: var(--wf-muted); overflow: hidden; }
.wfpc-mini-ev { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; display: block; font-weight: 700; color: var(--wf-text-2); }

.wfpc-mini-actions { display: flex; gap: 3px; flex-wrap: wrap; }

.wfpc-mini-btn {
  font-size: .6rem;
  padding: 3px 6px;
  border-radius: 6px;
  border: 1px solid var(--wf-border);
  background: var(--wf-surface-2);
  color: var(--wf-muted);
  cursor: pointer;
  text-decoration: none;
  transition: all .14s;
  font-weight: 700;
  font-family: inherit;
}

.wfpc-mini-btn:hover { background: var(--wf-border); color: var(--wf-text); border-color: #cbd5e1; }
.wfpc-mini-btn-danger { border-color: #fca5a5; color: #ef4444; }
.wfpc-mini-btn-danger:hover { background: #fee2e2; border-color: #f87171; }
.wfpc-mini-form { display: inline-flex; }
.wfpc-mini-empty-msg { color: var(--wf-muted); font-size: .79rem; padding: 16px 20px; font-style: italic; }
.wfpc-mini-toggle { display: none; }


/* ═══════════════════════════════════════════════════════════════
   MODALE GALERIE
   ═══════════════════════════════════════════════════════════════ */
.wfpc-modal {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,.82);
  z-index: 9999;
  align-items: center;
  justify-content: center;
  backdrop-filter: blur(6px);
  padding: 20px;
}

.wfpc-modal.is-open { display: flex; animation: wfpc-modal-in .2s var(--wf-ease); }

@keyframes wfpc-modal-in { from { opacity: 0; } to { opacity: 1; } }

.wfpc-modal-card {
  background: var(--wf-surface);
  border-radius: var(--wf-radius-xl);
  width: min(860px, 95vw);
  max-height: 88vh;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  box-shadow: var(--wf-shadow-xl), 0 0 0 1px rgba(0,0,0,.07);
  animation: wfpc-modal-scale .25s var(--wf-ease-spring);
}

@keyframes wfpc-modal-scale {
  from { transform: scale(.93) translateY(10px); opacity: .4; }
  to { transform: scale(1) translateY(0); opacity: 1; }
}

.wfpc-modal-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 18px 24px;
  border-bottom: 1px solid var(--wf-border);
  flex-shrink: 0;
  background: var(--wf-surface-2);
}

.wfpc-modal-title { font-size: .98rem; font-weight: 800; color: var(--wf-text); letter-spacing: -.2px; }

.wfpc-modal-x {
  width: 34px; height: 34px;
  border: none;
  background: var(--wf-surface-3);
  border-radius: 9px;
  cursor: pointer;
  font-size: 1.1rem;
  color: var(--wf-muted);
  display: flex; align-items: center; justify-content: center;
  transition: all .15s;
}

.wfpc-modal-x:hover {
  background: var(--wf-border);
  color: var(--wf-text);
  transform: rotate(90deg);
}

.wfpc-gallery-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(118px, 1fr));
  gap: 10px;
  padding: 20px 24px;
  overflow-y: auto;
  flex: 1;
  scrollbar-width: thin;
  scrollbar-color: #c7d2fe #f8fafc;
}

.wfpc-gallery-item {
  border: 2.5px solid var(--wf-border);
  border-radius: var(--wf-radius-sm);
  overflow: hidden;
  cursor: pointer;
  padding: 0;
  background: none;
  transition: all var(--wf-dur) var(--wf-ease-spring);
  aspect-ratio: 1;
  position: relative;
}

/* Overlay coche au hover */
.wfpc-gallery-item::after {
  content: '✓';
  position: absolute;
  inset: 0;
  background: rgba(99,102,241,.78);
  color: #fff;
  font-size: 1.8rem;
  font-weight: 800;
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  transition: opacity .16s;
  border-radius: calc(var(--wf-radius-sm) - 2px);
}

.wfpc-gallery-item:hover {
  border-color: var(--wf-primary);
  transform: scale(1.05);
  box-shadow: 0 8px 24px rgba(99,102,241,.3);
}

.wfpc-gallery-item:hover::after { opacity: 1; }
.wfpc-gallery-item img { width: 100%; height: 100%; object-fit: cover; display: block; }


/* ═══════════════════════════════════════════════════════════════
   RTL
   ═══════════════════════════════════════════════════════════════ */
.rtl .wfpc-chip-row,
.rtl .wfpc-ev-row,
.rtl .wfpc-media-actions { flex-direction: row-reverse; }

.rtl .wfpc-editor { direction: rtl; text-align: right; }

.rtl .wfpc-note {
  border-left: none;
  border-right: 3px solid #c7d2fe;
  border-radius: 9px 0 0 9px;
}

.rtl .wfpc-section-title::after,
.rtl .wfpc-ev-group-title::after { display: none; }

.rtl .wfpc-section-title::before,
.rtl .wfpc-ev-group-title::before {
  content: '';
  flex: 1;
  height: 1px;
  background: var(--wf-border-light);
}


/* ═══════════════════════════════════════════════════════════════
   RESPONSIVE
   ═══════════════════════════════════════════════════════════════ */

@media (max-width: 1280px) {
  :root { --wf-wizard-w: 440px; }
  .wfpc-main { padding: 26px 26px 60px; gap: 22px; }
  .wfpc-hero-inner { padding: 0 26px; }
}

@media (max-width: 1024px) {
  :root { --wf-wizard-w: 400px; }
  .wfpc-main { padding: 22px 20px 60px; gap: 18px; }
}

@media (max-width: 860px) {
  :root { --wf-wizard-w: 1fr; }

  .wfpc-main {
    grid-template-columns: 1fr;
    padding: 20px 16px 50px;
    gap: 18px;
  }

  .wfpc-wizard-panel { position: static; }

  .wfpc-right-panel {
    position: static;
    order: -1;
  }

  .wfpc-preview-card { min-height: 380px; }
}

@media (max-width: 640px) {
  .wfpc-hero-inner { padding: 0 16px; }
  .wfpc-hero-top { padding: 16px 0 14px; }
  .wfpc-hero-title { font-size: 1.1rem; }
  .wfpc-hero-icon { display: none; }

  .wfpc-pill { padding: 11px 9px 13px; }
  .wfpc-pill-label { display: none; }

  .wfpc-main { padding: 14px 12px 40px; gap: 14px; }

  .wfpc-step { padding: 18px 16px; }
  .wfpc-nav { padding: 13px 16px; }
  .wfpc-progress-wrap { padding: 12px 16px; }
  .wfpc-step-label-bar { padding: 11px 16px; }
  .wfpc-alerts { padding: 0 16px; }

  .wfpc-theme-grid { grid-template-columns: repeat(auto-fill, minmax(70px, 1fr)); gap: 7px; }

  .wfpc-chip { padding: 7px 12px; font-size: .74rem; }

  .wfpc-gb-dates { grid-template-columns: 1fr; }

  .wfpc-preview-card { min-height: 300px; padding: 18px 14px 24px; }

  .wfpc-gallery-grid { grid-template-columns: repeat(auto-fill, minmax(88px, 1fr)); }
}

@media (max-width: 400px) {
  .wfpc-main { padding: 10px 8px 30px; }
  .wfpc-step { padding: 14px 12px; }
  .wfpc-nav { padding: 10px 12px; }
  .wfpc-btn { padding: 10px 14px; font-size: .82rem; }
  .wfpc-btn-primary, .wfpc-btn-save { flex: auto; min-width: 0; }
}


/* ═══════════════════════════════════════════════════════════════
   CORRECTIONS v2 — Ajouts
   ═══════════════════════════════════════════════════════════════ */

/* ── Header nom/date dans la preview — aligné, pas décalé ────── */
.wfpc-preview-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  width: 100%;
  padding: 8px 14px;
  box-sizing: border-box;
  gap: 8px;
  flex-wrap: wrap;
}

.wfpc-preview-recipient {
  font-size: .85rem;
  font-weight: 700;
  color: inherit;
}

.wfpc-preview-date {
  font-size: .78rem;
  color: inherit;
  opacity: .8;
  white-space: nowrap;
}

/* Forcer l'affichage des blocs dans la preview (ne pas disparaître au hover) */
#wfpcPreviewCard .wf-block,
#wfpcPreviewCard .wf-card-stack > *,
#wfpcPreviewCard .wf-render,
#wfpcPreviewCard .card-frame {
  opacity: 1 !important;
  visibility: visible !important;
  pointer-events: none;
}

#wfpcPreviewCard .card-frame {
  margin: 0 auto;
}

#wfpcPreviewCard .wf-card-stack {
  display: flex;
  flex-direction: column;
  position: relative;
}


/* ── Accordéon thèmes (étape 2) ─────────────────────────────── */
.wfpc-tier-accordion {
  border: 1.5px solid var(--wf-border);
  border-radius: var(--wf-radius-sm);
  overflow: hidden;
  margin-bottom: 10px;
  transition: box-shadow var(--wf-dur);
}

.wfpc-tier-accordion.is-open {
  box-shadow: 0 4px 16px rgba(99,102,241,.12);
  border-color: #c7d2fe;
}

.wfpc-tier-head {
  width: 100%;
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 11px 16px;
  border: none;
  background: linear-gradient(135deg, #f8fafc 0%, #f4f3ff 100%);
  cursor: pointer;
  font-family: inherit;
  font-size: .8rem;
  font-weight: 700;
  color: var(--wf-text);
  transition: background var(--wf-dur);
  text-align: left;
}

.wfpc-tier-head:hover {
  background: linear-gradient(135deg, #ede9fe 0%, #e0e7ff 100%);
}

.wfpc-tier-label {
  flex: 1;
  display: flex;
  align-items: center;
  gap: 7px;
}

.wfpc-tier-count {
  font-size: .65rem;
  font-weight: 700;
  color: var(--wf-primary);
  background: rgba(99,102,241,.12);
  padding: 2px 9px;
  border-radius: 99px;
  flex-shrink: 0;
}

.wfpc-tier-arrow {
  font-size: .75rem;
  color: var(--wf-muted);
  transition: transform .22s var(--wf-ease);
  flex-shrink: 0;
}

.wfpc-tier-accordion.is-open .wfpc-tier-arrow {
  transform: rotate(180deg);
}

.wfpc-tier-body {
  display: none;
  padding: 14px;
  background: var(--wf-surface);
  border-top: 1px solid var(--wf-border-light);
}

.wfpc-tier-accordion.is-open .wfpc-tier-body {
  display: block;
}


/* ── Boutons icônes médias (étape 7) ────────────────────────── */
.wfpc-media-actions {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  margin-bottom: 10px;
}

.wfpc-ic-btn {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 5px;
  padding: 12px 14px;
  border-radius: var(--wf-radius-sm);
  border: 2px solid var(--wf-border);
  background: linear-gradient(135deg, #fafbff 0%, #f4f3ff 100%);
  color: var(--wf-text-2);
  font-size: .65rem;
  font-weight: 700;
  cursor: pointer;
  transition: all var(--wf-dur) var(--wf-ease-spring);
  font-family: inherit;
  min-width: 72px;
  flex: 1;
  max-width: 120px;
  box-shadow: var(--wf-shadow-xs);
}

.wfpc-ic-btn i {
  font-size: 1.1rem;
  color: var(--wf-primary);
  transition: color var(--wf-dur);
}

.wfpc-ic-btn span {
  text-align: center;
  line-height: 1.3;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  max-width: 80px;
}

.wfpc-ic-btn:hover:not(.is-locked) {
  border-color: var(--wf-primary);
  background: linear-gradient(135deg, #ede9fe 0%, #e0e7ff 100%);
  transform: translateY(-3px);
  box-shadow: 0 6px 18px rgba(99,102,241,.28);
}

.wfpc-ic-btn:hover:not(.is-locked) i {
  color: var(--wf-primary-dark);
}

.wfpc-ic-btn.is-locked {
  opacity: .6;
  cursor: pointer;
}

.wfpc-ic-btn.is-locked i {
  color: var(--wf-muted);
}


/* ── Barre de contrôles déplacement + taille du média ────────── */
.wfpc-media-ctrl-bar {
  display: none;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
  background: var(--wf-surface-2);
  border: 1.5px solid var(--wf-border);
  border-radius: var(--wf-radius-sm);
  padding: 10px 14px;
  margin-bottom: 12px;
}

.wfpc-mc-group {
  display: flex;
  align-items: center;
  gap: 5px;
}

.wfpc-mc-label {
  font-size: .6rem;
  font-weight: 800;
  color: var(--wf-muted);
  text-transform: uppercase;
  letter-spacing: .06em;
  white-space: nowrap;
  margin-right: 2px;
}

.wfpc-mc-btn {
  width: 32px;
  height: 32px;
  border: 1.5px solid var(--wf-border);
  border-radius: 8px;
  background: var(--wf-surface);
  color: var(--wf-text-2);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: .72rem;
  transition: all .14s;
  flex-shrink: 0;
}

.wfpc-mc-btn:hover {
  background: var(--wf-primary);
  color: #fff;
  border-color: var(--wf-primary);
  transform: scale(1.1);
  box-shadow: 0 3px 10px rgba(99,102,241,.35);
}

.wfpc-mc-btn-danger {
  border-color: #fca5a5;
  color: #ef4444;
}

.wfpc-mc-btn-danger:hover {
  background: #ef4444;
  border-color: #ef4444;
  color: #fff;
}

/* RBAC : items verrouillés — visibles, cliquables, non-disabled */
[data-locked] {
  cursor: pointer !important;
}


/* ── Alerte position fixe (pour RBAC messages) ──────────────── */
#wfpcAlerts {
  padding: 0 24px;
  position: relative;
  z-index: 50;
}


/* ═══════════════════════════════════════════════════════════════
   CORRECTIONS v3
   ═══════════════════════════════════════════════════════════════ */

/* ── Format ROND : header nom/date intégré dans le cercle ────── */
/* Le conteneur .wfpc-round-inner gère le clipping circulaire */
.wfpc-round-inner {
  width: 100%;
  height: 100%;
  display: flex;
  flex-direction: column;
  align-items: center;
  overflow: hidden;
  border-radius: inherit; /* hérite le border-radius du card-frame rond */
}

/* Header spécifique au format rond : centré, compact */
.wfpc-preview-header--round {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  width: 100%;
  padding: 10px 12px 4px;
  box-sizing: border-box;
  text-align: center;
  gap: 2px;
}

.wfpc-preview-header--round .wfpc-preview-recipient {
  font-size: .75rem;
  font-weight: 700;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  max-width: 90%;
}

.wfpc-preview-header--round .wfpc-preview-date {
  font-size: .65rem;
  opacity: .75;
  white-space: nowrap;
}

/* Header standard (portrait / paysage / carré) */
.wfpc-preview-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  width: 100%;
  padding: 8px 14px;
  box-sizing: border-box;
  gap: 8px;
  flex-wrap: wrap;
}

.wfpc-preview-recipient {
  font-size: .85rem;
  font-weight: 700;
}

.wfpc-preview-date {
  font-size: .78rem;
  opacity: .8;
  white-space: nowrap;
}

/* [supprimé] styles media par shape - gérés par JS */

/* Blocs toujours visibles (anti-disparition au hover) */
#wfpcPreviewCard .wf-block,
#wfpcPreviewCard .wf-card-stack > *,
#wfpcPreviewCard .card-frame,
#wfpcPreviewCard .wf-render {
  opacity: 1 !important;
  visibility: visible !important;
  pointer-events: none;
}

/* Hover sans transform (évite la disparition) */
#wfpcPreviewCard:hover {
  filter: drop-shadow(0 28px 60px rgba(0,0,0,.65));
}

/* ══════════════════════════════════════════════════════════════
   PANNEAU TEXTE LONG — hors carte, toujours visible
   Affiché sous la preview quelle que soit la forme de la carte
   ══════════════════════════════════════════════════════════════ */
.wfpc-long-text-panel {
  background: #ffffff;
  border: 1.5px solid #e2e8f0;
  border-radius: 14px;
  padding: 16px 20px;
  margin-top: 14px;
  box-shadow: 0 2px 12px rgba(0,0,0,.07);
  transition: box-shadow .2s;
}

.wfpc-long-text-panel:hover {
  box-shadow: 0 4px 20px rgba(99,102,241,.10);
}

.wfpc-long-text-label {
  font-size: .72rem;
  font-weight: 700;
  letter-spacing: .08em;
  text-transform: uppercase;
  color: #6366f1;
  margin-bottom: 10px;
  display: flex;
  align-items: center;
  gap: 6px;
}

.wfpc-long-text-label i { font-size: .75rem; }

.wfpc-long-text-body {
  color: #1e293b;
  line-height: 1.7;
  font-size: .9rem;
  word-break: break-word;
  white-space: pre-wrap;
}

/* Tooltip enrichis sur les boutons de la toolbar */
.wfpc-tb[title]:hover::after,
.wfpc-ic-btn[title]:hover::after,
.wfpc-mini-btn[title]:hover::after,
.wfpc-mc-btn[title]:hover::after {
  content: attr(title);
  position: absolute;
  bottom: calc(100% + 6px);
  left: 50%;
  transform: translateX(-50%);
  background: #1e293b;
  color: #f1f5f9;
  padding: 4px 10px;
  border-radius: 6px;
  font-size: .72rem;
  font-weight: 500;
  white-space: nowrap;
  pointer-events: none;
  z-index: 9999;
  box-shadow: 0 2px 8px rgba(0,0,0,.25);
  max-width: 220px;
  white-space: normal;
  text-align: center;
}

.wfpc-tb { position: relative; }
.wfpc-ic-btn { position: relative; }
.wfpc-mini-btn { position: relative; }
.wfpc-mc-btn { position: relative; }

/* Miniatures des cartes : s'assurer qu'une illustration est toujours visible */
.wfpc-mini-prev {
  position: relative;
  overflow: hidden;
}

.wfpc-mini-prev img,
.wfpc-mini-prev video {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

/* Amélioration professionnelle : badge sur miniatures */
.wfpc-mini-badge {
  position: absolute;
  bottom: 4px;
  right: 4px;
  font-size: .9rem;
  background: rgba(255,255,255,.85);
  border-radius: 50%;
  width: 22px;
  height: 22px;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 1px 4px rgba(0,0,0,.2);
}

/* ═══════════════════════════════════════════════════════════════
   COMPATIBILITY WITH VIEW_V2
   ═══════════════════════════════════════════════════════════════ */
/* Ensure card frames render consistently in both dashboard_v2 and view_v2 */
.card-frame {
  overflow: hidden;
  display: flex;
  flex-direction: column;
}

.wf-card-stack {
  display: flex;
  flex-direction: column;
  position: relative;
}

.wf-block {
  display: flex;
  flex-direction: column;
  overflow: hidden;
}

.wf-block-short {
  padding: 24px 20px;
  border-bottom: 1px solid var(--wf-border);
}

.wf-block-short:last-child {
  border-bottom: none;
}

.wf-block-content {
  line-height: 1.7;
  word-break: break-word;
  overflow-wrap: break-word;
}

.wf-block-image,
.wf-block-video {
  padding: 12px;
  border-bottom: 1px solid var(--wf-border);
  display: flex;
  justify-content: center;
  align-items: center;
  min-height: 200px;
  max-height: 500px;
  overflow: hidden;
}

.wf-block-image:last-child,
.wf-block-video:last-child {
  border-bottom: none;
}

.wf-img-mover {
  display: inline-flex;
  justify-content: center;
  align-items: center;
  max-width: 100%;
  max-height: 100%;
}

.wf-img-mover img,
.wf-img-mover video {
  width: 100%;
  max-width: 100%;
  height: auto;
  display: block;
  border-radius: 8px;
  object-fit: contain;
}


/* dashboard_v2: chips theme/visibility on mini thumbnails */
.wfpc-mini-chip{position:absolute;top:6px;padding:2px 6px;font-size:10px;line-height:1;border-radius:999px;background:rgba(255,255,255,.9);color:#111827;backdrop-filter:blur(6px);}
.wfpc-mini-chip-left{left:6px;max-width:70px;white-space:nowrap;overflow:hidden;text-overflow:ellipsis;}
.wfpc-mini-chip-right{right:6px;}
.wfpc-mini-chip-right.is-private{background:rgba(255,255,255,.9);}
.wfpc-mini-chip-right.is-public{background:rgba(255,255,255,.9);}

/* ── Override text-transform dans la preview (texte court = tel quel) ── */
/* Assure que le texte court et tout son contenu s'affichent sans majuscule forcée */
#wfpcPreviewCard .wf-block-content,
#wfpcPreviewCard .wf-block-short .wf-block-content,
#wfpcPreviewCard .wf-block-short .wf-block-content *,
#wfpcPreviewCard .wf-static-html,
#wfpcPreviewCard .wf-static-html *,
#wfpcPreviewCard .wf-block-short,
#wfpcPreviewCard .wf-block-short *,
#wfpcPreviewCard p,
#wfpcPreviewCard span {
  text-transform: none !important;
}
