/* ---------- Panels (Cards) ---------- */
.pe-panel {
  background: var(--pe-card);
  border: none;
  border-radius: var(--pe-r);
  box-shadow: var(--pe-nm-flat);
  overflow: hidden;
  transition: box-shadow 0.4s cubic-bezier(0.16, 1, 0.3, 1), transform 0.4s cubic-bezier(0.16, 1, 0.3, 1);
}

.pe-panel:hover {
  box-shadow: var(--pe-nm-flat-hover);
  transform: translateY(-2px);
}

.pe-panel-h {
  padding: 24px 30px 20px;
  font-size: 11px;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 1px;
  color: var(--pe-muted);
  border-bottom: 1px solid var(--pe-line-soft);
  display: flex;
  align-items: center;
  gap: 12px;
}

/* ---------- Top Stepper ---------- */
.pe-stepper {
  background: var(--pe-card);
  border: none;
  border-radius: var(--pe-r);
  box-shadow: var(--pe-nm-flat);
  padding: 28px 32px 24px;
  margin-bottom: 32px;
}

.pe-stepper-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 32px;
  flex-wrap: wrap;
  gap: 16px;
}

.pe-stepper-kicker {
  font-size: 11px;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 1px;
  color: var(--pe-primary);
  background: var(--pe-bg);
  box-shadow: var(--pe-nm-flat-sm);
  padding: 6px 14px;
  border-radius: 999px;
}

.pe-stepper-meta {
  font-size: 15px;
  font-weight: 700;
  color: var(--pe-ink);
}

.pe-stepper-cur {
  color: var(--pe-muted);
  font-weight: 500;
}

.pe-stepper-track {
  display: flex;
  align-items: flex-start;
  overflow-x: auto;
  scrollbar-width: none;
  padding: 10px 0;
}

.pe-stepper-track::-webkit-scrollbar {
  display: none;
}

.pe-step {
  position: relative;
  flex: 1 0 110px;
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  gap: 14px;
}

.pe-step::before {
  content: "";
  position: absolute;
  top: 29px;
  /* Centered with dot */
  left: -50%;
  width: 100%;
  height: 4px;
  background: var(--pe-line);
  z-index: 0;
  border-radius: 2px;
}

.pe-step:first-child::before {
  display: none;
}

.pe-step.is-done::before,
.pe-step.is-current::before {
  background: var(--pe-primary);
}

.pe-step-dot {
  position: relative;
  z-index: 1;
  width: 38px;
  height: 38px;
  border-radius: 50%;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 14px;
  font-weight: 800;
  background: var(--pe-bg);
  color: var(--pe-muted);
  border: none;
  box-shadow: var(--pe-nm-flat-sm);
  transition: all 0.3s cubic-bezier(0.16, 1, 0.3, 1);
}

.pe-step.is-done .pe-step-dot {
  background: var(--pe-primary);
  color: #fff;
  box-shadow: inset 2px 2px 4px rgba(0, 0, 0, 0.2), inset -2px -2px 4px rgba(255, 255, 255, 0.2);
}

.pe-step.is-current .pe-step-dot {
  color: var(--pe-primary);
  background: var(--pe-bg);
  box-shadow: var(--pe-nm-inset-soft), 0 0 0 3px var(--pe-primary-glow);
}

.pe-step-label {
  font-size: 12px;
  font-weight: 600;
  color: var(--pe-muted);
  max-width: 120px;
  line-height: 1.4;
  transition: color 0.3s ease;
}

.pe-step.is-current .pe-step-label {
  color: var(--pe-ink);
  font-weight: 700;
}

.pe-step.is-done .pe-step-label {
  color: var(--pe-muted);
}

/* ---------- Left Sidebar (Extremely Sleek Dark) ---------- */
.pe-sidebar {
  position: sticky;
  top: 32px;
  display: flex;
  flex-direction: column;
  height: calc(100vh - 64px);
  background: var(--pe-card-bg);
  border-radius: var(--pe-r);
  padding: 32px 24px;
  box-shadow: var(--pe-shadow);
  color: var(--pe-ink);
  border: 1px solid var(--pe-border);
}

.pe-sb-head {
  flex: none;
  display: flex;
  align-items: center;
  gap: 16px;
  padding-bottom: 24px;
  margin-bottom: 24px;
  border-bottom: 1px solid var(--pe-border);
}

.pe-sb-logo img {
  width: 48px;
  height: 48px;
  border-radius: 12px;
  border: 1px solid var(--pe-border);
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05);
}

