body.project-modal-open {
  overflow: hidden;
}

.project-page-modern {
  display: flex;
  flex-direction: column;
  gap: 22px;
}

.project-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 18px;
  flex-wrap: wrap;
}

.project-header h1 {
  margin: 0;
  color: #fff;
  font-size: clamp(1.5rem, 1.15rem + 1.4vw, 2.25rem);
  font-weight: 700;
  letter-spacing: -0.03em;
  line-height: 1.15;
}

.project-header-actions {
  display: flex;
  gap: 10px;
  align-items: center;
  flex-wrap: wrap;
}

/* Hauteur unique : Pyromap (logo lisible) + Enregistrer alignés */
.project-header-actions .action-btn {
  min-height: 54px;
  box-sizing: border-box;
  align-items: center;
}

.project-header-actions .action-btn-primary {
  padding: 0 24px;
  font-size: 14px;
}

.action-btn {
  appearance: none;
  border-radius: 14px;
  padding: 11px 16px;
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  transition: 0.2s ease;
  backdrop-filter: blur(10px);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: none;
  text-decoration: none;
}

.btn-inline-icon {
  width: 16px;
  height: 16px;
  margin-right: 6px;
  fill: none;
  stroke: currentColor;
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.action-btn:hover {
  transform: translateY(-1px);
}

.action-btn-soft {
  border: 1px solid rgba(255, 255, 255, 0.08);
  background: rgba(255, 255, 255, 0.06);
  color: #fff;
}

.action-btn-soft:hover {
  background: rgba(255, 255, 255, 0.1);
  border-color: rgba(255, 255, 255, 0.16);
}

.action-btn-pyromap {
  padding: 0 18px;
  height: 54px;
  min-height: 54px;
  border-color: rgba(147, 197, 253, 0.36);
  background: linear-gradient(180deg, rgba(15, 33, 66, 0.86), rgba(9, 25, 52, 0.82));
}

.action-btn-pyromap:hover {
  border-color: rgba(147, 197, 253, 0.52);
  background: linear-gradient(180deg, rgba(20, 45, 86, 0.92), rgba(11, 31, 62, 0.9));
}

.action-btn-pyromap__logo {
  display: block;
  width: auto;
  max-width: 152px;
  max-height: 36px;
  height: auto;
  object-fit: contain;
}

.action-btn-primary {
  border: 1px solid rgba(236, 72, 153, 0.35);
  background: linear-gradient(135deg, rgba(236, 72, 153, 0.24), rgba(139, 92, 246, 0.24));
  color: #fff;
  box-shadow: 0 10px 25px rgba(236, 72, 153, 0.15);
}

.action-btn-primary:hover {
  box-shadow: 0 14px 28px rgba(236, 72, 153, 0.18);
}

.project-layout-modern {
  display: grid;
  grid-template-columns: minmax(0, 2fr) minmax(340px, 0.95fr);
  gap: 22px;
  align-items: start;
}

.project-main-column {
  display: flex;
  flex-direction: column;
  gap: 22px;
}

.project-fixed-overview {
  position: static;
  top: auto;
  z-index: auto;
  border: 1px solid rgba(255, 255, 255, 0.14);
  background:
    radial-gradient(120% 120% at 0% 0%, rgba(236, 72, 153, 0.1), transparent 42%),
    radial-gradient(120% 120% at 100% 0%, rgba(59, 130, 246, 0.08), transparent 42%),
    rgba(8, 12, 24, 0.95);
  box-shadow: 0 18px 42px rgba(0, 0, 0, 0.34);
}

.project-fixed-overview-head {
  display: flex;
  flex-direction: column;
  gap: 6px;
  margin-bottom: 16px;
}

.project-fixed-overview-head h2 {
  margin: 0;
  color: #fff;
  font-size: 18px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.02em;
}

.project-fixed-overview .project-info-grid {
  margin-bottom: 14px;
}

.settings-panel {
  padding: 0;
  overflow: hidden;
  border: 1px solid rgba(255, 255, 255, 0.08);
  background: rgba(255, 255, 255, 0.03);
}

.settings-panel-summary {
  list-style: none;
  cursor: pointer;
  display: flex;
  align-items: flex-start;
  gap: 14px;
  padding: 20px 22px;
  user-select: none;
  transition: background 0.2s ease;
}

.settings-panel-summary::-webkit-details-marker {
  display: none;
}

.settings-panel-summary:hover {
  background: rgba(255, 255, 255, 0.04);
}

.settings-panel-meta {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.settings-panel-title {
  font-size: 17px;
  font-weight: 700;
  color: #fff;
  letter-spacing: -0.02em;
}

.settings-panel-desc {
  font-size: 13px;
  line-height: 1.45;
  color: rgba(255, 255, 255, 0.55);
}

.settings-panel-icon {
  flex-shrink: 0;
  width: 36px;
  height: 36px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 12px;
  font-size: 15px;
  color: rgba(236, 72, 153, 0.95);
  background: rgba(236, 72, 153, 0.12);
  border: 1px solid rgba(236, 72, 153, 0.22);
}

.settings-panel-icon svg {
  width: 18px;
  height: 18px;
  fill: none;
  stroke: currentColor;
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.settings-panel-chevron {
  flex-shrink: 0;
  width: 28px;
  height: 28px;
  margin-top: 2px;
  border-radius: 10px;
  border: 1px solid rgba(255, 255, 255, 0.1);
  background: rgba(255, 255, 255, 0.05);
  position: relative;
  transition: transform 0.25s ease, background 0.2s ease;
}

.settings-panel-chevron::after {
  content: "";
  position: absolute;
  left: 50%;
  top: 45%;
  width: 6px;
  height: 6px;
  border-right: 2px solid rgba(255, 255, 255, 0.65);
  border-bottom: 2px solid rgba(255, 255, 255, 0.65);
  transform: translate(-50%, -50%) rotate(45deg);
  transition: transform 0.25s ease;
}

.settings-panel[open] > .settings-panel-summary {
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}

.settings-panel[open] .settings-panel-chevron {
  background: rgba(139, 92, 246, 0.15);
  border-color: rgba(139, 92, 246, 0.28);
}

.settings-panel[open] .settings-panel-chevron::after {
  transform: translate(-50%, -30%) rotate(-135deg);
}

.settings-panel-body {
  padding: 20px 22px 22px;
}

/* Mon équipe : menu ⋮ (actions ligne) — ne pas rogner sous overflow du panneau ni passer sous l’accordéon suivant */
#projectTeamPanel.team-card-modern[open] {
  overflow: visible;
  position: relative;
  z-index: 40;
}

.hidden { display: none !important; }

.project-card,
.team-card-modern,
.calc-card-modern,
.cerfa-card {
  padding: 24px;
}

.project-card-header {
  display: flex;
  flex-direction: column;
  gap: 6px;
  margin-bottom: 18px;
}

.project-card-header h2 {
  margin: 0;
  font-size: 20px;
  font-weight: 700;
  color: #fff;
  text-transform: uppercase;
  letter-spacing: 0.02em;
}

.project-card-subtitle {
  color: rgba(255, 255, 255, 0.6);
  font-size: 13px;
  line-height: 1.5;
}

.project-info-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
}

.project-info-item {
  padding: 14px 16px;
  border-radius: 16px;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(255, 255, 255, 0.08);
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.project-info-label {
  color: rgba(255, 255, 255, 0.58);
  font-size: 13px;
}

.project-info-value {
  color: #fff;
  font-size: 15px;
  font-weight: 700;
}

.budget-grid-modern {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
}

.budget-box-modern {
  padding: 16px 18px;
  border-radius: 16px;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(255, 255, 255, 0.08);
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.budget-box-modern span {
  color: rgba(255, 255, 255, 0.58);
  font-size: 13px;
}

.budget-box-modern strong {
  color: #86efac;
  font-size: 18px;
  font-weight: 700;
}

.project-form-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 16px 18px;
}

.project-form-grid .form-group {
  margin-bottom: 0;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.project-form-grid .form-group.full {
  grid-column: 1 / -1;
}

.project-form-grid label {
  margin-bottom: 0;
  font-size: 13px;
  font-weight: 600;
  color: rgba(255, 255, 255, 0.74);
}

.project-form-grid input,
.project-form-grid select,
.project-form-grid textarea,
.cerfa-card input,
.cerfa-card select,
.cerfa-card textarea,
.team-table-modern input,
.team-table-modern select,
.project-modal-search input,
.project-date-input {
  width: 100%;
  box-sizing: border-box;
  min-height: 46px;
  padding: 0 14px;
  border-radius: 14px;
  border: 1px solid rgba(255, 255, 255, 0.1);
  background: rgba(255, 255, 255, 0.05);
  color: #fff;
  font-family: "Inter", sans-serif;
  font-size: 14px;
  outline: none;
  transition: 0.2s ease;
  backdrop-filter: blur(8px);
}

.project-form-grid textarea,
.cerfa-card textarea {
  padding: 12px 14px;
  min-height: 110px;
  resize: vertical;
}

.project-form-grid input:focus,
.project-form-grid select:focus,
.project-form-grid textarea:focus,
.cerfa-card input:focus,
.cerfa-card select:focus,
.cerfa-card textarea:focus,
.team-table-modern input:focus,
.team-table-modern select:focus,
.project-modal-search input:focus,
.project-date-input:focus {
  border-color: rgba(236, 72, 153, 0.35);
  box-shadow: 0 0 0 4px rgba(236, 72, 153, 0.12);
}

.project-form-grid input::placeholder,
.project-form-grid textarea::placeholder,
.cerfa-card input::placeholder,
.cerfa-card textarea::placeholder,
.project-modal-search input::placeholder {
  color: rgba(255, 255, 255, 0.32);
}

.project-form-grid select option,
.cerfa-card select option,
.team-table-modern select option {
  background: #0f172a;
  color: #fff;
}

/* ===== DATES DU PROJET ===== */

.project-dates-shell {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.project-dates-topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  flex-wrap: wrap;
}

.project-dates-summary {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
}

.project-dates-summary-label {
  color: #fff;
  font-size: 14px;
  font-weight: 700;
}

.project-dates-summary-count {
  padding: 7px 12px;
  border-radius: 999px;
  color: #fff;
  font-size: 12px;
  font-weight: 700;
  border: 1px solid rgba(236, 72, 153, 0.22);
  background: linear-gradient(135deg, rgba(236, 72, 153, 0.14), rgba(139, 92, 246, 0.14));
}

.project-dates-actions-inline {
  display: flex;
  align-items: center;
  gap: 10px;
}

.project-dates-timeline {
  position: relative;
}

.project-dates-track {
  display: flex;
  flex-direction: column;
  gap: 14px;
  position: relative;
}

.project-dates-track::before {
  content: "";
  position: absolute;
  top: 18px;
  bottom: 18px;
  left: 18px;
  width: 2px;
  border-radius: 999px;
  background: linear-gradient(
    to bottom,
    rgba(236, 72, 153, 0.42),
    rgba(139, 92, 246, 0.22),
    rgba(255, 255, 255, 0.08)
  );
}

.project-date-card {
  position: relative;
  padding-left: 52px;
}

.project-date-card-line {
  position: absolute;
  left: 18px;
  top: 33px;
  width: 18px;
  height: 2px;
  background: rgba(236, 72, 153, 0.4);
  border-radius: 999px;
}

.project-date-card-inner {
  display: grid;
  grid-template-columns: 48px minmax(0, 1fr) auto;
  align-items: center;
  gap: 14px;
  padding: 14px;
  border-radius: 20px;
  border: 1px solid rgba(255, 255, 255, 0.08);
  background:
    linear-gradient(135deg, rgba(255, 255, 255, 0.06), rgba(255, 255, 255, 0.03)),
    rgba(8, 11, 24, 0.55);
  box-shadow: 0 14px 35px rgba(0, 0, 0, 0.16);
  transition: 0.2s ease;
}

.project-date-card:hover .project-date-card-inner {
  border-color: rgba(255, 255, 255, 0.14);
  background:
    linear-gradient(135deg, rgba(255, 255, 255, 0.08), rgba(255, 255, 255, 0.04)),
    rgba(8, 11, 24, 0.65);
  transform: translateY(-1px);
}

.project-date-card.dragging {
  opacity: 0.6;
}

.project-date-card.drag-over .project-date-card-inner {
  border-color: rgba(236, 72, 153, 0.38);
  box-shadow: 0 0 0 4px rgba(236, 72, 153, 0.08), 0 14px 35px rgba(0, 0, 0, 0.18);
}

.project-date-card-order {
  width: 48px;
  height: 48px;
  border-radius: 16px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #fff;
  font-weight: 800;
  font-size: 15px;
  border: 1px solid rgba(236, 72, 153, 0.2);
  background: linear-gradient(135deg, rgba(236, 72, 153, 0.16), rgba(139, 92, 246, 0.16));
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.08);
}

.project-date-card-main {
  appearance: none;
  border: none;
  background: transparent;
  text-align: left;
  padding: 0;
  min-width: 0;
  display: flex;
  align-items: center;
  gap: 12px;
  cursor: pointer;
}

.project-date-card-chip {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 88px;
  padding: 9px 12px;
  border-radius: 999px;
  color: #fff;
  font-size: 12px;
  font-weight: 800;
  text-transform: capitalize;
  border: 1px solid rgba(236, 72, 153, 0.18);
  background: linear-gradient(135deg, rgba(236, 72, 153, 0.14), rgba(139, 92, 246, 0.14));
}

.project-date-card-full {
  color: #fff;
  font-size: 15px;
  font-weight: 700;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.project-date-card-actions {
  display: flex;
  align-items: center;
  gap: 8px;
}

.project-date-declaration {
  padding: 10px 14px 12px;
  border-top: 1px solid rgba(255, 255, 255, 0.06);
}

.project-date-declaration-options {
  display: flex;
  align-items: center;
  gap: 16px;
  flex-wrap: wrap;
}

.project-date-declaration-label {
  display: flex;
  align-items: center;
  gap: 10px;
  cursor: pointer;
  font-size: 12px;
  color: rgba(255, 255, 255, 0.72);
  user-select: none;
}

.project-date-declaration-label input.declaration-sent-cb {
  width: 18px;
  height: 18px;
  flex-shrink: 0;
  accent-color: rgba(34, 197, 94, 0.9);
}

.project-date-icon-btn {
  appearance: none;
  width: 42px;
  height: 42px;
  border-radius: 14px;
  border: 1px solid rgba(255, 255, 255, 0.1);
  background: rgba(255, 255, 255, 0.05);
  color: #fff;
  font-size: 14px;
  cursor: pointer;
  transition: 0.2s ease;
}

.project-date-icon-btn svg {
  width: 15px;
  height: 15px;
  fill: none;
  stroke: currentColor;
  stroke-width: 2.2;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.project-date-icon-btn:hover {
  background: rgba(255, 255, 255, 0.09);
  border-color: rgba(255, 255, 255, 0.16);
}

.project-date-icon-btn.cerfa {
  color: #dbeafe;
  background: rgba(59, 130, 246, 0.1);
  border-color: rgba(59, 130, 246, 0.2);
}

.project-date-icon-btn.cerfa:hover {
  background: rgba(59, 130, 246, 0.18);
  border-color: rgba(59, 130, 246, 0.34);
}

.project-date-icon-btn.danger {
  color: #ff9494;
  background: rgba(255, 90, 90, 0.08);
}

.project-date-icon-btn.danger:hover {
  background: rgba(255, 90, 90, 0.16);
  border-color: rgba(255, 90, 90, 0.22);
}

.project-dates-empty-state {
  padding: 28px 20px;
  border-radius: 22px;
  background: rgba(255, 255, 255, 0.04);
  border: 1px dashed rgba(255, 255, 255, 0.12);
  text-align: center;
}

.project-dates-empty-icon {
  font-size: 30px;
  margin-bottom: 10px;
}

.project-dates-empty-title {
  color: #fff;
  font-size: 16px;
  font-weight: 700;
}

.project-dates-empty-text {
  margin-top: 6px;
  color: rgba(255, 255, 255, 0.58);
  font-size: 13px;
  line-height: 1.5;
}

.project-dates-legend {
  color: rgba(255, 255, 255, 0.52);
  font-size: 13px;
}

/* ===== CALCUL ===== */

.calc-card-modern {
  position: static;
  top: auto;
  display: flex;
  flex-direction: column;
  gap: 2px;
  border: 1px solid rgba(255, 255, 255, 0.12);
  background:
    radial-gradient(120% 120% at 0% 0%, rgba(236,72,153,0.12), transparent 42%),
    radial-gradient(120% 120% at 100% 0%, rgba(59,130,246,0.10), transparent 42%),
    rgba(8, 12, 24, 0.92);
  box-shadow: 0 20px 45px rgba(0, 0, 0, 0.28);
}

.calc-head-modern{
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:10px;
  margin-bottom:8px;
}

.calc-title-modern {
  font-size: 18px;
  font-weight: 700;
  color: #fff;
  margin-bottom: 0;
}

.calc-health-badge{
  display:inline-flex;
  align-items:center;
  justify-content:center;
  padding:6px 10px;
  border-radius:999px;
  font-size:11px;
  font-weight:700;
  border:1px solid rgba(255,255,255,0.16);
  color:#dbeafe;
  background:rgba(59,130,246,0.18);
}

.calc-card-modern.is-risk .calc-health-badge{
  color:#fecaca;
  background:rgba(239,68,68,0.22);
  border-color:rgba(239,68,68,0.35);
}

.calc-card-modern.is-good .calc-health-badge{
  color:#bbf7d0;
  background:rgba(34,197,94,0.20);
  border-color:rgba(34,197,94,0.35);
}

.calc-quick-kpis{
  display:grid;
  grid-template-columns:repeat(2,minmax(0,1fr));
  gap:10px;
  margin: 0 0 14px;
}

.calc-quick-box{
  border:1px solid rgba(255,255,255,0.10);
  background:rgba(255,255,255,0.05);
  border-radius:14px;
  padding:10px 12px;
  display:flex;
  flex-direction:column;
  gap:4px;
}

.calc-quick-box span{
  font-size:11px;
  text-transform:uppercase;
  letter-spacing:.08em;
  color:rgba(255,255,255,0.62);
}

.calc-quick-box strong{
  font-size:16px;
  color:#fff;
}

.calc-section-title{
  margin-top:8px;
  padding-top:10px;
  border-top:1px solid rgba(255,255,255,0.08);
  color:rgba(255,255,255,0.62);
  font-size:11px;
  letter-spacing:.1em;
  text-transform:uppercase;
  font-weight:700;
}

.calc-row-modern {
  display: grid;
  grid-template-columns: auto minmax(24px, 1fr) auto;
  align-items: center;
  gap: 14px;
  padding: 10px 0;
}

.calc-label-modern {
  color: rgba(255, 255, 255, 0.62);
  font-size: 18px;
  line-height: 1.35;
  white-space: nowrap;
}

.calc-dots-modern {
  display: block;
  height: 1px;
  min-width: 24px;
  background-image: repeating-linear-gradient(
    to right,
    rgba(255, 255, 255, 0.2) 0 2px,
    transparent 2px 8px
  );
  background-repeat: repeat-x;
  background-position: center;
}

.calc-row-modern strong {
  color: #fff;
  font-size: 20px;
  font-weight: 700;
  text-align: right;
  white-space: nowrap;
}

.calc-row-highlight strong {
  color: #86efac;
}

.calc-card-modern.is-risk .calc-row-highlight strong{
  color:#fca5a5;
}

/* ===== ÉQUIPE ===== */

.team-table-wrap-modern {
  overflow: visible;
}

.team-table-modern {
  width: 100%;
  border-collapse: separate;
  border-spacing: 0 10px;
  min-width: 980px;
}

.team-table-modern thead th {
  text-align: left;
  padding: 0 16px 10px;
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: rgba(255, 255, 255, 0.5);
  border-bottom: none;
  white-space: nowrap;
}

.team-section-count {
  display: inline;
  font-weight: 700;
  color: rgba(236, 72, 153, 0.92);
  margin-left: 8px;
  font-size: 0.92em;
  letter-spacing: 0.02em;
}

.team-table-modern thead th.team-col-index {
  width: 44px;
  min-width: 44px;
  text-align: center;
  padding-left: 12px;
  padding-right: 8px;
}

.team-table-modern tbody td.team-row-index {
  width: 44px;
  min-width: 44px;
  text-align: center;
  padding: 18px 10px;
  font-weight: 700;
  font-size: 13px;
  font-variant-numeric: tabular-nums;
  color: rgba(255, 255, 255, 0.42);
  background: rgba(255, 255, 255, 0.028);
  user-select: none;
}

.team-table-modern tbody tr {
  transition: 0.2s ease;
}

.team-table-modern tbody tr:hover {
  transform: translateY(-1px);
}

.team-table-modern tbody td {
  padding: 18px 16px;
  border: none;
  color: #fff;
  font-size: 14px;
  vertical-align: middle;
  background: rgba(255, 255, 255, 0.04);
}

.team-table-modern tbody td:first-child {
  border-top-left-radius: 16px;
  border-bottom-left-radius: 16px;
}

.team-table-modern tbody td:last-child {
  border-top-right-radius: 16px;
  border-bottom-right-radius: 16px;
}

.team-table-modern tbody tr:hover td {
  background: rgba(255, 255, 255, 0.06);
}

.artificier-selected-wrap {
  display: flex;
  align-items: center;
  gap: 8px;
  width: 100%;
  min-width: 0;
}

.team-social-badges {
  display: inline-flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
  flex: 0 0 auto;
  width: 14px;
  min-width: 14px;
  justify-content: center;
}

.artificier-selected {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.team-social-dot {
  width: 12px;
  height: 12px;
  border-radius: 999px;
  display: inline-block;
  box-shadow: 0 0 0 1px rgba(255, 255, 255, 0.2) inset;
}

.team-social-dot.is-dpae-done {
  background: #22c55e;
}

.team-social-dot.is-end-done {
  background: #ef4444;
}

.team-social-legend {
  display: inline-flex;
  align-items: center;
  gap: 10px 14px;
  flex-wrap: wrap;
  padding: 8px 10px;
  border-radius: 12px;
  border: 1px solid rgba(255, 255, 255, 0.12);
  background: rgba(255, 255, 255, 0.04);
  margin-right: 4px;
}

.team-social-legend-item {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  font-size: 12px;
  color: rgba(255, 255, 255, 0.86);
  white-space: nowrap;
}

.team-table-modern thead th:nth-child(2),
.team-table-modern tbody td:nth-child(2) {
  width: 260px;
  min-width: 260px;
}

.social-decl-list {
  display: grid;
  gap: 12px;
}

.social-decl-item {
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 12px;
  padding: 12px;
  background: rgba(255, 255, 255, 0.03);
}

.social-decl-item-title {
  font-size: 14px;
  font-weight: 700;
  color: rgba(255, 255, 255, 0.95);
}

.social-decl-item-sub {
  font-size: 12px;
  color: rgba(255, 255, 255, 0.62);
  margin-top: 2px;
}

.social-decl-options {
  display: inline-flex;
  gap: 8px;
  margin-top: 10px;
}

.social-decl-option {
  appearance: none;
  border: 1px solid rgba(255, 255, 255, 0.14);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.04);
  color: #fff;
  font-size: 12px;
  font-weight: 600;
  padding: 7px 12px;
  cursor: pointer;
  transition: 0.2s ease;
}

.social-decl-option:hover {
  background: rgba(255, 255, 255, 0.11);
}

.social-decl-option.active {
  box-shadow: 0 0 0 2px rgba(255, 255, 255, 0.08) inset;
}

.social-decl-option-danger.active {
  border-color: rgba(239, 68, 68, 0.55);
  background: rgba(239, 68, 68, 0.2);
}

.social-decl-option-success.active {
  border-color: rgba(34, 197, 94, 0.6);
  background: rgba(34, 197, 94, 0.2);
}

.social-decl-option-pink.active {
  border-color: rgba(255, 79, 216, 0.65);
  background: rgba(255, 79, 216, 0.2);
}

.team-actions-modern {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  justify-content: flex-start;
  margin-top: 18px;
}

.team-global-rdv {
  display: inline-grid;
  grid-template-columns: auto auto minmax(120px, 1fr);
  align-items: center;
  gap: 10px 12px;
  padding: 8px 10px;
  border-radius: 12px;
  border: 1px solid rgba(255, 255, 255, 0.12);
  background: rgba(255, 255, 255, 0.04);
  box-shadow: none;
}

.team-global-rdv-icon {
  width: 28px;
  height: 28px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 12px;
  background: transparent;
  border: none;
  opacity: 0.95;
}

.team-global-rdv-icon svg {
  width: 24px;
  height: 24px;
  display: block;
  fill: none;
  stroke: #fff;
  stroke-width: 2.1;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.team-global-rdv label {
  color: rgba(255, 255, 255, 0.8);
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0;
  white-space: nowrap;
}

.team-global-rdv input[type="time"] {
  min-height: 36px;
  max-width: 140px;
  padding: 0 10px;
  border-radius: 10px;
  border: 1px solid rgba(255, 255, 255, 0.14);
  background: rgba(15, 23, 42, 0.45);
  color: rgba(255, 255, 255, 0.9);
  font-weight: 600;
  font-size: 13px;
  letter-spacing: 0;
  font-family: "Segoe UI", "Roboto", "Helvetica Neue", Arial, sans-serif;
  font-variant-numeric: tabular-nums;
}

.artificier-dropdown,
.statut-dropdown {
  min-width: 190px;
}

.artificier-selected,
.statut-selected {
  min-height: 46px;
  padding: 0 14px;
  border-radius: 14px;
  border: 1px solid rgba(255, 255, 255, 0.1);
  background: rgba(255, 255, 255, 0.05);
  color: #fff;
  display: flex;
  align-items: center;
  cursor: pointer;
  transition: 0.2s ease;
}

.artificier-dropdown {
  width: 100%;
  min-width: 0;
}

.artificier-selected {
  width: 100%;
  box-sizing: border-box;
}

.artificier-selected:hover,
.statut-selected:hover {
  border-color: rgba(255, 255, 255, 0.18);
  background: rgba(255, 255, 255, 0.07);
}

.date-assign-cell {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 8px;
}

.date-assign-btn {
  appearance: none;
  min-height: 34px;
  min-width: 34px;
  padding: 0 10px;
  border-radius: 14px;
  border: 1px solid rgba(255, 255, 255, 0.1);
  background: rgba(255, 255, 255, 0.05);
  color: #fff;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: 0.2s ease;
  font-weight: 600;
}

.date-assign-btn.compact {
  width: 34px;
  height: 34px;
  min-width: 34px;
  min-height: 34px;
  padding: 0;
  border-radius: 10px;
  font-size: 13px;
  font-weight: 700;
}

.date-assign-btn:hover {
  background: rgba(255, 255, 255, 0.08);
  border-color: rgba(255, 255, 255, 0.16);
}

.team-rdv-btn {
  appearance: none;
  min-height: 42px;
  padding: 0 14px;
  border-radius: 12px;
  border: 1px solid rgba(255, 255, 255, 0.1);
  background: rgba(255, 255, 255, 0.05);
  color: #fff;
  display: inline-flex;
  align-items: center;
  gap: 0;
  cursor: pointer;
  transition: 0.2s ease;
  font-weight: 700;
}

.team-rdv-btn:hover {
  background: rgba(255, 255, 255, 0.08);
}

.team-rdv-btn.has-effective-rdv {
  border-color: rgba(59, 130, 246, 0.35);
  background: rgba(59, 130, 246, 0.12);
}

.team-rdv-btn.has-personal-rdv {
  border-color: rgba(236, 72, 153, 0.36);
  background: rgba(236, 72, 153, 0.14);
}

.team-rdv-label { min-width: 48px; }

.date-assign-preview {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  min-height: 34px;
  align-items: center;
  width: 100%;
}

.date-badge,
.date-badge-empty {
  padding: 6px 10px;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 700;
}

.date-badge {
  color: #fff;
  border: 1px solid rgba(236, 72, 153, 0.18);
  background: linear-gradient(135deg, rgba(236, 72, 153, 0.14), rgba(139, 92, 246, 0.14));
}

.date-badge-empty {
  color: rgba(255, 255, 255, 0.6);
  border: 1px solid rgba(255, 255, 255, 0.08);
  background: rgba(255, 255, 255, 0.04);
}

.planning-state-segmented {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 5px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.08);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.04);
}

.planning-state-option {
  appearance: none;
  border: 1px solid transparent;
  background: transparent;
  color: rgba(255, 255, 255, 0.7);
  min-height: 34px;
  padding: 0 12px;
  border-radius: 999px;
  cursor: pointer;
  transition: 0.2s ease;
  font-size: 12px;
  font-weight: 700;
  white-space: nowrap;
}

.planning-state-option:hover {
  color: #fff;
  background: rgba(255, 255, 255, 0.06);
}

.planning-state-option.active[data-value="draft"] {
  color: #ffd36b;
  border-color: rgba(245, 158, 11, 0.2);
  background: rgba(245, 158, 11, 0.14);
  box-shadow: 0 8px 18px rgba(245, 158, 11, 0.1);
}

.planning-state-option.active[data-value="confirmed"] {
  color: #86efac;
  border-color: rgba(34, 197, 94, 0.2);
  background: rgba(34, 197, 94, 0.14);
  box-shadow: 0 8px 18px rgba(34, 197, 94, 0.1);
}

.delete-cell {
  text-align: right;
  white-space: nowrap;
  position: relative;
}

.team-row-actions-wrap {
  position: relative;
  display: inline-flex;
}

.team-row-actions-menu-btn {
  appearance: none;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  border-radius: 12px;
  border: 1px solid rgba(255, 255, 255, 0.12);
  background: rgba(255, 255, 255, 0.05);
  color: #dbeafe;
  cursor: pointer;
}

.team-row-actions-menu-btn svg {
  width: 18px;
  height: 18px;
  fill: currentColor;
  stroke: none;
}

.team-row-actions-menu {
  position: absolute;
  right: 0;
  top: calc(100% + 8px);
  bottom: auto;
  min-width: 260px;
  z-index: 200;
  display: none;
  flex-direction: column;
  gap: 4px;
  padding: 8px;
  border-radius: 12px;
  border: 1px solid rgba(255, 255, 255, 0.12);
  background: rgba(10, 14, 28, 0.98);
  box-shadow: 0 16px 40px rgba(0, 0, 0, 0.45);
}

tr.team-row-actions-open .team-row-actions-menu {
  display: flex;
}

.team-table-modern tbody tr {
  position: relative;
}

.team-table-modern tbody tr.team-row-actions-open {
  z-index: 210;
}

.team-row-actions-menu button {
  appearance: none;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  border: 1px solid transparent;
  background: rgba(255, 255, 255, 0.04);
  color: #fff;
  border-radius: 10px;
  min-height: 34px;
  text-align: left;
  padding: 0 10px;
  cursor: pointer;
  font-size: 12px;
}

.team-row-actions-menu button svg {
  width: 14px;
  height: 14px;
  flex: 0 0 14px;
  fill: none;
  stroke: currentColor;
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.team-row-actions-menu button:hover {
  background: rgba(255, 255, 255, 0.1);
}

.team-row-actions-menu button.danger {
  color: #fca5a5;
}

.team-row-hidden-action {
  display: none !important;
}

#projectTeamPanel {
  overflow: visible;
}

.btn-calendar-row,
.btn-notify-row,
.btn-contract-row,
.btn-delete-row {
  appearance: none;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0;
  vertical-align: middle;
  border: 1px solid rgba(255, 255, 255, 0.1);
  background: rgba(255, 255, 255, 0.05);
  color: #ff8a8a;
  width: 40px;
  height: 40px;
  border-radius: 12px;
  cursor: pointer;
  transition: 0.2s ease;
}

.btn-calendar-row {
  color: #dbeafe;
  margin-right: 8px;
  width: 44px;
  height: 44px;
  border-radius: 13px;
}

.btn-calendar-row svg,
.btn-notify-row svg,
.btn-contract-row svg,
.btn-delete-row svg {
  pointer-events: none;
  width: 19px;
  height: 19px;
  fill: none;
  stroke: currentColor;
  stroke-width: 2.2;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.btn-calendar-row:hover {
  background: rgba(59, 130, 246, 0.15);
  border-color: rgba(59, 130, 246, 0.3);
}

.btn-notify-row {
  color: #fde68a;
  margin-right: 8px;
}

.btn-notify-row:hover {
  background: rgba(245, 158, 11, 0.16);
  border-color: rgba(245, 158, 11, 0.32);
}

.btn-contract-row {
  color: #93c5fd;
  margin-right: 8px;
}

.btn-contract-row:hover {
  background: rgba(59, 130, 246, 0.14);
  border-color: rgba(59, 130, 246, 0.3);
}

.btn-delete-row:hover {
  background: rgba(255, 90, 90, 0.12);
  border-color: rgba(255, 90, 90, 0.24);
}

/* ===== CERFA ===== */

.cerfa-sections {
  display: flex;
  flex-direction: column;
  gap: 18px;
}

.cerfa-section {
  padding: 18px;
  border-radius: 18px;
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid rgba(255, 255, 255, 0.08);
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.cerfa-section-title {
  font-size: 15px;
  font-weight: 700;
  color: #fff;
}

.checkbox-grid-modern {
  display: flex;
  flex-wrap: wrap;
  gap: 12px 18px;
  padding: 14px 16px;
  border-radius: 16px;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(255, 255, 255, 0.08);
}

.checkbox-grid-modern label,
.radio-group-modern label {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  color: rgba(255, 255, 255, 0.82);
  font-size: 13px;
  font-weight: 500;
  cursor: pointer;
  line-height: 1.4;
}

.checkbox-grid-modern input[type="checkbox"],
.radio-group-modern input[type="radio"] {
  appearance: none;
  -webkit-appearance: none;
  margin: 0;
  flex: 0 0 auto;
  width: 18px;
  height: 18px;
  border: 1px solid rgba(255, 255, 255, 0.22);
  background: rgba(255, 255, 255, 0.04);
  box-shadow: inset 0 1px 2px rgba(0, 0, 0, 0.25);
  cursor: pointer;
  transition: 0.2s ease;
  position: relative;
}

.checkbox-grid-modern input[type="checkbox"] {
  border-radius: 6px;
}

.radio-group-modern input[type="radio"] {
  border-radius: 999px;
}

.checkbox-grid-modern input[type="checkbox"]:hover,
.radio-group-modern input[type="radio"]:hover {
  border-color: rgba(236, 72, 153, 0.45);
  background: rgba(255, 255, 255, 0.07);
}

.checkbox-grid-modern input[type="checkbox"]:focus,
.radio-group-modern input[type="radio"]:focus {
  outline: none;
  box-shadow: 0 0 0 4px rgba(236, 72, 153, 0.12), inset 0 1px 2px rgba(0, 0, 0, 0.25);
  border-color: rgba(236, 72, 153, 0.45);
}

.checkbox-grid-modern input[type="checkbox"]:checked {
  background: linear-gradient(135deg, rgba(236, 72, 153, 0.95), rgba(139, 92, 246, 0.95));
  border-color: rgba(236, 72, 153, 0.65);
  box-shadow: 0 6px 16px rgba(236, 72, 153, 0.28), inset 0 1px 1px rgba(255, 255, 255, 0.18);
}

.checkbox-grid-modern input[type="checkbox"]:checked::after {
  content: "";
  position: absolute;
  left: 5px;
  top: 1px;
  width: 5px;
  height: 10px;
  border: solid #fff;
  border-width: 0 2px 2px 0;
  transform: rotate(45deg);
}

.radio-group-modern input[type="radio"]:checked {
  border-color: rgba(236, 72, 153, 0.65);
  background: rgba(255, 255, 255, 0.04);
  box-shadow: 0 6px 16px rgba(236, 72, 153, 0.2), inset 0 1px 2px rgba(0, 0, 0, 0.25);
}

.radio-group-modern input[type="radio"]:checked::after {
  content: "";
  position: absolute;
  inset: 3px;
  border-radius: 999px;
  background: linear-gradient(135deg, rgba(236, 72, 153, 0.98), rgba(139, 92, 246, 0.98));
  box-shadow: 0 0 8px rgba(236, 72, 153, 0.32);
}

.checkbox-grid-modern.checkbox-grid-inline {
  align-items: center;
}

.checkbox-grid-inline {
  margin-bottom: 16px;
}

.cerfa-option-groups {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
}

.cerfa-option-card {
  padding: 16px;
  border-radius: 16px;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(255, 255, 255, 0.08);
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.cerfa-option-title {
  font-size: 13px;
  font-weight: 700;
  color: #fff;
}

.radio-group-modern {
  display: flex;
  flex-wrap: wrap;
  gap: 12px 18px;
}

.cerfa-actions-modern {
  display: flex;
  justify-content: flex-end;
  margin-top: 20px;
}

/* ===== CLASSEUR DOCUMENTS PROJET ===== */

.project-docs-shell {
  display: flex;
  flex-direction: column;
  gap: 14px;
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 18px;
  padding: 16px;
  background:
    linear-gradient(180deg, rgba(139, 92, 246, 0.1) 0%, rgba(255, 255, 255, 0.02) 36%, rgba(255, 255, 255, 0.01) 100%),
    rgba(2, 8, 23, 0.36);
  box-shadow: 0 18px 44px rgba(2, 6, 23, 0.35);
}

.project-docs-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
}

.project-docs-head-main {
  min-width: 280px;
}

.project-docs-head-title {
  color: #fff;
  font-size: 16px;
  font-weight: 700;
}

.project-docs-head-subtitle {
  margin-top: 4px;
  color: rgba(255, 255, 255, 0.7);
  font-size: 12px;
}

.project-docs-progress {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 9px 12px;
  border-radius: 999px;
  border: 1px solid rgba(255, 255, 255, 0.12);
  background: rgba(15, 23, 42, 0.5);
}

.project-docs-progress-track {
  width: 160px;
  height: 10px;
  border-radius: 999px;
  background: rgba(0, 0, 0, 0.28);
  overflow: hidden;
  border: 1px solid rgba(255, 255, 255, 0.08);
}

.project-docs-progress-fill {
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, #ec4899, #8b5cf6);
  transition: width 0.3s ease;
  box-shadow: 0 0 15px rgba(236, 72, 153, 0.35);
}

.project-docs-progress-label {
  color: rgba(255, 255, 255, 0.78);
  font-size: 11px;
  font-weight: 700;
}

.project-docs-progress-state {
  font-size: 10px;
  font-weight: 800;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: #fcd34d;
  border: 1px solid rgba(251, 191, 36, 0.28);
  background: rgba(251, 191, 36, 0.12);
  border-radius: 8px;
  padding: 4px 7px;
}

.project-docs-progress-state.is-complete {
  color: #6ee7b7;
  border-color: rgba(52, 211, 153, 0.28);
  background: rgba(52, 211, 153, 0.13);
}

.project-docs-checklist {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
  padding: 12px;
  border-radius: 16px;
  border: 1px solid rgba(255, 255, 255, 0.08);
  background: rgba(255, 255, 255, 0.03);
}

.project-docs-check-item {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  color: rgba(255, 255, 255, 0.86);
  font-size: 13px;
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 12px;
  padding: 10px 11px;
  background: rgba(2, 6, 23, 0.35);
}

.project-docs-check-item input {
  accent-color: #8b5cf6;
}

.project-docs-upload-row {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  gap: 8px 12px;
  align-items: center;
  border: 1px solid rgba(255, 255, 255, 0.09);
  border-radius: 14px;
  padding: 12px;
  background: rgba(255, 255, 255, 0.025);
}

.project-docs-upload-label {
  color: rgba(255, 255, 255, 0.85);
  font-size: 12px;
  font-weight: 700;
}

.project-docs-upload-controls {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
}

#projectDocCategory {
  min-height: 42px;
  border-radius: 12px;
  border: 1px solid rgba(255, 255, 255, 0.12);
  background: rgba(255, 255, 255, 0.06);
  color: #fff;
  padding: 0 12px;
}

.project-docs-upload-btn {
  min-height: 42px;
}

.project-docs-upload-hint {
  grid-column: 1 / -1;
  color: rgba(255, 255, 255, 0.6);
  font-size: 12px;
}

#projectDocCategory option {
  background: #0f172a;
  color: #fff;
}

.project-docs-tree {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.project-docs-folder {
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.03);
  overflow: hidden;
}

.project-docs-folder-head {
  padding: 10px 12px;
  font-size: 12px;
  font-weight: 800;
  color: rgba(255, 255, 255, 0.88);
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.06), rgba(255, 255, 255, 0.02));
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}

.project-docs-folder-title {
  display: inline-flex;
  align-items: center;
  gap: 8px;
}

.project-docs-folder-icon {
  width: 16px;
  height: 16px;
  border-radius: 4px;
  position: relative;
  display: inline-block;
  background: linear-gradient(180deg, #f8c95b, #e9a930);
  box-shadow: 0 2px 5px rgba(0, 0, 0, 0.28);
}

.project-docs-folder-icon::before {
  content: "";
  position: absolute;
  left: 2px;
  top: -3px;
  width: 8px;
  height: 5px;
  border-radius: 3px 3px 0 0;
  background: #f9d781;
}

.project-docs-folder-count {
  min-width: 24px;
  height: 24px;
  border-radius: 999px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 11px;
  font-weight: 800;
  color: rgba(255, 255, 255, 0.92);
  background: rgba(59, 130, 246, 0.2);
  border: 1px solid rgba(59, 130, 246, 0.4);
}

.project-docs-folder-list {
  display: flex;
  flex-direction: column;
}

.project-docs-item {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  gap: 12px;
  padding: 10px 12px;
  border-top: 1px solid rgba(255, 255, 255, 0.05);
}

.project-docs-item-name {
  color: #fff;
  font-size: 13px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  display: inline-flex;
  align-items: center;
  gap: 8px;
}

.project-docs-item-name::before {
  content: none;
}

.project-docs-doc-icon {
  width: 14px;
  height: 16px;
  display: inline-block;
  border-radius: 2px;
  background: linear-gradient(180deg, #ffffff, #e5e7eb);
  border: 1px solid rgba(148, 163, 184, 0.5);
  box-shadow: 0 1px 2px rgba(2, 6, 23, 0.35);
  position: relative;
}

.project-docs-doc-icon::after {
  content: "";
  position: absolute;
  right: -1px;
  top: -1px;
  width: 5px;
  height: 5px;
  background: #cbd5e1;
  clip-path: polygon(0 0, 100% 0, 100% 100%);
}

.project-docs-item-actions {
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

.project-docs-mini-btn {
  appearance: none;
  border: 1px solid rgba(255, 255, 255, 0.12);
  background: rgba(255, 255, 255, 0.05);
  color: #fff;
  min-height: 30px;
  padding: 0 10px;
  border-radius: 10px;
  cursor: pointer;
  font-size: 12px;
  font-weight: 700;
}

.project-docs-mini-btn:hover {
  background: rgba(255, 255, 255, 0.1);
}

.project-docs-mini-btn.danger {
  color: #fca5a5;
  border-color: rgba(248, 113, 113, 0.25);
}

.project-docs-empty {
  padding: 14px 12px;
  color: rgba(255, 255, 255, 0.55);
  font-size: 12px;
  font-style: italic;
}

@media (max-width: 860px) {
  .project-docs-checklist {
    grid-template-columns: 1fr;
  }
  .project-docs-upload-row {
    grid-template-columns: 1fr;
  }
}

/* ===== CLASSEUR DOCUMENTS PROJET V2 ===== */
.project-docs-card .settings-panel-body {
  padding-top: 16px;
}

.project-docs-shell {
  gap: 16px;
  border-radius: 22px;
  padding: 20px;
  border: 1px solid rgba(148, 163, 184, 0.22);
  background:
    radial-gradient(circle at 0% 0%, rgba(236, 72, 153, 0.12), transparent 42%),
    radial-gradient(circle at 100% 0%, rgba(168, 85, 247, 0.1), transparent 38%),
    linear-gradient(165deg, rgba(18, 21, 32, 0.96), rgba(10, 12, 20, 0.92));
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.08), 0 18px 46px rgba(0, 0, 0, 0.45), 0 0 0 1px rgba(236, 72, 153, 0.12);
}

.project-docs-head-title {
  font-size: 18px;
  letter-spacing: 0.01em;
}

.project-docs-head-subtitle {
  font-size: 12px;
  color: rgba(226, 232, 240, 0.78);
}

.project-docs-kpis {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
}

.project-docs-kpi-card {
  min-height: 74px;
  border-radius: 14px;
  border: 1px solid rgba(148, 163, 184, 0.25);
  background: linear-gradient(180deg, rgba(15, 23, 42, 0.74), rgba(15, 23, 42, 0.45));
  padding: 10px 12px;
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 5px;
}

.project-docs-kpi-label {
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: rgba(244, 114, 182, 0.8);
  font-weight: 700;
}

.project-docs-kpi-value {
  color: #fff;
  font-size: 24px;
  line-height: 1;
  font-weight: 800;
}

.project-docs-kpi-value-small {
  font-size: 14px;
  color: #f5d0fe;
}

.project-docs-checklist {
  gap: 10px;
  padding: 0;
  border: none;
  background: transparent;
}

.project-docs-check-item {
  border-radius: 14px;
  border-color: rgba(148, 163, 184, 0.2);
  background: rgba(15, 23, 42, 0.62);
}

.project-docs-check-item.is-done {
  border-color: rgba(52, 211, 153, 0.35);
  background: linear-gradient(180deg, rgba(6, 78, 59, 0.38), rgba(15, 23, 42, 0.6));
}

.project-docs-check-icon {
  width: 18px;
  height: 18px;
  border-radius: 999px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: 1px solid rgba(148, 163, 184, 0.45);
  color: transparent;
  background: rgba(15, 23, 42, 0.7);
}

.project-docs-check-item.is-done .project-docs-check-icon {
  border-color: rgba(52, 211, 153, 0.65);
  color: #34d399;
}

.project-docs-check-icon svg {
  width: 12px;
  height: 12px;
  fill: none;
  stroke: currentColor;
  stroke-width: 2.4;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.project-docs-upload-row {
  border-radius: 16px;
  border: 1px solid rgba(148, 163, 184, 0.24);
  background: rgba(15, 23, 42, 0.62);
}

#projectDocCategory {
  min-height: 44px;
  border-radius: 12px;
  border-color: rgba(148, 163, 184, 0.35);
  background: rgba(2, 6, 23, 0.75);
}

.project-docs-tree {
  gap: 12px;
}

.project-docs-folder {
  border-radius: 16px;
  border-color: rgba(255, 255, 255, 0.12);
  background: linear-gradient(165deg, rgba(16, 18, 30, 0.95), rgba(8, 10, 18, 0.94));
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.05);
}

.project-docs-folder-head {
  padding: 12px 14px;
  border-bottom-color: rgba(255, 255, 255, 0.08);
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.07), rgba(255, 255, 255, 0.02));
}

