/*
Theme Name: Jantes Tuning (enfant)
Template: twentytwentyfive
Version: 1.1.0
Description: Thème enfant de Twenty Twenty-Five pour Jantes Tuning : aluminium brossé, encre, orange disque chaud, coins chanfreinés.
Text Domain: jantes-tuning-child
*/

/* ---------- Signature : le chanfrein à 45° ---------- */
:root {
	--jt-chamfer: 28px;
	--jt-chamfer-sm: 14px;
	--jt-cut: polygon(0 0, calc(100% - var(--jt-chamfer)) 0, 100% var(--jt-chamfer), 100% 100%, 0 100%);
	--jt-cut-sm: polygon(0 0, calc(100% - var(--jt-chamfer-sm)) 0, 100% var(--jt-chamfer-sm), 100% 100%, 0 100%);
}

/* ---------- Titres : largeur étendue, graisse forte ---------- */
h1, h2, h3, .wp-block-site-title {
	font-stretch: 125%;
	letter-spacing: -0.005em;
}
h3 { font-stretch: 112%; }
.wp-block-post-content h2 { margin-top: 2.6rem; }
.wp-block-post-content h3 { margin-top: 1.8rem; }

/* ---------- Liens et focus ---------- */
.wp-block-post-content a:not(.wp-block-button__link) {
	text-decoration-thickness: 2px;
	text-underline-offset: 3px;
}
a:focus-visible, button:focus-visible, input:focus-visible, textarea:focus-visible {
	outline: 3px solid var(--wp--preset--color--frein);
	outline-offset: 3px;
}