.pe-sb-id {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.pe-sb-name {
  font-size: 18px;
  font-weight: 800;
  letter-spacing: -0.02em;
  color: var(--pe-ink);
  line-height: 1.2;
}

.pe-sb-tagline {
  display: flex;
  align-items: center;
  gap: 8px;
}

.pe-sb-fj {
  font-size: 10px;
  font-weight: 800;
  padding: 4px 10px;
  border-radius: 6px;
  background: var(--pe-bg-input);
  border: 1px solid var(--pe-border);
  color: var(--pe-muted);
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.pe-sb-status {
  font-size: 11px;
  font-weight: 600;
  color: var(--pe-muted);
  display: flex;
  align-items: center;
  gap: 6px;
}

.pe-sb-cards {
  flex: 1;
  overflow-y: auto;
  display: flex;
  flex-direction: column;
  gap: 12px;
  padding: 10px 0;
  scrollbar-width: none;
}

.pe-sb-cards::-webkit-scrollbar {
  display: none;
}

.pe-sb-card {
  padding: 16px;
  border-radius: 16px;
  background: rgba(255, 255, 255, 0.02);
  border: 1px solid rgba(255, 255, 255, 0.04);
  transition: all 0.3s cubic-bezier(0.16, 1, 0.3, 1);
  display: flex;
  flex-direction: column;
  gap: 6px;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.03), 0 4px 12px rgba(0, 0, 0, 0.1);
}

.pe-sb-card:hover {
  background: rgba(255, 255, 255, 0.04);
  border-color: rgba(255, 255, 255, 0.08);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.05), 0 8px 24px rgba(0, 0, 0, 0.15);
}

.pe-avancement-condense {
  margin-bottom: 32px;
}

.pe-ac-body {
  padding: 24px 30px;
  display: flex;
  flex-direction: column;
  gap: 20px;
}

.pe-ac-prog {
  margin: 0;
}

.pe-ac-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 8px;
}

.pe-ac-lbl {
  font-size: 11px;
  font-weight: 800;
  text-transform: uppercase;
  color: var(--pe-muted);
  letter-spacing: 0.5px;
}

.pe-ac-val {
  font-size: 14px;
  font-weight: 800;
}

.pe-ac-bar {
  height: 8px;
  background: var(--pe-bg);
  box-shadow: var(--pe-nm-inset-soft);
  border-radius: 999px;
  overflow: hidden;
  padding: 1px;
}

.pe-ac-bar>span {
  display: block;
  height: 100%;
  border-radius: 999px;
  transition: width 1s ease-out;
}

.pe-bar-dec>span {
  background: var(--pe-green);
  box-shadow: 0 0 6px rgba(16, 185, 129, 0.2);
}

.pe-bar-exe>span {
  background: var(--pe-primary);
  box-shadow: 0 0 6px rgba(79, 70, 229, 0.2);
}

.pe-sb-card.is-hi {
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid rgba(79, 70, 229, 0.4);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.05), 0 8px 24px rgba(0, 0, 0, 0.15);
}

.pe-sb-l {
  font-size: 10px;
  font-weight: 800;
  letter-spacing: 1px;
  text-transform: uppercase;
  color: #64748b;
}

.pe-sb-v {
  font-size: 14px;
  font-weight: 500;
  color: #e2e8f0;
  display: flex;
  align-items: center;
  gap: 10px;
  line-height: 1.5;
}

.pe-sb-list,
.pe-sb-assoc {
  margin: 6px 0 0;
  padding: 0;
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.pe-sb-list li {
  font-size: 13.5px;
  font-weight: 500;
  color: #cbd5e1;
  display: flex;
  align-items: center;
  gap: 10px;
}

.pe-sb-assoc li {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 6px 0;
  border-bottom: 1px solid rgba(255, 255, 255, 0.03);
}

.pe-sb-assoc li:last-child {
  border-bottom: none;
}

.pe-sb-assoc-role {
  font-size: 10px;
  font-weight: 700;
  color: #64748b;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.pe-sb-assoc-name {
  font-size: 13px;
  font-weight: 600;
  color: #e2e8f0;
  display: flex;
  align-items: center;
  gap: 8px;
}

/* Dots */
.pe-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  flex: none;
}

.pe-m-decide,
.pe-m-fait {
  background: var(--pe-green);
}

.pe-m-discussion {
  background: var(--pe-orange);
}

.pe-m-encours {
  background: var(--pe-blue);
}

.pe-m-avenir {
  background: #475569;
}

