@charset "UTF-8";

/* CSS repas – Version V1.6 - 2026
	Script, créé par sync - Boulette (V7.0.0)
	© 2026 Feuille d’heures Angélique
*/

/* ===== Impression Format A4 ===== */
@media print {
	@page {
		size: A4;
		margin: 9mm; /* C'est cette marge qui gère l'espacement avec le bord de la feuille */
	}

	html,
	body {
		width: 100%;
		margin: 0;
		padding: 0;
		background: transparent !important;
		box-sizing: border-box;
	}

	.tarif_print{ text-align:center; margin-top:5px; font-size:1.2rem;}
	.total_display{ margin-top:10px; font-weight:bold; font-size:1.2rem; text-align:center;}

	.container {
		display: block !important;
		width: 100%;
		max-width: 190mm;
		margin: 0 auto;
		box-shadow: none;
		box-sizing: border-box;
	}

	.jour {
		width: 100% !important;
		box-sizing: border-box !important;
		font-size: 0.85rem;
		margin-bottom: 3mm !important; /* Modifié : 3mm au lieu de 5mm espacement */
		padding: 2px !important; /* Ajouté : réduit l'espace à l'intérieur du bloc */
		overflow: visible !important;

		break-inside: avoid !important;
		page-break-inside: avoid !important;
		-webkit-column-break-inside: avoid !important;

		break-before: auto !important;
		break-after: auto !important;
		page-break-before: auto !important;
		page-break-after: auto !important;
	}

	.jour h2, .jour .titre, .jour .ligne, .jour .row, .jour .bloc, .jour .info {
		break-inside: avoid !important;
		page-break-inside: avoid !important;
	}

	/* On garde les jours cachés invisibles aussi à l'impression */
	.jour[hidden], .jour.hidden, .jour.cache, .jour.jour-cache, .jour.non-valide, .jour.inactive, .jour[style*="display: none"], .jour[style*="display:none"] {
		display: none !important;
		visibility: hidden !important;
		height: 0 !important;
		min-height: 0 !important;
		margin: 0 !important;
		padding: 0 !important;
		border: 0 !important;
		overflow: hidden !important;
	}

	.jour.force-break {
		break-before: page !important;
		page-break-before: always !important;
	}

/* On évite un grand blanc inutile avant le total */
	.total_display {
		break-before: auto !important;
		page-break-before: auto !important;
		margin-top: 6mm !important;
	}

	h2 {
		break-after: avoid !important;
		page-break-after: avoid !important;
	}

	.info input, .jour input[type="number"] {
		font-size: 0.75rem;
		width: auto;
	}

	hr, input {
		border: 0 !important;
	}

	.jours-container, .info {
		border: 2 !important;
	}

	button {
		display: none !important;
	}

	* {
		box-decoration-break: clone;
		-webkit-box-decoration-break: clone;
	}
}
/* ===== Mise à l'échelle impression (Optimisée) ===== */

@media print {
	.print-scale {
		transform: none !important;
		zoom: 0.78;
		width: 100%;
	}
}
@media print {
	body {
		font-size: auto; /* Taille de la police pour tout le corps de la page */
	}
}
/* ===== Mode noir et blanc ===== */
@media print {
	body.print_bw {
		filter: grayscale(100%);
		background: transparent !important;
	}
}

/* ===== Mode noir et blanc sans fond ===== */
@media print {
	/* On enlève les couleurs et fonds */
	body.print_bw_nobg * {
		background: transparent !important;
		color: #000 !important;
		box-shadow: none !important; /* On retire l'ombre portée */
	}

	/* On dessine le cadre du conteneur principal */
	body.print_bw_nobg .container {
		border: 2px solid #000 !important;
		border-radius: 10px;
		padding: 5mm !important;
	}

	/* On dessine le cadre de chaque journée */
	body.print_bw_nobg .jour {
		border: 2px solid #000 !important;
		margin-bottom: 3mm !important;
		padding: 3px !important;
		border-radius: 8px;
	}

	/* On ne redessine pas les jours cachés */
	body.print_bw_nobg .jour[hidden], body.print_bw_nobg .jour.hidden, body.print_bw_nobg .jour.cache, body.print_bw_nobg .jour.jour-cache, body.print_bw_nobg .jour.non-valide, body.print_bw_nobg .jour.inactive, body.print_bw_nobg .jour[style*="display: none"], body.print_bw_nobg .jour[style*="display:none"] {
		display: none !important;
		border: 0 !important;
		margin: 0 !important;

		margin-bottom: 3mm !important; /* Modifié : 3mm au lieu de 5mm espacement */
		padding: 2px !important; /* Ajouté : réduit l'espace à l'intérieur du bloc */
	}

	/* Optionnel : Dessiner une ligne sous les titres pour séparer */
	body.print_bw_nobg h2 {
		border-bottom: 1.5px solid #000 !important;
		padding-bottom: 3px;
		margin-bottom: 3px;
	}

	hr, input {
		border: 0 !important;
	}
}

/* ===== Mode couleur sans fond ===== */
@media print {
	body.print_color {
		-webkit-print-color-adjust: exact !important;
		print-color-adjust: exact !important;
		background: transparent !important;
	}
}


/****
création des boutons pour imprimé 
	<button onclick="setPrint('print_bw_nobg')" style="width:30%;">Imprimer NB</button>&nbsp;
	<button onclick="setPrint('print_color')" style="width:30%;">Couleur</button>&nbsp;
	<button onclick="setPrint('print_bw')" style="width:30%;">Noir & blanc</button>
****/

/* FIN de CSS */