/*
Theme Name: Trouve ton pneu
Description: Thème enfant GeneratePress de trouve-ton-pneu.fr, concept « Flanc » : le pneu comme typographie, sombre ou clair, avec le socle Fox embarqué (fox-socle/). Présentation seulement.
Author: Fox
Template: generatepress
Version: 1.0.2
Fox Socle: 1.3.0
Requires at least: 6.5
Tested up to: 6.8
Requires PHP: 7.2
License: GNU General Public License v2 or later
License URI: https://www.gnu.org/licenses/gpl-2.0.html
Text Domain: trouvetonpneu-theme
*/

/* Palettes ---------------------------------------------------------------
 * The theme owns its colours in both schemes, on :root[data-theme] (more
 * specific than the :root block GeneratePress prints): a palette already
 * saved in GeneratePress (its blue default, 24/10/2026) no longer wins.
 * Light = the values of inc/site.php; inc/scheme.php sets <html data-theme>. */
:root[data-theme="light"] {
	color-scheme: light;
	--contrast: #121110;
	--contrast-2: #4F4A44;
	--contrast-3: #C9C3B8;
	--base: #E2DDD4;
	--base-2: #EDEAE4;
	--base-3: #F7F5F1;
	--accent: #FF6A2B;
	--accent-text: #A3350A;
	--on-accent: #0E0E0E;
}
:root[data-theme="dark"] {
	color-scheme: dark;
	--contrast: #EDEAE4;
	--contrast-2: #B9B4AB;
	--contrast-3: #3A3A3A;
	--base: #161616;
	--base-2: #0E0E0E;
	--base-3: #1A1A1A;
	--accent: #FF6A2B;
	--accent-text: #FF6A2B;
	--on-accent: #0E0E0E;
}
:root {
	--ttp-condense: 62%;
	--ttp-relief-hi: #FBF9F5;
	--ttp-relief-lo: #BDB6AA;
}
:root[data-theme="dark"] { --ttp-relief-hi: #2E2E2E; --ttp-relief-lo: #050505; }

/* Fox Blocks and Fox Affiliate: the theme's orange, written as text where it is
 * text (links, numbers), and the orange triplet for their soft backgrounds. */
body {
	--fxb-link: var(--accent-text);
	--fxb-accent: var(--accent-text);
	--fxb-accent-rgb: 255, 106, 43;
	--fox-accent-text: var(--accent-text);
}
body a { color: var(--accent-text); }

/* Text ------------------------------------------------------------------- */
body {
	font-family: "Archivo", system-ui, sans-serif;
	font-size: 18px;
	line-height: 1.6;
	-webkit-font-smoothing: antialiased;
}
h1, h2, h3, h4, .entry-title, .page-title {
	font-family: inherit;
	font-weight: 900;
	font-stretch: var(--ttp-condense);
	text-transform: uppercase;
	line-height: 0.92;
	letter-spacing: -0.005em;
	color: var(--contrast);
}
h1, .entry-title, .page-title { font-size: clamp(48px, 9vw, 96px); }
h2 { font-size: clamp(36px, 6vw, 60px); }
h3 { font-size: clamp(26px, 3.6vw, 36px); font-stretch: 70%; }
h4 { font-size: 22px; font-stretch: 75%; }
h5, h6 { font-weight: 800; text-transform: uppercase; letter-spacing: 0.08em; font-size: 15px; }
a { text-underline-offset: 0.18em; text-decoration-thickness: 2px; }
strong, b { font-weight: 800; }
::selection { background: var(--accent); color: var(--on-accent); }
:focus-visible { outline: 3px solid var(--accent); outline-offset: 2px; }

hr, .wp-block-separator { border: 0; border-top: 2px solid var(--contrast); opacity: 1; }
blockquote, .wp-block-quote {
	border: 0;
	border-top: 2px solid var(--contrast);
	border-bottom: 1px solid var(--contrast-3);
	margin: 2em 0;
	padding: 1em 0;
	font-size: 1.2em;
	font-weight: 600;
	font-style: normal;
}
blockquote cite, .wp-block-quote cite { display: block; margin-top: 0.6em; font-size: 0.7em; font-weight: 700; text-transform: uppercase; letter-spacing: 0.08em; color: var(--contrast-2); }
table, .wp-block-table table { border-collapse: collapse; width: 100%; font-size: 16px; }
th, td { border: 0; border-bottom: 1px solid var(--contrast-3); padding: 0.7em 0.6em; text-align: left; }
th { font-weight: 800; text-transform: uppercase; letter-spacing: 0.06em; font-size: 13px; border-bottom: 2px solid var(--contrast); }
.wp-block-table { overflow-x: auto; }
code, kbd { background: var(--base); padding: 0.1em 0.35em; font-size: 0.9em; }
figcaption, .wp-element-caption { font-size: 14px; color: var(--contrast-2); }

/* Buttons ---------------------------------------------------------------- */
.wp-block-button__link, .wp-element-button, button, input[type="submit"], .button {
	border-radius: 0;
	font-family: inherit;
	font-weight: 800;
	text-transform: uppercase;
	letter-spacing: 0.06em;
	font-size: 15px;
	padding: 16px 22px;
	min-height: 44px;
}
/* More specific than GeneratePress's saved button colours
 * (a.wp-block-button__link:not(.has-background)). */
.wp-block-button a.wp-block-button__link:not(.has-background),
body input[type="submit"], body a.button, body .button { background: var(--accent); color: var(--on-accent); text-decoration: none; }
.wp-block-button a.wp-block-button__link:not(.has-background):hover,
.wp-block-button a.wp-block-button__link:not(.has-background):focus,
body input[type="submit"]:hover, body a.button:hover, body .button:hover { background: var(--contrast); color: var(--base-2); }
.wp-block-button.is-style-ttp-contour a.wp-block-button__link:not(.has-background),
.wp-block-button.is-style-outline a.wp-block-button__link:not(.has-background) {
	background: transparent;
	color: var(--contrast);
	border: 2px solid var(--contrast);
	padding: 14px 20px;
}
.wp-block-button.is-style-ttp-contour a.wp-block-button__link:not(.has-background):hover { background: var(--contrast); color: var(--base-2); }
body .generate-back-to-top, body .generate-back-to-top:visited { background: var(--accent); color: var(--on-accent); }
body .generate-back-to-top:hover, body .generate-back-to-top:focus { background: var(--contrast); color: var(--base-2); }

/* Header ----------------------------------------------------------------- */
.site-header { border-bottom: 1px solid var(--contrast-3); }
.main-title { font-weight: 900; font-stretch: 70%; text-transform: uppercase; letter-spacing: 0.02em; font-size: 26px; line-height: 1; }
.main-title a { text-decoration: none; }
.site-description { font-size: 13px; text-transform: uppercase; letter-spacing: 0.08em; }
.main-navigation .main-nav ul li a {
	font-weight: 700;
	text-transform: uppercase;
	letter-spacing: 0.08em;
	font-size: 14px;
}
.main-navigation .main-nav ul ul { border: 1px solid var(--contrast-3); }
.menu-toggle { font-weight: 800; text-transform: uppercase; letter-spacing: 0.08em; }

/* The dark / light button (inc/scheme.php, assets/js/scheme.js). */
.ttp-scheme-toggle {
	display: inline-flex;
	align-items: center;
	gap: 8px;
	min-height: 44px;
	margin: 0 8px;
	padding: 8px 14px;
	background: transparent;
	color: var(--contrast);
	border: 2px solid var(--contrast);
	font-size: 13px;
	line-height: 1;
	cursor: pointer;
}
.ttp-scheme-toggle:hover, .ttp-scheme-toggle:focus { background: var(--contrast); color: var(--base-2); }
.ttp-scheme-toggle[hidden] { display: none; }
.ttp-scheme-toggle__icon { flex: none; }
@media (max-width: 420px) {
	.ttp-scheme-toggle { padding: 8px 10px; }
	.ttp-scheme-toggle__label { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
}

/* Posts and archives ------------------------------------------------------ */
.entry-meta { font-size: 14px; text-transform: uppercase; letter-spacing: 0.06em; font-weight: 600; }
.entry-header { margin-bottom: 1.4em; }
.blog .entry-title, .archive .entry-title, .search .entry-title { font-size: clamp(30px, 4vw, 44px); }
.blog .entry-title a, .archive .entry-title a, .search .entry-title a { text-decoration: none; }
.blog article, .archive article, .search article { border-top: 2px solid var(--contrast); padding-top: 1.4em; }
.page-header { border-bottom: 2px solid var(--contrast); margin-bottom: 2em; }
.taxonomy-description, .archive-description { color: var(--contrast-2); font-size: 18px; }
.post-navigation, .paging-navigation { font-weight: 800; text-transform: uppercase; letter-spacing: 0.06em; font-size: 14px; }

/* Footer ----------------------------------------------------------------- */
.site-footer { border-top: 2px solid var(--contrast); }
.site-info { font-size: 14px; }
.site-footer .widget-title { font-size: 20px; font-stretch: 70%; }

/* Block styles (inc/presentation.php) ------------------------------------ */
.is-style-ttp-affiche { font-size: clamp(64px, 14vw, 132px); line-height: 0.92; font-stretch: var(--ttp-condense); }
.is-style-ttp-affiche mark, .is-style-ttp-affiche strong { background: none; color: var(--accent-text); font-weight: inherit; }
.is-style-ttp-surtitre { font-size: 14px; font-weight: 800; text-transform: uppercase; letter-spacing: 0.14em; color: var(--accent-text); }

.wp-block-group.is-style-ttp-flanc {
	background-image: var(--ttp-flanc);
	background-repeat: no-repeat;
	background-position: right center;
	background-size: min(46%, 520px) auto;
	padding-right: min(50%, 560px);
	min-height: 520px;
	display: flex;
	flex-direction: column;
	justify-content: center;
	margin-bottom: 2.5em;
}
@media (max-width: 900px) {
	.wp-block-group.is-style-ttp-flanc {
		padding-right: 0;
		padding-bottom: min(90vw, 440px);
		background-position: center bottom;
		background-size: min(86vw, 420px) auto;
		min-height: 0;
	}
}

.wp-block-group.is-style-ttp-bandeau {
	background: var(--accent);
	color: var(--on-accent);
	padding: 16px 20px;
	font-weight: 900;
	font-stretch: 70%;
	text-transform: uppercase;
	font-size: 24px;
	line-height: 1.2;
	letter-spacing: 0.02em;
}
.wp-block-group.is-style-ttp-bandeau a { color: inherit; }
.wp-block-group.is-style-ttp-bandeau p { margin: 0; }

.wp-block-group.is-style-ttp-carte {
	background: var(--base);
	padding: 26px;
	box-shadow: inset 0 2px 0 var(--ttp-relief-hi), inset 0 -3px 0 var(--ttp-relief-lo);
	height: 100%;
}
.wp-block-group.is-style-ttp-carte > :last-child { margin-bottom: 0; }
.wp-block-group.is-style-ttp-carte h3 { font-size: clamp(32px, 4vw, 46px); font-stretch: var(--ttp-condense); }
.wp-block-group.is-style-ttp-carte a { font-weight: 800; }
.wp-block-group.is-style-ttp-carte h3 a { color: var(--contrast); text-decoration: none; }
.wp-block-group.is-style-ttp-carte h3 a::after { content: " →"; color: var(--accent-text); }
.wp-block-group.is-style-ttp-carte h3 a:hover { color: var(--accent-text); }

.wp-block-list.is-style-ttp-pieges, ul.is-style-ttp-pieges, ol.is-style-ttp-pieges {
	list-style: none;
	margin: 0 0 2em;
	padding: 0;
	counter-reset: ttp-piege;
	border-top: 2px solid var(--contrast);
	display: grid;
	grid-template-columns: repeat(auto-fit, minmax(min(260px, 100%), 1fr));
	column-gap: 24px;
}
.is-style-ttp-pieges > li {
	counter-increment: ttp-piege;
	padding: 26px 0;
	border-bottom: 1px solid var(--contrast-3);
	color: var(--contrast-2);
	font-size: 16px;
}
.is-style-ttp-pieges > li::before {
	content: counter(ttp-piege, decimal-leading-zero);
	display: block;
	font-weight: 900;
	font-stretch: var(--ttp-condense);
	font-size: 60px;
	line-height: 1;
	margin-bottom: 12px;
	color: var(--accent-text);
}
.is-style-ttp-pieges > li strong { display: block; color: var(--contrast); font-size: 22px; margin-bottom: 6px; }

/* Night logo (inc/presentation.php): only when one is set. */
.ttp-logo-nuit { display: none; }
:root[data-theme="dark"] .ttp-has-night img:not(.ttp-logo-nuit) { display: none; }
:root[data-theme="dark"] .ttp-has-night .ttp-logo-nuit { display: inline-block; }
.ttp-footer-line { display: block; margin-bottom: 0.4em; }