.project-docs-folder-count {
  background: rgba(236, 72, 153, 0.16);
  border-color: rgba(236, 72, 153, 0.35);
  color: #fbcfe8;
}

.project-docs-item {
  padding: 12px 14px;
  border-top-color: rgba(148, 163, 184, 0.14);
}

.project-docs-item-main {
  min-width: 0;
}

.project-docs-item-name {
  font-size: 13px;
  font-weight: 700;
}

.project-docs-item-meta {
  margin-top: 4px;
  color: rgba(255, 255, 255, 0.56);
  font-size: 11px;
}

.project-docs-item-actions {
  gap: 8px;
  flex-wrap: wrap;
  justify-content: flex-end;
}

.project-docs-mini-btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  min-height: 32px;
  padding: 0 10px;
  border-radius: 10px;
  border-color: rgba(255, 255, 255, 0.16);
  background: rgba(255, 255, 255, 0.06);
  color: #e2e8f0;
}

.project-docs-mini-btn svg {
  width: 14px;
  height: 14px;
  fill: none;
  stroke: currentColor;
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.project-docs-mini-btn:hover {
  border-color: rgba(236, 72, 153, 0.48);
  background: rgba(236, 72, 153, 0.16);
  color: #fce7f3;
}

.project-docs-mini-btn.danger {
  color: #fecaca;
  border-color: rgba(248, 113, 113, 0.4);
  background: rgba(127, 29, 29, 0.28);
}

.project-docs-mini-btn.danger:hover {
  color: #fee2e2;
  border-color: rgba(248, 113, 113, 0.62);
  background: rgba(127, 29, 29, 0.46);
}

.project-docs-folder--client {
  border-color: rgba(236, 72, 153, 0.34);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.05), 0 0 0 1px rgba(236, 72, 153, 0.16);
}