/* ---------- Center: Segmented Tabs ---------- */
.pe-tabs-wrapper {
  position: sticky;
  top: 30px;
  z-index: 10;
  margin-bottom: 24px;
  display: flex;
  align-items: center;
  gap: 16px;
  background: var(--pe-bg);
  padding: 12px 0;
  margin-top: -12px;
}



.pe-tabs {
  flex: 1;
  display: flex;
  align-items: center;
  background: var(--pe-bg);
  padding: 8px;
  border-radius: 20px;
  gap: 12px;
  box-shadow: var(--pe-nm-inset);
  border: none;
}

.pe-tab {
  flex: 1;
  background: transparent;
  border: none;
  padding: 14px 20px;
  border-radius: 12px;
  font-family: inherit;
  color: var(--pe-muted);
  cursor: pointer;
  transition: all 0.3s cubic-bezier(0.16, 1, 0.3, 1);
}

.pe-tab:hover {
  color: var(--pe-ink);
}

.pe-tab.active {
  background: var(--pe-sb-bg);
  color: #ffffff;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.05), 0 4px 12px rgba(0, 0, 0, 0.2);
}

.pe-tab.active:hover {
  color: #ffffff;
}

.pe-tab-content {
  display: flex;
  flex-direction: row;
  align-items: center;
  justify-content: center;
  gap: 8px;
}

.pe-tab-lbl {
  font-size: 14px;
  font-weight: 700;
}

.pe-tab-prog {
  font-size: 12px;
  font-weight: 800;
  color: var(--pe-muted);
  background: var(--pe-bg);
  box-shadow: var(--pe-nm-inset-soft);
  padding: 2px 8px;
  border-radius: 999px;
  direction: ltr;
  display: inline-flex;
}

.pe-tab.active .pe-tab-prog {
  color: #94a3b8;
  background: #1c2639;
  box-shadow: inset 2px 2px 4px #070a10;
}

/* ---------- Accordions (Steps) ---------- */
.pe-section {
  display: flex;
  flex-direction: column;
  gap: 20px;
}

.pe-empty {
  text-align: center;
  padding: 60px 20px;
  color: var(--pe-muted);
  font-size: 15px;
  box-shadow: var(--pe-nm-inset);
  border-radius: var(--pe-r);
}

.pe-acc {
  background: var(--pe-card);
  border: 1.5px solid transparent;
  border-radius: var(--pe-r-sm);
  box-shadow: var(--pe-nm-flat-sm);
  transition: all 0.4s cubic-bezier(0.16, 1, 0.3, 1);
  animation: fadeInUp 0.5s ease-out forwards;
  opacity: 0;
}

.pe-acc:nth-child(1) {
  animation-delay: 0.05s;
}

.pe-acc:nth-child(2) {
  animation-delay: 0.10s;
}

.pe-acc:nth-child(3) {
  animation-delay: 0.15s;
}

.pe-acc:nth-child(4) {
  animation-delay: 0.20s;
}

.pe-acc:hover {
  box-shadow: var(--pe-nm-flat);
  transform: translateY(-2px);
}

.pe-acc[open] {
  background: #ffffff;
  border-color: var(--pe-primary);
  box-shadow: var(--pe-nm-inset);
}

.pe-acc[open]:hover {
  transform: none;
  box-shadow: var(--pe-nm-inset);
}

.pe-acc>summary {
  list-style: none;
  cursor: pointer;
  padding: 24px 30px;
  display: flex;
  align-items: center;
  gap: 20px;
}

.pe-acc>summary::-webkit-details-marker {
  display: none;
}

.pe-num {
  font-size: 13px;
  font-weight: 800;
  color: var(--pe-muted);
  min-width: 32px;
  height: 32px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--pe-bg);
  box-shadow: var(--pe-nm-inset-soft);
  border-radius: 8px;
  transition: all 0.3s ease;
}

.pe-acc[open] .pe-num {
  box-shadow: var(--pe-nm-flat-sm);
  color: var(--pe-primary);
}

.pe-ctitle {
  flex: 1;
  font-family: 'Cairo', sans-serif;
  font-size: 16px;
  font-weight: 700;
  color: var(--pe-ink);
}

.pe-cresume {
  display: block;
  font-size: 13.5px;
  font-weight: 500;
  color: var(--pe-muted);
  margin-top: 4px;
}

.pe-badges {
  display: flex;
  flex-direction: column;
  align-items: stretch;
  gap: 6px;
  flex-shrink: 0;
}

