.cp-shell {
  display: flex;
  flex-direction: column;
  gap: 18px;
  min-height: 100%;
  padding: 10px;
  color: rgba(255, 255, 255, 0.94);
}

/* =========================
   HEADER
========================= */
.cp-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-end;
  gap: 16px;
  flex-wrap: wrap;
}

.cp-kicker {
  font-size: 12px;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: rgba(255, 255, 255, 0.58);
  margin-bottom: 6px;
}

.cp-header h1 {
  margin: 0;
  font-size: 32px;
  font-weight: 800;
  line-height: 1.05;
  color: #ffffff;
}

.cp-header p {
  margin: 8px 0 0;
  max-width: 820px;
  font-size: 15px;
  color: rgba(255, 255, 255, 0.62);
}

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

/* =========================
   LAYOUT
========================= */
.cp-layout {
  display: grid;
  grid-template-columns: 360px minmax(0, 1fr);
  gap: 18px;
  min-height: 0;
}

.cp-left,
.cp-detail-card,
.cp-vehicles-card,
.cp-detail-empty {
  background:
    linear-gradient(180deg, rgba(255,255,255,0.055), rgba(255,255,255,0.022));
  border: 1px solid rgba(255,255,255,0.08);
  border-radius: 22px;
  box-shadow: 0 18px 40px rgba(0,0,0,0.22);
}

/* =========================
   COLONNE GAUCHE
========================= */
.cp-left {
  padding: 18px;
  display: flex;
  flex-direction: column;
  gap: 14px;
  min-height: 720px;
}

.cp-search-row {
  position: relative;
}

.cp-search-row::before {
  content: "⌕";
  position: absolute;
  left: 14px;
  top: 50%;
  transform: translateY(-50%);
  font-size: 14px;
  color: rgba(255,255,255,0.42);
  pointer-events: none;
}

#cpSearch {
  width: 100%;
  height: 46px;
  border: 1px solid rgba(255,255,255,0.09);
  border-radius: 14px;
  background:
    linear-gradient(180deg, rgba(255,255,255,0.09), rgba(255,255,255,0.035));
  color: #ffffff;
  font-size: 14px;
  font-weight: 500;
  padding: 0 16px 0 40px;
  outline: none;
  box-shadow:
    inset 0 1px 0 rgba(255,255,255,0.04),
    0 8px 18px rgba(0,0,0,0.14);
  transition:
    border-color 0.18s ease,
    box-shadow 0.18s ease,
    background 0.18s ease;
}

#cpSearch::placeholder {
  color: rgba(255,255,255,0.42);
}

#cpSearch:hover {
  border-color: rgba(255,255,255,0.14);
  background:
    linear-gradient(180deg, rgba(255,255,255,0.1), rgba(255,255,255,0.045));
}

#cpSearch:focus {
  border-color: rgba(65, 124, 255, 0.6);
  background:
    linear-gradient(180deg, rgba(255,255,255,0.12), rgba(255,255,255,0.05));
  box-shadow:
    0 0 0 4px rgba(65,124,255,0.12),
    inset 0 1px 0 rgba(255,255,255,0.06),
    0 10px 22px rgba(0,0,0,0.18);
}

.cp-list-meta {
  font-size: 13px;
  color: rgba(255,255,255,0.68);
  padding: 0 2px;
}

.cp-citizens-list {
  display: flex;
  flex-direction: column;
  gap: 12px;
  max-height: 70vh;
  overflow-y: auto;
  overflow-x: hidden;
  padding-right: 4px;
}

.cp-citizens-list::-webkit-scrollbar {
  width: 8px;
}

.cp-citizens-list::-webkit-scrollbar-track {
  background: transparent;
}

.cp-citizens-list::-webkit-scrollbar-thumb {
  background: rgba(255,255,255,0.12);
  border-radius: 999px;
}

.cp-citizens-list::-webkit-scrollbar-thumb:hover {
  background: rgba(255,255,255,0.2);
}

/* =========================
   CARTE CITOYEN LISTE
========================= */
.cp-citizen-card {
  display: grid;
  grid-template-columns: 52px minmax(0, 1fr) auto;
  gap: 14px;
  align-items: center;
  padding: 14px;
  border-radius: 18px;
  background:
    linear-gradient(180deg, rgba(255,255,255,0.055), rgba(255,255,255,0.03));
  border: 1px solid rgba(255,255,255,0.07);
  cursor: pointer;
  transition:
    transform 0.18s ease,
    border-color 0.18s ease,
    background 0.18s ease,
    box-shadow 0.18s ease;
}

.cp-citizen-card:hover {
  transform: translateY(-1px);
  border-color: rgba(255,255,255,0.14);
  background:
    linear-gradient(180deg, rgba(255,255,255,0.07), rgba(255,255,255,0.035));
  box-shadow: 0 10px 24px rgba(0,0,0,0.18);
}

.cp-citizen-card.active {
  border-color: rgba(72, 125, 255, 0.38);
  background:
    linear-gradient(180deg, rgba(72,125,255,0.16), rgba(255,255,255,0.04));
  box-shadow: 0 14px 28px rgba(14, 30, 64, 0.28);
}