.project-docs-folder--client .project-docs-folder-head {
  background: linear-gradient(180deg, rgba(236, 72, 153, 0.14), rgba(255, 255, 255, 0.02));
}

.project-docs-folder--client .project-docs-folder-count {
  background: rgba(236, 72, 153, 0.22);
  border-color: rgba(236, 72, 153, 0.42);
  color: #fdf2f8;
}

/* ===== CLASSEUR DOCUMENTS V3 FULL REDESIGN ===== */
.project-docs-tree {
  display: block;
}

.project-docs-board {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
}

.project-docs-section {
  border-radius: 16px;
  border: 1px solid rgba(255, 255, 255, 0.12);
  background: rgba(255, 255, 255, 0.04);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.08);
  overflow: hidden;
}

.project-docs-section.tone-client {
  border-color: rgba(236, 72, 153, 0.26);
  background: linear-gradient(180deg, rgba(236, 72, 153, 0.08), rgba(255, 255, 255, 0.03));
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.08), 0 0 0 1px rgba(236, 72, 153, 0.08);
}

.project-docs-section-head {
  min-height: 50px;
  padding: 0 14px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
  background: rgba(255, 255, 255, 0.04);
}

.project-docs-section-title-wrap {
  display: inline-flex;
  align-items: center;
  gap: 8px;
}