.pe-chev {
  color: var(--pe-muted);
  font-size: 20px;
  transition: transform 0.3s ease;
}

.pe-acc[open] .pe-chev {
  transform: rotate(90deg);
  color: var(--pe-ink);
}

/* Badges */
.pe-badge {
  font-size: 12px;
  font-weight: 700;
  padding: 4px 12px;
  border-radius: 6px;
  display: flex;
  align-items: center;
  gap: 6px;
  background: var(--pe-bg);
  color: var(--pe-muted);
  border: none;
  box-shadow: var(--pe-nm-flat-sm);
}

.pe-badge::before {
  content: "";
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: currentColor;
}

.pe-s-decide,
.pe-e-fait {
  color: var(--pe-green);
}

.pe-s-discussion {
  color: var(--pe-orange);
}

.pe-e-encours {
  color: var(--pe-blue);
}

.pe-tag {
  font-size: 10px;
  font-weight: 800;
  padding: 2px 8px;
  border-radius: 4px;
  background: var(--pe-bg);
  box-shadow: var(--pe-nm-inset-soft);
  color: var(--pe-primary);
  margin-left: 12px;
  vertical-align: middle;
}

.pe-tag-warn {
  color: #ef4444;
}

.pe-tag-new {
  color: #d946ef;
}

/* Accordion Body */
.pe-acc-body {
  padding: 0 30px 30px 84px;
}

.pe-acc-body ul {
  margin: 0;
  padding-left: 20px;
}

.pe-acc-body li {
  font-size: 14.5px;
  color: var(--pe-ink-soft);
  margin: 8px 0;
}

.pe-boxes-row {
  display: flex;
  gap: 24px;
  margin-top: 24px;
}

@media(max-width:768px) {
  .pe-boxes-row {
    flex-direction: column;
    gap: 16px;
  }
}

.pe-box {
  flex: 1;
  padding: 28px;
  border-radius: 20px;
  background: var(--pe-bg);
  border: none;
  box-shadow: var(--pe-nm-inset-soft);
  transition: box-shadow 0.3s cubic-bezier(0.16, 1, 0.3, 1);
  display: flex;
  flex-direction: column;
  text-align: start !important;
}

.pe-box:hover {
  box-shadow: var(--pe-nm-inset);
}

.pe-box h5 {
  margin: 0 0 16px;
  font-family: 'Cairo', sans-serif;
  font-size: 13.5px;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.8px;
  display: flex;
  align-items: center;
  gap: 8px;
}

.pe-svg-h-icon {
  width: 16px;
  height: 16px;
  stroke-width: 2.5px;
  flex: none;
}

.pe-section-title {
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 1px;
  color: var(--pe-slate);
  margin: 0 0 16px 0;
  font-weight: 700;
  border-bottom: 1px solid rgba(15, 23, 42, 0.06);
  padding-bottom: 8px;
}

.pe-box-info h5 {
  color: var(--pe-blue);
}

.pe-box-dec h5 {
  color: var(--pe-green);
}

.pe-box-ver h5 {
  color: var(--pe-orange);
}

