/* Contrat de sous-traitance (PDG 2026-10-14, cahier §8 tervicecenties) :
   page publique /contrat-sous-traitance et fenêtre de l'espace administrateur.
   Le texte est long et juridique : lignes aérées, numéros alignés, rien ne
   déborde (adresses e-mail et liens coupés au besoin, règle 11), impression
   propre (chaque annexe sur une nouvelle page). */

.cst-page { max-width: 820px; margin: 0 auto; padding: 32px 16px 48px; }

.cst-retour {
  color: #b5922a; font-size: 16px; font-weight: 600; text-decoration: none;
  display: inline-flex; align-items: center; gap: 6px; padding: 8px 14px;
  border: 1.5px solid #b5922a; border-radius: 10px; margin-bottom: 24px; background: #fff;
}

.cst-h1 { font-size: 24px; color: #1d1d1f; margin: 0 0 8px; }
.cst-intro { color: #555; font-size: 15px; line-height: 1.6; margin: 0 0 20px; }

.cst-choix { display: flex; flex-wrap: wrap; gap: 12px; margin-bottom: 20px; }
.cst-champ { display: flex; flex-direction: column; gap: 6px; flex: 1 1 220px; min-width: 0; font-size: 14px; color: #444; font-weight: 600; }
.cst-champ select { min-height: 44px; padding: 8px 10px; border: 1.5px solid #d8d2c2; border-radius: 10px; background: #fff; font-size: 15px; max-width: 100%; }

.cst-etat { color: #666; font-size: 14px; }
.cst-actions { text-align: center; margin-top: 28px; }

/* Le contrat lui-même */
.cst { font-size: 14.5px; line-height: 1.65; color: #2b2b2b; overflow-wrap: anywhere; }
.cst p { margin: 0 0 10px; }
.cst ul { margin: 0 0 10px; padding-left: 1.3em; }
.cst li { margin-bottom: 4px; }
.cst-entete { border-bottom: 2px solid #b5922a; padding-bottom: 12px; margin-bottom: 18px; }
.cst-entete h1 { font-size: 21px; color: #1d1d1f; margin: 0 0 6px; }
.cst-sous-titre { color: #555; font-size: 14px; }
.cst-version { color: #888; font-size: 12.5px; margin: 0; }
.cst-preambule { margin-bottom: 18px; }

.cst h2 { font-size: 17px; color: #1d1d1f; margin: 28px 0 10px; letter-spacing: .02em; }
.cst h3 { font-size: 15.5px; color: #1d1d1f; margin: 22px 0 8px; }
.cst h4 { font-size: 15px; color: #1d1d1f; margin: 18px 0 8px; }
.cst h5 { font-size: 14.5px; color: #333; margin: 14px 0 6px; }
.cst-titre-cct { text-align: center; }
.cst-section { text-align: center; text-transform: none; }
.cst-clause { display: flex; flex-wrap: wrap; gap: 4px 10px; align-items: baseline; }
.cst-num { color: #8A6F1F; font-weight: 600; }
.cst-annexe { text-align: center; }

.cst-item { display: grid; grid-template-columns: 2.6em minmax(0, 1fr); gap: 0 6px; margin: 0 0 8px; }
.cst-label { font-weight: 600; color: #555; }
.cst-corps { min-width: 0; }
.cst-option strong { letter-spacing: .03em; font-size: 13.5px; }

.cst-rubrique { margin-bottom: 8px; }
.cst-rubrique-nom { font-weight: 600; }
.cst-rubrique > p { display: inline; }
.cst-rubrique-titre { font-weight: 600; margin-top: 14px; }
.cst-reponse { padding-left: 1em; border-left: 3px solid #efe6cc; margin-bottom: 12px; }

.cst-notes { border-top: 1px solid #e5e0d3; margin-top: 24px; padding-top: 10px; font-size: 12.5px; color: #555; }
.cst-supplementaires, .cst-avenant { margin-top: 12px; }

@media (max-width: 600px) {
  .cst-page { padding: 20px 16px 40px; }
  .cst { font-size: 14px; }
  .cst-item { grid-template-columns: 2.2em minmax(0, 1fr); }
}

@media print {
  .cst-retour, .cst-choix, .cst-actions, .cst-etat, .cst-intro, .cst-h1 { display: none !important; }
  .cst-page { max-width: none; padding: 0; }
  .cst { font-size: 11pt; color: #000; }
  .cst-appendice > h2.cst-annexe:first-child,
  .cst-appendice > h3.cst-annexe,
  .cst-supplementaires, .cst-avenant { break-before: page; }
  .cst h2, .cst h3, .cst h4, .cst h5 { break-after: avoid; }
  .cst-item, .cst-rubrique { break-inside: avoid; }
}