.project-docs-section-dot {
  width: 8px;
  height: 8px;
  border-radius: 999px;
  background: #c084fc;
  box-shadow: 0 0 0 4px rgba(192, 132, 252, 0.14);
}

.project-docs-section.tone-general .project-docs-section-dot {
  background: #60a5fa;
  box-shadow: 0 0 0 4px rgba(96, 165, 250, 0.14);
}

.project-docs-section.tone-client .project-docs-section-dot {
  background: #f472b6;
  box-shadow: 0 0 0 4px rgba(244, 114, 182, 0.12);
}

.project-docs-section.tone-date .project-docs-section-dot {
  background: #f59e0b;
  box-shadow: 0 0 0 4px rgba(245, 158, 11, 0.12);
}

.project-docs-section-title {
  margin: 0;
  font-size: 16px;
  color: #fff;
  font-weight: 800;
}

.project-docs-section-count {
  min-width: 28px;
  height: 24px;
  border-radius: 999px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 11px;
  font-weight: 800;
  color: rgba(255, 255, 255, 0.9);
  border: 1px solid rgba(255, 255, 255, 0.2);
  background: rgba(255, 255, 255, 0.08);
}

.project-docs-section-grid {
  padding: 12px;
  display: grid;
  grid-template-columns: 1fr;
  gap: 10px;
}

.project-doc-card {
  border-radius: 12px;
  border: 1px solid rgba(255, 255, 255, 0.14);
  background: rgba(255, 255, 255, 0.05);
  padding: 10px;
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 10px;
  align-items: center;
  transition: border-color 0.2s ease, transform 0.2s ease, box-shadow 0.2s ease;
}

.project-doc-card:hover {
  border-color: rgba(236, 72, 153, 0.38);
  box-shadow: 0 8px 20px rgba(0, 0, 0, 0.22);
  transform: translateY(-1px);
}

.project-doc-card-top {
  display: inline-flex;
  align-items: center;
  gap: 8px;
}

