.cmp-wrap {
  font-family: inherit;
  padding: 1.5rem 0;
}

.cmp-titre {
  font-size: 25px;
  font-weight: 600;
  color: #010539;
  margin: 0 0 4px;
}

.cmp-sous-titre {
  font-size: 22px;
  color: #666;
  margin: 0 0 24px;
}

/* ===== DESKTOP ===== */

.cmp-table {
  width: 100%;
  border-collapse: separate;
  border-spacing: 0;
  table-layout: fixed;
}

.cmp-table th {
  padding: 10px 14px 12px;
  border-bottom: none;
  border-top: none;
  text-align: center;
  vertical-align: top;
  font-weight: normal;
}

.cmp-table th:first-child {
  width: 150px;
  text-align: left;
  padding-left: 0;
}

.cmp-table th:not(:first-child) {
  width: 22%;
}

th.vedette {
  background: #f2f2f2;
  border-top: 2px solid #010538;
  border-left: 2px solid #010538;
  border-right: 2px solid #010538;
  border-bottom: 2px solid #010538;
  border-radius: 16px 16px 0 0;
}

th.vedette .cmp-th-name {
  color: #010538;
}

.cmp-th-name {
  font-size: 18px;
  font-weight: 700;
  color: #010539;
  display: block;
  margin-bottom: 3px;
}

.cmp-th-sub {
  font-size: 16px;
  color: #888;
  display: block;
}

.cmp-badge-vedette {
  display: inline-block;
  background: #010539;
  color: #fff;
  font-size: 14px;
  font-weight: 700;
  padding: 2px 8px;
  border-radius: 10px;
  margin-bottom: 6px;
  text-transform: uppercase;
  letter-spacing: .04em;
}

div.cmp-wrap table.cmp-table tbody tr td {
  padding: 13px 14px;
  border-bottom: 1px solid #e8e8e5;
  vertical-align: middle;
  text-align: center;
  white-space: normal !important;
  word-break: break-word !important;
  overflow-wrap: break-word !important;
  max-width: 0 !important;
}

div.cmp-wrap table.cmp-table tbody tr td:first-child {
  width: 150px !important;
  max-width: 150px !important;
  font-size: 14px;
  font-weight: 600;
  color: #888;
  text-transform: uppercase;
  letter-spacing: .05em;
  text-align: left;
  padding-left: 0;
}

.cmp-table tr:last-child td {
  border-bottom: none;
}

td.vedette {
  background: #f2f2f2;
  border-left: 2px solid #010538;
  border-right: 2px solid #010538;
}

.cmp-table tr:last-child td.vedette {
  border-bottom: 2px solid #010538;
  border-radius: 0 0 16px 16px;
}

.ci {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 5px;
}

.ci.l {
  align-items: flex-start;
}

.cmp-badge {
  display: inline-flex;
  padding: 5px 12px;
  border-radius: 20px;
  font-size: 14px;
  font-weight: 500;
  width: fit-content;
}