/* Custom list items inside boxes */
.pe-box-info ul,
.pe-box-dec ul,
.pe-box-ver ul,
ul.pe-info-list {
  list-style: none !important;
  padding-inline-start: 0 !important;
  padding: 0 !important;
  margin: 0 !important;
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.pe-box-info li {
  font-size: 14px;
  line-height: 1.5;
  color: var(--pe-ink-soft);
  padding: 0 !important;
  margin: 0 !important;
  list-style: none !important;
}

.pe-badge-inline {
  display: inline-block;
  padding: 2px 6px;
  border-radius: 4px;
  font-size: 10px;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  margin-inline-end: 6px;
  vertical-align: middle;
}

.pe-bg-blue {
  background: rgba(59, 130, 246, 0.1);
  color: var(--pe-blue);
}

.pe-bg-green {
  background: rgba(34, 197, 94, 0.1);
  color: var(--pe-green);
}

.pe-bg-yellow {
  background: rgba(245, 158, 11, 0.1);
  color: var(--pe-orange);
}

.pe-bg-red {
  background: rgba(239, 68, 68, 0.1);
  color: var(--pe-red);
}

@media(min-width: 1024px) {
  .pe-boxes-row.pe-boxes-3-cols .pe-box {
    flex: 1 1 calc(33.333% - 16px) !important;
  }
}

.pe-status-select {
  appearance: none;
  background: var(--pe-slate-light);
  border: 1px solid rgba(15, 23, 42, 0.1);
  border-radius: 9999px;
  padding: 4px 28px 4px 12px;
  font-size: 11px;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  color: var(--pe-slate);
  cursor: pointer;
  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='currentColor' stroke-width='3' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpolyline points='6 9 12 15 18 9'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 10px center;
  transition: all 0.2s ease;
  font-family: 'Cairo', sans-serif !important;
}

.pe-status-select[data-val="decide"] {
  background-color: rgba(34, 197, 94, 0.15) !important;
  color: var(--pe-green) !important;
  border-color: transparent;
}

.pe-status-select[data-val="discussion"] {
  background-color: rgba(245, 158, 11, 0.15) !important;
  color: var(--pe-orange) !important;
  border-color: transparent;
}

.pe-status-select[data-val="avenir"],
.pe-status-select[data-val=""] {
  background-color: var(--pe-slate-light) !important;
  color: var(--pe-slate) !important;
  border-color: transparent;
}

.pe-status-select:hover {
  filter: brightness(0.95);
}

.pe-status-select:focus {
  outline: none;
  box-shadow: 0 0 0 2px rgba(59, 130, 246, 0.2);
}

.pe-box-dec li,
.pe-box-ver li {
  position: relative;
  padding-inline-start: 24px;
  font-size: 14px;
  font-weight: 500;
  color: var(--pe-ink-soft);
  line-height: 1.5;
}

.pe-box-dec li::before {
  content: "â—‹";
  position: absolute;
  inset-inline-start: 0;
  top: 1px;
  color: var(--pe-green);
  font-weight: 800;
  font-size: 16px;
}

.pe-box-ver li::before {
  content: "?";
  position: absolute;
  inset-inline-start: 0;
  top: 1px;
  color: var(--pe-orange);
  font-weight: 800;
  font-size: 15px;
}

/* Editable lists */
.pe-editable-list {
  outline: none;
  min-height: 24px;
}

.pe-editable-list:focus {
  background: rgba(15, 23, 42, 0.02);
  border-radius: 8px;
  padding: 8px;
  margin: -8px;
}

.pe-editable-list:empty::before {
  content: "Cliquez pour ajouter des Ã©lÃ©ments...";
  color: var(--pe-ink-soft);
  font-style: italic;
  font-size: 13.5px;
  cursor: text;
}

/* ---------- Right Column: Advancement ---------- */
.pe-avancement-bar {
  margin-bottom: 32px;
}

.pe-prog {
  padding: 24px 30px;
  border-bottom: 1px solid var(--pe-line-soft);
}

.pe-pl {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 12px;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  color: var(--pe-muted);
  margin-bottom: 16px;
}

.pe-pv {
  font-size: 16px;
  font-weight: 800;
  color: var(--pe-ink);
}

.pe-bar {
  height: 8px;
  background: var(--pe-bg);
  box-shadow: var(--pe-nm-inset-soft);
  border-radius: 999px;
  overflow: hidden;
  padding: 1px;
}

.pe-bar>span {
  display: block;
  height: 100%;
  border-radius: 999px;
  background: var(--pe-primary);
  animation: progressLoad 1s ease-out;
}

.pe-bar-dec>span {
  background: var(--pe-green);
}

/* Stats Grid */
.pe-stat-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
}

.pe-stat-cell {
  padding: 32px 20px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  border-bottom: 1px solid var(--pe-line-soft);
}

.pe-stat-cell:nth-child(odd) {
  border-right: 1px solid var(--pe-line-soft);
}

.pe-stat-n {
  font-size: 32px;
  font-weight: 800;
  line-height: 1;
  color: var(--pe-ink);
}

.pe-stat-l {
  font-size: 10px;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 1px;
  color: var(--pe-muted);
}

/* ---------- Overview & Notes ---------- */
.pe-note-panel {
  display: flex;
  flex-direction: column;
}