.project-doc-card-ext {
  min-height: 18px;
  padding: 0 7px;
  border-radius: 999px;
  border: 1px solid rgba(255, 255, 255, 0.22);
  background: rgba(255, 255, 255, 0.1);
  color: rgba(255, 255, 255, 0.9);
  font-size: 10px;
  font-weight: 800;
  letter-spacing: 0.05em;
  display: inline-flex;
  align-items: center;
}

.project-doc-card-date {
  font-size: 11px;
  color: rgba(255, 255, 255, 0.65);
}

.project-doc-card-name {
  margin-top: 5px;
  color: #fff;
  font-size: 14px;
  font-weight: 700;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.project-doc-card-actions {
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

.project-doc-card .project-docs-mini-btn {
  width: 32px;
  height: 32px;
  min-height: 32px;
  padding: 0;
  justify-content: center;
}

.project-doc-card .project-docs-mini-btn span {
  display: none;
}

.project-docs-empty--card {
  border: 1px dashed rgba(255, 255, 255, 0.2);
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.02);
  padding: 18px 12px;
  text-align: center;
  font-style: normal;
}

.project-docs-item-surface {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  gap: 12px;
  border-radius: 12px;
  border: 1px solid rgba(255, 255, 255, 0.08);
  background: linear-gradient(165deg, rgba(255, 255, 255, 0.04), rgba(255, 255, 255, 0.02));
  padding: 10px 12px;
}

.project-docs-item:hover .project-docs-item-surface {
  border-color: rgba(236, 72, 153, 0.36);
  box-shadow: 0 8px 22px rgba(0, 0, 0, 0.28), 0 0 0 1px rgba(236, 72, 153, 0.15);
}

.project-docs-item-name-text {
  min-width: 0;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.project-docs-item-meta-row {
  margin-top: 6px;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}

.project-docs-item-type-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 20px;
  padding: 0 8px;
  border-radius: 999px;
  border: 1px solid rgba(236, 72, 153, 0.4);
  background: rgba(236, 72, 153, 0.13);
  color: #fbcfe8;
  font-size: 10px;
  font-weight: 800;
  letter-spacing: 0.05em;
}

.project-docs-doc-icon.is-pdf {
  background: linear-gradient(180deg, #fee2e2, #fecaca);
  border-color: rgba(248, 113, 113, 0.7);
}

@media (max-width: 980px) {
  .project-docs-board {
    grid-template-columns: 1fr;
  }
  .project-docs-kpis {
    grid-template-columns: 1fr;
  }
}

/* Modal preview documents projet */
.pdf-viewer-modal {
  position: fixed;
  inset: 0;
  z-index: 5000;
  display: none;
  align-items: center;
  justify-content: center;
  padding: 18px;
  background: rgba(5, 10, 20, 0.72);
}

.pdf-viewer-box {
  width: min(1100px, 100%);
  height: min(88vh, 860px);
  border-radius: 14px;
  border: 1px solid rgba(255, 255, 255, 0.12);
  background: rgba(9, 12, 24, 0.96);
  overflow: hidden;
  display: flex;
  flex-direction: column;
}

.pdf-viewer-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 12px 14px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
  color: #fff;
  font-weight: 700;
}

.pdf-viewer-frame {
  width: 100%;
  height: 100%;
  border: none;
  background: #0b1220;
}

.project-doc-assign-box {
  width: min(640px, 100%);
  height: auto;
}

.project-doc-assign-body {
  padding: 14px;
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.project-doc-assign-lead {
  margin: 0;
  color: rgba(255, 255, 255, 0.82);
  font-size: 13px;
}

.project-doc-assign-field {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.project-doc-assign-field > span {
  color: rgba(255, 255, 255, 0.85);
  font-size: 12px;
  font-weight: 700;
}

.project-doc-assign-field select,
.project-doc-assign-field input {
  min-height: 42px;
  border-radius: 12px;
  border: 1px solid rgba(255, 255, 255, 0.14);
  background: rgba(255, 255, 255, 0.06);
  color: #fff;
  padding: 0 12px;
}

.project-doc-assign-field select option {
  background: #0f172a;
}

.project-doc-assign-hint {
  padding: 10px 12px;
  border-radius: 12px;
  border: 1px solid rgba(139, 92, 246, 0.35);
  background: rgba(139, 92, 246, 0.12);
  color: rgba(233, 213, 255, 0.95);
  font-size: 12px;
}

.project-doc-assign-actions {
  display: flex;
  justify-content: flex-end;
  gap: 10px;
}

/* ===== NOTES ===== */

.notes-editable-modern {
  min-height: 170px;
  padding: 16px 18px;
  border-radius: 16px;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(255, 255, 255, 0.08);
  color: white;
  font-size: 15px;
  line-height: 1.6;
  outline: none;
}

.notes-editable-modern:empty:before {
  content: attr(placeholder);
  color: rgba(255, 255, 255, 0.35);
}

.project-wish-board-toggle {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 10px;
  padding: 9px 12px;
  border-radius: 12px;
  border: 1px solid rgba(255, 255, 255, 0.1);
  background: rgba(255, 255, 255, 0.04);
  color: rgba(255, 255, 255, 0.9);
  font-size: 13px;
  font-weight: 600;
}

.project-wish-board-toggle input {
  width: 17px;
  height: 17px;
  accent-color: #22c55e;
}

/* ===== SAVE POPUP ===== */

.save-popup {
  position: fixed;
  top: 22px;
  left: 50%;
  transform: translateX(-50%) translateY(-10px);
  padding: 12px 16px;
  border-radius: 14px;
  color: #fff;
  font-size: 14px;
  font-weight: 700;
  background: linear-gradient(135deg, rgba(236, 72, 153, 0.92), rgba(139, 92, 246, 0.92));
  box-shadow: 0 14px 35px rgba(0, 0, 0, 0.28);
  opacity: 0;
  pointer-events: none;
  transition: 0.25s ease;
  z-index: 5000;
}

.save-popup.show {
  opacity: 1;
  transform: translateX(-50%) translateY(0);
}

.hidden-native-date-picker {
  position: fixed;
  top: 12px;
  left: 12px;
  width: 1px;
  height: 1px;
  opacity: 0.01;
  pointer-events: none;
  z-index: -1;
}

/* ===== MODALES ===== */

.project-modal-overlay {
  position: fixed;
  inset: 0;
  z-index: 4000;
  display: none;
  align-items: center;
  justify-content: center;
  padding: 24px;
  background: rgba(5, 8, 18, 0.72);
  backdrop-filter: blur(12px);
}

.project-modal-overlay.active {
  display: flex;
}

.project-modal-card {
  width: min(720px, 100%);
  max-height: min(85vh, 760px);
  border-radius: 28px;
  border: 1px solid rgba(255, 255, 255, 0.1);
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.08), rgba(255, 255, 255, 0.04)),
    rgba(9, 12, 24, 0.96);
  box-shadow: 0 30px 80px rgba(0, 0, 0, 0.45);
  display: flex;
  flex-direction: column;
  overflow: hidden;
}

.project-modal-card-centered {
  margin: auto;
}

.project-modal-card-small {
  width: min(620px, 100%);
}

.project-modal-header {
  flex: 0 0 auto;
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 16px;
  padding: 24px 24px 18px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}

.project-modal-header h3 {
  margin: 0 0 6px;
  color: #fff;
  font-size: 22px;
  font-weight: 700;
}

.project-modal-header p {
  margin: 0;
  color: rgba(255, 255, 255, 0.62);
  font-size: 14px;
  line-height: 1.5;
}

.project-modal-close {
  appearance: none;
  border: 1px solid rgba(255, 255, 255, 0.1);
  background: rgba(255, 255, 255, 0.05);
  color: #fff;
  width: 42px;
  height: 42px;
  border-radius: 14px;
  cursor: pointer;
  transition: 0.2s ease;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex: 0 0 auto;
}

.project-modal-close svg {
  width: 16px;
  height: 16px;
  fill: none;
  stroke: #fff;
  stroke-width: 2.2;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.project-modal-close:hover {
  background: rgba(255, 255, 255, 0.1);
}

.project-modal-body {
  flex: 1 1 auto;
  min-height: 0;
  padding: 20px 24px;
  overflow-y: auto;
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.project-modal-search {
  position: sticky;
  top: 0;
  z-index: 2;
  padding-bottom: 8px;
  background: rgba(9, 12, 24, 0.96);
}

.artificier-picker-list {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.artificier-picker-empty {
  padding: 22px;
  border-radius: 18px;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(255, 255, 255, 0.08);
  color: rgba(255, 255, 255, 0.62);
  text-align: center;
}

.artificier-picker-item,
.statut-picker-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 16px 18px;
  border-radius: 18px;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(255, 255, 255, 0.08);
  cursor: pointer;
  transition: 0.2s ease;
}

.artificier-picker-item:hover,
.statut-picker-item:hover {
  transform: translateY(-1px);
  background: rgba(255, 255, 255, 0.06);
  border-color: rgba(255, 255, 255, 0.14);
}

.artificier-picker-item.active,
.statut-picker-item.active {
  border-color: rgba(236, 72, 153, 0.38);
  background: linear-gradient(135deg, rgba(236, 72, 153, 0.16), rgba(139, 92, 246, 0.14));
  box-shadow: 0 10px 24px rgba(236, 72, 153, 0.14);
}

.artificier-picker-main,
.statut-picker-main {
  display: flex;
  align-items: center;
  gap: 14px;
  min-width: 0;
  flex: 1;
}

.artificier-picker-avatar,
.statut-picker-avatar {
  width: 44px;
  height: 44px;
  border-radius: 14px;
  flex: 0 0 auto;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.08);
}

.artificier-picker-avatar svg,
.statut-picker-avatar svg {
  width: 20px;
  height: 20px;
  display: block;
  stroke: #ffffff;
  stroke-width: 2.2;
  fill: none;
  opacity: 1;
}

.artificier-picker-text,
.statut-picker-text {
  display: flex;
  flex-direction: column;
  gap: 3px;
  min-width: 0;
  flex: 1;
}

.artificier-picker-name,
.statut-picker-name {
  color: #fff;
  font-size: 15px;
  font-weight: 700;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.artificier-picker-sub,
.statut-picker-sub {
  color: rgba(255, 255, 255, 0.58);
  font-size: 13px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.artificier-picker-badges,
.statut-picker-badges {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 8px;
  justify-content: flex-end;
  flex: 0 0 auto;
}

.artificier-badge,
.statut-badge {
  padding: 7px 10px;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 600;
  white-space: nowrap;
  border: 1px solid rgba(255, 255, 255, 0.08);
  background: rgba(255, 255, 255, 0.06);
  color: rgba(255, 255, 255, 0.88);
}

.artificier-badge-qualification {
  background: rgba(236, 72, 153, 0.12);
  border-color: rgba(236, 72, 153, 0.2);
}

.statut-badge-cost {
  background: rgba(34, 197, 94, 0.12);
  border-color: rgba(34, 197, 94, 0.18);
}

.statut-badge-salary {
  background: rgba(59, 130, 246, 0.12);
  border-color: rgba(59, 130, 246, 0.18);
}

.project-modal-footer {
  flex: 0 0 auto;
  display: flex;
  justify-content: flex-end;
  gap: 10px;
  padding: 18px 24px 24px;
  border-top: 1px solid rgba(255, 255, 255, 0.08);
  background: rgba(9, 12, 24, 0.96);
}

/* ===== MODAL DATES ===== */

.date-assign-toolbar {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
}

.date-assign-list {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.date-assign-item {
  display: grid;
  grid-template-columns: 18px auto 1fr;
  align-items: center;
  gap: 12px;
  padding: 14px 16px;
  border-radius: 16px;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(255, 255, 255, 0.08);
  color: #fff;
  cursor: pointer;
}

.date-assign-item:hover {
  background: rgba(255, 255, 255, 0.06);
  border-color: rgba(255, 255, 255, 0.14);
}

.date-assign-item input[type="checkbox"] {
  width: 18px;
  height: 18px;
  accent-color: #ec4899;
}

.date-assign-item-chip {
  padding: 6px 10px;
  border-radius: 999px;
  color: #fff;
  font-size: 12px;
  font-weight: 800;
  text-transform: capitalize;
  border: 1px solid rgba(236, 72, 153, 0.18);
  background: linear-gradient(135deg, rgba(236, 72, 153, 0.14), rgba(139, 92, 246, 0.14));
}

.date-assign-item-label {
  color: #fff;
  font-weight: 600;
}

.route-expense-shell {
  margin-top: 10px;
  padding: 18px;
  border-radius: 18px;
  border: 1px solid rgba(255, 255, 255, 0.12);
  background:
    linear-gradient(160deg, rgba(15, 23, 42, 0.72), rgba(30, 41, 59, 0.52)),
    rgba(255, 255, 255, 0.02);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.05);
}

.route-expense-intro {
  margin-bottom: 12px;
  color: rgba(255, 255, 255, 0.62);
  font-size: 12px;
  line-height: 1.45;
}

.route-expense-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 13px;
}

.route-address-wrap {
  position: relative;
  min-width: 0;
}

.route-address-suggest-panel {
  position: absolute;
  left: 0;
  right: 0;
  top: calc(100% + 4px);
  z-index: 80;
  max-height: 240px;
  overflow-y: auto;
  border-radius: 12px;
  border: 1px solid rgba(236, 72, 153, 0.35);
  background: rgba(15, 23, 42, 0.98);
  box-shadow: 0 12px 32px rgba(0, 0, 0, 0.45);
}

.route-address-suggest-item {
  display: block;
  width: 100%;
  text-align: left;
  padding: 10px 12px;
  border: none;
  border-bottom: 1px solid rgba(255, 255, 255, 0.06);
  background: transparent;
  color: rgba(255, 255, 255, 0.92);
  font-size: 13px;
  line-height: 1.35;
  cursor: pointer;
  font-family: inherit;
}

.route-address-suggest-item:last-child {
  border-bottom: none;
}

.route-address-suggest-item:hover,
.route-address-suggest-item:focus-visible {
  background: rgba(236, 72, 153, 0.18);
  outline: none;
}

.route-extras-trip-row {
  display: flex;
  align-items: center;
  gap: 12px;
  min-width: 0;
}

.route-extras-trip-row #routeExtras {
  flex: 1;
  min-width: 0;
}

.route-trip-segment {
  flex-shrink: 0;
  min-width: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
}

.route-trip-segment__caption {
  display: block;
  width: 100%;
  text-align: center;
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: rgba(255, 255, 255, 0.45);
}

.route-round-trip-input {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

.route-trip-segment__track {
  display: inline-flex;
  align-items: stretch;
  border-radius: 9px;
  border: 1px solid rgba(255, 255, 255, 0.18);
  background: rgba(15, 23, 42, 0.65);
  overflow: hidden;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.05);
}

.route-trip-segment__opt {
  min-width: 72px;
  min-height: 30px;
  padding: 0 12px;
  border: none;
  border-radius: 0;
  background: transparent;
  color: rgba(255, 255, 255, 0.55);
  font-family: inherit;
  font-size: 12px;
  font-weight: 600;
  cursor: pointer;
  transition: color 0.15s ease, background 0.15s ease;
}

.route-trip-segment__opt + .route-trip-segment__opt {
  border-left: 1px solid rgba(255, 255, 255, 0.1);
}

.route-trip-segment__opt:hover {
  color: rgba(255, 255, 255, 0.92);
  background: rgba(255, 255, 255, 0.06);
}

.route-trip-segment__opt.is-active {
  color: #fff;
  background: linear-gradient(180deg, rgba(236, 72, 153, 0.88), rgba(219, 39, 119, 0.82));
}

.route-trip-segment__opt:focus-visible {
  outline: none;
  box-shadow: inset 0 0 0 2px rgba(236, 72, 153, 0.75);
  position: relative;
  z-index: 1;
}

.route-expense-result {
  grid-column: 1 / -1;
  min-height: 50px;
  border-radius: 14px;
  border: 1px solid rgba(34, 197, 94, 0.3);
  background: linear-gradient(135deg, rgba(22, 163, 74, 0.18), rgba(5, 150, 105, 0.15));
  padding: 0 16px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  color: #d1fae5;
  font-weight: 600;
}

.route-expense-result strong {
  color: #bbf7d0;
  font-size: 19px;
}

.pipeline-kpis {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
}

.pipeline-kpi {
  border: 1px solid rgba(255, 255, 255, 0.08);
  background:
    radial-gradient(120% 120% at 0% 0%, rgba(236, 72, 153, 0.14), transparent 46%),
    rgba(255, 255, 255, 0.04);
  border-radius: 14px;
  padding: 12px 14px;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.05);
}

.pipeline-kpi span {
  color: rgba(255, 255, 255, 0.6);
  font-size: 12px;
}

.pipeline-kpi strong {
  display: block;
  margin-top: 8px;
  color: #ffffff;
  font-size: 28px;
  font-weight: 800;
  letter-spacing: -0.02em;
  line-height: 1.05;
  text-shadow: 0 8px 24px rgba(236, 72, 153, 0.22);
}

#pipelineCurrentLabel {
  font-size: 22px;
}

