/* Genere par 06-Matrices/construire_matrices.ps1 : ne pas modifier ici. */
/* Styles communs du module Matrices et de l'outil (reprennent la charte et les classes « p- » du module TND). */
:root {
  --fond: #fffdf9; --fond-doux: #f1e6d8; --texte: #24211f; --texte-doux: #5a524c;
  --accent: #a3461b; --accent-fonce: #7d3412; --accent-doux: #f8dfd0;
  --vert: #3f5f3a; --vert-doux: #e2ebdd; --bord: #c9b8a6; --rayon: 14px;
}

#psy { padding-top: 1.5rem; }
#psy h3 { font-size: 1.3rem; line-height: 1.3; margin: 0 0 0.5rem; }
#psy [hidden] { display: none !important; }
#psy section { scroll-margin-top: 1rem; margin-bottom: 2.5rem; }
.p-texte { max-width: 46rem; }

.p-pastille {
  display: inline-grid; place-items: center; flex-shrink: 0;
  width: 3rem; height: 3rem; border-radius: 46% 54% 52% 48% / 56% 44% 56% 44%;
  background: var(--accent-doux); color: var(--accent-fonce);
}
.p-pastille.p-vert { background: var(--vert-doux); color: var(--vert); border-radius: 55% 45% 48% 52% / 46% 56% 44% 54%; }
.p-pastille svg { width: 66%; height: 66%; }

.p-grille { list-style: none; padding: 0; margin: 0 0 1.5rem; display: grid; gap: 0.85rem; grid-template-columns: 1fr; }
.p-grille li { margin: 0; }
@media (min-width: 600px) { .p-grille { grid-template-columns: repeat(2, 1fr); } .p-grille > li:last-child:nth-child(odd) { grid-column: 1 / -1; } }
@media (min-width: 900px) { .p-grille { grid-template-columns: repeat(3, 1fr); } .p-grille > li:last-child:nth-child(odd) { grid-column: auto; } .p-grille > li:last-child:nth-child(3n+1) { grid-column: 1 / -1; } }
.p-porte {
  display: grid; grid-template-columns: 3rem 1fr; gap: 0.1rem 0.85rem; align-items: start; height: 100%;
  background: #fff; color: var(--texte); border: 2px solid var(--bord); border-radius: var(--rayon); padding: 0.95rem 1.1rem; text-decoration: none;
}
a.p-porte:hover { border-color: var(--accent); }
.p-porte .p-pastille { grid-row: span 2; }
.p-porte .p-lib { font-weight: 700; font-size: 1.08rem; }
.p-porte .p-desc { font-size: 0.98rem; color: var(--texte-doux); line-height: 1.45; }

