:root {
      --purple-950: #1f0749;
      --purple-900: #2d0877;
      --purple-850: #32008a;
      --purple-800: #3f00a8;
      --purple-700: #5217c9;
      --purple-600: #6b35df;
      --purple-400: #9b78ef;
      --purple-200: #d9ccff;
      --purple-100: #f1eafd;
      --purple-75: #f6f1ff;
      --purple-50: #faf7ff;

      --green: #159947;
      --green-bg: #effaf3;
      --orange-red: #ff4b2e;
      --blue-ish: #1d75d8;

      --white: #ffffff;
      --background: #ffffff;
      --text-main: #16043d;
      --text-muted: #6f5a8f;
      --border: #dfd4f3;
      --border-light: #eee8f8;
      --shadow-soft: 0 14px 34px rgba(53, 19, 105, 0.06);
      --shadow-card: 0 8px 18px rgba(53, 19, 105, 0.05);

      --sidebar-width: 270px;       /* largeur du menu vertical gauche : encore élargie pour sécuriser l'affichage de CLIENTS/PROSPECTS sans débordement */
      --left-content-gap: 18px;     /* fine bande d'aération entre le menu gauche fixe et la zone Études */
      --right-panel-width: 520px;   /* largeur du bandeau vertical droit */
      --page-gap: 28px;             /* espace entre contenu central et bandeau droit */
      --radius-large: 16px;         /* arrondi des grandes cartes */
      --radius-medium: 12px;        /* arrondi des champs et cartes secondaires */
      --radius-small: 8px;          /* arrondi des petits boutons */
    }
	
	
	 * {
      box-sizing: border-box;
    }

    html,
    body {
      margin: 0;
      min-height: 100%;
      font-family: Inter, Arial, Helvetica, sans-serif;
      color: var(--text-main);
      background: var(--background);
    }

    body {
      overflow: hidden;
    }
	
	
	
	
	
table
{
  
  border-width: 1px 1px 1px 1px;
  color: #000; 
}

th 
{
	background-color: #80207E; 
	color: #fff;
	padding: 10px;
    text-align: center;
}

td 
{
  padding: 5px;
  font-size: 14px;
}

.celluleTableauClick
{
	cursor: pointer;
}

	
select 
{
	font-weight: 800; 
	color:#2d0877; 
	font-size: 14px; 
	height: 39px; 
	border: 1px solid #dfd4f3; 
	border-radius: 7px; 
	padding: 0 16px;
}