#pipelineDoneCount {
  color: #86efac;
}

.pipeline-progress {
  margin: 12px 0 16px;
  height: 10px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.08);
  overflow: hidden;
}

.pipeline-progress i {
  display: block;
  width: 0%;
  height: 100%;
  background: linear-gradient(90deg, #22c55e, #38bdf8);
  transition: width 0.25s ease;
}

.pipeline-timeline {
  position: relative;
  padding-left: 24px;
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.pipeline-timeline::before {
  content: "";
  position: absolute;
  left: 9px;
  top: 8px;
  bottom: 8px;
  width: 2px;
  background: rgba(255, 255, 255, 0.14);
}

.pipeline-step {
  position: relative;
  padding: 12px 14px 12px 58px;
  border-radius: 14px;
  border: 1px solid rgba(255, 255, 255, 0.08);
  background: rgba(255, 255, 255, 0.04);
}

.pipeline-step.is-done {
  border-color: rgba(187, 247, 208, 0.42);
  background: rgba(187, 247, 208, 0.18);
  box-shadow: 0 8px 18px rgba(187, 247, 208, 0.12);
}

.pipeline-step::before {
  content: "";
  position: absolute;
  left: -21px;
  top: 17px;
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: #ec4899;
  box-shadow: 0 0 0 4px rgba(236, 72, 153, 0.2);
}

.pipeline-state-icon {
  position: absolute;
  left: 14px;
  top: 50%;
  transform: translateY(-50%);
  width: 30px;
  height: 30px;
  border-radius: 999px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: 1px solid rgba(255, 255, 255, 0.2);
  background: rgba(255, 255, 255, 0.06);
}

.pipeline-state-icon svg {
  width: 18px;
  height: 18px;
  fill: none;
  stroke-width: 2.8;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.pipeline-state-icon.done {
  border-color: rgba(34, 197, 94, 0.45);
  background: rgba(34, 197, 94, 0.16);
}

.pipeline-state-icon.done svg {
  stroke: #22c55e;
}

.pipeline-state-icon.not-done {
  border-color: rgba(239, 68, 68, 0.45);
  background: rgba(239, 68, 68, 0.16);
}

.pipeline-state-icon.not-done svg {
  stroke: #ef4444;
}

.pipeline-step-head {
  display: grid;
  grid-template-columns: 30px minmax(0, 1fr) auto;
  gap: 10px;
  align-items: start;
}

.pipeline-step-order {
  width: 30px;
  height: 30px;
  border-radius: 9px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: #fff;
  font-size: 12px;
  font-weight: 800;
  background: rgba(236, 72, 153, 0.2);
}

.pipeline-step-meta strong { font-size: 14px; }

.pipeline-step-meta p {
  margin: 4px 0 0;
  color: rgba(255, 255, 255, 0.62);
  font-size: 12px;
}

.pipeline-step-badge {
  padding: 6px 9px;
  border-radius: 999px;
  font-size: 11px;
  border: 1px solid rgba(255, 255, 255, 0.12);
  background: rgba(255, 255, 255, 0.05);
}

.pipeline-step-controls {
  margin-top: 10px;
  display: flex;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
}

.pipeline-status-open-btn {
  border: 1px solid rgba(255, 255, 255, 0.16);
  background: rgba(255, 255, 255, 0.06);
  color: #e2e8f0;
  border-radius: 10px;
  padding: 8px 12px;
  font-size: 12px;
  font-weight: 700;
  cursor: pointer;
}

.pipeline-status-open-btn:hover {
  border-color: rgba(56, 189, 248, 0.45);
  background: rgba(56, 189, 248, 0.16);
}

#pipelineStatusModal {
  align-items: center;
  justify-content: center;
}

#pipelineStatusModal .project-modal-card {
  margin: auto;
}

.pipeline-status-group {
  display: inline-flex;
  gap: 6px;
  flex-wrap: wrap;
}

.pipeline-status-btn {
  border: 1px solid rgba(255, 255, 255, 0.14);
  background: rgba(255, 255, 255, 0.04);
  color: #cbd5e1;
  border-radius: 999px;
  padding: 6px 10px;
  font-size: 11px;
  cursor: pointer;
}

.pipeline-status-btn.active {
  color: #fff;
  border-color: rgba(56, 189, 248, 0.45);
  background: rgba(56, 189, 248, 0.2);
}

.pipeline-dates {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
}

.pipeline-dates label {
  min-width: 220px;
  display: grid;
  grid-template-columns: 1fr;
  gap: 6px;
  color: rgba(255, 255, 255, 0.82);
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  padding: 8px 10px;
  border-radius: 12px;
  border: 1px solid rgba(255, 255, 255, 0.1);
  background: linear-gradient(145deg, rgba(255, 255, 255, 0.06), rgba(255, 255, 255, 0.02));
}

.pipeline-dates input {
  min-height: 38px;
  border-radius: 10px;
  padding: 0 12px;
  border: 1px solid rgba(255, 255, 255, 0.14);
  background: rgba(8, 12, 24, 0.78);
  color: #f8fafc;
  font-size: 13px;
  font-weight: 600;
  font-variant-numeric: tabular-nums;
  outline: none;
  transition: border-color 0.18s ease, box-shadow 0.18s ease, transform 0.18s ease;
}

.pipeline-dates input:focus {
  border-color: rgba(56, 189, 248, 0.6);
  box-shadow: 0 0 0 3px rgba(56, 189, 248, 0.14);
  transform: translateY(-1px);
}

.pipeline-dates input::-webkit-calendar-picker-indicator {
  filter: invert(1) opacity(0.85);
  cursor: pointer;
}

.pipeline-interest {
  margin-top: 14px;
  padding: 12px;
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.04);
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
}

.pipeline-interest label {
  color: rgba(255, 255, 255, 0.8);
  font-size: 13px;
  font-weight: 600;
}

/* ===== RESPONSIVE ===== */

.project-bottom-full-span {
  grid-column: 1 / -1;
  display: flex;
  flex-direction: column;
  gap: 22px;
}

.project-bottom-full-span .team-card-modern,
.project-bottom-full-span .project-card,
.project-bottom-full-span .settings-panel {
  width: 100%;
}

.team-table-modern {
  min-width: 0;
}

.team-table-modern thead th,
.team-table-modern tbody td {
  white-space: normal;
}

@media (max-width: 1200px) {
  .project-layout-modern {
    grid-template-columns: 1fr;
  }

  .calc-card-modern {
    position: static;
    top: auto;
  }

  .project-fixed-overview {
    position: static;
    top: auto;
  }
}

@media (max-width: 900px) {
  .project-info-grid,
  .budget-grid-modern,
  .project-form-grid,
  .cerfa-option-groups {
    grid-template-columns: 1fr;
  }

  .project-form-grid .form-group.full {
    grid-column: auto;
  }

  .route-expense-grid {
    grid-template-columns: 1fr;
  }

  .route-extras-trip-row {
    flex-direction: column;
    align-items: stretch;
  }

  .route-trip-segment {
    align-items: center;
  }

  .pipeline-kpis {
    grid-template-columns: 1fr;
  }

  .project-date-card-inner {
    grid-template-columns: 42px minmax(0, 1fr);
  }

  .project-date-card-actions {
    grid-column: 1 / -1;
    justify-content: flex-end;
  }
}

@media (max-width: 760px) {
  .project-header {
    flex-direction: column;
    align-items: stretch;
  }

  .project-header-actions {
    width: 100%;
  }

  .project-header-actions .action-btn,
  .team-actions-modern .action-btn {
    flex: 1;
  }

  .project-header h1 {
    font-size: 30px;
  }

  .checkbox-grid-modern,
  .radio-group-modern {
    flex-direction: column;
    align-items: flex-start;
  }

  .project-modal-overlay {
    padding: 12px;
  }

  .project-modal-card {
    width: 100%;
    max-height: calc(100vh - 24px);
    border-radius: 22px;
  }

  .project-modal-header,
  .project-modal-body,
  .project-modal-footer {
    padding-left: 16px;
    padding-right: 16px;
  }

  .project-modal-footer {
    flex-direction: column;
  }

  .project-modal-footer .action-btn {
    width: 100%;
  }

  .calc-label-modern {
    font-size: 13px;
  }

  .calc-row-modern strong {
    font-size: 15px;
  }

  .planning-state-segmented {
    flex-direction: column;
    border-radius: 16px;
    padding: 6px;
  }

  .planning-state-option {
    width: 100%;
  }

  .date-assign-toolbar {
    flex-direction: column;
  }

  .date-assign-toolbar .action-btn {
    width: 100%;
  }

  .date-assign-item {
    grid-template-columns: 18px auto 1fr;
  }

  .project-date-card {
    padding-left: 0;
  }

  .project-dates-track::before,
  .project-date-card-line {
    display: none;
  }

  .project-date-card-inner {
    grid-template-columns: 1fr;
  }

  .project-date-card-order {
    width: 42px;
    height: 42px;
  }

  .project-date-card-main {
    flex-direction: column;
    align-items: flex-start;
  }

  .project-date-card-full {
    white-space: normal;
  }
}

/* --- Espace client (modal fiche projet — même famille que modal admin / artificiers) --- */

.client-portal-modal-lead {
  margin: -6px 0 14px;
  font-size: 14px;
  line-height: 1.55;
}