.cp-avatar {
  width: 48px;
  height: 48px;
  min-width: 48px;
  border-radius: 14px;
  display: flex;
  align-items: center;
  justify-content: center;
  background:
    linear-gradient(180deg, rgba(255,255,255,0.1), rgba(255,255,255,0.04));
  border: 1px solid rgba(255,255,255,0.08);
  color: #ffffff;
  font-size: 18px;
  font-weight: 800;
}

.cp-citizen-main {
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.cp-citizen-main strong {
  font-size: 15px;
  font-weight: 800;
  line-height: 1.2;
  color: #ffffff;
  word-break: break-word;
}

.cp-citizen-main span {
  font-size: 13px;
  line-height: 1.35;
  color: rgba(255,255,255,0.72);
  word-break: break-word;
}

.cp-citizen-main small {
  font-size: 12px;
  line-height: 1.2;
  color: rgba(255,255,255,0.5);
}

.cp-citizen-actions {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 8px;
  flex-wrap: wrap;
  max-width: 188px;
}

.cp-citizen-actions .btn-view,
.cp-citizen-actions .btn-secondary,
.cp-citizen-actions .btn-danger {
  min-width: 98px;
  height: 38px;
  padding: 0 14px;
  border-radius: 12px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 14px;
  font-weight: 700;
  border: 1px solid transparent;
  transition: all 0.18s ease;
}

.cp-citizen-actions .btn-view {
  color: #eef4ff;
  background: linear-gradient(180deg, rgba(64,131,255,0.42), rgba(37,99,235,0.28));
  border-color: rgba(96,165,250,0.22);
}

.cp-citizen-actions .btn-view:hover {
  background: linear-gradient(180deg, rgba(64,131,255,0.52), rgba(37,99,235,0.36));
  box-shadow: 0 10px 18px rgba(37,99,235,0.22);
}

.cp-citizen-actions .btn-secondary {
  color: #f5f7ff;
  background: linear-gradient(180deg, rgba(255,255,255,0.13), rgba(255,255,255,0.06));
  border-color: rgba(255,255,255,0.08);
}

.cp-citizen-actions .btn-secondary:hover {
  background: linear-gradient(180deg, rgba(255,255,255,0.17), rgba(255,255,255,0.08));
  border-color: rgba(255,255,255,0.15);
}

.cp-citizen-actions .btn-danger {
  color: #ffffff;
  background: linear-gradient(180deg, #ff4343, #d91f1f);
  border-color: rgba(255, 92, 92, 0.24);
  box-shadow: 0 10px 20px rgba(217,31,31,0.22);
}

.cp-citizen-actions .btn-danger:hover {
  transform: translateY(-1px);
  filter: brightness(1.06);
  box-shadow: 0 14px 24px rgba(217,31,31,0.3);
}

/* =========================
   PANNEAU DROIT
========================= */
.cp-right {
  display: flex;
  flex-direction: column;
  gap: 18px;
}

.cp-detail-card,
.cp-vehicles-card,
.cp-detail-empty {
  padding: 18px;
}

.cp-detail-hero {
  display: grid;
  grid-template-columns: 110px minmax(0, 1fr) 230px;
  gap: 18px;
  align-items: center;
  margin-bottom: 18px;
}

.cp-detail-photo {
  width: 110px;
  height: 110px;
  min-width: 110px;
  border-radius: 20px;
  background-color: rgba(255,255,255,0.05);
  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;
  border: 1px solid rgba(255,255,255,0.08);
  box-shadow:
    inset 0 1px 0 rgba(255,255,255,0.04),
    0 12px 24px rgba(0,0,0,0.18);
  overflow: hidden;
}

.cp-detail-copy {
  min-width: 0;
}

.cp-detail-copy h2 {
  margin: 0;
  font-size: 28px;
  line-height: 1.08;
  font-weight: 800;
  color: #ffffff;
  word-break: break-word;
}

.cp-detail-copy p {
  margin: 8px 0 0;
  color: rgba(255,255,255,0.62);
  font-size: 15px;
}

.cp-badges {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  margin-top: 12px;
}

.cp-badge {
  padding: 7px 12px;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 700;
  color: rgba(255,255,255,0.9);
  background: rgba(255,255,255,0.06);
  border: 1px solid rgba(255,255,255,0.08);
}

.cp-badge.ok {
  background: rgba(52,211,153,0.12);
  border-color: rgba(52,211,153,0.2);
}

.cp-detail-actions .btn-secondary,
.cp-detail-actions .btn-primary {
  width: auto;
  min-width: 170px;
  height: 36px;
  min-height: 36px;
  padding: 0 16px;
  border-radius: 10px;
  font-size: 13px;
  justify-content: center;
}

/* =========================
   INFOS
========================= */
.cp-info-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
}

.cp-info-grid .info-card {
  background: rgba(255,255,255,0.035);
  border: 1px solid rgba(255,255,255,0.06);
  border-radius: 16px;
  padding: 14px;
  min-height: 82px;
}

.cp-info-grid .info-card span {
  display: block;
  margin-bottom: 8px;
  font-size: 12px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: rgba(255,255,255,0.55);
}

.cp-info-grid .info-card strong {
  font-size: 15px;
  line-height: 1.45;
  color: #ffffff;
  word-break: break-word;
}

.cp-info-grid .info-card-wide {
  grid-column: span 2;
}

/* =========================
   VEHICULES
========================= */
.cp-section-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 10px;
  margin-bottom: 14px;
}