option 
{
	font-weight: 800; 
	color:#2d0877; 
	font-size: 12px;
}

	
	
	
	
	.app {
      display: grid;
      grid-template-columns: calc(var(--sidebar-width) + var(--left-content-gap)) minmax(0, 1fr);
      height: 100vh;
      min-height: 100vh;
      overflow: hidden;
    }
	
	

    .content-zone {

      grid-column: 2;
      display: grid;
      grid-template-columns: minmax(980px, 1fr) var(--right-panel-width);
      gap: var(--page-gap);
      height: 100vh;
      overflow-y: auto;
      overflow-x: auto;
      padding-right: 22px;
    }

    .app.right-collapsed .content-zone {
      grid-template-columns: minmax(980px, 1fr) 26px;
    }

    .sidebar {
      height: 100vh;
      width: var(--sidebar-width);
      background: linear-gradient(180deg, #7a2291 0%, #6a187f 100%);
      color: var(--white);
      padding: 26px 8px 22px;
      display: flex;
      flex-direction: column;
      align-items: stretch;
      position: fixed;
      top: 0;
      left: 0;
      z-index: 100;
      overflow: hidden;
    }

    .brand-logo {
      height: 154px;
      display: flex;
      justify-content: center;
      align-items: flex-start;
      margin-bottom: 18px;
    }

    .cabinet-logo-img {
      width: 78px;
      height: 108px;
      object-fit: contain;
      display: block;
      filter: none;
    }

    .balloon-logo {
      width: 72px;
      height: 92px;
      position: relative;
      display: flex;
      justify-content: center;
      align-items: center;
    }

    .balloon-logo::before {
      content: "";
      width: 62px;
      height: 78px;
      border-radius: 50% 50% 46% 46%;
      background: radial-gradient(circle at 40% 28%, #ffffff 0%, #faf6ff 34%, #d8c4f6 66%, #8d58df 100%);
      box-shadow: inset -10px -14px 22px rgba(35, 0, 88, 0.22), 0 9px 20px rgba(0, 0, 0, 0.25);
      transform: rotate(-6deg);
    }

    .balloon-logo::after {
      content: "";
      position: absolute;
      width: 1px;
      height: 70px;
      background: rgba(255, 255, 255, 0.85);
      top: 76px;
      left: 38px;
      transform: rotate(-10deg);
      transform-origin: top center;
    }

    .balloon-mark {
      position: absolute;
      top: 22px;
      left: 31px;
      font-family: Georgia, serif;
      font-size: 45px;
      font-style: italic;
      color: var(--purple-700);
      z-index: 1;
      transform: rotate(-8deg);
      line-height: 1;
    }

    .nav-list {
      display: flex;
      flex-direction: column;
      gap: 4px;
      margin-top: 6px;
    }

    .nav-item {
      display: flex;
      align-items: center;
      gap: 16px;
      height: 55px;
      padding: 0 22px;
      border-radius: 10px;
      color: #fff;
      font-weight: 700;
      font-size: 16px;
      letter-spacing: 0.01em;
      text-decoration: none;
      white-space: nowrap;
    }

    .nav-item svg {
      width: 28px;
      height: 28px;
      flex: 0 0 auto;
      stroke: currentColor;
      fill: none;
      stroke-width: 2;
      stroke-linecap: round;
      stroke-linejoin: round;
    }

    .ui-picto {
      width: 24px;
      height: 24px;
      object-fit: contain;
      display: inline-block;
      flex: 0 0 auto;
    }

    .sidebar-picto {
      width: 28px;
      height: 28px;
      object-fit: contain;
      filter: brightness(0) invert(1);
      flex: 0 0 auto;
    }

    .purple-picto {
      width: 24px;
      height: 24px;
      object-fit: contain;
      filter: brightness(0) saturate(100%) invert(15%) sepia(87%) saturate(4135%) hue-rotate(260deg) brightness(74%) contrast(111%);
    }

    .svg-purple-picto {
      width: 24px;
      height: 24px;
      color: var(--purple-800);
      stroke: currentColor;
      fill: none;
      stroke-width: 2.2;
      stroke-linecap: round;
      stroke-linejoin: round;
      flex: 0 0 auto;
    }

    .svg-metric-picto {
      width: 33px;
      height: 33px;
      color: var(--purple-700);
      stroke: currentColor;
      fill: none;
      stroke-width: 2.1;
      stroke-linecap: round;
      stroke-linejoin: round;
      margin-bottom: 8px;
    }

    .metric-picto {
      width: 33px;
      height: 33px;
      object-fit: contain;
      filter: brightness(0) saturate(100%) invert(20%) sepia(99%) saturate(2760%) hue-rotate(258deg) brightness(86%) contrast(104%);
      margin-bottom: 8px;
    }

    .edit-picto {
      width: 17px;
      height: 17px;
      object-fit: contain;
      filter: brightness(0) saturate(100%) invert(15%) sepia(87%) saturate(4135%) hue-rotate(260deg) brightness(74%) contrast(111%);
      flex: 0 0 auto;
      cursor: default;
    }

    .nav-item.active {
      background: linear-gradient(90deg, #a94ac0 0%, #9134ab 100%);
      color: #fff;
      box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.26), 0 6px 14px rgba(58, 0, 76, 0.12);
    }

    .nav-item:hover {
      background: rgba(255, 255, 255, 0.10);
    }

    .sidebar-user {
      margin-top: auto;
      display: flex;
      align-items: center;
      gap: 11px;
      padding: 16px;
      color: #fff;
    }

    .avatar {
      width: 40px;
      height: 40px;
      border-radius: 50%;
      background: linear-gradient(135deg, #4820e3, #894eed);
      color: #fff;
      display: flex;
      align-items: center;
      justify-content: center;
      font-weight: 800;
      font-size: 15px;
    }

    .sidebar-user-name {
      font-weight: 700;
      font-size: 13px;
    }

    .sidebar-user-role {
      color: #e7dafd;
      font-size: 12px;
      margin-top: 2px;
    }

    .main {
      padding: 24px 0 28px;
      min-width: 980px;
      overflow: visible;
    }

    .page-title {
      color: var(--purple-850);
      font-size: 38px;
      line-height: 1;
      margin: 0 0 10px;
      font-weight: 900;
      letter-spacing: -0.03em;
    }

    .page-subtitle {
      font-size: 22px;
      color: #38303f;
      margin-bottom: 20px;
    }

    .module-title-card {
      min-height: 58px;
      border: 1px solid var(--border);
      border-radius: var(--radius-large);
      background: linear-gradient(90deg, #f1e9ff 0%, #f8f3ff 74%, #fff 100%);
      box-shadow: var(--shadow-card);
      display: flex;
      align-items: center;
      padding: 0 22px;
      margin-bottom: 12px;
    }

    .module-title-card h1 {
      margin: 0;
      color: var(--purple-850);
      font-size: 30px;
      line-height: 1;
      font-weight: 900;
      letter-spacing: 0.02em;
      text-transform: uppercase;
    }

    .breadcrumb-card {
      min-height: 46px;
      border: 1px solid var(--border-light);
      border-radius: 12px;
      background: #fff;
      display: flex;
      align-items: center;
      gap: 12px;
      padding: 0 18px;
      margin-bottom: 16px;
      color: var(--purple-900);
      font-size: 14px;
      font-weight: 800;
      box-shadow: 0 1px 0 rgba(91, 56, 152, 0.03);
    }

    .breadcrumb-label {
      color: var(--text-muted);
      font-size: 12px;
      font-weight: 900;
      text-transform: uppercase;
      letter-spacing: 0.04em;
      padding-right: 8px;
      border-right: 1px solid var(--border-light);
    }

    .breadcrumb-value {
      color: var(--purple-850);
      font-size: 15px;
      font-weight: 900;
    }

    .tabs {
      display: flex;
      align-items: flex-end;
      margin-bottom: 17px;
      border-bottom: 1px solid var(--border);
      gap: 0;
    }

    .toggle-all-sections-btn {
      margin-left: auto;
      height: 37px;
      min-width: 158px;
      padding: 0 13px;
      border: 1px solid #7a2291;
      border-bottom: none;
      border-radius: 11px 11px 0 0;
      background: linear-gradient(to top, #7a2291 0%, #b875ca 34%, #f4e9f8 76%, #ffffff 100%);
      color: var(--purple-900);
      font-family: inherit;
      font-size: 12px;
      font-weight: 900;
      display: inline-flex;
      align-items: center;
      justify-content: center;
      gap: 8px;
      cursor: default;
      box-shadow: 0 -2px 8px rgba(122, 34, 145, 0.12);
    }

    .toggle-all-sections-btn svg {
      width: 17px;
      height: 17px;
      stroke: currentColor;
      fill: none;
      stroke-width: 2.7;
      transition: transform 160ms ease;
    }

    .toggle-all-sections-btn.all-collapsed svg {
      transform: rotate(-90deg);
    }

    .tab {
      appearance: none;
      -webkit-appearance: none;
      font-family: inherit;
      cursor: default;
      height: 47px;
      min-width: 145px;
      padding: 0 27px;
      border: 1px solid var(--border);
      border-bottom: none;
      background: linear-gradient(180deg, #ffffff 0%, #fbf8ff 100%);
      display: flex;
      align-items: center;
      justify-content: center;
      color: var(--text-main);
      font-size: 14px;
      font-weight: 800;
      border-radius: 12px 12px 0 0;
      margin-right: -1px;
      position: relative;
    }

    .tab.active {
      color: var(--purple-900);
      background: linear-gradient(to top, #7a2291 0%, #b875ca 32%, #f3e8f7 72%, #ffffff 100%);
      border-color: #7a2291;
      box-shadow: 0 -2px 8px rgba(122, 34, 145, 0.18);
      z-index: 2;
    }

    .top-fields {
      display: grid;
      grid-template-columns: repeat(4, 1fr);
      gap: 24px;
      margin-bottom: 18px;
    }

    .field label {
      display: block;
      font-size: 14px;
      color: var(--purple-900);
      font-weight: 800;
      margin-bottom: 7px;
    }

    .input-like,
    .select-like {
      height: 39px;
      border: 1px solid var(--border);
      background: #fff;
      border-radius: 7px;
      display: flex;
      align-items: center;
      padding: 0 16px;
      font-weight: 800;
      color: var(--purple-900);
      font-size: 14px;
      min-width: 0;
    }

    .select-like {
      justify-content: space-between;
      cursor: default;
    }

    .select-like::after {
      content: "⌄";
      color: var(--purple-700);
      font-size: 22px;
      line-height: 1;
      margin-left: 12px;
    }

    .custom-select-wrapper {
      position: relative;
    }

    .custom-select-menu {
      position: absolute;
      top: calc(100% + 6px);
      left: 0;
      width: 100%;
      min-width: 210px;
      background: #fff;
      border: 1px solid var(--border);
      border-radius: 10px;
      box-shadow: 0 16px 30px rgba(46, 0, 115, 0.14);
      padding: 6px;
      z-index: 80;
      display: none;
    }

    .custom-select-wrapper.open .custom-select-menu {
      display: block;
    }

    .custom-select-option {
      min-height: 34px;
      display: flex;
      align-items: center;
      padding: 0 10px;
      border-radius: 7px;
      color: var(--purple-900);
      font-weight: 800;
      font-size: 13px;
      cursor: default;
    }

    .custom-select-option:hover,
    .custom-select-option.selected {
      background: var(--purple-100);
      color: var(--purple-850);
    }

    .date-picker-popover {
      position: absolute;
      background: #fff;
      border: 1px solid var(--border);
      border-radius: 12px;
      box-shadow: 0 16px 30px rgba(46, 0, 115, 0.14);
      padding: 12px;
      z-index: 90;
      display: none;
      width: 245px;
    }

    .date-picker-popover.open {
      display: block;
    }

    .date-picker-title {
      font-size: 13px;
      font-weight: 900;
      color: var(--purple-900);
      margin-bottom: 8px;
    }

    .date-picker-popover input[type="date"] {
      width: 100%;
      height: 36px;
      border: 1px solid var(--border);
      border-radius: 8px;
      color: var(--purple-900);
      font-weight: 800;
      padding: 0 8px;
      font-family: inherit;
    }

    .date-picker-actions {
      display: flex;
      justify-content: flex-end;
      gap: 8px;
      margin-top: 10px;
    }

    .date-picker-actions button {
      height: 30px;
      border-radius: 7px;
      border: 1px solid var(--purple-700);
      font-weight: 900;
      font-size: 12px;
      padding: 0 10px;
      font-family: inherit;
      cursor: default;
    }

    .date-picker-actions .cancel-date {
      background: #fff;
      color: var(--purple-800);
    }

    .date-picker-actions .apply-date {
      background: var(--purple-800);
      color: #fff;
    }

    .date-like {
      gap: 10px;
    }

    .date-like svg {
      width: 18px;
      height: 18px;
      color: var(--purple-700);
      stroke: currentColor;
      fill: none;
      stroke-width: 2;
    }

    .btn {
      height: 38px;
      border-radius: 7px;
      border: 1px solid var(--purple-700);
      color: var(--purple-800);
      background: #fff;
      display: inline-flex;
      align-items: center;
      justify-content: center;
      gap: 8px;
      padding: 0 18px;
      font-size: 14px;
      font-weight: 900;
      cursor: default;
      white-space: nowrap;
    }

    .btn svg {
      width: 16px;
      height: 16px;
      stroke: currentColor;
      fill: none;
      stroke-width: 2.4;
    }

    .btn.primary {
      color: #fff;
      background: linear-gradient(180deg, #4f0bd0 0%, #31007d 100%);
      border-color: #39008f;
      box-shadow: 0 6px 14px rgba(62, 0, 150, 0.18);
    }

    .btn.full {
      width: 100%;
    }

    .section-card {
      border: 1px solid var(--border-light);
      border-radius: var(--radius-large);
      background: #fff;
      margin-bottom: 14px;
      overflow: hidden;
      box-shadow: 0 1px 0 rgba(91, 56, 152, 0.03);
    }

    .section-header {
      height: 45px;
      display: flex;
      align-items: center;
      padding: 0 12px;
      background: linear-gradient(90deg, #f1e9ff 0%, #f8f3ff 74%, #fff 100%);
      border-bottom: 1px solid #f0e9fb;
    }

    .section-title-wrap {
      display: flex;
      align-items: center;
      gap: 12px;
      flex: 1;
      min-width: 0;
    }

    .section-number {
      width: 31px;
      height: 31px;
      border-radius: 50%;
      background: linear-gradient(180deg, #4710c2 0%, #2d007a 100%);
      color: white;
      display: inline-flex;
      align-items: center;
      justify-content: center;
      font-weight: 900;
      font-size: 18px;
      flex: 0 0 auto;
    }

    .section-title {
      font-size: 21px;
      font-weight: 900;
      color: var(--purple-900);
      letter-spacing: -0.01em;
    }

    .collapse-btn {
      width: 34px;
      height: 34px;
      border: 1px solid var(--border);
      border-radius: 8px;
      background: #fff;
      color: var(--purple-800);
      display: inline-flex;
      align-items: center;
      justify-content: center;
      margin-left: 16px;
      flex: 0 0 auto;
      cursor: default;
    }

    .collapse-btn svg {
      width: 18px;
      height: 18px;
      stroke: currentColor;
      fill: none;
      stroke-width: 2.6;
      transition: transform 160ms ease;
    }

    .section-card.collapsed .section-body {
      display: none;
    }

    .section-card.collapsed .collapse-btn svg {
      transform: rotate(-90deg);
    }

    .section-body {
      padding: 18px 16px 20px;
    }

    .comment-zone {
      margin-top: 16px;
      border: 1px solid var(--border-light);
      border-radius: var(--radius-medium);
      background: linear-gradient(180deg, #ffffff 0%, #fcfaff 100%);
      padding: 13px 14px 14px;
    }

    .comment-zone label {
      display: block;
      color: var(--purple-900);
      font-size: 13px;
      font-weight: 900;
      margin-bottom: 8px;
    }

    .comment-zone textarea {
      width: 100%;
      min-height: 78px;
      resize: vertical;
      border: 1px solid var(--border);
      border-radius: 9px;
      background: #fff;
      padding: 10px 12px;
      font-family: inherit;
      font-size: 13px;
      font-weight: 700;
      color: var(--purple-900);
      line-height: 1.45;
      outline: none;
    }

    .comment-zone textarea::placeholder {
      color: #9a86b6;
      font-weight: 600;
    }

    .comment-zone textarea:focus {
      border-color: var(--purple-600);
      box-shadow: 0 0 0 3px rgba(107, 53, 223, 0.10);
    }

    .entity-grid-top {
      display: grid;
      grid-template-columns: 285px 300px 150px;
      gap: 26px;
      align-items: end;
      margin-bottom: 16px;
    }

    .siret-zone {
      margin-top: 6px;
      margin-bottom: 18px;
    }

    .siret-row {
      display: flex;
      align-items: center;
      gap: 22px;
      margin-top: 8px;
      padding-left: 252px;
    }

    .siret-row .input-like {
      width: 365px;
      color: #8b78aa;
      font-weight: 700;
    }

    .business-table {
      width: 100%;
      max-width: 1010px;
      border-collapse: separate;
      border-spacing: 0;
      border: 1px solid var(--border);
      border-radius: 9px;
      overflow: hidden;
      font-size: 14px;
      color: var(--purple-900);
      font-weight: 800;
    }

    .business-table th,
    .business-table td {
      height: 34px;
      padding: 0 20px;
      border-bottom: 1px solid var(--border-light);
      border-right: 1px solid var(--border-light);
      text-align: left;
      vertical-align: middle;
    }

    .business-table th {
      background: linear-gradient(180deg, #fff 0%, #fbf8ff 100%);
      color: var(--purple-800);
      font-size: 13px;
      font-weight: 900;
    }

    .business-table td:last-child,
    .business-table th:last-child {
      border-right: none;
    }

    .business-table tr:last-child td {
      border-bottom: none;
    }

    .edit-cell {
      display: flex;
      align-items: center;
      justify-content: space-between;
      gap: 12px;
    }

    .pencil-icon {
      width: 17px;
      height: 17px;
      stroke: var(--purple-800);
      fill: none;
      stroke-width: 2.6;
      flex: 0 0 auto;
    }

    .row-edit-popover {
      position: absolute;
      width: 360px;
      background: #fff;
      border: 1px solid var(--border);
      border-radius: 14px;
      box-shadow: 0 18px 36px rgba(46, 0, 115, 0.16);
      padding: 14px;
      z-index: 95;
      display: none;
    }

    .row-edit-popover.open {
      display: block;
    }

    .row-edit-title {
      font-size: 15px;
      font-weight: 900;
      color: var(--purple-900);
      margin-bottom: 11px;
    }

    .row-edit-grid {
      display: grid;
      grid-template-columns: 1fr 1fr;
      gap: 10px;
    }

    .row-edit-field label {
      display: block;
      font-size: 11px;
      font-weight: 900;
      color: var(--purple-900);
      margin-bottom: 5px;
    }

    .row-edit-field input {
      width: 100%;
      height: 34px;
      border: 1px solid var(--border);
      border-radius: 8px;
      padding: 0 9px;
      font-family: inherit;
      font-size: 12px;
      font-weight: 800;
      color: var(--purple-900);
    }

    .row-edit-field.full {
      grid-column: 1 / -1;
    }

    .row-edit-actions {
      display: flex;
      justify-content: flex-end;
      gap: 8px;
      margin-top: 12px;
    }

    .row-edit-actions button {
      height: 31px;
      border-radius: 7px;
      border: 1px solid var(--purple-700);
      font-weight: 900;
      font-size: 12px;
      padding: 0 11px;
      font-family: inherit;
      cursor: default;
    }

    .row-edit-actions .cancel-row-edit {
      background: #fff;
      color: var(--purple-800);
    }

    .row-edit-actions .apply-row-edit {
      background: var(--purple-800);
      color: #fff;
    }

    .regime-table {
      width: 100%;
      border-collapse: separate;
      border-spacing: 0;
      border: 1px solid var(--border);
      border-radius: 9px;
      overflow: hidden;
      color: var(--purple-900);
      font-size: 14px;
      font-weight: 800;
    }

    .regime-table th,
    .regime-table td {
      height: 45px;
      padding: 0 18px;
      border-right: 1px solid var(--border-light);
      border-bottom: 1px solid var(--border-light);
      text-align: center;
      vertical-align: middle;
    }

    .regime-table th {
      background: linear-gradient(180deg, #fff 0%, #fbf8ff 100%);
      color: var(--purple-800);
      font-size: 13px;
      font-weight: 900;
    }

    .regime-table td:last-child,
    .regime-table th:last-child {
      border-right: none;
    }

    .regime-table tr:last-child td {
      border-bottom: none;
    }

    .regime-inline-select {
      width: 100%;
      min-width: 148px;
      height: 34px;
      border: 1px solid var(--border);
      border-radius: 8px;
      background: #fff;
      color: var(--purple-900);
      font-family: inherit;
      font-size: 13px;
      font-weight: 900;
      padding: 0 30px 0 12px;
      outline: none;
      cursor: pointer;
      appearance: auto;
    }

    .regime-inline-select:focus {
      border-color: var(--purple-600);
      box-shadow: 0 0 0 3px rgba(107, 53, 223, 0.10);
    }

    .create-regime-row {
      display: flex;
      justify-content: flex-end;
      margin-top: 10px;
    }

    .round-logo-row {
      display: inline-flex;
      align-items: center;
      gap: 7px;
    }

    .round-logo {
      width: 28px;
      height: 28px;
      border-radius: 50%;
      color: #fff;
      display: inline-flex;
      align-items: center;
      justify-content: center;
      font-size: 14px;
      font-weight: 900;
    }

    .logo-blue { background: #1266a8; }
    .logo-green { background: #159947; }
    .logo-orange { background: #f07812; }

    .generation-logo {
      display: inline-flex;
      align-items: center;
      gap: 10px;
      font-weight: 900;
    }

    .generation-mark {
      width: 27px;
      height: 27px;
      border-radius: 50%;
      background: conic-gradient(from 25deg, #00a0df 0 35%, #2657c8 35% 74%, transparent 74% 100%);
      position: relative;
    }

    .generation-mark::after {
      content: "";
      position: absolute;
      right: 2px;
      top: 8px;
      width: 16px;
      height: 8px;
      background: white;
      border-radius: 8px;
    }

    .demo-grid {
      display: grid;
      grid-template-columns: repeat(4, 1fr) 1.95fr;
      gap: 14px;
      align-items: stretch;
    }

    .metric-card {
      min-height: 140px;
      border: 1px solid var(--border-light);
      border-radius: var(--radius-medium);
      background: #fff;
      padding: 18px 16px;
      color: var(--purple-900);
      display: flex;
      flex-direction: column;
      justify-content: center;
      box-shadow: 0 1px 0 rgba(73, 0, 156, 0.03);
    }

    .metric-card svg {
      width: 33px;
      height: 33px;
      color: var(--purple-700);
      stroke: currentColor;
      fill: none;
      stroke-width: 2;
      margin-bottom: 8px;
    }

    .metric-title {
      font-size: 12px;
      font-weight: 900;
      margin-bottom: 13px;
    }

    .metric-value {
      font-size: 31px;
      line-height: 1;
      font-weight: 900;
      color: var(--purple-850);
      text-align: center;
    }

    .metric-lines {
      font-size: 16px;
      line-height: 1.8;
      font-weight: 900;
      text-align: center;
    }

    .upload-success {
      min-height: 140px;
      border: 1px solid #62cc85;
      border-radius: var(--radius-medium);
      background: #fff;
      padding: 15px 18px;
      color: var(--purple-900);
    }

    .success-title {
      display: flex;
      align-items: center;
      gap: 10px;
      color: var(--green);
      font-weight: 900;
      font-size: 14px;
      margin-bottom: 13px;
    }

    .success-check {
      width: 28px;
      height: 28px;
      border-radius: 50%;
      background: var(--green);
      color: #fff;
      display: inline-flex;
      align-items: center;
      justify-content: center;
      font-weight: 900;
      flex: 0 0 auto;
    }

    .file-box {
      display: flex;
      align-items: center;
      gap: 14px;
      border: 1px solid var(--border-light);
      border-radius: 9px;
      padding: 12px 14px;
      margin-bottom: 10px;
    }

    .excel-small {
      width: 32px;
      height: 38px;
      border-radius: 4px;
      background: #1d9a50;
      color: #fff;
      display: flex;
      align-items: center;
      justify-content: center;
      font-weight: 900;
      font-size: 18px;
    }

    .file-name {
      font-size: 15px;
      font-weight: 900;
    }

    .file-meta {
      font-size: 12px;
      color: var(--text-muted);
      margin-top: 4px;
    }

    .download-model {
      color: var(--purple-800);
      font-weight: 900;
      text-align: center;
      display: flex;
      align-items: center;
      justify-content: center;
      gap: 8px;
      font-size: 14px;
    }

    .download-model svg {
      width: 18px;
      height: 18px;
      stroke: currentColor;
      fill: none;
      stroke-width: 2.4;
    }

    .right-rail {

      padding: 20px 0 28px;
      position: relative;
      min-height: auto;
      overflow: visible;
      transition: width 200ms ease, transform 200ms ease;
    }

    .right-panel-inner {

      background: linear-gradient(180deg, #f5efff 0%, #fbf8ff 100%);
      border: 1px solid #d4c2f8;
      border-radius: var(--radius-large);
      padding: 18px;
      box-shadow: var(--shadow-soft);
      position: relative;
      max-height: none;
      display: flex;
      flex-direction: column;
      overflow: visible;
    }

    .right-rail-toggle {
      position: absolute;
      top: 22px;
      left: -22px;
      width: 35px;
      height: 45px;
      border: 1px solid var(--purple-400);
      border-radius: 10px;
      background: #fff;
      color: var(--purple-800);
      display: flex;
      align-items: center;
      justify-content: center;
      z-index: 10;
      cursor: default;
    }

    .right-rail-toggle svg {
      width: 20px;
      height: 20px;
      stroke: currentColor;
      fill: none;
      stroke-width: 2.8;
      transition: transform 160ms ease;
    }

    .app.right-collapsed .right-panel-inner {
      display: none;
    }

    .app.right-collapsed .right-rail-toggle svg {
      transform: rotate(180deg);
    }

    .right-card {
      background: linear-gradient(180deg, #ffffff 0%, #fbf8ff 100%);
      border: 1px solid #dcd0f4;
      border-radius: 14px;
      padding: 18px;
      margin-bottom: 16px;
      box-shadow: var(--shadow-card);
    }

    .right-card:last-child {
      margin-bottom: 0;
    }

    .right-card-title {
      display: flex;
      align-items: center;
      gap: 11px;
      color: var(--purple-850);
      font-weight: 900;
      font-size: 20px;
      margin-bottom: 14px;
    }

    .right-card-title svg {
      width: 23px;
      height: 23px;
      stroke: currentColor;
      fill: none;
      stroke-width: 2;
    }

    .team-grid {
      display: grid;
      grid-template-columns: repeat(4, 1fr);
      gap: 12px;
    }

    .team-card {
      border: 1px solid var(--border);
      border-radius: 10px;
      background: #fff;
      min-height: 92px;
      display: flex;
      flex-direction: column;
      align-items: center;
      justify-content: center;
      color: var(--purple-800);
      gap: 8px;
      font-size: 12px;
      font-weight: 900;
      text-align: center;
    }

    .team-card svg,
    .team-card .team-balloon,
    .team-card .team-picto {
      width: 39px;
      height: 39px;
      color: var(--purple-800);
    }

    .team-picto {
      object-fit: contain;
      display: block;
      filter: brightness(0) saturate(100%) invert(15%) sepia(87%) saturate(4135%) hue-rotate(260deg) brightness(74%) contrast(111%);
    }

    .team-cabinet-logo {
      width: 42px;
      height: 42px;
      object-fit: contain;
      display: block;
      filter: none;
    }

    .team-balloon {
      position: relative;
    }

    .team-balloon::before {
      content: "";
      width: 32px;
      height: 38px;
      border: 2px solid var(--purple-800);
      border-radius: 50% 50% 45% 45%;
      position: absolute;
      top: 0;
      left: 2px;
      transform: rotate(-5deg);
    }

    .team-balloon::after {
      content: "";
      width: 1px;
      height: 26px;
      background: var(--purple-800);
      position: absolute;
      left: 18px;
      top: 37px;
      transform: rotate(-12deg);
    }

    .team-balloon span {
      position: absolute;
      top: 5px;
      left: 13px;
      font-family: Georgia, serif;
      font-style: italic;
      font-size: 22px;
      line-height: 1;
      color: var(--purple-800);
      z-index: 2;
      transform: rotate(-8deg);
    }

    .tasks-head {
      display: flex;
      align-items: center;
      justify-content: space-between;
      margin-bottom: 15px;
    }

    .mini-btn {
      height: 32px;
      border-radius: 7px;
      border: 1px solid var(--purple-800);
      color: #fff;
      background: linear-gradient(180deg, #4e0ccb 0%, #31007d 100%);
      padding: 0 13px;
      font-size: 12px;
      font-weight: 900;
      display: inline-flex;
      align-items: center;
      gap: 6px;
    }

    .task-placeholder {
      display: grid;
      grid-template-columns: 32px 1fr;
      gap: 12px;
      align-items: center;
      color: var(--purple-850);
      padding-left: 12px;
    }

    .task-dots {
      display: flex;
      flex-direction: column;
      align-items: center;
      gap: 9px;
    }

    .task-dot {
      width: 14px;
      height: 14px;
      border: 2px solid var(--purple-700);
      border-radius: 50%;
      background: #fff;
    }

    .task-text {
      line-height: 1.65;
      font-weight: 800;
      font-size: 13px;
    }

    .task-note {
      margin-top: 10px;
      color: var(--text-muted);
      font-size: 13px;
      text-align: center;
    }

    .timeline {
      position: relative;
      padding-left: 31px;
      margin-top: 3px;
    }

    .timeline::before {
      content: "";
      position: absolute;
      left: 9px;
      top: 8px;
      bottom: 9px;
      width: 2px;
      background: var(--purple-700);
    }

    .timeline-item {
      position: relative;
      display: grid;
      grid-template-columns: 1fr 94px 22px;
      gap: 12px;
      align-items: start;
      min-height: 32px;
      color: var(--purple-900);
      font-size: 12px;
      font-weight: 900;
    }

    .timeline-item::before {
      content: "";
      position: absolute;
      left: -27px;
      top: 1px;
      width: 12px;
      height: 12px;
      border: 2px solid var(--purple-700);
      background: #fff;
      border-radius: 50%;
      z-index: 1;
    }

    .timeline-item.critical {
      color: var(--orange-red);
    }

    .timeline-item.critical::before {
      border-color: var(--orange-red);
    }

    .timeline-date {
      text-align: right;
    }

    .timeline-actions {
      display: flex;
      justify-content: flex-end;
    }

    .timeline-actions svg {
      width: 16px;
      height: 16px;
      stroke: var(--purple-800);
      fill: none;
      stroke-width: 2.5;
    }

    .retro-buttons {
      display: grid;
      grid-template-columns: 1fr 1fr;
      gap: 18px;
      margin-top: 6px;
    }

    .retro-card {
      padding-top: 12px;
      padding-bottom: 11px;
      margin-bottom: 12px;
    }

    .retro-card .right-card-title {
      margin-bottom: 6px;
    }

    .retro-card .timeline {
      margin-top: 0;
    }

    .retro-card .timeline-item {
      font-size: 11.2px;
      min-height: 28px;
      line-height: 1.18;
    }

    .message-list {
      display: flex;
      flex-direction: column;
      gap: 16px;
      margin-top: 12px;
    }

    .message-card {
      min-height: 310px;
      padding-top: 20px;
      padding-bottom: 24px;
    }

    .message-row {
      display: grid;
      grid-template-columns: 31px 1fr 95px;
      gap: 10px;
      align-items: start;
      color: var(--purple-900);
      font-size: 12px;
      font-weight: 800;
    }

    .message-avatar {
      width: 29px;
      height: 29px;
      border-radius: 50%;
      color: #fff;
      display: flex;
      align-items: center;
      justify-content: center;
      font-weight: 900;
      font-size: 12px;
    }

    .message-avatar.purple { background: #7f55e8; }
    .message-avatar.orange { background: #d7774d; }
    .message-avatar.blue { background: #227fa0; }
    .message-avatar.navy { background: #1473ae; }

    .message-subject {
      color: #2c1574;
      margin-top: 2px;
    }

    .message-date {
      text-align: right;
      color: var(--purple-900);
      font-size: 12px;
      font-weight: 800;
    }

    .see-all {
      display: block;
      text-align: center;
      margin-top: 12px;
      color: var(--purple-800);
      font-weight: 900;
      font-size: 13px;
      text-decoration: none;
    }


    /* ==========================================================================
       Règles communes aux onglets et composants réutilisables
       ========================================================================== */

    .app[data-current-tab="cahier-des-charges"] .top-fields,
    .app[data-current-tab="saisies-assureurs"] .top-fields,
    .app[data-current-tab="tarifications"] .top-fields,
    .app[data-current-tab="garanties"] .top-fields,
    .app[data-current-tab="rapports"] .top-fields {
      display: none;
    }

    .tab-panel {
      display: none;
    }

    .tab-panel.active {
      display: block;
    }

    .cdc-grid-2 {
      display: grid;
      grid-template-columns: repeat(2, minmax(0, 1fr));
      gap: 18px;
      margin-bottom: 16px;
    }

    .cdc-grid-3 {
      display: grid;
      grid-template-columns: repeat(3, minmax(0, 1fr));
      gap: 14px;
      margin-bottom: 16px;
    }

    .cdc-mini-card {
      border: 1px solid var(--border-light);
      border-radius: var(--radius-medium);
      background: linear-gradient(180deg, #ffffff 0%, #fcfaff 100%);
      padding: 14px;
      min-height: 96px;
    }

    .cdc-mini-title {
      color: var(--purple-900);
      font-size: 13px;
      font-weight: 900;
      margin-bottom: 9px;
    }

    .cdc-mini-value {
      color: var(--purple-850);
      font-size: 18px;
      font-weight: 900;
      line-height: 1.3;
    }

    .cdc-help-text {
      color: var(--text-muted);
      font-size: 12px;
      font-weight: 700;
      line-height: 1.45;
      margin-top: 7px;
    }

    .textarea-like {
      width: 100%;
      min-height: 104px;
      resize: vertical;
      border: 1px solid var(--border);
      border-radius: 9px;
      background: #fff;
      padding: 11px 12px;
      font-family: inherit;
      font-size: 13px;
      font-weight: 700;
      color: var(--purple-900);
      line-height: 1.45;
      outline: none;
    }

    .textarea-like::placeholder {
      color: #9a86b6;
      font-weight: 600;
    }

    .textarea-like:focus {
      border-color: var(--purple-600);
      box-shadow: 0 0 0 3px rgba(107, 53, 223, 0.10);
    }

    .service-grid {
      display: grid;
      grid-template-columns: repeat(3, minmax(0, 1fr));
      gap: 12px;
      margin-bottom: 16px;
    }

    .service-card {
      border: 1px solid var(--border);
      border-radius: var(--radius-medium);
      background: #fff;
      min-height: 76px;
      padding: 12px 13px;
      display: flex;
      align-items: flex-start;
      gap: 10px;
      color: var(--purple-900);
      font-size: 13px;
      font-weight: 900;
    }

    .service-card input {
      margin-top: 2px;
      accent-color: var(--purple-800);
      flex: 0 0 auto;
    }

    .service-card span {
      display: block;
    }

    .service-caption {
      display: block;
      margin-top: 4px;
      color: var(--text-muted);
      font-size: 11px;
      font-weight: 700;
      line-height: 1.35;
    }

    .upload-grid {
      display: grid;
      grid-template-columns: repeat(2, minmax(0, 1fr));
      gap: 14px;
    }

    .upload-drop-card {
      border: 1px dashed var(--purple-400);
      border-radius: var(--radius-medium);
      background: linear-gradient(180deg, #ffffff 0%, #fbf8ff 100%);
      padding: 16px;
      min-height: 104px;
      display: flex;
      align-items: center;
      gap: 14px;
    }

    .upload-drop-icon {
      width: 42px;
      height: 42px;
      border-radius: 10px;
      background: var(--purple-100);
      color: var(--purple-800);
      display: inline-flex;
      align-items: center;
      justify-content: center;
      flex: 0 0 auto;
    }

    .upload-drop-icon svg {
      width: 23px;
      height: 23px;
      stroke: currentColor;
      fill: none;
      stroke-width: 2.4;
    }

    .upload-drop-title {
      color: var(--purple-850);
      font-size: 14px;
      font-weight: 900;
      margin-bottom: 4px;
    }

    .upload-drop-meta {
      color: var(--text-muted);
      font-size: 12px;
      font-weight: 700;
      line-height: 1.35;
    }

    .cdc-comparison-grid {
      display: grid;
      grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
      gap: 0;
      border: 1px solid var(--border-light);
      border-radius: 16px;
      overflow: hidden;
      background: #fff;
    }

    .cdc-comparison-column {
      min-width: 0;
      padding: 16px;
      background: linear-gradient(180deg, #ffffff 0%, #fcfaff 100%);
    }

    .cdc-comparison-column + .cdc-comparison-column {
      border-left: 2px solid #e5d8f6;
    }

    .cdc-comparison-head {
      min-height: 42px;
      border-radius: 12px;
      display: flex;
      align-items: center;
      justify-content: center;
      margin-bottom: 14px;
      background: linear-gradient(90deg, #f1e9ff 0%, #f8f3ff 100%);
      color: var(--purple-900);
      font-size: 17px;
      font-weight: 900;
      text-transform: uppercase;
      letter-spacing: 0.02em;
    }

    .cdc-comparison-block {
      border: 1px solid var(--border-light);
      border-radius: 14px;
      background: #fff;
      padding: 13px;
      margin-bottom: 14px;
    }

    .cdc-comparison-block-title {
      color: var(--purple-850);
      font-size: 14px;
      font-weight: 900;
      margin-bottom: 12px;
      display: flex;
      align-items: center;
      gap: 8px;
    }

    .cdc-comparison-block-title::before {
      content: "";
      width: 8px;
      height: 8px;
      border-radius: 50%;
      background: var(--purple-700);
      flex: 0 0 auto;
    }

    .cdc-comparison-column .cdc-info-grid {
      grid-template-columns: repeat(2, minmax(0, 1fr));
      gap: 12px;
    }

    .cdc-comparison-column .cdc-tariff-settings-grid {
      grid-template-columns: minmax(0, 1fr);
      gap: 12px;
      margin-top: 12px;
    }

    .cdc-comparison-column .upload-grid {
      grid-template-columns: minmax(0, 1fr);
    }

    .cdc-current-doc-upload-grid {
      grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
      gap: 10px;
    }

    .cdc-current-doc-upload-grid .upload-drop-card {
      min-height: 78px;
      padding: 10px;
      gap: 9px;
      align-items: flex-start;
    }

    .cdc-current-doc-upload-grid .upload-drop-icon {
      width: 34px;
      height: 34px;
      border-radius: 9px;
    }

    .cdc-current-doc-upload-grid .upload-drop-icon svg {
      width: 19px;
      height: 19px;
    }

    .cdc-current-doc-upload-grid .upload-drop-title {
      font-size: 12px;
      line-height: 1.2;
      margin-bottom: 3px;
    }

    .cdc-current-doc-upload-grid .upload-drop-meta {
      font-size: 10.5px;
      line-height: 1.25;
    }

    .cdc-comparison-column .comment-zone {
      margin-top: 12px;
    }

    .cdc-comparison-full {
      margin-top: 16px;
      border: 1px solid var(--border-light);
      border-radius: 16px;
      background: linear-gradient(180deg, #ffffff 0%, #fcfaff 100%);
      padding: 16px;
    }

    .cdc-comparison-full-title {
      color: var(--purple-900);
      font-size: 16px;
      font-weight: 900;
      margin-bottom: 12px;
    }

    .cdc-comparison-grid {
      gap: 14px 0;
      padding: 16px;
      align-items: stretch;
      background: linear-gradient(180deg, #ffffff 0%, #fcfaff 100%);
    }

    .cdc-comparison-column {
      display: contents;
      padding: 0;
      background: transparent;
    }

    .cdc-comparison-column + .cdc-comparison-column {
      border-left: none;
    }

    .cdc-comparison-head,
    .cdc-comparison-block {
      margin-bottom: 0;
      height: 100%;
    }

    .cdc-comparison-column:first-child .cdc-comparison-head { order: 1; }
    .cdc-comparison-column:nth-child(2) .cdc-comparison-head { order: 2; }
    .cdc-comparison-column:first-child [data-compare-theme="parametres"] { order: 3; }
    .cdc-comparison-column:nth-child(2) [data-compare-theme="parametres"] { order: 4; }
    .cdc-comparison-column:first-child [data-compare-theme="garanties"] { order: 5; }
    .cdc-comparison-column:nth-child(2) [data-compare-theme="garanties"] { order: 6; }
    .cdc-comparison-column:first-child [data-compare-theme="tarification"] { order: 7; }
    .cdc-comparison-column:nth-child(2) [data-compare-theme="tarification"] { order: 8; }
    .cdc-comparison-column:first-child [data-compare-theme="services"] { order: 9; }
    .cdc-comparison-column:nth-child(2) [data-compare-theme="services"] { order: 10; }

    .cdc-comparison-column:first-child .cdc-comparison-head,
    .cdc-comparison-column:first-child .cdc-comparison-block {
      border-radius: 14px 0 0 14px;
    }

    .cdc-comparison-column:nth-child(2) .cdc-comparison-head,
    .cdc-comparison-column:nth-child(2) .cdc-comparison-block {
      border-left: 2px solid #e5d8f6;
      border-radius: 0 14px 14px 0;
    }

    .cdc-comparison-block[data-compare-theme="parametres"] {
      background: linear-gradient(180deg, #f6fbff 0%, #ffffff 100%);
      border-color: #dceeff;
    }

    .cdc-comparison-block[data-compare-theme="garanties"] {
      background: linear-gradient(180deg, #f5fff8 0%, #ffffff 100%);
      border-color: #d7f0df;
    }

    .cdc-comparison-block[data-compare-theme="tarification"] {
      background: linear-gradient(180deg, #fffaf0 0%, #ffffff 100%);
      border-color: #f2e4bd;
    }

    .cdc-comparison-block[data-compare-theme="services"] {
      background: linear-gradient(180deg, #fff7fd 0%, #ffffff 100%);
      border-color: #efd8ea;
    }

    .cdc-comparison-full[data-compare-theme="frais"] {
      background: linear-gradient(180deg, #faf8ff 0%, #ffffff 100%);
      border-color: #e1d9f2;
    }

    .cdc-comparison-block[data-compare-theme="parametres"] .cdc-comparison-block-title::before { background: #8bbde8; }
    .cdc-comparison-block[data-compare-theme="garanties"] .cdc-comparison-block-title::before { background: #8fca9b; }
    .cdc-comparison-block[data-compare-theme="tarification"] .cdc-comparison-block-title::before { background: #d9b75d; }
    .cdc-comparison-block[data-compare-theme="services"] .cdc-comparison-block-title::before { background: #d29ac7; }

    .cdc-summary-strip {
      display: grid;
      grid-template-columns: repeat(6, minmax(0, 1fr));
      gap: 12px;
      margin-bottom: 16px;
    }

    .cdc-summary-card {
      min-height: 96px;
      border: 1px solid var(--border-light);
      border-radius: var(--radius-medium);
      background: linear-gradient(180deg, #ffffff 0%, #fcfaff 100%);
      padding: 12px 14px;
      box-shadow: 0 1px 0 rgba(73, 0, 156, 0.03);
    }

    .cdc-summary-label {
      font-size: 11px;
      font-weight: 900;
      color: var(--text-muted);
      text-transform: uppercase;
      letter-spacing: 0.03em;
      margin-bottom: 10px;
    }

    .cdc-summary-value {
      font-size: 15px;
      font-weight: 900;
      color: var(--purple-850);
      line-height: 1.35;
    }

    .cdc-summary-subvalue {
      font-size: 12px;
      font-weight: 700;
      color: var(--text-muted);
      margin-top: 5px;
    }

    .status-line {
      display: flex;
      align-items: center;
      gap: 9px;
    }

    .status-dot {
      width: 12px;
      height: 12px;
      border-radius: 50%;
      background: var(--green);
      flex: 0 0 auto;
    }

    .status-dot.orange { background: #f29b38; }
    .status-dot.red { background: #e0564a; }

    .progress-track {
      margin-top: 8px;
      height: 6px;
      border-radius: 999px;
      background: #eee7fb;
      overflow: hidden;
    }

    .progress-bar {
      height: 100%;
      width: 78%;
      border-radius: 999px;
      background: linear-gradient(90deg, #5d24e5 0%, #8c57ef 100%);
    }

    .cdc-info-grid {
      display: grid;
      grid-template-columns: repeat(5, minmax(0, 1fr));
      gap: 14px;
      margin-bottom: 8px;
    }

    .cdc-info-grid-6 {
      display: grid;
      grid-template-columns: repeat(6, minmax(0, 1fr));
      gap: 14px;
      margin-bottom: 10px;
    }

    .cdc-info-label {
      display: block;
      font-size: 11px;
      font-weight: 900;
      color: var(--text-muted);
      margin-bottom: 6px;
      text-transform: uppercase;
      letter-spacing: 0.02em;
    }

    .cdc-info-value {
      font-size: 14px;
      font-weight: 900;
      color: var(--purple-900);
      line-height: 1.35;
    }

    .badge {
      display: inline-flex;
      align-items: center;
      justify-content: center;
      min-height: 26px;
      padding: 0 10px;
      border-radius: 999px;
      font-size: 12px;
      font-weight: 900;
      white-space: nowrap;
      border: 1px solid transparent;
    }

    .badge.orange {
      background: #fff2e7;
      color: #d96c17;
      border-color: #ffd5b2;
    }

    .badge.green {
      background: #effaf3;
      color: #1f8d4b;
      border-color: #ccefd8;
    }

    .badge.red {
      background: #fff0ef;
      color: #d54c40;
      border-color: #f8c5c0;
    }

    .badge.purple {
      background: #f3ecff;
      color: var(--purple-800);
      border-color: #ddcefb;
    }

    .attachment-row {
      display: flex;
      align-items: center;
      gap: 10px;
      flex-wrap: wrap;
      margin-top: 10px;
    }

    .attachment-chip {
      display: inline-flex;
      align-items: center;
      gap: 8px;
      min-height: 34px;
      padding: 0 12px;
      border: 1px solid var(--border);
      border-radius: 9px;
      background: #fff;
      color: var(--purple-900);
      font-size: 12px;
      font-weight: 800;
    }

    .attachment-chip .meta {
      color: var(--text-muted);
      font-weight: 700;
      font-size: 11px;
    }

    .attachment-link {
      margin-left: auto;
      color: var(--purple-800);
      font-size: 12px;
      font-weight: 900;
      text-decoration: none;
    }

    .pill-row {
      display: flex;
      flex-wrap: wrap;
      gap: 8px;
      margin-top: 8px;
    }

    .pill {
      min-height: 31px;
      padding: 0 12px;
      border-radius: 8px;
      border: 1px solid #d7c8f6;
      background: #fff;
      color: var(--purple-800);
      display: inline-flex;
      align-items: center;
      font-size: 12px;
      font-weight: 900;
    }

    .pill.active {
      background: linear-gradient(180deg, #4f0bd0 0%, #31007d 100%);
      color: #fff;
      border-color: #39008f;
    }

    .cdc-upload-box {
      width: 100%;
      min-height: 140px;
      border: 1px dashed #cbb5f4;
      border-radius: 12px;
      background: linear-gradient(180deg, #ffffff 0%, #fcf9ff 100%);
      padding: 16px;
      display: flex;
      align-items: center;
      justify-content: center;
    }

    .cdc-upload-inner {
      text-align: center;
      color: var(--purple-900);
    }

    .cdc-upload-icon {
      width: 44px;
      height: 44px;
      margin: 0 auto 10px;
      border-radius: 50%;
      background: var(--purple-100);
      color: var(--purple-800);
      display: flex;
      align-items: center;
      justify-content: center;
      font-weight: 900;
      font-size: 24px;
    }

    .cdc-upload-title {
      font-size: 14px;
      font-weight: 900;
      margin-bottom: 6px;
    }

    .cdc-upload-subtitle {
      font-size: 12px;
      color: var(--text-muted);
      font-weight: 700;
      margin-bottom: 12px;
    }

    .cdc-action-grid {
      display: grid;
      grid-template-columns: repeat(4, minmax(0, 1fr));
      gap: 14px;
    }

    .cdc-action-card {
      min-height: 90px;
      border: 1px solid var(--border-light);
      border-radius: 12px;
      background: linear-gradient(180deg, #ffffff 0%, #fcfaff 100%);
      padding: 14px;
      display: flex;
      align-items: center;
      gap: 12px;
    }

    .cdc-action-icon {
      width: 42px;
      height: 42px;
      border-radius: 10px;
      background: var(--purple-100);
      color: var(--purple-800);
      display: inline-flex;
      align-items: center;
      justify-content: center;
      font-size: 20px;
      font-weight: 900;
      flex: 0 0 auto;
    }

    .cdc-action-title {
      font-size: 14px;
      font-weight: 900;
      color: var(--purple-900);
      margin-bottom: 4px;
    }

    .cdc-action-subtitle {
      font-size: 12px;
      color: var(--text-muted);
      font-weight: 700;
      line-height: 1.35;
    }

    .tab-panel[data-tab-panel="cahier-des-charges"] td[contenteditable="true"] {
      outline: none;
      cursor: text;
    }

    .tab-panel[data-tab-panel="cahier-des-charges"] td[contenteditable="true"]:focus {
      background: var(--purple-75);
      box-shadow: inset 0 0 0 2px rgba(107, 53, 223, 0.20);
    }

    .tariff-matrix-wrap {
      overflow-x: auto;
      border: 1px solid var(--border-light);
      border-radius: 14px;
      background: #fff;
      box-shadow: 0 1px 0 rgba(91, 56, 152, 0.03);
    }

    .tariff-matrix {
      width: 100%;
      min-width: 520px;
      border-collapse: separate;
      border-spacing: 0;
      color: var(--purple-900);
      font-size: 13px;
      font-weight: 800;
    }

    .tariff-matrix th,
    .tariff-matrix td {
      height: 38px;
      padding: 9px 12px;
      border-right: 1px solid var(--border-light);
      border-bottom: 1px solid var(--border-light);
      vertical-align: middle;
      text-align: center;
    }

    .tariff-matrix thead th {
      background: linear-gradient(180deg, #f7f1fb 0%, #efe4f5 100%);
      color: var(--purple-900);
      font-size: 12px;
      font-weight: 900;
      border-right: 1px solid var(--border-light);
      border-bottom: 1px solid var(--border-light);
      white-space: nowrap;
    }

    .tariff-matrix thead tr:nth-child(2) th {
      background: linear-gradient(180deg, #f5f5f6 0%, #ededf0 100%);
      color: #51485f;
    }

    .tariff-matrix .tariff-year {
      font-size: 14px;
      letter-spacing: 0.03em;
    }

    .tariff-matrix .tariff-corner,
    .tariff-matrix .tariff-row-head,
    .tariff-matrix .tariff-section {
      width: 185px;
      min-width: 185px;
      text-align: left;
      white-space: nowrap;
    }

    .tariff-matrix .tariff-row-head,
    .tariff-matrix .tariff-section {
      background: #fbf8ff;
      color: var(--purple-800);
      font-weight: 900;
    }

    .tariff-matrix .tariff-section {
      background: #f6effa;
      color: var(--purple-900);
      border-left: 4px solid #d8c0e6;
    }

    .tariff-matrix .tariff-group-row th {
      height: 32px;
      padding: 7px 12px;
      text-align: left;
      background: linear-gradient(90deg, #efe5f7 0%, #fbf8ff 100%);
      color: var(--purple-900);
      border-left: 4px solid #7a2291;
      font-size: 12px;
      font-weight: 900;
      text-transform: uppercase;
      letter-spacing: 0.03em;
    }

    .tariff-matrix .tariff-group-hidden {
      display: none;
    }

    .tariff-matrix tbody td {
      background: #fff;
      color: var(--purple-900);
      min-width: 46px;
      width: 46px;
      padding-left: 6px;
      padding-right: 6px;
    }

    .tariff-matrix thead th:not(.tariff-corner):not(.tariff-row-head):not(.tariff-year),
    .tariff-matrix .tariff-year {
      min-width: 46px;
      width: 46px;
      padding-left: 6px;
      padding-right: 6px;
    }

    .tariff-matrix tbody tr:nth-child(even) td,
    .tariff-matrix tbody tr:nth-child(even) .tariff-row-head {
      background: #fcfbfe;
    }

    .tariff-matrix tbody tr:hover td,
    .tariff-matrix tbody tr:hover .tariff-row-head,
    .tariff-matrix tbody tr:hover .tariff-section {
      background: #f8f3ff;
    }

    .tariff-matrix td[contenteditable="true"]:focus {
      background: var(--purple-75) !important;
      box-shadow: inset 0 0 0 2px rgba(107, 53, 223, 0.20);
    }

    .tariff-matrix.hide-alsace .tariff-alsace {
      display: none;
    }

    .tariff-matrix .tariff-option-hidden {
      display: none;
    }

    .tariff-matrix-actions {
      display: flex;
      justify-content: flex-end;
      gap: 10px;
      flex-wrap: wrap;
      margin-top: 10px;
    }

    .tab-panel[data-tab-panel="cahier-des-charges"] .required-empty {
      background: #fff1f1 !important;
      color: var(--purple-900);
      font-weight: 900;
    }

    .required-pencil {
      display: inline-flex;
      align-items: center;
      justify-content: center;
      width: 18px;
      height: 18px;
      border-radius: 50%;
      background: #ffe0e0;
      color: #c84646;
      font-size: 12px;
      font-weight: 900;
    }

    .cdc-radio-row {
      display: flex;
      align-items: center;
      gap: 8px;
      min-height: 39px;
      flex-wrap: wrap;
    }

    .cdc-tariff-settings-grid {
      display: grid;
      grid-template-columns: minmax(330px, max-content) minmax(230px, max-content) minmax(230px, max-content);
      gap: 26px;
      align-items: end;
      margin-top: 14px;
      margin-bottom: 8px;
    }

    .cdc-tariff-settings-grid .cdc-info-item {
      min-width: 0;
    }

    .cdc-tariff-settings-grid .cdc-radio-row {
      justify-content: flex-start;
    }

    .cdc-radio-pill {
      min-height: 34px;
      border: 1px solid var(--border);
      border-radius: 999px;
      background: #fff;
      color: var(--purple-900);
      display: inline-flex;
      align-items: center;
      gap: 7px;
      padding: 0 12px;
      font-size: 13px;
      font-weight: 900;
      cursor: default;
    }

    .cdc-radio-pill input {
      accent-color: var(--purple-800);
    }

    .cdc-radio-pill.hidden-by-risk {
      display: none;
    }

    .cdc-structure-radio-row {
      gap: 7px;
      align-items: flex-start;
    }

    .cdc-structure-radio-row .cdc-radio-pill {
      min-height: 31px;
      padding: 0 10px;
      font-size: 12px;
    }

    .cdc-structure-field {
      grid-column: 1 / -1;
    }

    .cdc-structure-field .cdc-structure-radio-row {
      width: 100%;
      align-items: center;
    }

    .cdc-option-structure-field {
      grid-column: 1 / 2;
      margin-top: -2px;
    }

    .cdc-option-structure-field.hidden {
      display: none;
    }

    .cdc-option-structure-field .cdc-radio-row {
      align-items: center;
      gap: 8px;
    }

    .cdc-expressed-in-field.hidden,
    .cdc-alsace-field.hidden {
      display: none;
    }

    .cdc-conditional-upload {
      margin-top: 10px;
      min-height: 86px;
      padding: 12px;
    }

    .cdc-conditional-upload.hidden {
      display: none;
    }

    .fees-table .fees-health.hidden-by-risk,
    .fees-table .fees-prevoyance.hidden-by-risk {
      display: none;
    }

    .cdc-service-pill.hidden-by-risk,
    .cdc-service-item.hidden-by-risk {
      display: none !important;
    }

    .cdc-info-item.diff-highlight,
    .cdc-radio-pill.diff-highlight,
    .comment-zone.diff-highlight {
      border-color: #ffb454 !important;
      background: #fff7e8 !important;
      box-shadow: inset 0 0 0 1px rgba(255, 180, 84, 0.35), 0 4px 12px rgba(255, 180, 84, 0.12);
      position: relative;
    }

    .cdc-info-item.diff-highlight::after,
    .comment-zone.diff-highlight::after {
      content: "⚠ Différent";
      position: absolute;
      top: 8px;
      right: 10px;
      min-height: 20px;
      padding: 0 8px;
      border-radius: 999px;
      background: #ffedd1;
      color: #b15d00;
      border: 1px solid #ffc878;
      display: inline-flex;
      align-items: center;
      font-size: 10px;
      font-weight: 900;
      letter-spacing: 0.01em;
    }

    .cdc-radio-pill.diff-highlight::after {
      content: "⚠";
      width: 18px;
      height: 18px;
      border-radius: 50%;
      background: #ffedd1;
      color: #b15d00;
      display: inline-flex;
      align-items: center;
      justify-content: center;
      font-size: 11px;
      font-weight: 900;
      margin-left: 2px;
    }

    .fees-table td.fees-diff {
      background: #fff7e8 !important;
      box-shadow: inset 0 0 0 2px rgba(255, 180, 84, 0.45);
      color: #7a3c00;
      font-weight: 900;
    }

    .fees-table td.fees-diff::after {
      content: " ⚠";
      color: #b15d00;
      font-weight: 900;
    }

    /* ==========================================================================
       Onglet Saisies : synthèse, messages paramétrés, assureurs, gestionnaires
       ========================================================================== */

    .tab-panel[data-tab-panel="saisies-assureurs"] .section-card {
      margin-bottom: 18px;
    }

    .saisies-intro {
      display: flex;
      justify-content: space-between;
      gap: 18px;
      align-items: flex-start;
      flex-wrap: wrap;
    }

    .summary-split {
      display: grid;
      grid-template-columns: minmax(0, 1.55fr) minmax(250px, 0.7fr);
      gap: 12px;
      align-items: start;
    }

    .summary-main,
    .summary-side {
      min-width: 0;
    }

    .summary-main {
      display: flex;
      align-items: flex-start;
      gap: 10px;
    }

    .section-card[data-collapsible="saisies-synthese"] .section-body {
      padding-top: 10px;
      padding-bottom: 10px;
    }

    .section-card[data-collapsible="saisies-synthese"] .saisies-intro-text {
      font-size: 12px;
      line-height: 1.45;
      margin: 0;
    }

    .section-card[data-collapsible="saisies-synthese"] .saisies-stats {
      gap: 8px;
      width: 100%;
      align-items: stretch;
    }

    .section-card[data-collapsible="saisies-synthese"] .saisie-kpi {
      flex: 1 1 0;
      min-width: 155px;
      padding: 8px 10px;
      border-radius: 10px;
    }

    .section-card[data-collapsible="saisies-synthese"] .saisie-kpi-label {
      font-size: 9px;
      line-height: 1.15;
      margin-bottom: 3px;
    }

    .section-card[data-collapsible="saisies-synthese"] .saisie-kpi-value {
      font-size: 18px;
      line-height: 1.05;
    }

    .summary-upload-card {
      height: auto;
      border: 1px solid var(--border-light);
      border-radius: 12px;
      background: linear-gradient(180deg, #ffffff 0%, #fcfaff 100%);
      padding: 10px;
    }

    .summary-upload-title {
      font-size: 13px;
      font-weight: 900;
      color: var(--purple-900);
      margin-bottom: 2px;
    }

    .summary-upload-subtitle {
      font-size: 11px;
      font-weight: 700;
      color: var(--text-muted);
      line-height: 1.25;
      margin-bottom: 6px;
    }

    .summary-upload-dropzone {
      min-height: 0;
      border: 1px dashed #ccb8ee;
      border-radius: 10px;
      background: #fbf8ff;
      padding: 8px 10px;
      text-align: center;
      display: grid;
      grid-template-columns: 28px minmax(0, 1fr) auto;
      align-items: center;
      gap: 8px;
    }

    .summary-upload-icon {
      width: 28px;
      height: 28px;
      border-radius: 9px;
      background: var(--purple-100);
      color: var(--purple-800);
      display: inline-flex;
      align-items: center;
      justify-content: center;
      margin-bottom: 0;
    }

    .summary-upload-icon svg {
      width: 16px;
      height: 16px;
      stroke: currentColor;
      fill: none;
      stroke-width: 2.2;
    }

    .summary-upload-text {
      font-size: 12px;
      font-weight: 800;
      color: var(--purple-900);
      margin-bottom: 0;
      text-align: left;
    }

    .summary-upload-or {
      display: none;
    }

    .summary-upload-meta {
      grid-column: 1 / -1;
      margin-top: 0;
      font-size: 10px;
      font-weight: 700;
      color: var(--text-muted);
      text-align: left;
      padding-left: 36px;
    }

    .saisies-intro-text {
      flex: 1 1 520px;
      font-size: 13px;
      line-height: 1.6;
      font-weight: 700;
      color: var(--purple-900);
    }

    .saisies-stats {
      display: flex;
      gap: 12px;
      flex-wrap: wrap;
    }

    .saisie-kpi {
      min-width: 150px;
      border: 1px solid var(--border-light);
      border-radius: 12px;
      background: linear-gradient(180deg, #ffffff 0%, #fcfaff 100%);
      padding: 12px 14px;
    }

    .saisie-kpi-label {
      font-size: 11px;
      font-weight: 900;
      color: var(--text-muted);
      text-transform: uppercase;
      margin-bottom: 6px;
    }

    .saisie-kpi-value {
      font-size: 24px;
      font-weight: 900;
      color: var(--purple-850);
    }

    .smart-table-wrap {
      overflow: auto;
      border: 1px solid var(--border-light);
      border-radius: 14px;
      background: #fff;
    }

    .smart-table-wrap-tall { max-height: 430px; }
    .smart-table-wrap-medium { max-height: 305px; }

    .smart-table {
      width: 100%;
      border-collapse: separate;
      border-spacing: 0;
      min-width: 1140px;
    }

    .smart-table thead th {
      position: sticky;
      top: 0;
      background: linear-gradient(180deg, #7a2291 0%, #6a187f 100%);
      color: #fff;
      font-size: 12px;
      font-weight: 900;
      text-align: left;
      padding: 14px 12px;
      border-right: 1px solid rgba(255,255,255,0.18);
      z-index: 1;
      white-space: nowrap;
    }

    .smart-table tbody td {
      padding: 12px;
      border-bottom: 1px solid #efe8f6;
      font-size: 13px;
      font-weight: 700;
      color: var(--purple-900);
      vertical-align: middle;
      background: #fff;
      white-space: nowrap;
    }

    .smart-table tbody tr:nth-child(even) td { background: #fcfbfe; }
    .smart-table tbody tr:hover td { background: #f8f3ff; }
    .smart-table tbody tr.selected-row td { background: #f3ebff; }

    .entity-cell {
      display: flex;
      align-items: center;
      gap: 12px;
      min-width: 240px;
    }

    .entity-logo {
      width: 42px;
      height: 42px;
      border-radius: 12px;
      background: linear-gradient(180deg, #f1e9ff 0%, #e6d8ff 100%);
      color: var(--purple-800);
      display: flex;
      align-items: center;
      justify-content: center;
      font-size: 13px;
      font-weight: 900;
      flex: 0 0 auto;
      border: 1px solid #ddd1f5;
      overflow: hidden;
    }

    .entity-name {
      font-size: 14px;
      font-weight: 900;
      color: var(--purple-900);
      margin-bottom: 3px;
    }

    .entity-sub {
      font-size: 11px;
      font-weight: 700;
      color: var(--text-muted);
    }

    .saisir-btn {
      min-height: 36px;
      padding: 0 14px;
      border: 1px solid #d2c4f2;
      border-radius: 10px;
      background: #fff;
      color: var(--purple-800);
      font-size: 12px;
      font-weight: 900;
      cursor: pointer;
      transition: all 0.18s ease;
    }

    .saisir-btn:hover { background: #f4eeff; border-color: #b79be8; }
    .saisir-btn.active {
      background: linear-gradient(180deg, #4f0bd0 0%, #31007d 100%);
      color: #fff;
      border-color: #39008f;
    }

    .status-select-wrap {
      display: inline-flex;
      align-items: center;
      min-height: 30px;
      border-radius: 999px;
      padding: 0 10px;
      border: 1px solid transparent;
    }

    .status-select {
      border: none;
      background: transparent;
      font-size: 12px;
      font-weight: 900;
      outline: none;
      cursor: pointer;
      color: inherit;
      max-width: 190px;
    }

    .status-select-wrap.pending { background: #f5f3f8; color: #756d86; border-color: #e5dfef; }
    .status-select-wrap.waiting { background: #fff5e9; color: #c86f12; border-color: #f5d4aa; }
    .status-select-wrap.success { background: #effaf3; color: #1f8d4b; border-color: #ccefd8; }
    .status-select-wrap.refused { background: #fff0ef; color: #d54c40; border-color: #f8c5c0; }

    .date-cell {
      display: inline-flex;
      align-items: center;
      gap: 7px;
      min-height: 34px;
    }

    .date-trigger {
      width: 31px;
      height: 31px;
      border: 1px solid #d8caef;
      border-radius: 8px;
      background: #fff;
      color: var(--purple-800);
      display: inline-flex;
      align-items: center;
      justify-content: center;
      cursor: pointer;
      flex: 0 0 auto;
    }

    .date-trigger svg {
      width: 16px;
      height: 16px;
      stroke: currentColor;
      fill: none;
      stroke-width: 2.2;
    }

    .date-label { min-width: 78px; }

    .native-date-input {
      position: absolute;
      opacity: 0;
      pointer-events: none;
      width: 1px;
      height: 1px;
    }

    .native-date-input.native-date-input-fallback {
      position: static;
      opacity: 1;
      pointer-events: auto;
      width: auto;
      height: 31px;
      border: 1px solid #d8caef;
      border-radius: 8px;
      color: var(--purple-900);
      font-family: inherit;
      font-size: 12px;
      font-weight: 800;
      padding: 0 7px;
      background: #fff;
    }

    .muted-cell { color: #9b92ab !important; }

    .action-feed {
      display: flex;
      flex-direction: column;
      gap: 10px;
    }

    .action-feed-empty {
      font-size: 13px;
      font-weight: 700;
      color: var(--text-muted);
    }

    .action-feed-item {
      border: 1px solid var(--border-light);
      border-radius: 12px;
      background: #fff;
      padding: 12px 14px;
      font-size: 13px;
      font-weight: 700;
      color: var(--purple-900);
    }

    .action-feed-item strong { color: var(--purple-800); }

    .msg-param-intro {
      font-size: 13px;
      line-height: 1.6;
      font-weight: 700;
      color: var(--purple-900);
      margin-bottom: 12px;
    }

    .msg-token-list {
      display: flex;
      flex-wrap: wrap;
      gap: 8px;
      margin-bottom: 16px;
    }

    .msg-token-chip {
      display: inline-flex;
      align-items: center;
      min-height: 28px;
      padding: 0 10px;
      border-radius: 999px;
      border: 1px solid #ddd1f5;
      background: #f8f4ff;
      color: var(--purple-800);
      font-size: 12px;
      font-weight: 900;
    }

    .msg-grid {
      display: grid;
      grid-template-columns: repeat(2, minmax(0, 1fr));
      gap: 16px;
    }

    .msg-card {
      border: 1px solid var(--border-light);
      border-radius: 14px;
      background: linear-gradient(180deg, #ffffff 0%, #fcfaff 100%);
      padding: 16px;
    }

    .msg-card-head { margin-bottom: 12px; }

    .msg-card-title {
      font-size: 14px;
      font-weight: 900;
      color: var(--purple-900);
      margin-bottom: 4px;
    }

    .msg-card-subtitle {
      font-size: 12px;
      font-weight: 700;
      color: var(--text-muted);
      line-height: 1.45;
    }

    .msg-label {
      display: block;
      font-size: 12px;
      font-weight: 900;
      color: var(--purple-850);
      margin-bottom: 8px;
    }

    .msg-textarea {
      width: 100%;
      min-height: 250px;
      resize: vertical;
      border: 1px solid #d8caef;
      border-radius: 12px;
      background: #fff;
      color: var(--purple-900);
      padding: 12px 14px;
      font-family: inherit;
      font-size: 13px;
      line-height: 1.5;
      font-weight: 700;
      outline: none;
    }

    .msg-textarea:focus {
      border-color: #b89be9;
      box-shadow: 0 0 0 3px rgba(107, 53, 223, 0.10);
    }

    .msg-actions {
      margin-top: 16px;
      display: flex;
      align-items: center;
      gap: 12px;
      flex-wrap: wrap;
    }

    .btn.btn-secondary {
      background: #fff;
      color: var(--purple-800);
      border: 1px solid #d2c4f2;
    }

    .msg-save-feedback {
      font-size: 12px;
      font-weight: 800;
      color: #1f8d4b;
      min-height: 18px;
    }

    /* ==========================================================================
       Onglet Tarifications : paramètres, tableau comparatif, graphiques
       ========================================================================== */

    .tarification-settings-grid {
      display: grid;
      grid-template-columns: minmax(340px, 1.25fr) minmax(360px, 1fr) minmax(240px, 0.65fr);
      gap: 16px;
      align-items: stretch;
    }

    .tarification-side-stack {
      display: grid;
      grid-template-rows: auto auto;
      gap: 12px;
      min-width: 0;
    }

    .offer-choice-card,
    .financing-card,
    .fees-input-card,
    .tarif-expression-card {
      border: 1px solid var(--border-light);
      border-radius: 14px;
      background: linear-gradient(180deg, #ffffff 0%, #fcfaff 100%);
      padding: 14px;
      min-width: 0;
    }

    .offer-checkbox-grid {
      display: grid;
      grid-template-columns: repeat(2, minmax(0, 1fr));
      gap: 8px;
      margin-top: 8px;
    }

    .offer-card-head {
      display: flex;
      justify-content: space-between;
      align-items: flex-start;
      gap: 12px;
      margin-bottom: 2px;
    }

    .offer-card-head .btn {
      height: 32px;
      padding: 0 12px;
      font-size: 12px;
      flex: 0 0 auto;
    }

    .offer-checkbox-pill {
      min-height: 34px;
      border: 1px solid var(--border);
      border-radius: 999px;
      background: #fff;
      color: var(--purple-900);
      display: inline-flex;
      align-items: center;
      gap: 8px;
      padding: 0 11px;
      font-size: 12px;
      font-weight: 900;
      cursor: default;
      white-space: nowrap;
    }

    .offer-checkbox-pill input {
      accent-color: var(--purple-800);
    }

    .financing-matrix {
      width: 100%;
      border-collapse: separate;
      border-spacing: 0;
      border: 1px solid var(--border);
      border-radius: 10px;
      overflow: hidden;
      color: var(--purple-900);
      font-size: 12px;
      font-weight: 800;
    }

    .financing-matrix th,
    .financing-matrix td {
      height: 34px;
      padding: 7px 9px;
      border-right: 1px solid var(--border-light);
      border-bottom: 1px solid var(--border-light);
      text-align: center;
      vertical-align: middle;
    }

    .financing-matrix th {
      background: linear-gradient(180deg, #f7f1fb 0%, #efe4f5 100%);
      color: var(--purple-900);
      font-weight: 900;
      white-space: nowrap;
    }

    .financing-matrix th:first-child,
    .financing-matrix td:first-child {
      text-align: left;
      width: 48%;
    }

    .financing-matrix tr:last-child td {
      border-bottom: none;
    }

    .financing-matrix th:last-child,
    .financing-matrix td:last-child {
      border-right: none;
    }

    .money-mini-input {
      width: 100%;
      max-width: 150px;
      height: 39px;
      border: 1px solid var(--border);
      border-radius: 8px;
      background: #fff;
      color: var(--purple-900);
      font-family: inherit;
      font-size: 14px;
      font-weight: 900;
      padding: 0 12px;
      outline: none;
      text-align: right;
    }

    .money-mini-input:focus {
      border-color: var(--purple-600);
      box-shadow: 0 0 0 3px rgba(107, 53, 223, 0.10);
    }

    .tarif-expression-card .cdc-radio-row {
      align-items: flex-start;
      gap: 7px;
    }

    .tarif-expression-card .cdc-radio-pill {
      min-height: 31px;
      padding: 0 10px;
      font-size: 12px;
    }

    .tarif-expression-card.prevoyance-locked .cdc-radio-pill:not([data-tarif-expression="salaire"]) {
      display: none;
    }

    .tarif-expression-card.prevoyance-locked .cdc-radio-pill[data-tarif-expression="salaire"] {
      background: #f3ecff;
      border-color: #ddcefb;
    }

    .tarif-expression-card.prevoyance-locked input {
      pointer-events: none;
    }

    .tarification-table-toolbar {
      display: flex;
      justify-content: space-between;
      align-items: flex-end;
      gap: 16px;
      margin-top: 12px;
      flex-wrap: wrap;
    }

    .tarification-toolbar-left {
      display: flex;
      align-items: flex-end;
      gap: 12px;
      flex-wrap: wrap;
    }

    .tarification-toolbar-right {
      display: flex;
      align-items: center;
      gap: 10px;
      margin-left: auto;
    }

    .excel-export-hint {
      width: 38px;
      height: 38px;
      border-radius: 10px;
      border: 1px solid #cfe7d6;
      background: linear-gradient(180deg, #f4fbf6 0%, #e8f6ed 100%);
      box-shadow: 0 4px 10px rgba(16, 124, 65, 0.08);
      display: inline-flex;
      align-items: center;
      justify-content: center;
      flex: 0 0 auto;
      cursor: default;
    }

    .excel-export-hint svg {
      width: 22px;
      height: 22px;
      display: block;
    }

    .excel-export-hint:hover {
      transform: translateY(-1px);
    }

    .excel-export-hint-label {
      color: #2f6b46;
      font-size: 11px;
      font-weight: 900;
      white-space: nowrap;
    }

    .acceptable-threshold-card {
      border: 1px solid var(--border-light);
      border-radius: 14px;
      background: linear-gradient(180deg, #ffffff 0%, #fcfaff 100%);
      padding: 12px 14px;
      min-width: 205px;
      display: none;
    }

    .acceptable-threshold-card.visible {
      display: block;
    }

    .acceptable-threshold-card .money-mini-input {
      max-width: 138px;
      height: 34px;
      font-size: 13px;
    }

    .tariff-table-choice-card,
    .tariff-table-choice-card {
      min-width: 520px;
    }

    .comparison-mode-card {
      min-width: 420px;
    }

    .comparison-mode-title {
      color: var(--purple-900);
      font-size: 12px;
      font-weight: 900;
      text-transform: uppercase;
      letter-spacing: 0.02em;
      margin-bottom: 8px;
    }

    .tarification-graph-toolbar {
      margin-bottom: 14px;
      display: flex;
      align-items: center;
      justify-content: flex-start;
      flex-wrap: wrap;
      gap: 12px;
    }

    .tarification-graph-wrap {
      border: 1px solid var(--border-light);
      border-radius: 16px;
      background: linear-gradient(180deg, #ffffff 0%, #fcfaff 100%);
      padding: 18px;
      overflow-x: auto;
    }

    .tarification-graph-area {
      min-height: 340px;
      min-width: 760px;
      display: flex;
      align-items: stretch;
      gap: 18px;
      padding: 22px;
      border: 1px dashed #d6c8ef;
      border-radius: 14px;
      background:
        linear-gradient(180deg, rgba(122,34,145,0.05) 0 1px, transparent 1px) 0 0 / 100% 64px,
        linear-gradient(180deg, #ffffff 0%, #fbf8ff 100%);
      transition: min-width 160ms ease;
    }

    .graph-offer-card {
      width: 210px;
      min-width: 210px;
      border: 1px solid var(--border-light);
      border-radius: 16px;
      background: #fff;
      padding: 14px 12px 12px;
      display: flex;
      flex-direction: column;
      gap: 12px;
      box-shadow: 0 6px 18px rgba(79, 11, 208, 0.06);
    }

    .graph-offer-head {
      display: flex;
      justify-content: center;
      align-items: center;
      min-height: 46px;
    }

    .graph-offer-logo {
      max-width: 120px;
      max-height: 34px;
      object-fit: contain;
      display: block;
    }

    .graph-offer-logo-fallback {
      height: 34px;
      min-width: 90px;
      border-radius: 999px;
      border: 1px solid #ddd2f2;
      background: #f7f1fb;
      color: var(--purple-900);
      display: inline-flex;
      align-items: center;
      justify-content: center;
      padding: 0 14px;
      font-size: 12px;
      font-weight: 900;
      text-transform: uppercase;
      letter-spacing: 0.03em;
    }

    .graph-offer-body {
      flex: 1;
      display: flex;
      align-items: flex-end;
      justify-content: center;
    }

    .graph-rate-pair {
      display: flex;
      align-items: flex-end;
      justify-content: center;
      gap: 14px;
      height: 230px;
    }

    .graph-rate-bar-wrap {
      width: 74px;
      display: flex;
      flex-direction: column;
      align-items: center;
      justify-content: flex-end;
      gap: 8px;
    }

    .graph-rate-bar {
      width: 46px;
      border-radius: 12px 12px 4px 4px;
      background: linear-gradient(180deg, #8c57ef 0%, #4f0bd0 100%);
      box-shadow: 0 8px 16px rgba(79, 11, 208, 0.16);
    }

    .graph-rate-bar.alt {
      background: linear-gradient(180deg, #c38cff 0%, #7a2291 100%);
    }

    .graph-data-tag {
      width: 100%;
      min-height: 40px;
      text-align: center;
      color: var(--purple-900);
      font-size: 11px;
      font-weight: 900;
      line-height: 1.25;
    }

    .graph-data-tag .value {
      display: block;
      font-size: 12px;
      margin-top: 2px;
    }

    .graph-budget-stack-wrap {
      display: flex;
      flex-direction: column;
      align-items: center;
      justify-content: flex-end;
      gap: 10px;
      height: 240px;
    }

    .graph-budget-stack {
      width: 76px;
      height: 200px;
      border-radius: 14px 14px 6px 6px;
      overflow: hidden;
      border: 1px solid #d9cdf1;
      background: #f6f2fd;
      display: flex;
      flex-direction: column-reverse;
      box-shadow: inset 0 0 0 1px rgba(255,255,255,0.45);
    }

    .graph-budget-segment {
      display: flex;
      align-items: center;
      justify-content: center;
      padding: 6px;
      color: #fff;
      text-align: center;
      font-size: 10px;
      font-weight: 900;
      line-height: 1.2;
    }

    .graph-budget-segment.employees {
      background: linear-gradient(180deg, #a56bf6 0%, #7a2291 100%);
    }

    .graph-budget-segment.employer {
      background: linear-gradient(180deg, #8c57ef 0%, #4f0bd0 100%);
    }

    .graph-budget-legend {
      width: 100%;
      display: grid;
      gap: 5px;
      font-size: 11px;
      color: var(--purple-900);
      font-weight: 900;
    }

    .graph-budget-legend div {
      text-align: center;
    }

    .graph-pie-wrap {
      display: flex;
      flex-direction: column;
      align-items: center;
      gap: 12px;
    }

    .graph-pie {
      width: 150px;
      height: 150px;
      border-radius: 50%;
      border: 8px solid #fff;
      box-shadow: 0 8px 18px rgba(79, 11, 208, 0.10);
    }

    .graph-pie-legend {
      width: 100%;
      display: grid;
      gap: 6px;
    }

    .graph-pie-item {
      border-radius: 10px;
      padding: 6px 8px;
      font-size: 11px;
      font-weight: 900;
      color: var(--purple-900);
      background: #faf7ff;
      border: 1px solid #ece3fa;
      line-height: 1.25;
    }

    .graph-pie-item.gagnants { border-left: 6px solid #52b788; }
    .graph-pie-item.perdants { border-left: 6px solid #ef476f; }
    .graph-pie-item.neutres { border-left: 6px solid #b8b8c9; }

    .graph-pie-item .line-1,
    .graph-pie-item .line-2 {
      display: block;
    }

    .graph-pie-item .line-2 {
      font-size: 10px;
      margin-top: 2px;
      opacity: 0.95;
    }

    /* ==========================================================================
       Onglet Garanties : dépôts visuels des fichiers standardisés
       ========================================================================== */

    .garanties-params-grid {
      display: grid;
      grid-template-columns: repeat(2, minmax(0, 1fr));
      gap: 14px;
      margin-bottom: 16px;
    }

    .garanties-param-card {
      border: 1px solid var(--border-light);
      border-radius: 14px;
      background: linear-gradient(180deg, #ffffff 0%, #fcfaff 100%);
      padding: 14px;
      min-width: 0;
    }

    .garanties-param-card .cdc-radio-row {
      align-items: flex-start;
      gap: 7px;
      margin-top: 8px;
    }

    .garanties-param-card .cdc-radio-pill {
      min-height: 31px;
      padding: 0 10px;
      font-size: 12px;
    }

    .garanties-upload-zone {
      display: grid;
      grid-template-columns: repeat(2, minmax(0, 1fr));
      gap: 14px;
    }

    .garanties-upload-card {
      border: 1px solid var(--border-light);
      border-radius: 14px;
      background: linear-gradient(180deg, #ffffff 0%, #fcfaff 100%);
      box-shadow: 0 6px 16px rgba(79, 11, 208, 0.05);
      padding: 12px 14px;
      min-height: 94px;
      display: grid;
      grid-template-columns: minmax(210px, 1fr) minmax(260px, 1.15fr) auto;
      gap: 12px;
      align-items: center;
    }

    .garanties-upload-title-wrap {
      min-width: 0;
    }

    .garanties-upload-title {
      display: block;
      color: var(--purple-900);
      font-size: 13px;
      font-weight: 900;
      line-height: 1.25;
      margin-bottom: 4px;
    }

    .garanties-upload-help {
      color: var(--text-muted);
      font-size: 11px;
      font-weight: 700;
      line-height: 1.3;
    }

    .garanties-upload-drop {
      min-height: 52px;
      border: 1px dashed #d6c8ef;
      border-radius: 12px;
      background: linear-gradient(180deg, #fbf8ff 0%, #f7f1fb 100%);
      padding: 9px 11px;
      display: flex;
      align-items: center;
      justify-content: space-between;
      gap: 10px;
      min-width: 0;
    }

    .garanties-upload-file {
      min-width: 0;
      display: flex;
      align-items: center;
      gap: 10px;
    }

    .garanties-file-badge {
      width: 30px;
      height: 30px;
      border-radius: 8px;
      background: linear-gradient(180deg, #edf8f0 0%, #dcf1e2 100%);
      border: 1px solid #c9e7d1;
      color: #107c41;
      display: inline-flex;
      align-items: center;
      justify-content: center;
      flex: 0 0 auto;
    }

    .garanties-file-badge svg {
      width: 17px;
      height: 17px;
      display: block;
    }

    .garanties-file-meta {
      min-width: 0;
    }

    .garanties-file-name {
      display: block;
      color: var(--purple-900);
      font-size: 12px;
      font-weight: 900;
      line-height: 1.2;
      overflow: hidden;
      text-overflow: ellipsis;
      white-space: nowrap;
    }

    .garanties-file-template {
      display: block;
      color: var(--text-muted);
      font-size: 11px;
      font-weight: 700;
      margin-top: 2px;
    }

    .garanties-upload-cta {
      color: var(--purple-800);
      font-size: 11px;
      font-weight: 900;
      white-space: nowrap;
      flex: 0 0 auto;
    }

    .garanties-upload-actions {
      display: inline-flex;
      align-items: center;
      gap: 6px;
      justify-content: flex-end;
      flex: 0 0 auto;
    }

    .garanties-icon-btn {
      width: 29px;
      height: 29px;
      border-radius: 8px;
      border: 1px solid var(--border);
      background: #fff;
      color: #4f475d;
      display: inline-flex;
      align-items: center;
      justify-content: center;
      box-shadow: 0 2px 5px rgba(79, 11, 208, 0.04);
      cursor: default;
    }

    .garanties-icon-btn svg {
      width: 16px;
      height: 16px;
      display: block;
    }

    .garanties-icon-btn:hover {
      transform: translateY(-1px);
      border-color: #cfc0eb;
      color: var(--purple-800);
    }

    .garanties-future-dev-note {
      margin-top: 12px;
      color: var(--text-muted);
      font-size: 11px;
      font-weight: 700;
      line-height: 1.45;
    }

    .guarantee-post-layout {
      display: grid;
      grid-template-columns: 1fr;
      gap: 16px;
      align-items: stretch;
    }

    .guarantee-table-card,
    .guarantee-graph-card {
      border: 1px solid var(--border-light);
      border-radius: 16px;
      background: linear-gradient(180deg, #ffffff 0%, #fcfaff 100%);
      box-shadow: 0 6px 16px rgba(79, 11, 208, 0.05);
      min-width: 0;
      overflow: hidden;
    }

    .guarantee-card-head {
      min-height: 46px;
      display: flex;
      align-items: center;
      justify-content: space-between;
      gap: 12px;
      padding: 10px 12px;
      border-bottom: 1px solid var(--border-light);
      background: linear-gradient(180deg, #fbf8ff 0%, #f5eefc 100%);
    }

    .guarantee-card-title {
      color: var(--purple-900);
      font-size: 12px;
      font-weight: 950;
      text-transform: uppercase;
      letter-spacing: 0.02em;
    }

    .guarantee-excel-hint {
      display: inline-flex;
      align-items: center;
      gap: 7px;
      color: #2f6b46;
      font-size: 11px;
      font-weight: 900;
      white-space: nowrap;
    }

    .guarantee-excel-icon {
      width: 30px;
      height: 30px;
      border-radius: 8px;
      border: 1px solid #cfe7d6;
      background: linear-gradient(180deg, #f4fbf6 0%, #e8f6ed 100%);
      display: inline-flex;
      align-items: center;
      justify-content: center;
      box-shadow: 0 4px 10px rgba(16, 124, 65, 0.08);
      flex: 0 0 auto;
    }

    .guarantee-excel-icon svg {
      width: 18px;
      height: 18px;
      display: block;
    }

    .guarantee-table-scroll {
      overflow-x: auto;
      padding: 12px;
      background: linear-gradient(180deg, #ffffff 0%, #fcfaff 100%);
    }

    .guarantee-comparison-table {
      width: 100%;
      min-width: 860px;
      border-collapse: separate;
      border-spacing: 0;
      color: var(--purple-900);
      font-size: 12px;
      overflow: hidden;
      border: 1px solid #ddd5ea;
      border-radius: 14px;
      background: #fff;
    }

    .guarantee-comparison-table th,
    .guarantee-comparison-table td {
      border-right: 1px solid var(--border-light);
      border-bottom: 1px solid var(--border-light);
      padding: 7px 8px;
      vertical-align: middle;
      background: #fff;
      white-space: nowrap;
    }

    .guarantee-comparison-table thead th {
      background: linear-gradient(180deg, #a66cc8 0%, #8f56b7 100%);
      color: #fff;
      font-weight: 950;
      text-align: center;
      font-size: 11px;
    }

    .guarantee-comparison-table thead tr:nth-child(2) th {
      background: linear-gradient(180deg, #b784d3 0%, #9c67c2 100%);
    }

    .guarantee-comparison-table thead tr:first-child th:first-child {
      border-top-left-radius: 14px;
    }

    .guarantee-comparison-table thead tr:first-child th:last-child {
      border-top-right-radius: 14px;
    }

    .guarantee-comparison-table tbody tr:last-child th:first-child {
      border-bottom-left-radius: 14px;
    }

    .guarantee-comparison-table tbody tr:last-child td:last-child {
      border-bottom-right-radius: 14px;
    }

    .guarantee-comparison-table tr > *:last-child {
      border-right: none;
    }

    .guarantee-comparison-table tbody tr:last-child > * {
      border-bottom: none;
    }

    .guarantee-row-head {
      min-width: 270px;
      font-weight: 850;
      color: var(--purple-900);
      text-align: left;
    }

    .guarantee-row-check {
      display: inline-flex;
      align-items: center;
      gap: 7px;
    }

    .guarantee-row-check input {
      accent-color: var(--purple-800);
    }

    .guarantee-comparison-table tbody td {
      text-align: center;
      font-weight: 800;
    }

    .guarantee-comparison-table tbody tr:nth-child(even) td,
    .guarantee-comparison-table tbody tr:nth-child(even) th {
      background: #fbf9ff;
    }

    .guarantee-mini-placeholder {
      border: 1px dashed #d6c8ef;
      border-radius: 14px;
      background: linear-gradient(180deg, #ffffff 0%, #fbf8ff 100%);
      padding: 18px;
      color: var(--text-muted);
      font-size: 12px;
      font-weight: 800;
      line-height: 1.45;
    }

    .guarantee-graph-body {
      padding: 16px;
      min-height: 420px;
    }

    .guarantee-graph-title {
      display: inline-flex;
      align-items: center;
      justify-content: center;
      min-height: 28px;
      padding: 0 12px;
      border-radius: 999px;
      background: #fff;
      border: 1px solid var(--border-light);
      color: var(--purple-900);
      font-size: 12px;
      font-weight: 950;
      margin-bottom: 14px;
    }

    .guarantee-contract-chart {
      display: grid;
      gap: 18px;
    }

    .guarantee-selected-line {
      border: 1px solid var(--border-light);
      border-radius: 14px;
      background: linear-gradient(180deg, #ffffff 0%, #fcfaff 100%);
      padding: 12px 14px;
    }

    .guarantee-selected-line.is-hidden {
      display: none;
    }

    .guarantee-empty-selection-note {
      display: none;
      border: 1px dashed #d6c8ef;
      border-radius: 14px;
      background: linear-gradient(180deg, #ffffff 0%, #fbf8ff 100%);
      padding: 16px;
      color: var(--text-muted);
      font-size: 12px;
      font-weight: 800;
      line-height: 1.45;
    }

    .guarantee-empty-selection-note.visible {
      display: block;
    }

    .guarantee-selected-line-title {
      color: var(--purple-900);
      font-size: 12px;
      font-weight: 950;
      margin-bottom: 10px;
      line-height: 1.3;
    }

    .guarantee-contract-rows {
      display: grid;
      gap: 10px;
    }

    .guarantee-contract-row {
      display: grid;
      grid-template-columns: minmax(170px, 0.35fr) minmax(520px, 1fr);
      gap: 14px;
      align-items: center;
    }

    .guarantee-contract-label {
      color: var(--purple-900);
      font-size: 11px;
      font-weight: 900;
      line-height: 1.25;
      text-align: right;
    }

    .guarantee-contract-track {
      min-height: 30px;
      border-radius: 10px;
      background: #f1edf7;
      overflow: hidden;
      display: flex;
      box-shadow: inset 0 0 0 1px rgba(79, 11, 208, 0.08);
    }

    .guarantee-level-segment {
      min-width: 44px;
      display: flex;
      align-items: center;
      justify-content: center;
      color: #fff;
      font-size: 10px;
      font-weight: 950;
      white-space: nowrap;
      padding: 0 6px;
    }

    .guarantee-level-segment.base {
      background: #5f5a6a;
    }

    .guarantee-level-segment.option1 {
      background: #8f56b7;
    }

    .guarantee-level-segment.option2 {
      background: #c8abd8;
      color: var(--purple-900);
    }

    .guarantee-legend {
      margin-top: 16px;
      display: flex;
      gap: 10px;
      flex-wrap: wrap;
      color: var(--purple-900);
      font-size: 11px;
      font-weight: 900;
    }

    .guarantee-legend-item {
      display: inline-flex;
      align-items: center;
      gap: 5px;
    }

    .guarantee-legend-dot {
      width: 10px;
      height: 10px;
      border-radius: 99px;
      display: inline-block;
    }

    .guarantee-legend-dot.base {
      background: #5f5a6a;
    }

    .guarantee-legend-dot.option1 {
      background: #8f56b7;
    }

    .guarantee-legend-dot.option2 {
      background: #c8abd8;
    }

    @media (max-width: 1200px) {
      .msg-grid { grid-template-columns: 1fr; }
      .summary-split { grid-template-columns: 1fr; }
      .tarification-settings-grid { grid-template-columns: 1fr; }
      .comparison-mode-card { min-width: 0; width: 100%; }
      .garanties-params-grid { grid-template-columns: 1fr; }
      .garanties-upload-zone { grid-template-columns: 1fr; }
      .garanties-upload-card { grid-template-columns: 1fr; align-items: stretch; }
      .guarantee-post-layout { grid-template-columns: 1fr; }
      .guarantee-bar-row { grid-template-columns: 1fr; }
      .guarantee-bar-label { text-align: left; }
      .guarantee-contract-row { grid-template-columns: 1fr; }
      .guarantee-contract-label { text-align: left; }
    }

    @media (max-width: 1500px) {
      .app {
        grid-template-columns: calc(255px + var(--left-content-gap)) minmax(0, 1fr);
      }

      .content-zone {
        grid-template-columns: 980px 470px;
      }

      .app.right-collapsed .content-zone {
        grid-template-columns: 980px 26px;
      }

      .page-title {
        font-size: 34px;
      }
    }