.bg { background: #f2f2f2; color: #444441; }
.bd { background: #010538; color: #fff; }

.oui {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  background: #E1F5EE;
  color: #0F6E56;
  padding: 4px 10px;
  border-radius: 20px;
  font-size: 14px;
  font-weight: 600;
}

.oui::before { content: "✓ "; }

.det { font-size: 14px; color: #888; }
.detv { font-size: 14px; color: #010538; }

div.cmp-wrap table.cmp-table tbody tr td ul.ul {
  list-style: none !important;
  padding-left: 0 !important;
  margin: 0 !important;
  width: 100% !important;
  max-width: 100% !important;
}

div.cmp-wrap table.cmp-table tbody tr td ul.ul li {
  list-style: none !important;
  padding-left: 0 !important;
  font-size: 14px;
  color: #555;
  padding-top: 2px;
  padding-bottom: 2px;
  line-height: 1.5;
  white-space: normal !important;
  word-break: break-word !important;
  overflow-wrap: break-word !important;
}

td.vedette .ul li { color: #010538; }

/* ===== MOBILE ===== */

.cmp-mobile { display: none; }

@media (max-width: 640px) {

  .cmp-table { display: none; }
  .cmp-mobile { display: block; }

  .cmp-switcher {
    display: flex;
    gap: 6px;
    margin-bottom: 16px;
    overflow-x: auto;
    padding-bottom: 4px;
  }

  .cmp-switcher button {
    flex: 1;
    min-width: 0;
    padding: 8px 10px;
    border: 1px solid #e8e8e5;
    border-radius: 8px;
    background: #fff;
    font-size: 12px;
    font-weight: 600;
    color: #888;
    cursor: pointer;
    font-family: inherit;
    transition: all .15s;
  }

  .cmp-switcher button.vedette-btn { border-color: #010538; color: #010538; }
  .cmp-switcher button.active { background: #010538; color: #fff; border-color: #010538; }

  .cmp-panel { display: none; }
  .cmp-panel.active { display: block; }

  .cmp-panel-header {
    padding: 12px 14px;
    border-radius: 16px 16px 0 0;
    border: 1px solid #e8e8e5;
    border-bottom: none;
    background: #fff;
  }

  .cmp-panel.vedette-panel .cmp-panel-header {
    background: #f2f2f2;
    border: 2px solid #010538;
    border-bottom: none;
    border-radius: 16px 16px 0 0;
  }

  .cmp-panel-body {
    border: 1px solid #e8e8e5;
    border-radius: 0 0 16px 16px;
    overflow: hidden;
  }

  .cmp-panel.vedette-panel .cmp-panel-body {
    border: 2px solid #010538;
    border-top: none;
    border-radius: 0 0 16px 16px;
  }

  .cmp-panel-row {
    display: grid;
    grid-template-columns: 100px 1fr;
    gap: 8px;
    padding: 10px 14px;
    border-bottom: 1px solid #f0f0ee;
    align-items: start;
  }

  .cmp-panel-row:last-child { border-bottom: none; }

  .cmp-panel.vedette-panel .cmp-panel-row { border-bottom: 1px solid #d8d8d8; }
  .cmp-panel.vedette-panel .cmp-panel-row:last-child { border-bottom: none; }

  .cmp-panel-label {
    font-size: 10px;
    font-weight: 700;
    color: #888;
    text-transform: uppercase;
    letter-spacing: .05em;
    padding-top: 5px;
    line-height: 1.3;
  }

  .cmp-panel.vedette-panel .cmp-panel-label { color: #555; }

  .cmp-panel-content {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 5px;
  }
}


/*-------------------------------------*/
/*-------------------------------------*/
/*-------------------------------------*/

/* tableau provenances */

.prov-wrap {
  font-family: inherit;
  padding: 1.5rem 0;
}

.prov-table {
  width: 100%;
  border-collapse: separate;
  border-spacing: 0;
}

.prov-table th {
  padding: 10px 14px 12px;
  border-bottom: 2px solid #1a1a1a;
  text-align: center;
  vertical-align: bottom;
  font-size: 11px;
  font-weight: 600;
  color: #888;
  text-transform: uppercase;
  letter-spacing: .05em;
}

.prov-table th:first-child {
  text-align: left;
  padding-left: 0;
  width: 220px;
}

.prov-table td {
  padding: 13px 14px;
  border-bottom: 1px solid #e8e8e5;
  text-align: center;
  vertical-align: middle;
  font-size: 14px;
  color: #1a1a1a;
}

.prov-table td:first-child {
  text-align: left;
  padding-left: 0;
  font-weight: 600;
}

.prov-table tr:last-child td {
  border-bottom: none;
}

.prov-label {
  display: flex;
  align-items: center;
}

.prov-dot {
  width: 9px;
  height: 9px;
  border-radius: 50%;
  display: inline-block;
  margin-right: 7px;
  flex-shrink: 0;
}

.badge {
  display: inline-flex;
  align-items: center;
  padding: 4px 11px;
  border-radius: 20px;
  font-size: 13px;
  font-weight: 500;
  width: fit-content;
}

.bg  { background: #f2f2f2; color: #444441; }
.bd  { background: #010538; color: #fff; }
.pos { background: #E1F5EE; color: #0F6E56; }
.neg { background: #FCEBEB; color: #A32D2D; }
.warn { background: #FEF3CD; color: #7A5000; }

.bar-wrap {
  display: flex;
  align-items: center;
  gap: 8px;
}

.bar-bg {
  flex: 1;
  height: 7px;
  background: #f2f2f2;
  border-radius: 4px;
  overflow: hidden;
  min-width: 60px;
}

.bar-fill {
  height: 100%;
  border-radius: 4px;
}

.bar-label {
  font-size: 13px;
  font-weight: 500;
  color: #1a1a1a;
  white-space: nowrap;
  min-width: 36px;
  text-align: right;
}

.prov-note {
  font-size: 12px;
  color: #888;
  background: #f8f8f7;
  border-left: 3px solid #d8d8d8;
  padding: 8px 12px;
  margin-top: 16px;
  line-height: 1.6;
  border-radius: 0 6px 6px 0;
}

@media (max-width: 640px) {
  .prov-table th:nth-child(3),
  .prov-table td:nth-child(3) {
    display: none;
  }

  .prov-table th:first-child {
    width: 130px;
  }
}

/*-------------------------------------*/
/*-------------------------------------*/
/*-------------------------------------*/

/* tableau programme */

.tc-wrap {
  font-family: inherit;
  max-width: 850px;
  padding: 1.5rem 0;
}

.tc-thead {
  display: grid;
  grid-template-columns: 180px 1fr 200px;
  border-bottom: 1.5px solid #d0d0d0;
  padding-bottom: 10px;
  margin-bottom: 2px;
}

.tc-thead span {
  font-size: 14px;
  font-weight: 600;
  color: #999;
  text-transform: uppercase;
  letter-spacing: .07em;
  padding: 0 14px;
}

.tc-thead span:first-child {
  padding-left: 0;
}

.tc-row {
  display: grid;
  grid-template-columns: 180px 1fr 200px;
  border-bottom: 1px solid #e8e8e5;
  padding: 18px 0;
  align-items: start;
}

.tc-row:last-child {
  border-bottom: none;
}

/* =============================================
   PALETTE — boucle automatique via nth-child(5n+Y)
   Changer le chiffre 5 si tu modifies le nombre de couleurs
   Modifier uniquement ici pour changer les couleurs
   ============================================= */

.tc-row:nth-child(5n+1) { --c-dot: #7B6FD0; --c-bg1: #EEEDFE; --c-bg2: #E0DDF5; --c-bg3: #D3CFEC; --c-text: #4A3FA0; }
.tc-row:nth-child(5n+2) { --c-dot: #3BAF82; --c-bg1: #E0F5ED; --c-bg2: #C8EDE0; --c-bg3: #B0E0D0; --c-text: #1A7A52; }
.tc-row:nth-child(5n+3) { --c-dot: #E05B6F; --c-bg1: #FDEAED; --c-bg2: #FAD8DE; --c-bg3: #F5C0C8; --c-text: #A02035; }
.tc-row:nth-child(5n+4) { --c-dot: #E07040; --c-bg1: #FDEEE6; --c-bg2: #FAE0D0; --c-bg3: #F5CEBC; --c-text: #A04020; }
.tc-row:nth-child(5n+5) { --c-dot: #D4A020; --c-bg1: #FDF3D6; --c-bg2: #FAECC0; --c-bg3: #F5E0A0; --c-text: #8A6010; }

/* ============================================= */

.tc-dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  flex-shrink: 0;
  margin-top: 5px;
  background: var(--c-dot);
}

.tc-badge-n1 { background: var(--c-bg1); color: var(--c-text); }
.tc-badge-n2 { background: var(--c-bg2); color: var(--c-text); }
.tc-badge-n3 { background: var(--c-bg3); color: var(--c-text); }

.tc-comp {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  padding-right: 12px;
}

.tc-comp-name {
  font-size: 18px;
  font-weight: 700;
  color: #1a1a1a;
}

.tc-matieres {
  padding: 0 14px;
}

.tc-matieres ul {
  list-style: none;
}

.tc-matieres li {
  font-size: 14px;
  color: #555;
  line-height: 1.9;
  padding-left: 12px;
  position: relative;
  white-space: normal;
  word-break: break-word;
}

.tc-matieres li::before {
  content: "·";
  position: absolute;
  left: 0;
  color: #bbb;
}

.tc-sem {
  padding: 0 14px;
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.tc-badge {
  display: inline-flex;
  align-items: center;
  padding: 5px 14px;
  border-radius: 20px;
  font-size: 14px;
  font-weight: 500;
  width: fit-content;
}

.tc-niveau {
  font-size: 13px;
  color: #aaa;
  padding-left: 2px;
  line-height: 1.4;
}

@media (max-width: 640px) {
  .tc-thead { display: none; }
  .tc-row { grid-template-columns: 1fr; gap: 12px; padding: 16px 0; }
  .tc-matieres, .tc-sem { padding: 0; }
}

/*-------------------------------------*/
/*-------------------------------------*/
/*-------------------------------------*/

/* tableau poursuite étude */


.pe-wrap {
  font-family: inherit;
  padding: 1.5rem 0;
}

.pe-table {
  width: 100%;
  border-collapse: separate;
  border-spacing: 0;
  table-layout: fixed;
}

.pe-table th {
  padding: 10px 14px 12px;
  border-bottom: 2px solid #1a1a1a;
  border-top: none;
  text-align: left;
  vertical-align: bottom;
  font-size: 14px;
  font-weight: 600;
  color: #888;
  text-transform: uppercase;
  letter-spacing: .05em;
}

.pe-table th:first-child {
  padding-left: 0;
  width: 200px;
}

.pe-table td {
  padding: 14px 14px;
  border-bottom: 1px solid #e8e8e5;
  vertical-align: top;
  font-size: 14px;
  color: #1a1a1a;
  white-space: normal;
  word-break: break-word;
}

.pe-table td:first-child {
  padding-left: 0;
  font-weight: 700;
  font-size: 16px;
}

.pe-table tr:last-child td {
  border-bottom: none;
}

/* =============================================
   PALETTE — boucle automatique via nth-child(4n+Y)
   Changer le chiffre 4 si tu modifies le nombre de couleurs
   Modifier uniquement ici pour changer les couleurs
   ============================================= */

.pe-table tbody tr:nth-child(4n+1) { --c-dot: #7B6FD0; --c-bg: #EEEDFE; --c-text: #4A3FA0; }
.pe-table tbody tr:nth-child(4n+2) { --c-dot: #3BAF82; --c-bg: #E0F5ED; --c-text: #1A7A52; }
.pe-table tbody tr:nth-child(4n+3) { --c-dot: #E05B6F; --c-bg: #FDEAED; --c-text: #A02035; }
.pe-table tbody tr:nth-child(4n+4) { --c-dot: #E07040; --c-bg: #FDEEE6; --c-text: #A04020; }

/* ============================================= */

.pe-label {
  display: flex;
  align-items: flex-start;
  gap: 10px;
}

.pe-dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  flex-shrink: 0;
  margin-top: 5px;
  background: var(--c-dot);
}

.badge {
  display: inline-flex;
  align-items: center;
  padding: 4px 12px;
  border-radius: 20px;
  font-size: 13px;
  font-weight: 500;
  width: fit-content;
}

.b-auto   { background: var(--c-bg); color: var(--c-text); }
.b-gray   { background: #f2f2f2; color: #444441; }
.b-green  { background: #E1F5EE; color: #0F6E56; }
.b-orange { background: #FEF3CD; color: #7A5000; }
.b-red    { background: #FCEBEB; color: #A32D2D; }

.pe-cell-inner {
  display: flex;
  flex-direction: column;
  gap: 5px;
}

.pe-detail {
  font-size: 13px;
  color: #888;
  line-height: 1.5;
}

@media (max-width: 640px) {
  .pe-table thead { display: none; }
  .pe-table,
  tbody, tr, td { display: block; width: 100%; }
  .pe-table tbody tr {
    border-bottom: 1px solid #e8e8e5;
    padding: 14px 0;
  }
  .pe-table tbody tr:last-child { border-bottom: none; }
  .pe-table td { border-bottom: none; padding: 4px 0; }
  .pe-table td:first-child { font-size: 16px; padding-bottom: 8px; }
  .pe-table td::before {
    content: attr(data-label);
    display: block;
    font-size: 11px;
    font-weight: 600;
    color: #888;
    text-transform: uppercase;
    letter-spacing: .05em;
    margin-bottom: 4px;
  }
  .pe-table td:first-child::before { display: none; }
}

/*-------------------------------------*/
/*-------------------------------------*/
/*-------------------------------------*/

/* tableau salaires */
.sal-wrap {
  font-family: inherit;
  padding: 1.5rem 0;
}

.sal-table {
  width: 100%;
  border-collapse: separate;
  border-spacing: 0;
  table-layout: fixed;
}

.sal-table th {
  padding: 10px 14px 12px;
  border-bottom: 2px solid #1a1a1a;
  border-top: none;
  text-align: left;
  vertical-align: bottom;
  font-size: 14px;
  font-weight: 600;
  color: #888;
  text-transform: uppercase;
  letter-spacing: .05em;
}

.sal-table th:first-child {
  padding-left: 0;
  width: 220px;
}

.sal-table td {
  padding: 14px 14px;
  border-bottom: 1px solid #e8e8e5;
  vertical-align: middle;
  font-size: 14px;
  color: #010539;
  white-space: normal;
  word-break: break-word;
}

.sal-table td:first-child {
  padding-left: 0;
  font-weight: 700;
  font-size: 16px;
}

.sal-table tr:last-child td {
  border-bottom: none;
}

/* =============================================
   PALETTE — boucle 5 couleurs
   ============================================= */

.sal-table tbody tr:nth-child(5n+1) { --c-dot: #7B6FD0; --c-bg: #EEEDFE; --c-text: #4A3FA0; }
.sal-table tbody tr:nth-child(5n+2) { --c-dot: #3BAF82; --c-bg: #E0F5ED; --c-text: #1A7A52; }
.sal-table tbody tr:nth-child(5n+3) { --c-dot: #E05B6F; --c-bg: #FDEAED; --c-text: #A02035; }
.sal-table tbody tr:nth-child(5n+4) { --c-dot: #E07040; --c-bg: #FDEEE6; --c-text: #A04020; }
.sal-table tbody tr:nth-child(5n+5) { --c-dot: #D4A020; --c-bg: #FDF3D6; --c-text: #8A6010; }

.sal-label {
  display: flex;
  align-items: flex-start;
  gap: 10px;
}

.sal-dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  flex-shrink: 0;
  margin-top: 5px;
  background: var(--c-dot);
}

.badge {
  display: inline-flex;
  align-items: center;
  padding: 4px 12px;
  border-radius: 20px;
  font-size: 13px;
  font-weight: 500;
  width: fit-content;
}

.b-auto { background: var(--c-bg); color: var(--c-text); }
.b-dark { background: #f2f2f2; color: #010539; }

/* Ligne taux d'emploi */
.sal-taux-row td {
  background: #f8f8f7;
  border-top: 1px solid #e8e8e5;
  border-bottom: none;
}

.sal-taux-inner {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
}

.sal-taux-number {
  font-size: 28px;
  font-weight: 700;
  color: #010539;
}

.sal-taux-label {
  font-size: 14px;
  color: #555;
  line-height: 1.5;
}

@media (max-width: 640px) {
  .sal-table thead { display: none; }
  .sal-table, tbody, tr, td { display: block; width: 100%; }
  .sal-table tbody tr { border-bottom: 1px solid #e8e8e5; padding: 14px 0; }
  .sal-table tbody tr:last-child { border-bottom: none; }
  .sal-table td { border-bottom: none; padding: 4px 0; }
  .sal-table td:first-child { font-size: 16px; padding-bottom: 8px; }
  .sal-table td::before {
    content: attr(data-label);
    display: block;
    font-size: 11px;
    font-weight: 600;
    color: #888;
    text-transform: uppercase;
    letter-spacing: .05em;
    margin-bottom: 4px;
  }
  .sal-table td:first-child::before { display: none; }
  .sal-taux-row td::before { display: none; }
}