.pe-overview {
  padding: 20px 30px;
  border-bottom: 1px solid var(--pe-line-soft);
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.pe-ov-row {
  display: flex;
  align-items: center;
  gap: 16px;
}

.pe-ov-ico {
  font-size: 18px;
}

.pe-ov-lbl {
  flex: 1;
  font-size: 14px;
  font-weight: 600;
  color: var(--pe-ink-soft);
}

.pe-ov-val {
  font-size: 14px;
  font-weight: 700;
  color: var(--pe-muted);
}

.pe-note-wrap {
  padding: 20px;
  display: flex;
  flex-direction: column;
  gap: 16px;
  flex: 1;
}

.pe-note-lbl {
  font-size: 11px;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 1px;
  color: var(--pe-muted);
}

.pe-note-area {
  flex: 1;
  min-height: 200px;
  resize: vertical;
  border: none;
  border-radius: 12px;
  padding: 16px;
  font-family: inherit;
  font-size: 14px;
  color: var(--pe-ink);
  background: var(--pe-bg);
  box-shadow: var(--pe-nm-inset);
  outline: none;
  transition: all 0.3s cubic-bezier(0.16, 1, 0.3, 1);
}

.pe-note-area:focus {
  background: var(--pe-bg);
  box-shadow: var(--pe-nm-inset), 0 0 0 2px var(--pe-primary-glow);
}

.pe-note-saved {
  font-size: 12px;
  font-weight: 700;
  color: var(--pe-green);
  opacity: 0;
  align-self: flex-end;
}

.pe-note-saved.pe-saved-visible {
  opacity: 1;
}

.pe-foot {
  margin-top: 48px;
  text-align: center;
  font-size: 13px;
  font-weight: 600;
  color: var(--pe-muted);
}

@media(max-width:1100px) {
  .pe-layout {
    grid-template-columns: 1fr;
  }

  /* Les onglets repassent en une colonne ; la zone contextuelle se place sous les accordÃ©ons. */
  .pe-tabgrid {
    grid-template-columns: 1fr;
  }

  .pe-ctx-col {
    position: static;
  }
}

/* Mobile Header and Drawer */
.pe-drawer-close {
  display: none;
}

.pe-mobile-header {
  display: none;
}

.pe-drawer-overlay {
  display: none;
}

@media(max-width:980px) {

  html,
  body {
    max-width: 100vw;
    overflow-x: hidden;
  }

  .pe-app,
  .pe-app.pe-rtl {
    padding: 0;
  }

  .pe-mobile-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 16px 20px;
    background: var(--pe-card);
    border-bottom: 1px solid var(--pe-border);
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    box-sizing: border-box;
    z-index: 200;
  }

  .pe-mh-logo {
    display: flex;
    align-items: center;
    gap: 12px;
  }

  .pe-mh-logo img {
    width: 32px;
    height: 32px;
    border-radius: 8px;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.05);
  }

  .pe-mh-title {
    font-weight: 800;
    font-size: 16px;
    color: var(--pe-ink);
  }

  .pe-mh-toggle {
    background: transparent;
    border: none;
    font-size: 20px;
    color: var(--pe-ink);
    cursor: pointer;
    padding: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
  }

  .pe-shell {
    display: block;
    padding: 80px 16px 16px 16px;
    width: 100%;
    box-sizing: border-box;
    overflow-x: hidden;
  }

  .pe-main {
    grid-column: auto;
    grid-row: auto;
  }

  /* DRAWER SIDEBAR */
  .pe-col-left {
    position: fixed !important;
    top: 0 !important;
    right: -100% !important;
    left: auto !important;
    width: 320px !important;
    height: 100vh !important;
    background: var(--pe-bg) !important;
    z-index: 300 !important;
    transition: right 0.3s cubic-bezier(0.16, 1, 0.3, 1) !important;
    overflow: hidden !important;
    display: flex !important;
    flex-direction: column !important;
    padding: 24px !important;
    box-shadow: -4px 0 24px rgba(0, 0, 0, 0.1) !important;
    border-radius: 0 !important;
    border: none !important;
  }

  .pe-app.is-drawer-open .pe-col-left {
    right: 0 !important;
  }

  /* DRAWER OVERLAY */
  .pe-drawer-overlay {
    display: block;
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    background: rgba(15, 23, 42, 0.4);
    z-index: 250;
    backdrop-filter: blur(2px);
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.3s ease;
  }

  .pe-app.is-drawer-open .pe-drawer-overlay {
    opacity: 1;
    pointer-events: auto;
  }

  .pe-drawer-close {
    display: flex;
    align-items: center;
    justify-content: center;
    position: absolute;
    top: 36px;
    right: 36px;
    width: 32px;
    height: 32px;
    border-radius: 50%;
    background: var(--pe-bg);
    border: none;
    font-size: 18px;
    color: var(--pe-ink);
    cursor: pointer;
    z-index: 10;
    transition: background 0.2s;
  }

  .pe-drawer-close:hover {
    background: rgba(0, 0, 0, 0.1);
  }


  .pe-sidebar,
  .pe-col-left .pe-sidebar {
    top: 0;
    max-height: none;
    height: auto;
    min-height: 0;
    flex: 1 1 auto;
    display: flex;
    flex-direction: column;
    border: none;
    box-shadow: none;
    background: transparent;
    padding: 0;
  }

  .pe-ws-header {
    flex-direction: row;
    flex-wrap: wrap;
    align-items: flex-start;
    gap: 12px;
  }

  .pe-ws-head-text {
    flex: 1;
    min-width: 200px;
  }

  .pe-ws-header .pe-btn-secondary,
  .pe-ws-header .pe-add-btn,
  .pe-ws-header button {
    width: 100%;
    justify-content: center;
  }

  .pe-wizard-stepper-row {
    flex-wrap: wrap;
    gap: 12px;
  }

  .pe-intake-card-summary {
    flex-wrap: wrap;
    gap: 12px;
  }

  .pe-intake-card-title {
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    min-width: 0;
    flex: 1;
  }
}

