/* Documents contractuels (CGV, contrat d'abonnement) aux couleurs de MS-CRM : bleu, beige, encre ; A4 imprimable. */
@page { size: A4; margin: 16mm 16mm 18mm; }
:root { --bleu: #0a66c2; --bleu-fonce: #084f96; --bleu-doux: #e7f0fa; --beige: #efeae2; --beige-2: #f6f3ee; --encre: #111b21; --gris: #54656f; --bordure: #e0d9ce; --vert: #166534; --vert-doux: #dcf5e4; }
* { box-sizing: border-box; -webkit-print-color-adjust: exact; print-color-adjust: exact; }
body { font-family: "Segoe UI", system-ui, -apple-system, Roboto, Arial, sans-serif; color: var(--encre); font-size: 9.8pt; line-height: 1.5; margin: 0; background: #fff; }
.feuille { max-width: 178mm; margin: 0 auto; padding: 10mm 0; }
@media print { .feuille { padding: 0; } }

/* En-tête : bandeau aux couleurs de la marque */
.entete { display: flex; justify-content: space-between; align-items: center; gap: 8mm; background: #0b2545; color: #fff; border-radius: 3mm; padding: 4.5mm 6mm; margin-bottom: 6mm; }
.entete .marque { display: flex; align-items: center; gap: 3mm; font-weight: 800; font-size: 13.5pt; color: #fff; }
.entete .marque::before { content: ""; width: 9mm; height: 9mm; border-radius: 50%; flex: none;
  background: var(--bleu) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='white' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M4 21V5a1 1 0 0 1 1-1h9a1 1 0 0 1 1 1v16'/%3E%3Cpath d='M15 9h4a1 1 0 0 1 1 1v11'/%3E%3Cpath d='M8 8h3M8 12h3M8 16h3M3 21h18'/%3E%3C/svg%3E") center / 5mm no-repeat; }
.entete .marque span { color: #7dbbff; font-weight: 600; }
.entete .ref { font-size: 8.5pt; color: #c9d3da; text-align: right; line-height: 1.5; }
.entete .ref input { background: rgba(255, 255, 255, .12); color: #fff; border-bottom-color: #7dbbff; }

h1 { font-size: 19pt; font-weight: 800; color: var(--encre); text-align: center; margin: 2mm 0 1mm; letter-spacing: -0.01em; }
.sous-titre { text-align: center; color: var(--bleu); margin: 0 0 6mm; font-weight: 600; }
h2 { font-size: 10.5pt; font-weight: 800; color: var(--bleu); margin: 6mm 0 2mm; padding: 1.6mm 3mm; background: var(--bleu-doux); border-left: 1.2mm solid var(--bleu); border-radius: 0 1.5mm 1.5mm 0; text-transform: uppercase; letter-spacing: .03em; break-after: avoid; page-break-after: avoid; }
h3 { font-size: 10pt; font-weight: 700; color: var(--encre); margin: 3.5mm 0 1.5mm; break-after: avoid; }
p { margin: 0 0 2.4mm; text-align: justify; hyphens: auto; }
ul, ol { margin: 0 0 2.4mm; padding-left: 6mm; }
li { margin-bottom: 1mm; text-align: justify; }
li::marker { color: var(--bleu); }
strong { color: var(--encre); }

.encart { border: 1px solid var(--bordure); background: var(--beige-2); border-radius: 2mm; padding: 3mm 4mm; margin: 3mm 0 4mm; font-size: 9.2pt; }
.avertissement { border: 1px solid #9a4b06; background: #fdf0d8; color: #6b3404; border-radius: 2mm; padding: 3mm 4mm; margin: 0 0 5mm; font-size: 8.8pt; }
.a-completer { background: #fff4c2; padding: 0 1mm; }

table { width: 100%; border-collapse: separate; border-spacing: 0; margin: 2mm 0 4mm; font-size: 9.2pt; break-inside: avoid; border: 1px solid var(--bordure); border-radius: 2mm; overflow: hidden; }
th, td { border-bottom: 1px solid var(--bordure); padding: 2mm 2.5mm; vertical-align: top; text-align: left; }
tr:last-child > td, tr:last-child > th { border-bottom: 0; }
td + td, th + th, th + td, td + th { border-left: 1px solid var(--bordure); }
thead th, table > tbody > tr:first-child > th, table > tr:first-child > th { background: var(--bleu); color: #fff; font-size: 8.8pt; font-weight: 700; }
tbody th { background: var(--beige-2); color: var(--encre); font-weight: 700; }
tbody tr:nth-child(even) > td { background: #fbfaf8; }
td.n { text-align: right; }

.parties { display: grid; grid-template-columns: 1fr 1fr; gap: 5mm; margin: 3mm 0 5mm; }
.partie { border: 1px solid var(--bordure); border-top: 1.2mm solid var(--bleu); background: var(--beige-2); border-radius: 2mm; padding: 3mm 4mm; font-size: 9.2pt; }
.partie strong { display: block; margin-bottom: 1.5mm; text-transform: uppercase; font-size: 8.8pt; letter-spacing: .05em; color: var(--bleu); }
.ligne { border-bottom: 1px dotted var(--gris); display: inline-block; min-width: 60mm; height: 4.5mm; vertical-align: bottom; }
.signatures { display: grid; grid-template-columns: 1fr 1fr; gap: 6mm; margin-top: 6mm; break-inside: avoid; }
.signatures div { border: 1px solid var(--bordure); border-top: 1.2mm solid #0b2545; background: var(--beige-2); border-radius: 2mm; min-height: 42mm; padding: 3mm 4mm; font-size: 9.2pt; }
.case { display: inline-block; width: 3.6mm; height: 3.6mm; border: 1px solid var(--encre); vertical-align: -0.5mm; margin-right: 1.5mm; }
.saut { break-before: page; page-break-before: always; }
.pied { margin-top: 8mm; padding: 3mm 4mm; background: var(--beige); border-radius: 2mm; font-size: 7.8pt; color: var(--gris); text-align: center; }