.p-bref { background: #fff; border: 1px solid var(--bord); border-radius: var(--rayon); padding: 1.2rem 1.4rem 0.3rem; margin-bottom: 1rem; }
.p-etiquette { font-size: 0.85rem; font-weight: 700; text-transform: uppercase; letter-spacing: 0.05em; color: var(--vert); display: block; margin-bottom: 0.3rem; }
#psy details.p-loin { background: var(--fond-doux); border-radius: var(--rayon); padding: 0.2rem 1.4rem; margin: 0 0 1.8rem; }
#psy details.p-loin[open] { padding-bottom: 0.6rem; }
#psy details.p-loin > summary { cursor: pointer; font-weight: 700; color: var(--accent-fonce); padding: 0.7rem 0; }
.p-sources { font-size: 0.92rem; color: var(--texte-doux); border-top: 1px solid var(--bord); padding-top: 0.6rem; }
.p-sources ul { padding-left: 1.2rem; margin-bottom: 0.4rem; }
.p-encadre { border-left: 5px solid var(--vert); background: var(--vert-doux); padding: 1rem 1.25rem; border-radius: 0 var(--rayon) var(--rayon) 0; margin: 0 0 1.5rem; max-width: 46rem; }
.p-encadre p:last-child { margin-bottom: 0; }
.p-question { border: 2px dashed var(--accent); background: #fff; border-radius: var(--rayon); padding: 0.9rem 1.2rem; margin: 0 0 1.2rem; max-width: 46rem; }
.p-question .p-etiquette { color: var(--accent-fonce); }
.p-question p:last-child { margin-bottom: 0; }

.p-bouton { display: inline-block; font: inherit; font-weight: 600; cursor: pointer; text-decoration: none; background: var(--accent); color: #fff; border: 2px solid var(--accent); padding: 0.6rem 1.2rem; border-radius: 999px; line-height: 1.3; font-size: 1rem; }
.p-bouton:hover { background: var(--accent-fonce); border-color: var(--accent-fonce); color: #fff; }
.p-bouton.p-second { background: transparent; color: var(--accent); }
.p-bouton.p-second:hover { background: var(--fond-doux); color: var(--accent-fonce); }
.p-licence { margin-top: 2.5rem; padding-top: 1rem; border-top: 1px solid var(--bord); font-size: 0.92rem; color: var(--texte-doux); }
.p-tableau { border-collapse: collapse; width: 100%; max-width: 46rem; margin: 0 0 1.2rem; background: #fff; font-size: 1rem; }
.p-tableau th, .p-tableau td { border: 1px solid var(--bord); padding: 0.55rem 0.75rem; vertical-align: top; text-align: left; }
.p-tableau thead th { background: var(--fond-doux); }
table > caption.p-etiquette { display: table-caption; caption-side: top; text-align: left; }
@media (max-width: 760px) {
  body { font-size: 1.0625rem; }
  .p-bref, #psy details.p-loin { padding-left: 1rem; padding-right: 1rem; }
}

/* Propre au module */
.p-etapes { list-style: none; padding: 0; margin: 0 0 1.2rem; counter-reset: etape; max-width: 46rem; }
.p-etapes > li { counter-increment: etape; display: grid; grid-template-columns: 2.6rem 1fr; gap: 0 0.8rem; margin-bottom: 0.9rem; }
.p-etapes > li::before { content: counter(etape); display: grid; place-items: center; width: 2.4rem; height: 2.4rem; font-weight: 700; background: var(--accent-doux); color: var(--accent-fonce); border-radius: 46% 54% 52% 48% / 56% 44% 56% 44%; }
.p-etapes > li > div > p { margin: 0; }
.p-mini { margin: 0 0 1.2rem; max-width: 46rem; }
.p-mini table { border-collapse: collapse; width: 100%; background: #fff; font-size: 0.98rem; }
.p-mini th, .p-mini td { border: 1px solid #8d8177; padding: 0.45rem 0.65rem; text-align: left; vertical-align: top; }
.p-mini th { background: var(--fond-doux); }
.p-mini .p-m-role { color: var(--vert); font-size: 0.86rem; font-weight: 700; }
.p-mini .p-m-case { height: 3.6rem; }
.p-mini figcaption { font-size: 0.92rem; color: var(--texte-doux); margin-top: 0.4rem; }
.p-appel { background: var(--accent-doux); border-radius: var(--rayon); padding: 1.1rem 1.3rem; margin: 0 0 2rem; }
.p-appel h2 { font-size: 1.3rem; margin-bottom: 0.3rem; }
.p-appel p { margin-bottom: 0.7rem; }

/* Lisibilite (01/11/2026) : zones mieux separees, titres plus marques, lignes plus courtes */
body { line-height: 1.65; }
.p-bandeau { background: var(--fond-doux); border-bottom: 2px solid var(--bord); }
#psy .p-texte p, #psy .p-encadre p { margin-bottom: 0.85rem; }
#psy .p-encadre p:last-child { margin-bottom: 0; }
#psy section { margin-bottom: 0; padding: 2.2rem 0 1.4rem; border-top: 2px solid var(--bord); }
#psy h2 { font-size: 1.85rem; color: var(--accent-fonce); margin-bottom: 1rem; }
#psy nav h2, .p-appel h2 { color: var(--texte); }
#psy .p-appel h2 { font-size: 1.3rem; margin-bottom: 0.3rem; }
#psy h3 { font-size: 1.35rem; color: var(--vert); margin: 1.7rem 0 0.5rem; }
#psy h3:first-child, #psy summary + h3 { margin-top: 0.4rem; }
.p-texte, .p-encadre, .p-question, .p-tableau, .p-etapes, .p-mini { max-width: 40rem; }
.p-bref { border: 1px solid var(--bord); border-left: 6px solid var(--vert); }
#psy details.p-loin { background: var(--fond-doux); }
#psy details.p-loin > summary { font-size: 1.05rem; }
.p-sources { border-top-color: var(--bord); color: var(--texte); }
.p-porte { border-color: var(--bord); }
.p-appel { background: var(--accent-doux); }
.p-tableau th, .p-tableau td, .p-mini th, .p-mini td { border-color: var(--bord); }
.p-tableau thead th, .p-mini th { background: var(--fond-doux); }
.p-licence { border-top: 2px solid var(--bord); }
