/* ==========================================================================
   Kits de campagne mairies : BD, bloc « à relayer », affiches imprimables
   ========================================================================== */

/* ---------- BD dans la fiche ---------- */
.kit-bd { background: var(--mag-pale, #EEF5F4); padding: clamp(2rem, 4vw, 3.2rem) 0; border-top: 1px solid var(--mag-clair, #D9ECEA); border-bottom: 1px solid var(--mag-clair, #D9ECEA); }
.kit-bd * { color: inherit; }
.kit-bd { color: var(--noir, #191919); }
.kit-bd-entete { max-width: 46rem; margin-bottom: 1.4rem; }
.kit-bd-entete .etiquette { display: inline-block; background: var(--corail, #EE8A62); color: #0B3638; border-radius: 999px; padding: .15rem .75rem; font-size: .82rem; font-weight: 700; }
.kit-bd-entete h2 { color: var(--mag, #0F4C4E); margin: .5rem 0 .3rem; font-size: clamp(1.5rem, 3vw, 2.1rem); }
.kit-bd-entete p { margin: 0; color: #4b5b5b; }
.bd-grille { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 1.1rem; counter-reset: none; }
.bd-case figure { margin: 0; background: #fff; border-radius: .6rem; overflow: hidden; box-shadow: 0 6px 20px rgba(15, 76, 78, .1); height: 100%; display: flex; flex-direction: column; }
.bd-svg { display: block; width: 100%; height: auto; }
.bd-case figcaption { padding: .8rem .95rem 1rem; font-size: .95rem; line-height: 1.5; display: flex; gap: .6rem; align-items: flex-start; }
.bd-legende { flex: 1 1 auto; min-width: 0; }
.bd-num { flex: none; width: 1.7rem; height: 1.7rem; border-radius: 50%; background: var(--mag, #0F4C4E); color: #fff !important; display: grid; place-items: center; font-weight: 700; font-size: .85rem; }
.kit-bd-actions { display: flex; flex-wrap: wrap; gap: .6rem; margin: 1.4rem 0 0; }

/* ---------- Kit à relayer ---------- */
.kit-mairie { padding: clamp(2rem, 4vw, 3.2rem) 0; background: var(--creme, #FAF8F4); }
.kit-mairie * { color: inherit; }
.kit-mairie { color: var(--noir, #191919); }
.kit-entete { background: linear-gradient(120deg, var(--mag, #0F4C4E), var(--mag-nuit, #0B3638)); color: #fff; border-radius: 1.1rem; padding: clamp(1.2rem, 3vw, 2rem); margin-bottom: 1.3rem; }
.kit-entete .etiquette { display: inline-block; background: rgba(255, 255, 255, .15); border-radius: 999px; padding: .15rem .75rem; font-size: .82rem; font-weight: 600; }
.kit-entete h2 { color: #fff; margin: .5rem 0 .4rem; font-size: clamp(1.35rem, 2.6vw, 1.85rem); line-height: 1.25; }
.kit-entete p { margin: 0; color: rgba(255, 255, 255, .88); max-width: 50rem; }
.kit-fichiers { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: .9rem; margin-bottom: 1.3rem; }
.kit-fichier { display: flex; flex-direction: column; gap: .3rem; background: #fff; border: 1px solid var(--mag-clair, #D9ECEA); border-radius: .9rem; padding: .7rem .7rem .9rem; text-decoration: none; transition: transform .15s, box-shadow .15s; }
.kit-fichier:hover { transform: translateY(-2px); box-shadow: 0 10px 24px rgba(15, 76, 78, .14); }
.kit-apercu { display: block; aspect-ratio: 210 / 297; background: var(--mag-pale, #EEF5F4); border-radius: .5rem; overflow: hidden; margin-bottom: .3rem; }
.kit-apercu img { width: 100%; height: 100%; object-fit: contain; object-position: center top; display: block; }
.kit-fichier strong { color: var(--mag, #0F4C4E); font-size: 1rem; }
.kit-fichier span { font-size: .85rem; color: #5f6f6f; line-height: 1.4; }
.kit-fichier em { font-style: normal; font-weight: 700; color: var(--terre, #C4532F); font-size: .9rem; margin-top: auto; }
.kit-textes { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 1rem; }
.kit-bloc { background: #fff; border: 1px solid var(--mag-clair, #D9ECEA); border-radius: .9rem; padding: 1.1rem 1.2rem; display: flex; flex-direction: column; gap: .5rem; }
.kit-bloc-lien { grid-column: 1 / -1; }
.kit-bloc h3 { margin: 0; color: var(--mag, #0F4C4E); font-size: 1.1rem; }
.kit-aide { margin: 0; font-size: .88rem; color: #5f6f6f; }
.kit-bloc textarea, .kit-bloc input { width: 100%; font: inherit; font-size: .93rem; line-height: 1.5; border: 1px solid var(--mag-clair, #D9ECEA); background: var(--mag-pale, #EEF5F4); border-radius: .6rem; padding: .7rem .8rem; resize: vertical; }
.kit-boutons { display: flex; flex-wrap: wrap; gap: .5rem; }
.kit-merci { margin: 1.2rem 0 0; font-size: .95rem; }

@media (max-width: 1100px) {
	.kit-fichiers { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}
@media (max-width: 800px) {
	.bd-grille { grid-template-columns: repeat(2, minmax(0, 1fr)); }
	.kit-textes { grid-template-columns: minmax(0, 1fr); }
	.kit-fichiers { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 520px) {
	.bd-grille { grid-template-columns: minmax(0, 1fr); }
}
@media print {
	.kit-mairie, .kit-bd-actions { display: none !important; }
	.bd-grille { grid-template-columns: repeat(2, 1fr); }
	.bd-case { break-inside: avoid; }
}

/* ---------- Pages imprimables (/affiche/...) ---------- */
@font-face{font-family:'Poppins';src:url('/assets/font/Poppins-Black.eot');src:url('/assets/font/Poppins-Black.eot?#iefix') format('embedded-opentype'),url('/assets/font/Poppins-Black.woff2') format('woff2'),url('/assets/font/Poppins-Black.woff') format('woff'),url('/assets/font/Poppins-Black.ttf') format('truetype'),url('/assets/font/Poppins-Black.svg#font/Poppins-Black') format('svg');font-weight:900;font-style:normal;font-display:swap}
@font-face{font-family:'Poppins';src:url('/assets/font/Poppins-Bold.eot');src:url('/assets/font/Poppins-Bold.eot?#iefix') format('embedded-opentype'),url('/assets/font/Poppins-Bold.woff2') format('woff2'),url('/assets/font/Poppins-Bold.woff') format('woff'),url('/assets/font/Poppins-Bold.ttf') format('truetype'),url('/assets/font/Poppins-Bold.svg#font/Poppins-Bold') format('svg');font-weight:700;font-style:normal;font-display:swap}
@font-face{font-family:'Poppins';src:url('/assets/font/Poppins-Italic.eot');src:url('/assets/font/Poppins-Italic.eot?#iefix') format('embedded-opentype'),url('/assets/font/Poppins-Italic.woff2') format('woff2'),url('/assets/font/Poppins-Italic.woff') format('woff'),url('/assets/font/Poppins-Italic.ttf') format('truetype'),url('/assets/font/Poppins-Italic.svg#font/Poppins-Italic') format('svg');font-weight:400;font-style:italic;font-display:swap}
@font-face{font-family:'Poppins';src:url('/assets/font/Poppins-Regular.eot');src:url('/assets/font/Poppins-Regular.eot?#iefix') format('embedded-opentype'),url('/assets/font/Poppins-Regular.woff2') format('woff2'),url('/assets/font/Poppins-Regular.woff') format('woff'),url('/assets/font/Poppins-Regular.ttf') format('truetype'),url('/assets/font/Poppins-Regular.svg#font/Poppins-Regular') format('svg');font-weight:400;font-style:normal;font-display:swap}
.affiche-page { margin: 0; background: #d9dfde; font-family: Poppins, Arial, sans-serif; color: #1b2a2b; -webkit-print-color-adjust: exact; print-color-adjust: exact; }
.affiche-page * { box-sizing: border-box; }
.affiche { background: #fff; margin: 20px auto; box-shadow: 0 10px 40px rgba(0, 0, 0, .2); overflow: hidden; }
.affiche-a4, .affiche-bd-page { width: 210mm; height: 297mm; padding: 0 12mm 7mm; display: flex; flex-direction: column; }
@page { size: A4; margin: 0; }
@media print {
	.affiche-page { background: #fff; }
	.affiche { margin: 0; box-shadow: none; }
}
.aff-bandeau { background: #0F4C4E; color: #fff; margin: 0 -12mm; padding: 5mm 12mm; display: flex; justify-content: space-between; gap: 6mm; font-size: 10.5pt; font-weight: 600; letter-spacing: .02em; }
.aff-commune { font-weight: 400; opacity: .9; }
.aff-titre { font-size: 31pt; line-height: 1.06; margin: 6.5mm 0 2.5mm; color: #0B3638; font-weight: 700; }
.aff-titre-bd { font-size: 22pt; margin: 6mm 0 4mm; color: #0B3638; }
.aff-sous { font-size: 12.5pt; margin: 0 0 5mm; color: #3a4a4a; line-height: 1.4; }
.aff-bd { display: grid; grid-template-columns: repeat(3, 1fr); gap: 3mm; margin-bottom: 5mm; }
.aff-bd figure, .aff-bd-grille figure { margin: 0; }
.aff-bd .bd-svg, .aff-bd-grille .bd-svg { width: 100%; height: auto; display: block; }
.aff-infos { display: grid; grid-template-columns: 1fr 1fr; gap: 4mm; margin-bottom: 4mm; }
.aff-bloc { border: .35mm solid #C9DAD8; border-radius: 1.5mm; overflow: hidden; background: #fff; }
.aff-bloc h2 { margin: 0; display: flex; align-items: center; gap: 2.2mm; padding: 3mm 4mm; font-size: 13pt; line-height: 1.2; color: #fff; text-transform: uppercase; letter-spacing: .03em; }
.aff-bloc h2 .aff-ico { width: 5.5mm; height: 5.5mm; flex: none; }
.aff-bloc-signes h2 { background: #C98A12; }
.aff-bloc-urgence h2 { background: #C4532F; }
.aff-bloc-prevention h2 { background: #0F4C4E; }
.aff-ico { display: block; }
.aff-signes-liste, .aff-etapes, .aff-prev-grille { list-style: none; margin: 0; padding: 0; }
.aff-signes-liste li, .aff-etapes li { display: flex; align-items: center; gap: 3mm; padding: 2.2mm 4mm; border-top: .25mm solid #E6EEED; font-size: 10.5pt; line-height: 1.28; min-height: 11mm; }
.aff-signes-liste li:first-child, .aff-etapes li:first-child { border-top: 0; }
.aff-signes-liste .aff-ico { width: 7mm; height: 7mm; flex: none; color: #C98A12; }
.aff-num { flex: none; width: 7mm; height: 7mm; border-radius: 50%; background: #C4532F; color: #fff; display: grid; place-items: center; font-size: 11pt; font-weight: 700; }
.aff-etapes strong { color: #A9432A; }
.aff-bloc-prevention { margin-bottom: 4mm; }
.aff-prev-grille { display: grid; grid-template-columns: repeat(5, 1fr); }
.aff-prev-grille li { display: flex; flex-direction: column; align-items: center; text-align: center; gap: 1.2mm; padding: 3.5mm 2.5mm 4mm; border-left: .25mm solid #E6EEED; }
.aff-prev-grille li:first-child { border-left: 0; }
.aff-prev-grille .aff-ico { width: 10.5mm; height: 10.5mm; color: #0F4C4E; margin-bottom: .8mm; }
.aff-prev-grille strong { font-size: 10.5pt; line-height: 1.2; color: #0B3638; }
.aff-prev-grille span { font-size: 8.8pt; line-height: 1.3; color: #3a4a4a; }
.aff-numeros { display: grid; grid-template-columns: auto repeat(4, 1fr); align-items: stretch; border: .35mm solid #0F4C4E; border-radius: 1.5mm; overflow: hidden; margin-bottom: 4mm; }
.aff-numeros-titre { font-style: normal; background: #0F4C4E; color: #fff; display: grid; place-items: center; padding: 0 5mm; font-size: 11pt; font-weight: 700; text-transform: uppercase; letter-spacing: .04em; }
.aff-numeros div { text-align: center; padding: 2.2mm 2mm 2.6mm; border-left: .25mm solid #C9DAD8; }
.aff-numeros div:nth-child(2) { border-left: 0; }
.aff-numeros strong { display: block; font-size: 22pt; line-height: 1.05; color: #0F4C4E; }
.aff-numeros span { display: block; font-size: 7.8pt; line-height: 1.2; color: #3a4a4a; }
.aff-pied { margin-top: auto; display: flex; gap: 5mm; align-items: center; border-top: .4mm solid #D9ECEA; padding-top: 3.5mm; font-size: 10pt; }
.aff-pied strong { display: block; font-size: 11.5pt; color: #0B3638; }
.aff-pied span { display: block; color: #4b5b5b; }
.aff-pied .aff-source { font-size: 8.5pt; color: #7a8a8a; margin-top: 1mm; }
.aff-qr { flex: none; width: 21mm; height: 21mm; background: #fff; padding: 1.2mm; border: .3mm solid #D9ECEA; }
.aff-qr svg { width: 100%; height: 100%; display: block; }
.aff-bd-grille { display: grid; grid-template-columns: 1fr 1fr; gap: 3.5mm 5mm; margin-bottom: 4mm; }
.aff-bd-grille figcaption { font-size: 8.8pt; line-height: 1.35; margin-top: 1.4mm; color: #2a3a3a; }
.aff-bd-grille figcaption b { color: #fff; background: #0F4C4E; border-radius: 50%; display: inline-grid; place-items: center; width: 4.6mm; height: 4.6mm; font-size: 8pt; margin-right: 1mm; }

/* Visuels réseaux (1080 × 1350 et 1080 × 1080) */
.visuel { width: 1080px; padding: 64px 72px; background: linear-gradient(160deg, #0F4C4E 0%, #0B3638 100%); color: #fff; display: flex; flex-direction: column; }
.visuel-reseaux { height: 1350px; }
.visuel-carre { height: 1080px; padding: 52px 64px; }
.vis-sur { margin: 0 0 14px; font-size: 26px; font-weight: 600; color: #F6C23E; letter-spacing: .02em; }
.visuel h1 { margin: 0 0 34px; font-size: 64px; line-height: 1.08; font-weight: 700; }
.visuel-carre h1 { font-size: 52px; margin-bottom: 24px; }
.vis-case { border-radius: 18px; overflow: hidden; border: 6px solid #fff; background: #fff; }
.vis-case .bd-svg { width: 100%; height: auto; display: block; }
.vis-reflexes { margin: 36px 0 0; padding: 0; list-style: none; display: grid; gap: 14px; font-size: 32px; line-height: 1.3; counter-reset: r; }
.vis-reflexes li { counter-increment: r; padding-left: 64px; position: relative; }
.vis-reflexes li::before { content: counter(r); position: absolute; left: 0; top: 0; width: 46px; height: 46px; border-radius: 50%; background: #EE8A62; color: #fff; display: grid; place-items: center; font-weight: 700; }
.vis-reflexes b { color: #F6C23E; }
.vis-url { margin: auto 0 0; font-size: 34px; font-weight: 700; background: #fff; color: #0F4C4E; border-radius: 14px; padding: 18px 26px; align-self: flex-start; }
.visuel-carre .vis-case { width: 760px; align-self: center; }
.visuel-carre h1 { font-size: 50px; }
.visuel-carre .vis-reflexes { display: flex; flex-wrap: wrap; justify-content: center; gap: 12px 26px; font-size: 25px; margin: 24px 0 0; }
.visuel-carre .vis-reflexes li { padding-left: 50px; }
.visuel-carre .vis-reflexes li::before { width: 38px; height: 38px; }
.visuel-carre .vis-reflexes li { white-space: nowrap; }
.visuel-carre .vis-url { align-self: center; font-size: 30px; }

/* ---------- Espace mairie : frise des campagnes ---------- */
.kits-campagnes { padding: clamp(2rem, 4vw, 3.2rem) 0; background: var(--mag-pale, #EEF5F4); }
.kits-campagnes * { color: inherit; }
.kits-campagnes { color: var(--noir, #191919); }
.kits-campagnes h2 { color: var(--mag, #0F4C4E); text-align: center; margin: 0 0 .5rem; }
.kits-frise { list-style: none; margin: 1.5rem 0 0; padding: 0; display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 1rem; }
.kits-mois { background: #fff; border-radius: 1rem; padding: 1.1rem; border: 1px solid var(--mag-clair, #D9ECEA); display: flex; flex-direction: column; gap: .45rem; }
.kits-pret { border: 2px solid var(--terre, #C4532F); box-shadow: 0 10px 28px rgba(196, 83, 47, .15); }
.kits-mois-nom { font-size: 1.35rem; font-weight: 700; color: var(--mag, #0F4C4E); }
.kits-periode { font-size: .85rem; color: #5f6f6f; }
.kits-mois img { width: 100%; height: auto; border-radius: .5rem; border: 1px solid var(--mag-clair, #D9ECEA); }
.kits-mois strong { line-height: 1.35; }
.kits-statut { font-size: .82rem; font-weight: 700; color: #1F7A51; background: #E3F4EB; border-radius: 999px; padding: .15rem .6rem; align-self: flex-start; }
.kits-bientot { color: #8A6400; background: #FEF6DE; }
.kits-mois .btn { margin-top: auto; align-self: flex-start; }
@media (max-width: 1000px) { .kits-frise { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 560px) {
	.kits-frise { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: .6rem; }
	.kits-mois { padding: .7rem; gap: .35rem; border-radius: .8rem; }
	.kits-mois-nom { font-size: 1.05rem; }
	.kits-periode { font-size: .75rem; }
	.kits-statut { font-size: .68rem; white-space: nowrap; padding: .1rem .45rem; }
	.kits-mois strong { font-size: .88rem; line-height: 1.3; }
	.kits-mois .btn { font-size: .85rem; padding: .45rem .8rem; }
}
.kits-campagnes .btn:not(.contour), .kit-mairie .btn:not(.contour), .kit-bd .btn:not(.contour) { color: #fff; }
.kits-frise { align-items: start; }
.kits-mois .btn { margin-top: .4rem; }
.affiche-a4 > *, .affiche-bd-page > * { flex: none; }
@media print {
	html:has(body.affiche-page), body.affiche-page { width: 210mm; margin: 0 !important; padding: 0 !important; background: #fff; }
	.affiche-page .affiche { margin: 0 !important; box-shadow: none; }
}

/* ---------- Kit : message court (applis) et affiches à blocs variables ---------- */
.kit-textes-4 .kit-bloc-lien { grid-column: auto; }
.aff-choc { margin: 0 0 4mm; display: flex; align-items: center; justify-content: center; gap: 3mm; background: #C4532F; color: #fff; border-radius: 1.5mm; padding: 2.6mm 5mm; font-size: 15.5pt; font-weight: 700; line-height: 1.15; text-transform: uppercase; letter-spacing: .02em; text-align: center; }
.aff-choc .aff-ico { width: 7.5mm; height: 7.5mm; flex: none; color: #fff; stroke-width: 2.2; }
.aff-choc span { color: #fff; }
.aff-faux-grille { grid-template-columns: repeat(3, 1fr); }
.aff-faux-grille li { align-items: stretch; text-align: left; gap: 1mm; padding: 2.6mm 3.5mm 3mm; border-left: .25mm solid #E6EEED; border-top: .25mm solid #E6EEED; }
.aff-faux-grille li:nth-child(3n+1) { border-left: 0; }
.aff-faux-grille li:nth-child(-n+3) { border-top: 0; }
.aff-faux-tete { display: flex; align-items: center; gap: 2mm; }
.aff-faux-grille .aff-faux-tete .aff-ico { width: 7mm; height: 7mm; margin: 0; flex: none; }
.aff-faux-grille strong { font-size: 10.5pt; }
.aff-faux-grille em { font-size: 8.6pt; line-height: 1.3; color: #5a4a3a; font-style: italic; }
.aff-faux-grille .aff-faux-vrai { font-size: 8.6pt; line-height: 1.3; color: #0B3638; font-weight: 600; padding-left: 3.2mm; position: relative; }
.aff-faux-grille .aff-faux-vrai::before { content: ""; position: absolute; left: 0; top: 1.3mm; width: 1.6mm; height: 1.6mm; border-radius: 50%; background: #2E9E6B; }
.aff-numeros-souple { display: flex; }
.aff-numeros-souple > div { flex: 1 1 auto; }
.aff-numeros-souple .aff-numeros-titre { width: 27mm; text-align: center; line-height: 1.15; padding: 0 3mm; }
.aff-numeros .aff-num-long strong { font-size: 16pt; line-height: 1.25; white-space: nowrap; }
.aff-compact .aff-titre { margin-top: 5.5mm; }
.aff-compact .aff-sous { margin-bottom: 4mm; }
.aff-compact .aff-bd { margin-bottom: 3.5mm; }
.aff-compact .aff-choc { padding: 2.2mm 5mm; margin-bottom: 3.5mm; }
.aff-compact .aff-infos { margin-bottom: 3.5mm; }
.aff-compact .aff-signes-liste li, .aff-compact .aff-etapes li { padding-top: 1.8mm; padding-bottom: 1.8mm; min-height: 10mm; }
.aff-compact .aff-bloc h2 { padding-top: 2.6mm; padding-bottom: 2.6mm; }
.aff-compact .aff-bloc-prevention { margin-bottom: 3.5mm; }
.aff-compact .aff-faux-grille li { padding: 2.2mm 3.2mm 2.5mm; gap: .7mm; }
/* Page BD A4 : six cases + pied (QR) sur une seule page */
.affiche-bd-page .aff-titre-bd { margin: 5mm 0 3.5mm; }
.affiche-bd-page .aff-bd-grille { grid-template-columns: repeat(2, 76mm); justify-content: space-evenly; gap: 2.8mm 6mm; margin-bottom: 3mm; }
.affiche-bd-page .aff-bd-grille figcaption { font-size: 8.5pt; line-height: 1.32; margin-top: 1.2mm; }
.visuel h1, .aff-titre { text-wrap: balance; }
/* Encart simulateur dans la section des campagnes : titre blanc, aligné à gauche */
.kits-campagnes .encart-simulateur h2 { color: #fff; text-align: left; margin: 0 0 .4rem; }
/* Ajustement automatique à la page A4 (variable posée par le script de la page imprimable) */
main.affiche-a4 > :not(.aff-bandeau):not(.aff-pied), main.affiche-bd-page > :not(.aff-bandeau):not(.aff-pied) { zoom: var(--aff-ajust, 1); }