/* ---------- En-tête ---------- */
.jt-header { padding-block: 1rem; }
.jt-brand { gap: 0.75rem; }
.jt-mark { color: #fff; flex: none; }
.jt-header .wp-block-site-title,
.jt-footer .wp-block-site-title {
	margin: 0;
	font-size: 1.15rem;
	font-weight: 800;
}
.jt-header .wp-block-site-title a,
.jt-footer .wp-block-site-title a { color: #fff; text-decoration: none; }
.jt-header .wp-block-navigation a,
.jt-footer .wp-block-navigation a {
	color: #fff;
	text-decoration: none;
	font-weight: 600;
	text-underline-offset: 6px;
	text-decoration-thickness: 3px;
}
.jt-header .wp-block-navigation a:hover,
.jt-footer .wp-block-navigation a:hover {
	text-decoration: underline;
	text-decoration-color: var(--wp--preset--color--frein);
}
.wp-block-navigation__responsive-container.is-menu-open { background: var(--wp--preset--color--encre); color: #fff; }

/* Pas d'interstice entre les grandes zones */
.wp-site-blocks > .jt-hero,
.wp-site-blocks > .jt-band,
.wp-site-blocks > .jt-main,
.wp-site-blocks > .jt-footer,
.wp-site-blocks > footer { margin-block-start: 0; }

/* ---------- Accueil : la photo plein cadre ---------- */
.jt-hero {
	min-height: min(88vh, 54rem) !important;
	position: relative;
	align-items: flex-end;
	padding: clamp(1.5rem, 5vw, 4rem);
	isolation: isolate;
}
.jt-hero::after {
	content: "";
	position: absolute;
	inset: 0;
	z-index: 0;
	background: linear-gradient(to top, rgba(14, 24, 32, 0.94) 0%, rgba(14, 24, 32, 0.6) 42%, rgba(14, 24, 32, 0.12) 100%);
}
.jt-hero .wp-block-cover__image-background { object-fit: cover; }
.jt-hero .wp-block-cover__inner-container { position: relative; z-index: 1; width: 100%; }
.jt-hero-title {
	color: #fff;
	font-size: clamp(2.7rem, 8.6vw, 7.2rem);
	font-weight: 800;
	line-height: 0.98;
	letter-spacing: -0.02em;
	max-width: 13em;
	margin: 0;
}
.jt-hero-intro {
	color: rgba(255, 255, 255, 0.9);
	font-size: var(--wp--preset--font-size--medium);
	line-height: 1.5;
	max-width: 36rem;
	margin-top: 1.4rem;
}
.jt-hero-intro p { margin: 0; }
.jt-hero .wp-block-buttons { margin-top: 2rem; }

/* ---------- Bandeau de titre des pages et articles ---------- */
.jt-band { padding: clamp(2.5rem, 6vw, 5rem) clamp(1.25rem, 4vw, 2rem) clamp(4.5rem, 10vw, 8rem); }
.jt-page-title {
	color: #fff;
	font-size: clamp(2.2rem, 5.6vw, 4.2rem);
	font-weight: 800;
	line-height: 1.02;
	margin: 0;
}
.jt-page-intro {
	color: #C9D3DA;
	font-size: var(--wp--preset--font-size--medium);
	line-height: 1.55;
	margin-top: 1.2rem;
	max-width: 40rem;
}
.jt-page-intro p { margin: 0; }
.jt-meta { gap: 1rem; margin-bottom: 1.2rem; font-size: 0.95rem; color: #C9D3DA; }
.jt-meta a { color: var(--wp--preset--color--frein); font-weight: 700; text-decoration: none; }
.jt-meta a:hover { text-decoration: underline; }

/* ---------- Corps ---------- */
.jt-main { padding: 0 clamp(1.25rem, 4vw, 2rem) clamp(3rem, 8vw, 6rem); }
.jt-main > .wp-block-post-content { margin-top: clamp(2.5rem, 5vw, 3.5rem); }
.jt-figure { position: relative; margin-top: calc(-1 * clamp(3rem, 7vw, 6rem)) !important; }
.jt-figure img { clip-path: var(--jt-cut); width: 100%; height: 100%; object-fit: cover; }
body.home .jt-main > .wp-block-post-content { margin-top: 0; padding-top: clamp(3rem, 7vw, 5.5rem); }

/* Listes de contenu : repère à cinq boulons */
.wp-block-post-content .wp-block-list { list-style: none; padding-left: 0; }
.wp-block-post-content .wp-block-list > li { position: relative; padding-left: 1.9rem; margin-block: 0.55rem; }
.wp-block-post-content .wp-block-list > li::before {
	content: "";
	position: absolute;
	left: 0;
	top: 0.45em;
	width: 1.05rem;
	height: 1.05rem;
	background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 48 48'%3E%3Ccircle cx='24' cy='24' r='20' fill='none' stroke='%230E1820' stroke-width='5'/%3E%3Cg fill='%23E8541E'%3E%3Ccircle cx='24' cy='11' r='4.6'/%3E%3Ccircle cx='36.4' cy='20' r='4.6'/%3E%3Ccircle cx='31.6' cy='34.5' r='4.6'/%3E%3Ccircle cx='16.4' cy='34.5' r='4.6'/%3E%3Ccircle cx='11.6' cy='20' r='4.6'/%3E%3C/g%3E%3C/svg%3E") center / contain no-repeat;
}

/* ---------- Boutons ---------- */
.wp-block-button__link {
	clip-path: var(--jt-cut-sm);
	padding: 0.9rem 1.7rem;
	font-size: 1rem;
}
.wp-block-button__link:hover { background: #fff; color: var(--wp--preset--color--encre); }
.is-style-outline > .wp-block-button__link {
	clip-path: none;
	background: transparent;
	color: #fff;
	border: 2px solid #fff;
}
.is-style-outline > .wp-block-button__link:hover { background: #fff; color: var(--wp--preset--color--encre); }

/* ---------- Cartes (marques, histoire, articles) ---------- */
.wp-block-post-template.jt-cards {
	gap: clamp(1rem, 2.4vw, 1.6rem);
	list-style: none;
	padding: 0;
	margin-block: 1.6rem 2.5rem;
}
.jt-cards > .wp-block-post {
	display: flex;
	flex-direction: column;
	margin: 0;
	background: var(--wp--preset--color--surface);
	clip-path: var(--jt-cut);
}
.jt-cards .wp-block-post-featured-image { margin: 0; }
.jt-cards .wp-block-post-featured-image img { display: block; width: 100%; }
.jt-card-body { padding: 1.2rem 1.4rem 1.6rem; display: flex; flex-direction: column; gap: 0.4rem; flex: 1; }
.jt-card-body > * { margin-inline: 0 !important; max-width: none !important; }
.jt-card-body .wp-block-post-title { margin: 0; font-size: 1.15rem; line-height: 1.2; }
.jt-card-body .wp-block-post-title a { color: var(--wp--preset--color--encre); text-decoration: none; }
.jt-card-body .wp-block-post-title a:hover { text-decoration: underline; text-decoration-color: var(--wp--preset--color--frein); text-decoration-thickness: 3px; text-underline-offset: 4px; }
.jt-card-body .wp-block-post-excerpt { margin: 0; color: var(--wp--preset--color--acier); font-size: 0.95rem; line-height: 1.55; }
.jt-card-body .wp-block-post-excerpt__excerpt { margin: 0; }
.jt-card-cat a { color: var(--wp--preset--color--frein-fonce); font-weight: 700; font-size: 0.85rem; text-decoration: none; }

@media (max-width: 900px) {
	.wp-block-post-template.jt-cards.is-layout-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 600px) {
	.wp-block-post-template.jt-cards.is-layout-grid { grid-template-columns: minmax(0, 1fr); }
}

/* ---------- Navigation entre articles, pagination ---------- */
.jt-postnav { margin-top: 3rem; padding-top: 1.5rem; border-top: 3px solid var(--wp--preset--color--encre); }
.jt-postnav a { font-weight: 700; color: var(--wp--preset--color--encre); }
.wp-block-query-pagination { margin-top: 2rem; font-weight: 700; }
.wp-block-query-pagination a { color: var(--wp--preset--color--encre); }

/* ---------- Formulaire de contact ---------- */
.jt-contact-form { display: grid; gap: 1.1rem; max-width: 40rem; }
.jt-contact-form label { display: grid; gap: 0.4rem; font-weight: 700; }
.jt-contact-form input,
.jt-contact-form textarea {
	font: inherit;
	padding: 0.75rem 0.9rem;
	border: 2px solid var(--wp--preset--color--encre);
	border-radius: 0;
	background: var(--wp--preset--color--surface);
	color: var(--wp--preset--color--encre);
}
.jt-contact-form button { justify-self: start; border: 0; cursor: pointer; }
.jt-contact-form small { color: var(--wp--preset--color--acier); }
.jt-hp { position: absolute; left: -9999px; height: 0; overflow: hidden; }
.jt-notice { padding: 0.9rem 1.1rem; background: var(--wp--preset--color--surface); border-left: 6px solid var(--wp--preset--color--frein); font-weight: 600; }

/* ---------- Pied de page ---------- */
.jt-footer { padding: clamp(2.5rem, 6vw, 4.5rem) clamp(1.25rem, 4vw, 2rem) 1.5rem; }
.jt-footer .wp-block-heading { color: #fff; font-size: 1rem; margin: 0 0 0.9rem; }
.jt-footer-tagline { color: #B5C0C9; max-width: 22rem; margin-top: 0.8rem; }
.jt-footer-legal { color: #8E9BA6; font-size: 0.85rem; margin-top: 2.5rem; padding-top: 1.2rem; border-top: 1px solid rgba(255, 255, 255, 0.16); }
.jt-footer .wp-block-navigation { gap: 0.5rem; }
