/* =========================================================
   COMPTE ET DONNÉES — Mon Invoice / STARK
   ========================================================= */

.cd-section .cd-carte {
  margin-bottom: 14px;
  padding: 18px;
  border: 1px solid var(--bordure, #e2e8f0);
  border-radius: 10px;
  background: #fff;
}

.cd-section .cd-carte.cd-conseil {
  border-color: #bcd0f5;
  background: #fbfdff;
}

.cd-section .cd-carte.cd-danger {
  border-color: #f0d4d2;
  background: #fffdfd;
}

.cd-section .cd-entete {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
}

.cd-section .cd-entete > div {
  min-width: 0;
  flex: 1;
}

.cd-section h4 {
  margin: 0 0 6px;
  font-size: 15px;
}

.cd-section h5 {
  margin: 0 0 8px;
  color: #52627a;
  font-size: 12px;
  letter-spacing: .04em;
  text-transform: uppercase;
}

.cd-section .cd-titre-donnees {
  margin-top: 28px !important;
}

.cd-section .cd-texte,
.cd-section .cd-liste,
.cd-section .cd-compteurs,
.cd-section .cd-apercu {
  margin: 0;
  color: #4b5567;
  font-size: 13px;
  line-height: 1.5;
}

.cd-section .cd-liste {
  margin-top: 8px;
  padding-left: 0;
  list-style: none;
}

.cd-section .cd-liste li + li {
  margin-top: 4px;
}

.cd-section .cd-note {
  margin-top: 12px;
}

.cd-section .cd-aide {
  display: block;
  color: #6b7586;
  font-size: 12px;
  line-height: 1.45;
}

.cd-section .cd-badge,
.cd-section .cd-recommande {
  display: inline-flex;
  margin-top: 6px;
  padding: 3px 9px;
  border-radius: 20px;
  background: #edf3ff;
  color: #244d9b;
  font-size: 11px;
  font-weight: 600;
}

.cd-section .cd-recommande {
  margin: 0 0 0 6px;
  background: #e7f6ec;
  color: #157046;
  vertical-align: middle;
}

.cd-section .cd-etat {
  margin: -4px 0 12px;
  padding: 8px 12px;
  border-radius: 8px;
  background: #f4f6fa;
  color: #3d4a5f;
  font-size: 13px;
}

/* ---------- Boutons ---------- */

.cd-section .cd-bouton {
  display: inline-flex;
  min-height: 38px;
  flex: 0 0 auto;
  align-items: center;
  justify-content: center;
  padding: 0 14px;
  border: 1px solid #cdd5e1;
  border-radius: 7px;
  background: #fff;
  color: #263247;
  font: inherit;
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  white-space: nowrap;
}

.cd-section .cd-bouton:hover:not(:disabled) {
  background: #f4f6fa;
}

.cd-section .cd-bouton.cd-principal {
  border-color: var(--bleu, #244d9b);
  background: var(--bleu, #244d9b);
  color: #fff;
}

.cd-section .cd-bouton.cd-principal:hover:not(:disabled) {
  background: #193b7a;
}

.cd-section .cd-bouton.cd-rouge {
  border-color: #d92d20;
  color: #b42318;
}

.cd-section .cd-bouton.cd-rouge:hover:not(:disabled) {
  background: #fff1f0;
}

.cd-section .cd-bouton.cd-rouge-plein {
  border-color: #b42318;
  background: #b42318;
  color: #fff;
}

.cd-section .cd-bouton.cd-rouge-plein:hover:not(:disabled) {
  background: #912018;
}

.cd-section .cd-bouton.cd-petit {
  min-height: 30px;
  padding: 0 10px;
  font-size: 12px;
}

.cd-section .cd-bouton:disabled {
  opacity: .5;
  cursor: not-allowed;
}

.cd-section .cd-lien {
  padding: 0;
  border: 0;
  background: none;
  color: #52627a;
  font: inherit;
  font-size: 13px;
  text-decoration: underline;
  cursor: pointer;
}

/* ---------- Dépliants du compte ---------- */

.cd-section .cd-depliant {
  margin-top: 12px;
  border: 1px solid #e6eaf0;
  border-radius: 8px;
  background: #fafbfc;
}

.cd-section .cd-depliant summary {
  padding: 10px 12px;
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
}

.cd-section .cd-formulaire {
  display: grid;
  gap: 10px;
  padding: 4px 12px 12px;
}

.cd-section label {
  display: grid;
  gap: 5px;
  color: #3d4a5f;
  font-size: 13px;
  font-weight: 600;
}

.cd-section input[type="text"],
.cd-section input[type="email"],
.cd-section input[type="password"],
.cd-section input[type="date"] {
  width: 100%;
  max-width: 340px;
  min-height: 38px;
  padding: 7px 10px;
  border: 1px solid #cdd5e1;
  border-radius: 7px;
  background: #fff;
  color: #263247;
  font: inherit;
  font-size: 14px;
  box-sizing: border-box;
}

.cd-section #cd-zero-mot,
.cd-section #cd-tout-mot {
  max-width: 220px;
  font-weight: 700;
  letter-spacing: .08em;
  text-transform: uppercase;
}

.cd-section .cd-actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px 14px;
}

/* ---------- Panneaux de confirmation ---------- */

.cd-section .cd-panneau {
  display: grid;
  gap: 12px;
  margin-top: 14px;
  padding-top: 14px;
  border-top: 1px dashed #e0e4ea;
}

.cd-section .cd-ligne {
  max-width: 340px;
}

.cd-section .cd-case {
  display: flex;
  align-items: center;
  gap: 8px;
  font-weight: 400;
}

.cd-section .cd-case input {
  width: 17px;
  height: 17px;
  margin: 0;
}

.cd-section .cd-compteurs ul {
  display: grid;
  gap: 4px;
  max-width: 360px;
  margin: 6px 0 0;
  padding: 0;
  list-style: none;
}

.cd-section .cd-compteurs li {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  padding: 4px 8px;
  border-radius: 6px;
  background: #f6f7f9;
}

.cd-section .cd-compteurs p {
  margin: 0;
}

.cd-section .cd-tableau {
  width: 100%;
  max-width: 420px;
  margin-bottom: 8px;
  border-collapse: collapse;
  font-size: 13px;
}

.cd-section .cd-tableau th,
.cd-section .cd-tableau td {
  padding: 5px 8px;
  border-bottom: 1px solid #edf0f4;
  text-align: right;
}

.cd-section .cd-tableau th:first-child,
.cd-section .cd-tableau td:first-child {
  text-align: left;
}

.cd-section .cd-tableau th {
  color: #52627a;
  font-size: 12px;
  font-weight: 600;
}

.cd-section .cd-progression {
  overflow: hidden;
  max-width: 420px;
  height: 8px;
  border-radius: 99px;
  background: #edf0f4;
}

.cd-section .cd-progression i {
  display: block;
  width: 0;
  height: 100%;
  border-radius: inherit;
  background: var(--bleu, #244d9b);
  transition: width .2s ease;
}

.cd-section .cd-message {
  min-height: 0;
  margin: 0;
  color: #3d4a5f;
  font-size: 13px;
  font-weight: 600;
  line-height: 1.45;
}

.cd-section .cd-message:empty {
  display: none;
}

.cd-section .cd-message.ok {
  color: #157046;
}

.cd-section .cd-message.erreur {
  color: #b42318;
}

/* ---------- Archives ---------- */

.cd-section .cd-archives {
  margin-top: 16px;
  padding-top: 14px;
  border-top: 1px solid #e6eaf0;
}

.cd-section .cd-archives p {
  margin: 0;
}

.cd-section .cd-archives-ul {
  display: grid;
  gap: 8px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.cd-section .cd-archives-ul li {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 8px 12px;
  padding: 10px 12px;
  border: 1px solid #e6eaf0;
  border-radius: 8px;
  background: #fff;
}

.cd-section .cd-archives-ul small {
  display: block;
  color: #6b7586;
  font-size: 12px;
}

.cd-section .cd-archives-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

/* ---------- Petits écrans ---------- */

@media (max-width: 640px) {
  .cd-section .cd-entete {
    flex-direction: column;
  }

  .cd-section .cd-entete > .cd-bouton {
    width: 100%;
  }
}