.cp-section-head h3 {
  margin: 0;
  font-size: 24px;
  font-weight: 800;
  color: #ffffff;
}

.cp-section-head p {
  margin: 4px 0 0;
  font-size: 14px;
  color: rgba(255,255,255,0.62);
}

.cp-vehicles-table-wrap {
  overflow-x: auto;
  overflow-y: hidden;
}

.cp-vehicles-table-wrap::-webkit-scrollbar {
  height: 8px;
}

.cp-vehicles-table-wrap::-webkit-scrollbar-thumb {
  background: rgba(255,255,255,0.12);
  border-radius: 999px;
}

.cp-vehicles-table {
  width: 100%;
  min-width: 760px;
  border-collapse: collapse;
}

.cp-vehicles-table th,
.cp-vehicles-table td {
  padding: 12px 10px;
  text-align: left;
  border-bottom: 1px solid rgba(255,255,255,0.06);
  white-space: nowrap;
}

.cp-vehicles-table th {
  font-size: 12px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: rgba(255,255,255,0.58);
}

.cp-vehicles-table td {
  color: rgba(255,255,255,0.88);
}

/* =========================
   VIDE
========================= */
.cp-empty {
  min-height: 120px;
  padding: 18px;
  border-radius: 16px;
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  background: rgba(255,255,255,0.025);
  border: 1px dashed rgba(255,255,255,0.08);
  color: rgba(255,255,255,0.58);
}

.cp-detail-empty {
  min-height: 280px;
  display: grid;
  place-content: center;
  text-align: center;
}

/* =========================
   CHAMPS / MODALES
========================= */
.cp-shell input,
.cp-shell select,
.cp-shell textarea {
  width: 100%;
}

.cp-shell textarea {
  min-height: 110px;
  resize: vertical;
}

.licenses {
  display: flex;
  gap: 14px;
  flex-wrap: wrap;
}

.licenses label {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  color: rgba(255,255,255,0.85);
}

/* =========================
   RESPONSIVE
========================= */
@media (max-width: 1380px) {
  .cp-detail-hero {
    grid-template-columns: 110px minmax(0, 1fr);
  }

  .cp-detail-actions {
    grid-column: 1 / -1;
    flex-direction: row;
    flex-wrap: wrap;
  }

  .cp-detail-actions .btn-secondary,
  .cp-detail-actions .btn-primary {
    width: auto;
    min-width: 220px;
  }
}

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

  .cp-left {
    min-height: auto;
  }

  .cp-info-grid {
    grid-template-columns: 1fr 1fr;
  }

  .cp-info-grid .info-card-wide {
    grid-column: span 2;
  }
}

@media (max-width: 740px) {
  .cp-detail-hero {
    grid-template-columns: 1fr;
  }

  .cp-detail-photo {
    width: 92px;
    height: 92px;
    min-width: 92px;
  }

  .cp-info-grid {
    grid-template-columns: 1fr;
  }

  .cp-info-grid .info-card-wide {
    grid-column: span 1;
  }

  .cp-citizen-card {
    grid-template-columns: 48px 1fr;
  }

  .cp-citizen-actions {
    grid-column: 1 / -1;
    justify-content: flex-start;
    max-width: none;
  }

  .cp-citizen-actions .btn-view,
  .cp-citizen-actions .btn-secondary,
  .cp-citizen-actions .btn-danger {
    min-width: 0;
    flex: 1 1 140px;
  }
}

/* =========================
   BOUTONS COMPACTS
   (Citizen Portal seulement)
========================= */

/* boutons dans la fiche citoyen */
.cp-detail-actions .btn-primary,
.cp-detail-actions .btn-secondary {
  min-height: 36px;
  height: 36px;
  padding: 0 16px;
  font-size: 13px;
  border-radius: 10px;
}

#cpAddVehicleBtn,
#cpEditCurrentCitizen {
  width: auto;
  min-width: 170px;
}

/* actions dans la liste citoyen */
.cp-citizen-actions .btn-view,
.cp-citizen-actions .btn-secondary,
.cp-citizen-actions .btn-danger {
  min-width: 70px;
  height: 30px;
  padding: 0 12px;
  font-size: 12px;
  border-radius: 8px;
}

/* boutons header */
.cp-header-actions .btn-primary,
.cp-header-actions .btn-secondary {
  height: 34px;
  padding: 0 14px;
  font-size: 13px;
  border-radius: 10px;
}

.cp-detail-actions {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  justify-content: center;
  gap: 10px;
}