.client-portal-saas {
  display: flex;
  flex-direction: column;
  flex: 1;
  min-height: 0;
  margin-top: 2px;
}

.client-portal-tabs {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  padding: 2px 0 12px;
  margin: 0 0 4px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.client-portal-tab {
  appearance: none;
  border: 1px solid rgba(255, 255, 255, 0.12);
  background: rgba(255, 255, 255, 0.04);
  color: rgba(255, 255, 255, 0.62);
  font-size: 12px;
  font-weight: 600;
  padding: 8px 14px;
  border-radius: 10px;
  cursor: pointer;
  transition:
    background 0.15s ease,
    color 0.15s ease,
    border-color 0.15s ease;
}

.client-portal-tab:hover {
  color: rgba(255, 255, 255, 0.92);
  border-color: rgba(255, 255, 255, 0.22);
}

.client-portal-tab.is-active {
  color: #fff;
  border-color: rgba(236, 72, 153, 0.48);
  background: rgba(236, 72, 153, 0.14);
}

.client-portal-tab-panels-wrap {
  flex: 1;
  min-height: 0;
  display: flex;
  flex-direction: column;
}

.client-portal-tab-panel {
  flex: 1;
  min-height: 0;
  display: flex;
  flex-direction: column;
}

.client-portal-tab-panel[hidden] {
  display: none !important;
}

.client-portal-tab-panel-scroll {
  flex: 1;
  min-height: 0;
  overflow-x: hidden;
  overflow-y: auto;
  scrollbar-width: thin;
  scrollbar-color: rgba(236, 72, 153, 0.35) rgba(0, 0, 0, 0.2);
  padding-right: 8px;
  margin-right: -4px;
}

.client-portal-events-block--flush {
  padding-top: 2px;
}

.client-portal-activity-head {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  align-items: flex-start;
  gap: 12px;
  margin-bottom: 4px;
}

.client-portal-activity-head-text {
  flex: 1;
  min-width: 0;
}

.client-portal-activity-head .client-portal-upload-lead {
  margin-bottom: 0;
}

.client-portal-reset-activity-btn {
  flex-shrink: 0;
  align-self: flex-start;
}

#clientPortalModal.modal.modal-overlay-modern .modal-content.modal-box-modern.client-portal-admin-modal {
  display: flex !important;
  flex-direction: column !important;
  max-height: min(92vh, 880px) !important;
  overflow: hidden !important;
  padding-bottom: 18px !important;
}

#clientPortalModal .client-portal-modal-scroll {
  flex: 1;
  min-height: 0;
  overflow-x: hidden;
  overflow-y: auto;
  scrollbar-width: thin;
  scrollbar-color: rgba(236, 72, 153, 0.35) rgba(0, 0, 0, 0.2);
  margin-right: -4px;
  padding-right: 10px;
}

.client-portal-modal-body-inner {
  display: flex;
  flex-direction: column;
  gap: 12px;
  padding-bottom: 4px;
}

.client-portal-modal-body {
  display: flex;
  flex-direction: column;
  gap: 16px;
  padding: 16px;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.03), rgba(255, 255, 255, 0.01)),
    rgba(7, 10, 20, 0.72);
}

.client-portal-account-block,
.client-portal-upload-block,
.client-portal-events-block {
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 14px;
  padding: 14px;
  background: rgba(255, 255, 255, 0.03);
}

.client-portal-account-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(220px, 1fr));
  gap: 10px;
}

.client-portal-status {
  margin: 0 0 8px;
  font-size: 13px;
  color: rgba(255, 255, 255, 0.7);
  line-height: 1.5;
}

.client-portal-link-line {
  margin: 0 0 10px;
  font-size: 13px;
  color: rgba(255, 255, 255, 0.55);
}

.client-portal-public-link {
  color: #93c5fd;
  font-weight: 600;
  word-break: break-all;
}

.client-portal-field {
  display: flex;
  flex-direction: column;
  gap: 6px;
  font-size: 12px;
  font-weight: 600;
  color: rgba(255, 255, 255, 0.55);
}

.client-portal-field input {
  height: 44px;
  border-radius: 12px;
  border: 1px solid rgba(255, 255, 255, 0.12);
  background: rgba(255, 255, 255, 0.05);
  color: #fff;
  padding: 0 12px;
  font-size: 14px;
}

.client-portal-password-wrap {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 8px;
  align-items: center;
}

.client-portal-password-wrap input {
  width: 100%;
}

.client-portal-pass-toggle-btn {
  height: 44px;
  min-width: 70px;
  border-radius: 12px;
  border: 1px solid rgba(255, 255, 255, 0.16);
  background: rgba(255, 255, 255, 0.07);
  color: #fff;
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
}

.client-portal-pass-toggle-btn:hover {
  border-color: rgba(147, 197, 253, 0.55);
  background: rgba(147, 197, 253, 0.16);
}

.client-portal-actions {
  margin-top: 10px;
}

.client-portal-actions-row {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  align-items: center;
}

.project-btn-danger-outline {
  border: 1px solid rgba(248, 113, 113, 0.45) !important;
  background: rgba(248, 113, 113, 0.08) !important;
  color: #fecaca !important;
}

.project-btn-danger-outline:hover {
  background: rgba(248, 113, 113, 0.16) !important;
  border-color: rgba(248, 113, 113, 0.65) !important;
}

.client-portal-upload-block {
  margin-top: 0;
}

.client-portal-upload-title {
  margin: 0 0 6px;
  font-size: 15px;
  font-weight: 700;
  color: #fff;
}

.client-portal-upload-lead {
  margin: 0 0 12px;
  font-size: 13px;
  color: rgba(255, 255, 255, 0.55);
  line-height: 1.5;
}

.client-portal-upload-row {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  align-items: center;
}

#clientPortalModal .client-portal-upload-row--modal {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px 12px;
  align-items: center;
}

#clientPortalModal .client-portal-upload-row--modal .client-portal-file-picker {
  grid-column: 1 / -1;
  min-width: 0;
}

#clientPortalModal .client-portal-upload-row--modal .client-portal-text-input {
  min-width: 0;
}

#clientPortalModal .client-portal-upload-row--modal #clientPortalUploadBtn {
  grid-column: 1 / -1;
  justify-self: start;
}

@media (max-width: 640px) {
  #clientPortalModal .client-portal-upload-row--modal {
    grid-template-columns: 1fr;
  }
}

/* Sélecteur de fichier — UX custom (input natif masqué) */
.client-portal-file-picker {
  position: relative;
  flex: 1;
  min-width: 0;
  min-height: 44px;
}

.client-portal-file-input-native {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

.client-portal-file-picker-ui {
  display: block;
  cursor: pointer;
  margin: 0;
}

.client-portal-file-picker-surface {
  display: flex;
  align-items: center;
  gap: 12px;
  min-height: 44px;
  padding: 6px 8px 6px 10px;
  border-radius: 12px;
  border: 1px solid rgba(255, 255, 255, 0.14);
  background:
    linear-gradient(135deg, rgba(99, 102, 241, 0.08), rgba(236, 72, 153, 0.06)),
    rgba(7, 10, 20, 0.55);
  transition:
    border-color 0.18s ease,
    box-shadow 0.18s ease,
    background 0.18s ease;
}

.client-portal-file-picker:hover .client-portal-file-picker-surface {
  border-color: rgba(236, 72, 153, 0.38);
  background:
    linear-gradient(135deg, rgba(99, 102, 241, 0.12), rgba(236, 72, 153, 0.09)),
    rgba(12, 16, 28, 0.65);
}

.client-portal-file-picker:focus-within .client-portal-file-picker-surface {
  outline: none;
  border-color: rgba(236, 72, 153, 0.55);
  box-shadow: 0 0 0 3px rgba(236, 72, 153, 0.2);
}

.client-portal-file-picker-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  flex-shrink: 0;
  padding: 8px 16px;
  border-radius: 10px;
  font-size: 13px;
  font-weight: 600;
  letter-spacing: 0.02em;
  color: #fff;
  border: 1px solid rgba(236, 72, 153, 0.42);
  background: linear-gradient(145deg, rgba(236, 72, 153, 0.35), rgba(99, 102, 241, 0.28));
  box-shadow: 0 1px 0 rgba(255, 255, 255, 0.06) inset;
  transition:
    filter 0.15s ease,
    border-color 0.15s ease,
    transform 0.12s ease;
}

.client-portal-file-picker:hover .client-portal-file-picker-btn {
  filter: brightness(1.08);
  border-color: rgba(244, 114, 182, 0.65);
}

.client-portal-file-picker:active .client-portal-file-picker-btn {
  transform: scale(0.98);
}

.client-portal-file-picker-icon {
  flex-shrink: 0;
  opacity: 0.95;
}

