/*
 * differentiel-personnalite.css — PsyRisso Desktop
 * Chapeau + volets du différentiel HQI/Trouble de la personnalité
 * (pages/differentiel-personnalite/*.php)
 * Layout générique (.bande, .cadre, .cadre-lecture) dans layout.css.
 * Même structure que differentiel-tdah.css.
 */
.per-content { max-width: none; }

.per-h1 {
  font-family: var(--font-heading, Georgia, 'Times New Roman', serif);
  font-size: clamp(1.3rem, 3vw, 1.75rem);
  font-weight: normal;
  color: var(--bleu);
  line-height: 1.3;
  margin: 0 0 0.3rem;
}

.per-soustitre-p {
  font-style: italic;
  color: #777777;
  margin: 0 0 1.4rem;
  font-size: 1.02rem;
}

.per-p {
  /* font-size: 0.95rem; line-height: 1.78; text-align: justify; -- valeurs d'origine */
  font-family: Calibri, Carlito, Arial, sans-serif;
  color: #3a3a3a;
  font-size: 16px;
  line-height: 1.5;
  text-indent: 1.6em;
  margin: 0 0 1rem;
}

/* ── Liens de retour ── */
.per-backlink {
  display: inline-block;
  margin: 0 0 1.3rem;
  font-size: 0.9rem;
  color: var(--dore);
  text-decoration: none;
}
.per-backlink:hover { color: var(--bleu); }

.per-backlinks {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin: 0 0 1.3rem;
}
.per-backlinks .per-backlink { margin: 0; }

/* ── Chip vers le volet suivant ── */
.per-chips { margin-top: 1.2rem; padding-top: 1rem; border-top: 1px solid var(--gris-sep); }
.per-chips-label {
  margin: 0 0 0.85rem;
  font-size: 0.72rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--dore);
}
.per-chip-row { display: grid; grid-template-columns: repeat(3, 1fr); gap: 0.7rem; }
.per-chip {
  display: block;
  padding: 0.4rem 0.85rem;
  border: 1px solid var(--gris-sep);
  border-radius: 999px;
  background: var(--blanc);
  color: var(--bleu);
  font-family: var(--font-heading, Georgia, 'Times New Roman', serif);
  font-size: 0.85rem;
  text-align: center;
  text-decoration: none;
  transition: all 0.18s ease;
}
.per-arw { margin-left: 0.4rem; color: var(--dore); transition: transform 0.18s ease; }
.per-chip:hover { background: var(--bleu); color: var(--creme); border-color: var(--bleu); }
.per-chip:hover .per-arw { color: var(--creme); }

.per-chip.active {
  background: var(--bleu);
  color: var(--creme);
  border-color: var(--bleu);
  pointer-events: none;
}
.per-chip.active .per-arw { color: var(--creme); }

.per-h2 {
  font-family: var(--font-heading, Georgia, 'Times New Roman', serif);
  font-size: 1.1rem;
  font-weight: normal;
  color: var(--bleu);
  line-height: 1.3;
  margin: 2rem 0 0.6rem;
}

/* ── Listes à tirets (volet Repérer et orienter) ── */
.per-outils { list-style: none; padding-left: 24px; margin: 0.4rem 0 0; }
.per-outils li {
  /* text-align: justify; font-size: 0.95rem; line-height: 1.78; -- valeurs d'origine */
  font-family: Calibri, Carlito, Arial, sans-serif;
  font-size: 16px;
  line-height: 1.5;
  color: #3a3a3a;
  position: relative;
  padding-left: 1.1em;
  margin: 0 0 0.55rem;
}
.per-outils li:before { content: "◆";; position: absolute; left: 0; color: var(--dore); }

