/*
Theme Name: Meilleurs Airfryers
Description: Thème léger et rapide pour un site d'affiliation transparent (guides, comparatifs, conseils). Sans framework, sans police externe.
Version: 1.0.0
Requires at least: 6.4
Requires PHP: 8.1
Text Domain: meilleurs-airfryers
*/

:root {
	--bg: #fbf8f3;
	--surface: #ffffff;
	--ink: #1c2a33;
	--muted: #52606a;
	--line: #e4ddd0;
	--brand: #0e5a63;
	--brand-dark: #0a434a;
	--brand-soft: #e3f0f1;
	--accent: #b83a0a;
	--accent-dark: #962d06;
	--good: #14663a;
	--bad: #9a2a1a;
	--note: #fff4d6;
	--radius: 14px;
	--shadow: 0 1px 2px rgba(28, 42, 51, .06), 0 8px 22px rgba(28, 42, 51, .08);
	--maxw: 1120px;
	--prose: 44rem;
	--font: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
body {
	margin: 0;
	background: var(--bg);
	color: var(--ink);
	font: 1.0625rem/1.65 var(--font);
	-webkit-font-smoothing: antialiased;
}
img, svg, video { max-width: 100%; height: auto; }
a { color: var(--brand); text-underline-offset: .18em; }
a:hover { color: var(--brand-dark); }
:focus-visible { outline: 3px solid var(--accent); outline-offset: 2px; border-radius: 4px; }
.af-sr, .screen-reader-text {
	position: absolute !important; width: 1px; height: 1px; margin: -1px; padding: 0; overflow: hidden;
	clip: rect(0, 0, 0, 0); white-space: nowrap; border: 0;
}
.skip-link {
	position: absolute; left: 1rem; top: -4rem; background: var(--ink); color: #fff; padding: .6rem 1rem;
	border-radius: 8px; z-index: 100; transition: top .15s;
}
.skip-link:focus { top: 1rem; }

.wrap { width: min(100% - 2rem, var(--maxw)); margin-inline: auto; }

/* En-tête ------------------------------------------------------------- */
.site-header { background: var(--surface); border-bottom: 1px solid var(--line); }
.site-header__bar { display: flex; align-items: center; justify-content: space-between; gap: 1rem; min-height: 4.25rem; }
.brand { display: inline-flex; align-items: center; gap: .6rem; color: var(--ink); text-decoration: none; font-weight: 800; font-size: 1.15rem; letter-spacing: -.01em; }
.brand:hover { color: var(--brand); }
.brand svg { flex: none; }
.nav-toggle {
	display: none; align-items: center; gap: .5rem; background: none; border: 1px solid var(--line); border-radius: 10px;
	padding: .5rem .8rem; font: inherit; font-weight: 600; color: var(--ink); cursor: pointer;
}
.primary-nav ul { list-style: none; margin: 0; padding: 0; display: flex; gap: .25rem; flex-wrap: wrap; }
.primary-nav a {
	display: block; padding: .55rem .85rem; border-radius: 10px; color: var(--ink); text-decoration: none; font-weight: 600;
}
.primary-nav a:hover, .primary-nav .current-menu-item > a, .primary-nav .current-cat > a { background: var(--brand-soft); color: var(--brand-dark); }
@media (max-width: 760px) {
	.js .nav-toggle { display: inline-flex; }
	.js .primary-nav { display: none; flex-basis: 100%; }
	.js .primary-nav.is-open { display: block; padding-bottom: .75rem; }
	.js .site-header__bar { flex-wrap: wrap; padding-block: .5rem; }
	.primary-nav ul { flex-direction: column; }
	.no-js .primary-nav { flex-basis: 100%; padding-bottom: .5rem; }
	.no-js .site-header__bar { flex-wrap: wrap; }
}

/* Boutons --------------------------------------------------------------- */
.af-btn, .btn {
	position: relative; display: inline-flex; align-items: center; justify-content: center; gap: .5rem; min-height: 3rem; padding: .7rem 1.25rem;
	border-radius: 12px; background: var(--accent); color: #fff; font-weight: 700; text-decoration: none; border: 2px solid transparent;
	transition: background .15s, transform .15s;
}
.af-btn:hover, .btn:hover { background: var(--accent-dark); color: #fff; }
.af-btn:active, .btn:active { transform: translateY(1px); }
.btn--ghost { background: transparent; color: var(--brand-dark); border-color: var(--brand); }
.btn--ghost:hover { background: var(--brand-soft); color: var(--brand-dark); }
.af-cta { display: flex; flex-wrap: wrap; gap: .6rem; margin: 1.25rem 0; }

/* Accueil ---------------------------------------------------------------- */
.hero { background: linear-gradient(135deg, var(--brand-soft), #f7efe0); border-bottom: 1px solid var(--line); }
.hero__inner { padding-block: clamp(2.5rem, 7vw, 5rem); }
.hero__copy { max-width: 48rem; }
.hero h1, .entry-title, .section__title { text-wrap: balance; }
.hero h1 { font-size: clamp(2rem, 5.5vw, 3.1rem); line-height: 1.1; letter-spacing: -.02em; margin: 0 0 1rem; }
.hero p { font-size: 1.2rem; color: var(--muted); margin: 0 0 1.75rem; max-width: 38rem; }
.hero__actions { display: flex; flex-wrap: wrap; gap: .75rem; }
.section { padding-block: clamp(2rem, 5vw, 3.5rem); }
.section__title { font-size: clamp(1.4rem, 3.4vw, 1.9rem); letter-spacing: -.01em; margin: 0 0 1.25rem; }
.grid { display: grid; gap: 1.1rem; grid-template-columns: repeat(auto-fill, minmax(min(100%, 17rem), 1fr)); }
.grid--cats { grid-template-columns: repeat(auto-fit, minmax(min(100%, 13rem), 1fr)); }
.card {
	display: flex; flex-direction: column; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius);
	padding: 1.25rem; box-shadow: var(--shadow); text-decoration: none; color: inherit;
}
a.card:hover { border-color: var(--brand); color: inherit; }
.card__kicker { font-size: .8rem; font-weight: 700; text-transform: uppercase; letter-spacing: .06em; color: var(--brand); margin: 0 0 .4rem; }
.card__title { font-size: 1.2rem; line-height: 1.3; margin: 0 0 .5rem; }
.card__excerpt { color: var(--muted); margin: 0 0 .9rem; font-size: 1rem; }
.card__meta { margin: auto 0 0; font-size: .85rem; color: var(--muted); }
.card__thumb { margin: -1.25rem -1.25rem 1rem; border-radius: var(--radius) var(--radius) 0 0; overflow: hidden; }
.card__thumb img { display: block; width: 100%; aspect-ratio: 16 / 9; object-fit: cover; }
.trust { display: grid; gap: 1.25rem; grid-template-columns: repeat(auto-fit, minmax(14rem, 1fr)); }
.trust__item h3 { margin: .6rem 0 .3rem; font-size: 1.1rem; }
.trust__item p { margin: 0; color: var(--muted); font-size: 1rem; }
.trust__icon { width: 2.75rem; height: 2.75rem; border-radius: 12px; background: var(--brand-soft); color: var(--brand-dark); display: grid; place-items: center; }
.empty { background: var(--surface); border: 1px dashed var(--line); border-radius: var(--radius); padding: 2rem; text-align: center; color: var(--muted); }

/* Articles et pages ------------------------------------------------------- */
.page-head { padding-block: 1.75rem 1rem; }
.article > .wrap { max-width: 46rem; }
.crumbs { font-size: .9rem; color: var(--muted); margin: 0 0 .9rem; }
.crumbs ol { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; gap: .35rem; }
.crumbs li:not(:last-child)::after { content: "›"; margin-left: .35rem; color: var(--muted); }
.crumbs a { color: var(--muted); }
.entry-title { font-size: clamp(1.9rem, 5vw, 2.6rem); line-height: 1.15; letter-spacing: -.02em; margin: 0 0 .75rem; }
.entry-meta { display: flex; flex-wrap: wrap; gap: .35rem 1.1rem; color: var(--muted); font-size: .95rem; margin: 0; }
.entry-meta a { color: var(--muted); }
.entry-thumb { margin: 1rem 0 0; }
.entry-thumb img { display: block; border-radius: var(--radius); width: 100%; }
.entry-content { padding-bottom: 2rem; }
.entry-content > * + * { margin-top: 1.1em; }
.entry-content h2 { font-size: clamp(1.45rem, 3.4vw, 1.9rem); line-height: 1.25; margin: 2.2em 0 .6em; letter-spacing: -.01em; scroll-margin-top: 1rem; }
.entry-content h3 { font-size: 1.25rem; line-height: 1.3; margin: 1.8em 0 .5em; }
.entry-content ul, .entry-content ol { padding-left: 1.4em; }
.entry-content li + li { margin-top: .35em; }
.entry-content blockquote { margin-inline: 0; padding: .5rem 1.25rem; border-left: 4px solid var(--brand); background: var(--brand-soft); border-radius: 0 var(--radius) var(--radius) 0; }
.entry-content table { position: relative; display: block; overflow-x: auto; max-width: 100%; border-collapse: collapse; }
.entry-content th, .entry-content td { padding: .6rem .8rem; border: 1px solid var(--line); text-align: left; vertical-align: top; }
.entry-content th { background: var(--brand-soft); }
.entry-content img { border-radius: 10px; }
.entry-updated::before { content: "•"; margin-right: 1.1rem; color: var(--line); }

/* Composants d'affiliation ------------------------------------------------ */
.af-disclosure, .af-editor-notice {
	background: var(--note); border: 1px solid #ecd9a0; border-radius: 12px; padding: .8rem 1rem; font-size: .95rem;
}
.af-disclosure p, .af-editor-notice { margin: 0; }
.af-editor-notice { border-style: dashed; }
.af-todo { background: #ffd9d2; padding: 0 .3em; border-radius: 4px; }
.af-toc { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 1rem 1.25rem; }
.af-toc__title { font-weight: 800; margin: 0 0 .4rem; }
.af-toc ol { margin: 0; padding-left: 1.2em; }
.af-product { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 1.25rem; box-shadow: var(--shadow); }
.entry-content .af-product > * + * { margin-top: .9rem; }
.af-product__title { margin: 0 !important; font-size: 1.3rem; }
.af-specs { display: grid; grid-template-columns: repeat(auto-fit, minmax(9rem, 1fr)); gap: .6rem; margin: 0; }
.af-specs div { background: var(--bg); border-radius: 10px; padding: .55rem .8rem; }
.af-specs dt { font-size: .8rem; color: var(--muted); text-transform: uppercase; letter-spacing: .05em; }
.af-specs dd { margin: 0; font-weight: 700; }
.af-source { font-size: .9rem; color: var(--muted); margin: 0; }
.af-proscons { display: grid; gap: 1rem; grid-template-columns: repeat(auto-fit, minmax(14rem, 1fr)); }
.af-proscons h4 { margin: 0 0 .35rem; font-size: 1rem; }
.af-proscons ul { margin: 0; padding-left: 1.2em; }
.af-pros h4 { color: var(--good); }
.af-cons h4 { color: var(--bad); }
.af-tested { border-left: 4px solid var(--good); padding-left: .9rem; }
.af-compare { position: relative; overflow-x: auto; border: 1px solid var(--line); border-radius: var(--radius); background: var(--surface); }
.af-compare table { display: table; max-width: none; border-collapse: collapse; width: 100%; min-width: 34rem; }
.af-compare th, .af-compare td { padding: .8rem 1rem; border-bottom: 1px solid var(--line); text-align: left; vertical-align: top; }
.af-compare thead th { background: var(--brand-soft); position: sticky; top: 0; }
.af-compare tbody th { font-weight: 700; color: var(--muted); white-space: nowrap; }
.af-compare tr:last-child > * { border-bottom: 0; }
.af-compare .af-cta { margin: 0; }
.af-compare .af-btn { min-height: 2.6rem; padding: .5rem .9rem; font-size: .95rem; }
.af-faq { background: var(--surface); border: 1px solid var(--line); border-radius: 12px; padding: .2rem 1rem; }
.af-faq + .af-faq { margin-top: .6rem; }
.af-faq summary { cursor: pointer; font-weight: 700; padding: .75rem 0; }
.af-faq > div { padding-bottom: .75rem; }
.af-sources { margin-top: 2.5rem; border-top: 1px solid var(--line); padding-top: .5rem; }
.af-sources ol { color: var(--muted); font-size: .95rem; word-break: break-word; }

/* Listes d'archives ---------------------------------------------------------- */
.archive-desc { color: var(--muted); max-width: 40rem; margin: 0; font-size: 1.1rem; }
.pagination { display: flex; flex-wrap: wrap; gap: .4rem; margin: 2rem 0; }
.pagination .page-numbers { padding: .5rem .9rem; border: 1px solid var(--line); border-radius: 10px; background: var(--surface); text-decoration: none; }
.pagination .current { background: var(--brand); border-color: var(--brand); color: #fff; }
.search-form { display: flex; gap: .5rem; max-width: 30rem; }
.search-form input[type="search"] { flex: 1; min-width: 0; padding: .7rem .9rem; border: 1px solid var(--line); border-radius: 12px; font: inherit; background: var(--surface); }

/* Pied de page ------------------------------------------------------------------ */
.site-footer { background: var(--ink); color: #dfe6ea; margin-top: 3rem; padding-block: 2.5rem; font-size: .95rem; }
.site-footer a { color: #fff; }
.site-footer__grid { display: grid; gap: 1.75rem; grid-template-columns: repeat(auto-fit, minmax(15rem, 1fr)); }
.site-footer h2 { font-size: 1rem; margin: 0 0 .6rem; color: #fff; }
.site-footer ul { list-style: none; padding: 0; margin: 0; display: grid; gap: .35rem; }
.site-footer__legal { border-top: 1px solid rgba(255, 255, 255, .18); margin-top: 1.75rem; padding-top: 1.25rem; color: #c3ced4; }

@media (prefers-reduced-motion: reduce) {
	html { scroll-behavior: auto; }
	* { transition: none !important; }
}