/* ---------- Language Switcher ---------- */
.pe-lang-switcher {
  display: inline-flex;
  gap: 4px;
  background: rgba(0, 0, 0, 0.04);
  padding: 3px;
  border-radius: 8px;
  border: 1px solid rgba(0, 0, 0, 0.03);
  margin-top: 32px;
}

.pe-lang-item {
  text-align: center;
  font-size: 9px;
  font-weight: 800;
  text-decoration: none;
  color: var(--pe-muted);
  padding: 4px 8px;
  border-radius: 6px;
  transition: all 0.3s cubic-bezier(0.16, 1, 0.3, 1);
}

.pe-lang-item:hover {
  color: var(--pe-ink);
}

.pe-lang-item.is-active {
  background: #ffffff;
  color: var(--pe-primary);
  box-shadow: var(--pe-nm-flat-sm);
}

/* ---------- RTL (Arabic) Support ---------- */
.pe-rtl {
  direction: rtl;
  text-align: right;
}

.pe-rtl .pe-sb-tagline {
  justify-content: flex-start;
}

.pe-rtl .pe-sb-fj {
  margin-right: 0;
  margin-left: 12px;
}

.pe-rtl .pe-sb-status {
  margin-left: 0;
  margin-right: auto;
}

.pe-rtl .pe-sb-name {
  text-align: right;
}

.pe-rtl .pe-tab-lbl {
  text-align: right;
}

.pe-rtl .pe-note-lbl {
  text-align: right;
}

.pe-rtl .pe-chev {
  transform: scaleX(-1);
}

.pe-rtl .pe-acc[open] .pe-chev {
  transform: rotate(-90deg) scaleX(-1);
}

.pe-rtl .pe-acc-body {
  text-align: right;
  padding: 0 84px 30px 30px;
}

.pe-rtl .pe-acc-body ul {
  padding-right: 20px;
  padding-left: 0;
}

.pe-rtl .pe-tag {
  margin-right: 12px;
  margin-left: 0;
}

.pe-rtl .pe-sb-card {
  text-align: right;
}

.pe-rtl .pe-sb-l {
  text-align: right;
}

.pe-rtl .pe-sb-v {
  text-align: right;
}

.pe-rtl .pe-sb-list li .pe-dot {
  margin-left: 8px;
  margin-right: 0;
}

.pe-rtl .pe-sb-assoc li .pe-dot {
  margin-left: 8px;
  margin-right: 0;
}

/* ---------- Ã‰dition Interactive & Hover States ---------- */
.pe-editable-text {
  cursor: pointer;
  display: inline-block;
  padding: 1px 4px;
  margin: -1px -4px;
  border-radius: 4px;
  transition: all 0.2s ease;
  min-width: 15px;
}

.pe-editable-text:hover {
  background: rgba(255, 255, 255, 0.12);
  color: #ffffff;
}

/* Pour le header blanc / clair */
.pe-sb-name .pe-editable-text:hover,
.pe-sb-fj .pe-editable-text:hover {
  background: rgba(15, 23, 42, 0.06);
  color: var(--pe-ink);
}

/* Inputs de formulaires inline */
.pe-inline-input {
  background: transparent !important;
  border: none !important;
  outline: none !important;
  padding: 0 !important;
  margin: 0 !important;
  width: 100%;
  color: var(--pe-ink) !important;
  font-family: inherit !important;
  font-size: inherit !important;
  font-weight: inherit !important;
  letter-spacing: inherit !important;
  text-align: inherit !important;
  box-shadow: none !important;
}