/* ── Tableaux (correspondances, borderline) ── */
.per-tbl { width: 100%; border-collapse: collapse; margin: 1.2rem 0 0.4rem; font-size: 0.9rem; }
.per-tbl th, .per-tbl td { border: 1px solid var(--gris-sep); padding: 0.55rem 0.7rem; text-align: left; vertical-align: top; }
.per-tbl th { background: var(--bleu); color: #FAFAF7; font-weight: 600; text-align: center; }
.per-tbl td { line-height: 1.5; }
.per-tbl .per-dom { font-weight: bold; color: var(--bleu); white-space: nowrap; }
.per-tbl .per-trouble {
  font-family: Calibri, Carlito, Arial, sans-serif;
  font-weight: bold;
  font-style: italic;
  display: block;
  margin-top: 0.3rem;
}
.per-tbl .per-trouble:first-child { margin-top: 0; }
.per-tbl-scroll { overflow-x: auto; }

/* ── Références (hors cadre central) — non concernées par le chantier justify,
   restent alignées à gauche partout sur le site ── */
.per-refs { margin: 1.6rem 0 0; max-width: none; padding: 0 0.3rem; }
.per-refs-label {
  font-size: 0.72rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--dore);
  margin: 0 0 0.6rem;
}
.per-refs ul { list-style: none; margin: 0; padding: 0; }
.per-refs li {
  /* font-size: 0.82rem; line-height: 1.55; color: #5f5f5f; -- valeurs d'origine */
  font-family: Calibri, Carlito, Arial, sans-serif;
  font-size: 15px;
  line-height: 1.55;
  color: #359C95;
  padding-left: 1.3em;
  text-indent: -1.3em;
  margin: 0 0 0.55rem;
}

/* ── Couleurs fixes du tableau (distinction HQI/TDA/H indépendante de la palette) ── */
.per-tbl {
  width: 100%;
  border-collapse: separate;
  border-spacing: 0;
  margin: 1.5rem 0;
  font-size: 0.9rem;
  border: 1px solid #e3e0d8;
  border-radius: 8px;
  overflow: hidden;
  box-shadow: 0 2px 8px rgba(27, 59, 53, 0.06);
}

.per-tbl th {
  background: var(--bleu);
  color: #FAFAF7;
  /* font-family: var(--font-heading); font-weight: normal; -- valeurs d'origine */
  font-family: Calibri, Carlito, Arial, sans-serif;
  font-weight: 600;
  text-align: center;
  padding: 0.85rem 1.1rem;
  font-size: 0.9rem;
  letter-spacing: 0.01em;
}

.per-tbl th:first-child {
  width: 16%;
  font-weight: 600;
  color: #FAFAF7;
  background: var(--bleu);
}
.per-tbl td:first-child {
  width: 16%;
  font-weight: 600;
  color: var(--bleu);
  background: #F3F1EA;
}

.per-tbl th:nth-child(2) {
  background: #F2E7D3;
  color: #7A5A26;
  font-weight: 600;
}
.per-tbl th:nth-child(3) {
  background: #DDE8F2;
  color: #2A5578;
  font-weight: 600;
}

.per-tbl td {
  padding: 0.9rem 1.1rem;
  vertical-align: top;
  /* line-height: 1.6; -- valeur d'origine, texte héritait de Georgia par défaut */
  font-family: Calibri, Carlito, Arial, sans-serif;
  font-size: 0.95rem;
  line-height: 1.55;
  border-top: 1px solid #ece9e1;
}

.per-tbl td:nth-child(2) {
  background: #FAF6EF;
}
.per-tbl td:nth-child(3) {
  background: #F1F6FA;
}

.per-tbl tr:hover td {
  background: #F5F2EA;
}

/* ── Légende au-dessus du tableau ── */
.per-tbl-header-row {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  flex-wrap: wrap;
  gap: 0.5rem 1.5rem;
  margin-bottom: 0.6rem;
}

.per-tbl-caption {
  font-style: italic;
  color: #6a6a6a;
  font-size: 0.85rem;
}

.per-tbl-legende {
  display: flex;
  gap: 1.2rem;
  align-items: center;
  font-size: 0.85rem;
  color: #3a3a3a;
  flex-shrink: 0;
}

.per-tbl-legende .pastille {
  display: inline-block;
  width: 10px;
  height: 10px;
  border-radius: 50%;
  margin-right: 6px;
}

.per-tbl-legende .pastille-hqi {
  background: #C9A05C;
}
.per-tbl-legende .pastille-tdah {
  background: #5B93B8;
}
/* Modificateur pour tableaux à 2 colonnes de largeur égale (ex. correspondances) */
.per-tbl-2col th:first-child,
.per-tbl-2col td:first-child {
  width: 50%;
}

/* Pastille supplémentaire pour matcher la colonne 1 (fond vert foncé) */
.per-tbl-legende .pastille-bleu { background: var(--bleu); }

/* Modificateur pour tableaux à 3 colonnes avec col2/col3 de largeur égale */
.per-tbl-eq23 th:nth-child(2), .per-tbl-eq23 td:nth-child(2),
.per-tbl-eq23 th:nth-child(3), .per-tbl-eq23 td:nth-child(3) {
  width: 42%;
}