/* chauffe-eau-pacific.com : un carnet de dépannage, vert sapin et sable.
   Polices système uniquement, grands caractères, fort contraste. */

:root {
	--sapin: #1f4a36;
	--sapin-fonce: #143325;
	--sapin-clair: #3f8f5f;
	--sable: #f4ead3;
	--sable-fonce: #e9d9b4;
	--papier: #fffdf6;
	--encre: #1a1a16;
	--encre-douce: #45463c;
	--trait: #cdb98a;
	--alerte: #8c2f14;
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }

body {
	margin: 0;
	font-family: Verdana, Tahoma, "DejaVu Sans", sans-serif;
	font-size: 20px;
	line-height: 1.65;
	color: var(--encre);
	background: var(--sable);
}

h1, h2, h3, .nom-carnet, .appel-haut, .gros-appel, .appel-bas {
	font-family: "Trebuchet MS", "Gill Sans", "Segoe UI", sans-serif;
}

a { color: var(--sapin); text-underline-offset: 3px; }
a:focus-visible, button:focus-visible, input:focus-visible, textarea:focus-visible, label:focus-within {
	outline: 4px solid #d98e04; outline-offset: 2px;
}
b, strong { color: var(--sapin-fonce); }

/* ------------------------------------------------ Couverture du carnet (haut de page) */
.couverture { background: var(--sapin); color: #fff; border-bottom: 8px solid var(--sable-fonce); }
.couverture-haut {
	max-width: 940px; margin: 0 auto; padding: 14px 18px;
	display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 12px 20px;
}
.nom-carnet { color: #fff; text-decoration: none; font-size: 25px; font-weight: 700; line-height: 1.2; }
.nom-carnet small { display: block; font-size: 15px; font-weight: 400; letter-spacing: 0.08em; text-transform: uppercase; color: var(--sable-fonce); }
.appel-haut {
	display: block; background: var(--sable); color: var(--sapin-fonce); text-decoration: none;
	font-size: 27px; font-weight: 800; padding: 8px 18px; border-radius: 4px; line-height: 1.2;
	box-shadow: 4px 4px 0 var(--sapin-fonce);
}
.appel-haut small { display: block; font-size: 14px; font-weight: 400; color: var(--encre-douce); }
.appel-haut:hover { background: #fff; }

/* Onglets : comme les intercalaires d'un carnet */
.onglets ul {
	list-style: none; margin: 0 auto; padding: 0 18px; max-width: 940px;
	display: flex; flex-wrap: wrap; gap: 6px;
}
.onglets a {
	display: block; white-space: nowrap; padding: 10px 14px 8px; font-size: 17px;
	color: #fff; text-decoration: none; border-radius: 8px 8px 0 0; background: var(--sapin-fonce);
}
.onglets a:hover { background: var(--sapin-clair); }
.onglets a[aria-current="page"] { background: var(--sable-fonce); color: var(--sapin-fonce); font-weight: 700; }

/* ------------------------------------------------ La feuille (le contenu) */
.feuille { max-width: 940px; margin: 0 auto; padding: 22px 14px 40px; }

section, .autres { margin: 0 0 26px; }

.page-carnet, .ouverture, .zone-question {
	background: var(--papier);
	border: 1px solid var(--trait);
	border-radius: 3px;
	padding: 26px 26px 26px 46px;
	position: relative;
	box-shadow: 0 2px 0 var(--trait);
}
/* Double trait de marge, à gauche, comme dans un cahier */
.page-carnet::before, .ouverture::before, .zone-question::before {
	content: ""; position: absolute; top: 0; bottom: 0; left: 26px;
	border-left: 2px solid var(--sapin-clair); border-right: 1px solid var(--sapin-clair); width: 4px;
	opacity: 0.55;
}

h1 { font-size: 38px; line-height: 1.2; margin: 6px 0 14px; color: var(--sapin-fonce); }
h2 { font-size: 29px; line-height: 1.25; margin: 0 0 14px; color: var(--sapin-fonce); }
h3 { font-size: 22px; line-height: 1.3; margin: 18px 0 6px; color: var(--sapin-fonce); }
p { margin: 0 0 14px; }

.etiquette {
	display: inline-block; margin: 0 0 8px; padding: 2px 12px;
	background: var(--sable-fonce); color: var(--sapin-fonce);
	font-size: 16px; font-weight: 700; letter-spacing: 0.04em; transform: rotate(-1.2deg);
}
.chapeau { font-size: 22px; }
.rassure { font-style: italic; border-left: 4px solid var(--sapin-clair); padding-left: 14px; }
.petit-mot { font-size: 18px; color: var(--encre-douce); }

/* Ouverture : texte + croquis */
.ouverture { display: grid; grid-template-columns: 1fr 220px; gap: 22px; align-items: center; }
.croquis { width: 100%; height: auto; display: block; }
.fiche-tete .croquis { max-width: 220px; }

.gros-appel {
	display: inline-block; background: var(--sapin); color: #fff; text-decoration: none;
	font-size: 25px; font-weight: 800; padding: 16px 24px; border-radius: 6px;
	box-shadow: 4px 4px 0 var(--sable-fonce);
}
.gros-appel:hover { background: var(--sapin-fonce); }

/* En bref (fiches) */
.en-bref { margin: 6px 0 18px; border-top: 1px dashed var(--trait); }
.en-bref dt { font-weight: 700; color: var(--sapin); font-size: 17px; text-transform: uppercase; letter-spacing: 0.05em; margin-top: 10px; }
.en-bref dd { margin: 0; padding-bottom: 10px; border-bottom: 1px dashed var(--trait); }

.retour { margin: 0 0 12px; font-size: 18px; }
.retour a::before { content: "\2190  "; }

/* ------------------------------------------------ Boîte de questions (commun.py) */
.zone-question { background: #eef4ee; border-color: var(--sapin-clair); }
.assistant h2 { font-size: 27px; }
.assistant-suggestions { display: flex; flex-direction: column; gap: 8px; margin: 0 0 16px; }
.assistant-suggestion {
	font: inherit; font-size: 19px; text-align: left; cursor: pointer;
	padding: 12px 16px; background: var(--papier); color: var(--sapin-fonce);
	border: 2px solid var(--sapin); border-radius: 4px;
}
.assistant-suggestion::before { content: "\00BB  "; font-weight: 700; }
.assistant-suggestion:hover { background: var(--sapin); color: #fff; }
.assistant-ligne { display: flex; flex-wrap: wrap; gap: 10px; }
.assistant-ligne label { width: 100%; font-weight: 700; font-size: 18px; }
.assistant-ligne input[type=text] {
	flex: 1 1 240px; min-width: 0; font: inherit; font-size: 19px; padding: 13px;
	border: 2px solid var(--encre-douce); border-radius: 4px; background: #fff;
}
.assistant-ligne button {
	font: inherit; font-size: 19px; font-weight: 700; padding: 13px 20px; cursor: pointer;
	border: 0; border-radius: 4px; background: var(--sapin); color: #fff;
}
.assistant-piege { position: absolute; left: -9999px; width: 1px; height: 1px; opacity: 0; }
.assistant-reponse { margin-top: 16px; padding: 16px 18px; background: var(--papier); border: 2px dashed var(--sapin-clair); }
.assistant-appel {
	display: inline-block; background: var(--sapin); color: #fff; font-weight: 800;
	padding: 12px 18px; border-radius: 4px; text-decoration: none;
}
.assistant-note { font-size: 16px; color: var(--encre-douce); margin: 14px 0 0; }

/* ------------------------------------------------ Outil « Réparer ou remplacer ? » */
.balance-form fieldset { border: 0; border-top: 2px solid var(--sapin); margin: 0 0 16px; padding: 10px 0 0; }
.balance-form legend { font-weight: 700; font-size: 21px; color: var(--sapin-fonce); padding-right: 10px; }
.balance-form label {
	display: flex; gap: 12px; align-items: flex-start; cursor: pointer;
	padding: 10px 12px; margin: 6px 0; background: var(--sable); border-radius: 4px;
}
.balance-form input[type=radio] { width: 26px; height: 26px; margin: 2px 0 0; flex: none; accent-color: var(--sapin); }
.balance-form label:has(input:checked) { background: var(--sable-fonce); font-weight: 700; }
.balance-verdict { border: 3px solid var(--sapin); padding: 16px 18px; background: #eef4ee; }
.balance-verdict p:last-child { margin-bottom: 0; }
.balance-titre { font-size: 25px; font-weight: 800; color: var(--sapin-fonce); margin-bottom: 6px; }
.balance-appel {
	display: inline-block; margin-top: 10px; background: var(--sapin); color: #fff; font-weight: 800;
	padding: 12px 18px; border-radius: 4px; text-decoration: none;
}

/* ------------------------------------------------ Frise */
.frise { list-style: none; margin: 10px 0 20px; padding: 0; display: grid; grid-template-columns: repeat(4, 1fr); gap: 0; }
.frise li { position: relative; padding: 34px 14px 0 0; border-top: 4px solid var(--sapin); }
.frise li::before {
	content: ""; position: absolute; top: -14px; left: 0; width: 20px; height: 20px;
	border-radius: 50%; background: var(--papier); border: 4px solid var(--sapin);
}
.frise li:last-child::before { background: var(--sapin-clair); }
.frise-date { display: block; font-weight: 800; font-size: 21px; color: var(--sapin-fonce); margin-bottom: 4px; }
.frise p { font-size: 18px; }

/* ------------------------------------------------ Sommaire et note dans la marge */
.avec-marge { display: grid; grid-template-columns: 1fr 240px; gap: 24px; align-items: start; }
.marge { background: #fff7b8; padding: 16px; transform: rotate(1.5deg); box-shadow: 2px 3px 0 var(--trait); font-size: 18px; }
.marge-titre { font-weight: 800; color: var(--sapin-fonce); margin-bottom: 6px; }
.sommaire { list-style: none; counter-reset: s; margin: 0; padding: 0; }
.sommaire li { counter-increment: s; border-bottom: 1px dashed var(--trait); }
.sommaire a { display: grid; grid-template-columns: 44px 1fr; column-gap: 8px; padding: 12px 0; text-decoration: none; color: var(--encre); }
.sommaire a::before {
	content: counter(s); grid-row: span 2; font-family: "Trebuchet MS", sans-serif; font-size: 30px;
	font-weight: 800; color: var(--sapin-clair); line-height: 1.1;
}
.sommaire b { text-decoration: underline; text-decoration-color: var(--sapin-clair); }
.sommaire span { color: var(--encre-douce); font-size: 18px; }
.sommaire a:hover b { color: var(--sapin); }

/* ------------------------------------------------ Fiches des modèles */
.fiches-modeles { display: grid; grid-template-columns: repeat(2, 1fr); gap: 16px; }
.fiche-modele { background: #fff; border: 1px solid var(--trait); border-top: 6px solid var(--sapin); padding: 14px 16px; font-size: 18px; }
.fiche-modele h3 { margin-top: 0; }
.fiche-modele:last-child { border-top-color: var(--sapin-clair); background: #eef4ee; }
.fiche-epoque { font-style: italic; color: var(--encre-douce); }

/* ------------------------------------------------ Page de comptes (prix) */
.comptes { list-style: none; margin: 0 0 16px; padding: 0; }
.comptes li { display: flex; align-items: flex-end; gap: 8px; padding: 10px 0; border-bottom: 1px solid var(--sable-fonce); }
.compte-nom { font-weight: 700; }
.compte-nom small { display: block; font-weight: 400; font-size: 16px; color: var(--encre-douce); }
.compte-points { flex: 1; border-bottom: 3px dotted var(--trait); margin-bottom: 8px; min-width: 20px; }
.compte-prix { font-weight: 800; font-size: 22px; color: var(--sapin-fonce); white-space: nowrap; }

/* ------------------------------------------------ Alerte fuite */
.alerte { background: #fbeee6; border-color: var(--alerte); }
.alerte::before { border-color: var(--alerte); }
.alerte h2 { color: var(--alerte); }

/* ------------------------------------------------ Questions fréquentes */
.qr { padding: 4px 0 4px; border-bottom: 1px dashed var(--trait); }
.qr h3::before { content: "Q. "; color: var(--sapin-clair); }
.qr p::before { content: "R. "; font-weight: 800; color: var(--sapin-clair); }

/* ------------------------------------------------ Texte des fiches */
.texte-fiche h2 { margin-top: 18px; padding-bottom: 4px; border-bottom: 2px solid var(--sable-fonce); }
.texte-fiche h2:first-child { margin-top: 0; }
.liste-carnet { padding-left: 26px; }
.liste-carnet li { margin-bottom: 8px; }
ul.liste-carnet { list-style: none; padding-left: 0; }
ul.liste-carnet li { padding-left: 30px; position: relative; }
ul.liste-carnet li::before { content: "\2713"; position: absolute; left: 4px; color: var(--sapin-clair); font-weight: 800; }
.encart { background: #fff7b8; padding: 14px 18px; border-left: 6px solid var(--sapin); font-style: italic; }
.trois-cas { display: grid; gap: 14px; margin-bottom: 14px; }
.trois-cas > div { background: #fff; border: 1px solid var(--trait); padding: 12px 16px; }
.trois-cas > div:nth-child(1) { border-left: 8px solid var(--sapin-clair); }
.trois-cas > div:nth-child(2) { border-left: 8px solid #c79a2e; }
.trois-cas > div:nth-child(3) { border-left: 8px solid var(--alerte); }
.trois-cas h3 { margin-top: 0; }

.autres ul { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; gap: 10px; }
.autres a { display: inline-block; padding: 10px 14px; background: var(--sable); border: 1px solid var(--trait); border-radius: 4px; text-decoration: none; font-weight: 700; }

/* ------------------------------------------------ Formulaire (commun.py) */
.contact h2 { margin-top: 0; }
.contact-form { display: grid; gap: 4px; max-width: 620px; }
.contact-form label { font-weight: 700; margin-top: 10px; }
.contact-form input, .contact-form textarea {
	font: inherit; font-size: 19px; padding: 12px; width: 100%;
	border: 2px solid var(--encre-douce); border-radius: 4px; background: #fff;
	background-image: repeating-linear-gradient(transparent, transparent 31px, #e6dcc4 32px);
}
.contact-form input { background-image: none; }
.contact-form button {
	justify-self: start; margin-top: 14px; font: inherit; font-size: 20px; font-weight: 700;
	padding: 14px 28px; border: 0; border-radius: 4px; background: var(--sapin); color: #fff; cursor: pointer;
}

/* ------------------------------------------------ Dos du carnet (pied de page) */
.dos { background: var(--sapin-fonce); color: #f1ead8; padding: 30px 18px 100px; font-size: 18px; }
.dos > p { max-width: 900px; margin: 0 auto 12px; }
.dos a { color: #fff; }
.dos-nom { font-weight: 800; font-size: 20px; }
.dos-franchise { border-top: 1px solid #3d6650; padding-top: 12px; }

/* Barre d'appel fixe, sur téléphone seulement */
.appel-bas { display: none; }

@media (max-width: 760px) {
	body { font-size: 19px; }
	.couverture-haut { padding: 10px 14px; }
	.nom-carnet { font-size: 21px; }
	.appel-haut { font-size: 23px; width: 100%; text-align: center; }
	.feuille { padding: 14px 8px 30px; }
	.page-carnet, .ouverture, .zone-question { padding: 18px 16px 18px 30px; }
	.page-carnet::before, .ouverture::before, .zone-question::before { left: 14px; }
	h1 { font-size: 30px; }
	h2 { font-size: 25px; }
	.chapeau { font-size: 20px; }
	.ouverture, .avec-marge, .fiches-modeles { grid-template-columns: 1fr; }
	.croquis, .fiche-tete .croquis { max-width: 120px; margin: 0 auto; }
	.onglets ul { padding: 0 8px; gap: 4px; }
	.onglets a { font-size: 16px; padding: 8px 10px; border-radius: 6px 6px 0 0; }
	.gros-appel { font-size: 22px; display: block; text-align: center; }
	.frise { grid-template-columns: 1fr; }
	.frise li { border-top: 0; border-left: 4px solid var(--sapin); padding: 0 0 16px 24px; }
	.frise li::before { top: 2px; left: -12px; }
	.comptes li { flex-wrap: wrap; }
	.compte-points { display: none; }
	.compte-prix { margin-left: auto; }
	.appel-bas {
		display: block; position: fixed; left: 0; right: 0; bottom: 0; z-index: 30;
		background: var(--sapin); color: #fff; text-align: center; text-decoration: none;
		font-size: 22px; font-weight: 800; padding: 16px 10px;
		border-top: 4px solid var(--sable-fonce);
	}
}