/* Curseur pointer pour les pastilles de statut cliquables */
[data-field="status"] {
  cursor: pointer;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

[data-field="status"]:hover {
  transform: scale(1.25);
  box-shadow: 0 0 6px rgba(255, 255, 255, 0.6);
}

/* Hover overlay pour le Logo */
.pe-sb-logo {
  cursor: pointer;
  position: relative;
  display: inline-block;
  border-radius: 12px;
  overflow: hidden;
}

.pe-sb-logo::after {
  content: "âœ ï¸ ";
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(15, 23, 42, 0.7);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 14px;
  color: #ffffff;
  opacity: 0;
  transition: opacity 0.25s ease;
  pointer-events: none;
}

.pe-sb-logo:hover::after {
  opacity: 1;
}

/* ---------- Rich Visual Checklist Items ---------- */
.pe-rich-list {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 20px;
  margin: 20px 0 !important;
  padding: 0 !important;
  list-style: none !important;
}

@media(max-width: 900px) {
  .pe-rich-list {
    grid-template-columns: 1fr;
  }
}

.pe-rich-item {
  position: relative;
  display: flex;
  flex-direction: column;
  padding: 20px;
  border-radius: 20px;
  background: #ffffff;
  border: 1px solid rgba(15, 23, 42, 0.06);
  box-shadow: var(--pe-nm-flat-sm);
  transition: all 0.3s cubic-bezier(0.16, 1, 0.3, 1);
  gap: 12px;
  text-align: start !important;
}

.pe-rich-item:hover {
  transform: translateY(-4px);
  box-shadow: var(--pe-nm-flat);
}

.pe-rich-item.pe-rich-green {
  background: linear-gradient(180deg, rgba(16, 185, 129, 0.02) 0%, rgba(255, 255, 255, 1) 100%);
}

.pe-rich-item.pe-rich-yellow {
  background: linear-gradient(180deg, rgba(245, 158, 11, 0.02) 0%, rgba(255, 255, 255, 1) 100%);
}

.pe-rich-item.pe-rich-red {
  background: linear-gradient(180deg, rgba(239, 68, 68, 0.02) 0%, rgba(255, 255, 255, 1) 100%);
}

.pe-rich-item.pe-rich-blue {
  background: linear-gradient(180deg, rgba(59, 130, 246, 0.02) 0%, rgba(255, 255, 255, 1) 100%);
}

.pe-rich-icon-wrap {
  width: 38px;
  height: 38px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  flex: none;
  box-shadow: var(--pe-nm-inset-soft);
}

.pe-rich-green .pe-rich-icon-wrap {
  background: rgba(16, 185, 129, 0.08);
}

.pe-rich-green .pe-svg-icon {
  color: var(--pe-green);
}

.pe-rich-yellow .pe-rich-icon-wrap {
  background: rgba(245, 158, 11, 0.08);
}

.pe-rich-yellow .pe-svg-icon {
  color: var(--pe-orange);
}

.pe-rich-red .pe-rich-icon-wrap {
  background: rgba(239, 68, 68, 0.08);
}

.pe-rich-red .pe-svg-icon {
  color: #ef4444;
}

.pe-rich-blue .pe-rich-icon-wrap {
  background: rgba(59, 130, 246, 0.08);
}

.pe-rich-blue .pe-svg-icon {
  color: var(--pe-blue);
}

.pe-rich-header {
  display: flex;
  align-items: center;
  gap: 12px;
  width: 100%;
}

.pe-rich-title-wrap {
  flex: 1;
  min-width: 0;
}

.pe-rich-badge {
  font-size: 9px;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  padding: 4px 8px;
  border-radius: 6px;
  margin-inline-start: auto;
  line-height: 1;
  flex: none;
}

.pe-rich-green .pe-rich-badge {
  background: rgba(16, 185, 129, 0.12);
  color: #065f46;
}

.pe-rich-yellow .pe-rich-badge {
  background: rgba(245, 158, 11, 0.12);
  color: #92400e;
}

.pe-rich-red .pe-rich-badge {
  background: rgba(239, 68, 68, 0.12);
  color: #991b1b;
}

.pe-rich-blue .pe-rich-badge {
  background: rgba(59, 130, 246, 0.12);
  color: #075985;
}

.pe-rich-title {
  font-size: 14px;
  font-weight: 800;
  color: var(--pe-ink);
  letter-spacing: -0.01em;
  line-height: 1.3;
}

.pe-rich-desc {
  font-size: 13.5px;
  font-weight: 500;
  color: var(--pe-ink-soft);
  line-height: 1.6;
}