.client-portal-file-picker-filename {
  flex: 1;
  min-width: 0;
  font-size: 13px;
  line-height: 1.35;
  color: rgba(255, 255, 255, 0.42);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.client-portal-file-picker-filename.is-selected {
  color: rgba(255, 255, 255, 0.9);
  font-weight: 500;
}

@media (max-width: 520px) {
  .client-portal-file-picker-surface {
    flex-direction: column;
    align-items: stretch;
    gap: 10px;
  }

  .client-portal-file-picker-btn {
    justify-content: center;
  }

  .client-portal-file-picker-filename {
    white-space: normal;
    word-break: break-word;
  }
}

.client-portal-text-input {
  flex: 1;
  min-width: 220px;
  min-height: 38px;
  padding: 0 12px;
  border-radius: 10px;
  border: 1px solid rgba(255, 255, 255, 0.12);
  background: rgba(255, 255, 255, 0.05);
  color: #fff;
  font-size: 13px;
}

.client-portal-text-input:focus {
  outline: none;
  border-color: rgba(236, 72, 153, 0.5);
  box-shadow: 0 0 0 3px rgba(236, 72, 153, 0.16);
}

.client-portal-upload-msg {
  margin: 8px 0 0;
  min-height: 1.2em;
  font-size: 12px;
  color: #6ee7b7;
}

.client-portal-upload-progress {
  margin-top: 8px;
  display: none;
  align-items: center;
  gap: 10px;
}

.client-portal-upload-progress.is-active {
  display: flex;
}

.client-portal-upload-progress-bar {
  flex: 1;
  height: 10px;
  border-radius: 999px;
  overflow: hidden;
  background: rgba(255, 255, 255, 0.12);
  border: 1px solid rgba(255, 255, 255, 0.12);
}

.client-portal-upload-progress-bar > span {
  display: block;
  height: 100%;
  width: 0%;
  border-radius: 999px;
  background: linear-gradient(90deg, #8b5cf6, #ec4899);
  transition: width 0.15s linear;
}

.client-portal-upload-progress.is-error .client-portal-upload-progress-bar > span {
  background: linear-gradient(90deg, #ef4444, #f97316);
}

.client-portal-upload-progress.is-success .client-portal-upload-progress-bar > span {
  background: linear-gradient(90deg, #22c55e, #16a34a);
}

.client-portal-upload-progress-text {
  min-width: 44px;
  text-align: right;
  color: rgba(255, 255, 255, 0.85);
  font-size: 12px;
  font-weight: 700;
}

.client-portal-file-ul {
  list-style: none;
  margin: 12px 0 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

#clientPortalModal .client-portal-file-ul {
  max-height: min(260px, 32vh);
  overflow-y: auto;
}

.client-portal-file-li {
  display: flex;
  flex-wrap: nowrap;
  align-items: center;
  gap: 12px;
  padding: 10px 12px;
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.1);
}

.client-portal-file-li-text {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.client-portal-file-li-actions {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  flex-shrink: 0;
}

.client-portal-file-icon-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 36px;
  height: 36px;
  padding: 0;
  border-radius: 10px;
  border: 1px solid rgba(129, 140, 248, 0.35);
  background: rgba(99, 102, 241, 0.12);
  color: #c7d2fe;
  cursor: pointer;
  transition:
    background 0.15s ease,
    border-color 0.15s ease,
    color 0.15s ease,
    transform 0.1s ease;
}

.client-portal-file-icon-btn:hover {
  background: rgba(99, 102, 241, 0.22);
  border-color: rgba(165, 180, 252, 0.55);
  color: #eef2ff;
}

.client-portal-file-icon-btn:active {
  transform: scale(0.96);
}

.client-portal-file-icon-btn:focus {
  outline: none;
}

.client-portal-file-icon-btn:focus-visible {
  box-shadow: 0 0 0 3px rgba(99, 102, 241, 0.35);
}

.client-portal-file-icon-btn--danger {
  border-color: rgba(248, 113, 113, 0.35);
  background: rgba(248, 113, 113, 0.1);
  color: #fca5a5;
}

.client-portal-file-icon-btn--danger:hover {
  background: rgba(248, 113, 113, 0.2);
  border-color: rgba(252, 165, 165, 0.55);
  color: #fecaca;
}

.client-portal-file-name {
  font-size: 13px;
  font-weight: 600;
  color: #fff;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.client-portal-file-meta {
  font-size: 12px;
  color: rgba(255, 255, 255, 0.45);
}

@media (max-width: 520px) {
  .client-portal-file-li {
    flex-wrap: wrap;
  }

  .client-portal-file-li-actions {
    width: 100%;
    justify-content: flex-end;
  }
}

.client-portal-file-empty {
  font-size: 13px;
  color: rgba(255, 255, 255, 0.45);
  padding: 8px 0;
}

.client-portal-events-block {
  margin-top: 0;
}

.client-portal-events-ul {
  list-style: none;
  margin: 10px 0 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 8px;
  max-height: 220px;
  overflow: auto;
}

.client-portal-event-li,
.client-portal-event-empty {
  padding: 9px 10px;
  border-radius: 10px;
  border: 1px solid rgba(255, 255, 255, 0.08);
  background: rgba(255, 255, 255, 0.04);
  font-size: 12px;
  line-height: 1.45;
  color: rgba(255, 255, 255, 0.82);
}

.client-portal-event-empty {
  color: rgba(255, 255, 255, 0.5);
}

.client-portal-ticket-list {
  display: flex;
  flex-direction: column;
  gap: 10px;
  margin-top: 10px;
  max-height: min(52vh, 480px);
  overflow: auto;
}

.client-portal-ticket-card {
  border: 1px solid rgba(255, 255, 255, 0.12);
  background: rgba(255, 255, 255, 0.05);
  border-radius: 12px;
  padding: 12px;
}

.client-portal-ticket-card-top {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 12px;
  margin-bottom: 4px;
}

.client-portal-ticket-card-head {
  min-width: 0;
  flex: 1;
}

.client-portal-ticket-delete {
  flex-shrink: 0;
  white-space: nowrap;
}

.client-portal-ticket-subject {
  margin: 0;
  color: #fff;
  font-weight: 700;
  font-size: 13px;
}

.client-portal-ticket-meta {
  margin: 4px 0 0;
  color: rgba(255, 255, 255, 0.55);
  font-size: 12px;
}

.client-portal-ticket-msg-row {
  display: flex;
  gap: 8px;
  align-items: flex-start;
  margin-top: 6px;
}

.client-portal-ticket-msg-row .client-portal-ticket-msg {
  flex: 1;
  min-width: 0;
  margin-top: 0;
}

.client-portal-msg-delete {
  flex-shrink: 0;
  width: 30px;
  height: 30px;
  padding: 0;
  border-radius: 8px;
  border: 1px solid rgba(248, 113, 113, 0.35);
  background: rgba(248, 113, 113, 0.1);
  color: #fca5a5;
  font-size: 20px;
  line-height: 1;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  transition:
    background 0.15s ease,
    border-color 0.15s ease;
}

.client-portal-msg-delete:hover {
  background: rgba(248, 113, 113, 0.18);
  border-color: rgba(248, 113, 113, 0.55);
}

.client-portal-ticket-msg {
  border-radius: 10px;
  padding: 8px 10px;
  margin-top: 6px;
  font-size: 12px;
  line-height: 1.4;
  color: rgba(255, 255, 255, 0.9);
}

.client-portal-ticket-msg--client {
  background: rgba(236, 72, 153, 0.16);
  border: 1px solid rgba(236, 72, 153, 0.28);
}

.client-portal-ticket-msg--staff {
  background: rgba(99, 102, 241, 0.16);
  border: 1px solid rgba(129, 140, 248, 0.28);
}

.client-portal-ticket-reply {
  display: flex;
  gap: 8px;
  margin-top: 10px;
  align-items: center;
}

.client-portal-ticket-reply input {
  flex: 1;
  min-width: 200px;
  min-height: 34px;
  border-radius: 10px;
  border: 1px solid rgba(255, 255, 255, 0.12);
  background: rgba(255, 255, 255, 0.04);
  color: #fff;
  padding: 0 10px;
}

.client-portal-ticket-empty {
  font-size: 12px;
  color: rgba(255, 255, 255, 0.55);
}

/* Vote interactif — aperçu sur la fiche projet */
.interactive-vote-project-card {
  padding: 22px 22px 20px;
  border: 1px solid rgba(129, 140, 248, 0.18);
  background:
    linear-gradient(145deg, rgba(99, 102, 241, 0.08), rgba(236, 72, 153, 0.05)),
    rgba(9, 12, 24, 0.9);
}

.interactive-vote-inline-block {
  margin-top: 14px;
  padding-top: 14px;
  border-top: 1px solid rgba(255, 255, 255, 0.08);
}

.interactive-vote-inline-block--standalone {
  margin-top: 0;
  padding-top: 0;
  border-top: none;
}

.interactive-vote-inline-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 10px;
  margin-bottom: 8px;
}

.interactive-vote-inline-head h3 {
  margin: 0;
  font-size: 15px;
  color: #fff;
}

.interactive-vote-results {
  display: grid;
  gap: 8px;
}

.interactive-vote-result-row {
  padding: 10px 12px;
  border-radius: 12px;
  border: 1px solid rgba(255, 255, 255, 0.1);
  background: rgba(255, 255, 255, 0.04);
}

.interactive-vote-result-top {
  display: flex;
  justify-content: space-between;
  gap: 10px;
  margin-bottom: 6px;
  font-size: 13px;
  color: #fff;
}

.interactive-vote-result-bar {
  height: 9px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.1);
  overflow: hidden;
}

.interactive-vote-result-bar > span {
  display: block;
  height: 100%;
  background: linear-gradient(90deg, #8b5cf6, #ec4899);
}

.interactive-vote-empty {
  color: rgba(255, 255, 255, 0.55);
  font-size: 13px;
}

/* Popup style aligned with Pyromap popup family */
.pip-hidden { display: none !important; }

.pip-style-studio-backdrop {
  position: fixed;
  inset: 0;
  z-index: 9988;
  background: transparent;
}

.pip-style-popup {
  position: fixed;
  inset: 0;
  z-index: 9989;
  display: grid;
  place-items: center;
  padding: 16px;
}

.pip-style-popup.pip-style-popup--portal .pip-style-popup__panel.interactive-vote-popup-panel {
  width: min(1200px, 98vw);
  max-height: 92vh;
  border-radius: 18px;
  border: 1px solid rgba(255, 255, 255, 0.14);
  background: rgba(9, 12, 22, 0.98);
  box-shadow: 0 30px 90px rgba(0, 0, 0, 0.55);
  display: flex;
  flex-direction: column;
}

.pip-style-popup.pip-style-popup--portal .pip-style-popup__panel.operational-access-popup-panel {
  width: min(720px, 96vw);
  max-height: 85vh;
  border-radius: 18px;
  border: 1px solid rgba(255, 255, 255, 0.14);
  background: rgba(9, 12, 22, 0.98);
  box-shadow: 0 30px 90px rgba(0, 0, 0, 0.55);
  display: flex;
  flex-direction: column;
}

.pip-style-popup__head {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  align-items: center;
  padding: 14px 18px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.09);
}

.pip-style-popup__head-text { display: flex; flex-direction: column; gap: 2px; }
.pip-style-popup__title { margin: 0; color: #fff; font-size: 19px; }
.pip-style-popup__lead { color: rgba(255, 255, 255, 0.58); font-size: 12px; }

.pip-style-popup__close {
  width: 34px;
  height: 34px;
  border-radius: 10px;
  border: 1px solid rgba(255, 255, 255, 0.14);
  background: rgba(255, 255, 255, 0.06);
  color: #fff;
  cursor: pointer;
}

.interactive-vote-popup-body {
  overflow: auto;
  padding: 16px 18px 18px;
}

@media (max-width: 980px) {
  .client-portal-account-grid {
    grid-template-columns: 1fr;
  }
}

.interactive-vote-msg {
  min-height: 1.2em;
  margin: 0 0 10px;
  color: #86efac;
  font-size: 13px;
}

.interactive-vote-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 10px;
  margin-bottom: 10px;
}

.interactive-vote-popup-body label {
  display: flex;
  flex-direction: column;
  gap: 6px;
  font-size: 12px;
  color: #cbd5e1;
}

.interactive-vote-popup-body input,
.interactive-vote-popup-body textarea,
.interactive-vote-popup-body select {
  border-radius: 10px;
  border: 1px solid rgba(255, 255, 255, 0.14);
  background: rgba(15, 23, 42, 0.62);
  color: #fff;
  min-height: 38px;
  padding: 8px 10px;
}

.interactive-vote-options {
  display: grid;
  gap: 8px;
}

.interactive-vote-option {
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 12px;
  padding: 10px;
  background: rgba(255, 255, 255, 0.03);
}

.interactive-vote-option-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 8px;
}

.interactive-vote-actions {
  margin-top: 12px;
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  align-items: center;
}

.operational-access-popup-body {
  overflow: auto;
  padding: 16px 18px 18px;
}

.operational-access-msg {
  min-height: 1.2em;
  margin: 0 0 10px;
  color: #86efac;
  font-size: 13px;
}

.operational-access-table-wrap {
  overflow-x: auto;
  border-radius: 12px;
  border: 1px solid rgba(255, 255, 255, 0.1);
}

.operational-access-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 13px;
}

.operational-access-table thead th {
  text-align: left;
  padding: 10px 12px;
  color: rgba(255, 255, 255, 0.55);
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
  background: rgba(255, 255, 255, 0.04);
}

.operational-access-table tbody td {
  padding: 10px 12px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.06);
  color: rgba(255, 255, 255, 0.92);
  vertical-align: middle;
}

.operational-access-table tbody tr:last-child td {
  border-bottom: none;
}

.operational-access-email {
  font-weight: 600;
}

.operational-access-cb {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
}

.operational-access-cb input {
  width: 18px;
  height: 18px;
  accent-color: #22c55e;
  cursor: pointer;
}

.operational-access-empty {
  padding: 14px 12px;
  color: rgba(255, 255, 255, 0.55);
  font-size: 13px;
}

.operational-access-actions {
  margin-top: 14px;
  display: flex;
  justify-content: flex-end;
  gap: 10px;
}

.pip-style-popup.pip-style-popup--portal .pip-style-popup__panel.project-contracts-popup-panel {
  width: min(920px, 96vw);
  max-height: 85vh;
  border-radius: 18px;
  border: 1px solid rgba(255, 255, 255, 0.14);
  background: rgba(9, 12, 22, 0.98);
  box-shadow: 0 30px 90px rgba(0, 0, 0, 0.55);
  display: flex;
  flex-direction: column;
}

.project-contracts-popup-body {
  overflow: auto;
  padding: 16px 18px 18px;
}

.project-contracts-msg {
  min-height: 1.2em;
  margin: 0 0 10px;
  color: #86efac;
  font-size: 13px;
}

.project-contracts-list {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.project-contracts-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  gap: 10px;
  border: 1px solid rgba(255, 255, 255, 0.11);
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.04);
  padding: 10px 12px;
}

.project-contracts-row-title {
  color: #fff;
  font-size: 13px;
  font-weight: 700;
}

.project-contracts-row-sub {
  margin-top: 4px;
  color: rgba(255, 255, 255, 0.6);
  font-size: 12px;
}

.project-contracts-row-actions {
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

.project-contracts-icon-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 36px;
  height: 36px;
  border-radius: 10px;
  border: 1px solid rgba(129, 140, 248, 0.35);
  background: rgba(99, 102, 241, 0.12);
  color: #c7d2fe;
  cursor: pointer;
  transition: background 0.15s ease, border-color 0.15s ease, color 0.15s ease, transform 0.1s ease;
  text-decoration: none;
}

.project-contracts-icon-btn:hover {
  background: rgba(99, 102, 241, 0.22);
  border-color: rgba(165, 180, 252, 0.55);
  color: #eef2ff;
}

.project-contracts-icon-btn svg {
  width: 18px;
  height: 18px;
  fill: none;
  stroke: currentColor;
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.project-contracts-icon-btn--danger {
  border-color: rgba(248, 113, 113, 0.35);
  background: rgba(248, 113, 113, 0.1);
  color: #fca5a5;
}

.project-contracts-icon-btn--danger:hover {
  background: rgba(248, 113, 113, 0.2);
  border-color: rgba(252, 165, 165, 0.55);
  color: #fecaca;
}

.planning-infos-artificier-lead {
  margin: 0 0 16px;
  font-size: 13px;
  line-height: 1.55;
  color: rgba(248, 250, 252, 0.72);
}

.planning-infos-artificier-field {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.planning-infos-artificier-field span {
  font-size: 13px;
  font-weight: 600;
  color: rgba(248, 250, 252, 0.85);
}

.planning-infos-artificier-field textarea {
  width: 100%;
  box-sizing: border-box;
  min-height: 220px;
  padding: 12px 14px;
  border-radius: 12px;
  border: 1px solid rgba(255, 255, 255, 0.12);
  background: rgba(0, 0, 0, 0.25);
  color: rgba(248, 250, 252, 0.96);
  font-family: inherit;
  font-size: 13px;
  line-height: 1.45;
  resize: vertical;
}

.planning-infos-artificier-field textarea:focus {
  outline: none;
  border-color: rgba(236, 72, 153, 0.45);
  box-shadow: 0 0 0 3px rgba(236, 72, 153, 0.12);
}

.planning-infos-artificier-field textarea::placeholder {
  color: rgba(248, 250, 252, 0.35);
}