/*
Theme Name: Amateurs
Theme URI: https://amateurs-de-cuisine.com/
Description: Thème sur mesure d'Amateurs de cuisine : recettes de la communauté, conseils et rappels conso. Léger, accessible, sans constructeur de pages.
Author: Amateurs de cuisine
Version: 1.0.0
Requires at least: 6.5
Requires PHP: 8.0
License: GPLv2 or later
Text Domain: amateurs
*/

/* ===== Jetons de design ===== */
:root {
	--c-bg: #fbf8f3;
	--c-surface: #ffffff;
	--c-ink: #1f1d1a;
	--c-muted: #6b645b;
	--c-line: #ebe4d8;
	--c-brand: #1e7a4c;
	--c-brand-ink: #0f4a2d;
	--c-brand-soft: #e5f1e9;
	--c-accent: #d9711c;
	--c-accent-soft: #fcefe2;
	--c-alert: #c62828;
	--c-alert-bg: #fdecea;
	--adc-alert: var(--c-alert);
	--adc-alert-bg: var(--c-alert-bg);
	--f-sans: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, "Noto Sans", sans-serif;
	--f-serif: "Iowan Old Style", "Palatino Linotype", Palatino, "Book Antiqua", Georgia, serif;
	--radius: 14px;
	--radius-sm: 8px;
	--shadow: 0 1px 2px rgba(31, 29, 26, .05), 0 10px 30px rgba(31, 29, 26, .07);
	--w: 1200px;
	--w-text: 740px;
	--gutter: clamp(16px, 4vw, 32px);
}

/* ===== Base ===== */
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
body {
	margin: 0;
	background: var(--c-bg);
	color: var(--c-ink);
	font: 400 1.0625rem/1.65 var(--f-sans);
	-webkit-font-smoothing: antialiased;
	overflow-x: hidden;
}
img, svg, video { max-width: 100%; height: auto; display: block; }
a { color: var(--c-brand); text-underline-offset: .18em; }
a:hover { color: var(--c-brand-ink); }
h1, h2, h3, h4 { font-family: var(--f-serif); line-height: 1.2; color: var(--c-ink); margin: 0 0 .6em; font-weight: 700; letter-spacing: -.01em; }
h1 { font-size: clamp(2rem, 4.4vw, 3.1rem); }
h2 { font-size: clamp(1.5rem, 2.8vw, 2rem); }
h3 { font-size: 1.25rem; }
p { margin: 0 0 1.1em; }
:focus-visible { outline: 3px solid var(--c-accent); outline-offset: 2px; border-radius: 4px; }
.screen-reader-text, .sr-only { position: absolute !important; width: 1px; height: 1px; overflow: hidden; clip: rect(1px, 1px, 1px, 1px); white-space: nowrap; }
.skip-link:focus { position: fixed; top: 8px; left: 8px; z-index: 1000; width: auto; height: auto; clip: auto; background: var(--c-ink); color: #fff; padding: .6rem 1rem; border-radius: var(--radius-sm); }
.wrap { width: min(100% - 2 * var(--gutter), var(--w)); margin-inline: auto; }
.wrap--text { width: min(100% - 2 * var(--gutter), var(--w-text)); margin-inline: auto; }

/* ===== Boutons ===== */
.btn { display: inline-flex; align-items: center; gap: .5rem; padding: .7rem 1.2rem; border-radius: 999px; border: 2px solid transparent; font: 600 .95rem/1 var(--f-sans); text-decoration: none; cursor: pointer; transition: background .15s, color .15s, border-color .15s; }
.btn svg { width: 18px; height: 18px; flex: none; }
@media (max-width: 520px) { .search-form .btn span { display: none; } .search-form .btn { padding-inline: .9rem; } }
.btn--primary { background: var(--c-brand); color: #fff; }
.btn--primary:hover { background: var(--c-brand-ink); color: #fff; }
.btn--accent { background: var(--c-accent); color: #fff; }
.btn--accent:hover { background: #b85d12; color: #fff; }
.btn--ghost { border-color: var(--c-line); color: var(--c-ink); background: var(--c-surface); }
.btn--ghost:hover { border-color: var(--c-brand); color: var(--c-brand); }

/* ===== En-tête ===== */
.site-header { position: sticky; top: 0; z-index: 50; background: rgba(255, 255, 255, .94); backdrop-filter: saturate(160%) blur(8px); border-bottom: 1px solid var(--c-line); }
.site-header__bar { display: flex; align-items: center; gap: 1.25rem; min-height: 68px; }
.brand { display: inline-flex; align-items: center; gap: .6rem; text-decoration: none; color: var(--c-ink); margin-right: auto; }
.brand svg { width: 38px; height: 38px; flex: none; }
.brand__name { font: 700 1.2rem/1.1 var(--f-serif); letter-spacing: -.01em; }
.brand__tag { display: block; font: 500 .72rem/1.2 var(--f-sans); color: var(--c-muted); letter-spacing: .02em; }
.main-nav ul { list-style: none; margin: 0; padding: 0; display: flex; gap: .25rem; }
.main-nav a { display: block; padding: .55rem .8rem; border-radius: 999px; color: var(--c-ink); text-decoration: none; font-weight: 550; font-size: .97rem; }
.main-nav a:hover, .main-nav .current-menu-item > a, .main-nav .current-menu-ancestor > a, .main-nav .current-post-ancestor > a, body.blog .main-nav .current_page_parent > a, body.single-post:not(:has(.main-nav .current-post-ancestor)) .main-nav .current_page_parent > a { background: var(--c-brand-soft); color: var(--c-brand-ink); }
.main-nav .menu-item--alert.current-menu-item > a, .main-nav .menu-item--alert.current-post-ancestor > a { background: var(--c-alert-bg); color: var(--c-alert); }
.main-nav .menu-item--alert > a { color: var(--c-alert); }
.main-nav .menu-item--alert > a:hover { background: var(--c-alert-bg); color: var(--c-alert); }
.main-nav .sub-menu { display: none; }
.header-actions { display: flex; align-items: center; gap: .5rem; }
.icon-btn { display: inline-grid; place-items: center; width: 42px; height: 42px; border-radius: 50%; border: 1px solid var(--c-line); background: var(--c-surface); color: var(--c-ink); cursor: pointer; }
.icon-btn:hover { border-color: var(--c-brand); color: var(--c-brand); }
.icon-btn svg { width: 20px; height: 20px; }
.nav-toggle { display: none; }
.header-search { display: none; border-top: 1px solid var(--c-line); padding: .9rem 0; }
.header-search.is-open { display: block; }

@media (max-width: 960px) {
	.nav-toggle { display: inline-grid; }
	.main-nav { display: none; position: absolute; left: 0; right: 0; top: 100%; background: var(--c-surface); border-bottom: 1px solid var(--c-line); box-shadow: var(--shadow); }
	.main-nav.is-open { display: block; }
	.main-nav ul { flex-direction: column; padding: .5rem var(--gutter) 1rem; }
	.main-nav a { border-radius: var(--radius-sm); padding: .8rem; }
	.header-actions .btn { display: none; }
	.brand__tag { display: none; }
}

/* ===== Formulaire de recherche ===== */
.search-form { display: flex; gap: .5rem; width: 100%; }
.search-form input[type="search"] { flex: 1; min-width: 0; padding: .8rem 1.1rem; border: 1px solid var(--c-line); border-radius: 999px; font: inherit; background: var(--c-surface); color: var(--c-ink); }
.search-form input[type="search"]:focus { outline: none; border-color: var(--c-brand); box-shadow: 0 0 0 3px var(--c-brand-soft); }

/* ===== Accueil : hero ===== */
.hero { padding: clamp(2.5rem, 7vw, 5rem) 0 clamp(2rem, 5vw, 3.5rem); background:
	radial-gradient(1200px 400px at 85% -10%, var(--c-accent-soft), transparent 60%),
	radial-gradient(900px 380px at 0% 0%, var(--c-brand-soft), transparent 55%); }
.hero__grid { display: grid; grid-template-columns: 1.15fr .85fr; gap: clamp(1.5rem, 4vw, 3.5rem); align-items: center; }
.hero__kicker { display: inline-block; font: 650 .8rem/1 var(--f-sans); text-transform: uppercase; letter-spacing: .12em; color: var(--c-brand); margin-bottom: 1rem; }
.hero h1 { margin-bottom: .45em; }
.hero__lead { font-size: 1.15rem; color: var(--c-muted); max-width: 36em; }
.hero .search-form { max-width: 560px; margin: 1.5rem 0 1rem; }
.chips { display: flex; flex-wrap: wrap; gap: .5rem; padding: 0; margin: 0; list-style: none; }
.chip { display: inline-block; padding: .4rem .85rem; border-radius: 999px; background: var(--c-surface); border: 1px solid var(--c-line); color: var(--c-ink); text-decoration: none; font-size: .9rem; font-weight: 550; }
.chip:hover { border-color: var(--c-brand); color: var(--c-brand); }
.hero__media { position: relative; }
.hero__media img { width: 100%; aspect-ratio: 4 / 5; object-fit: cover; border-radius: 28px; box-shadow: var(--shadow); }
.hero__badge { position: absolute; left: -1rem; bottom: 1.5rem; background: var(--c-surface); border-radius: var(--radius); padding: .8rem 1rem; box-shadow: var(--shadow); display: flex; gap: .7rem; align-items: center; max-width: 260px; font-size: .9rem; }
.hero__badge strong { display: block; font-size: 1.4rem; font-family: var(--f-serif); color: var(--c-brand); }
@media (max-width: 860px) {
	.hero__grid { grid-template-columns: 1fr; }
	.hero__media { display: none; }
}

/* ===== Sections ===== */
.section { padding: clamp(2.5rem, 6vw, 4.5rem) 0; }
.section--tint { background: var(--c-surface); border-block: 1px solid var(--c-line); }
.section__head { display: flex; align-items: end; justify-content: space-between; gap: 1rem; margin-bottom: 1.75rem; flex-wrap: wrap; }
.section__head h2 { margin: 0; }
.section__head p { margin: .35rem 0 0; color: var(--c-muted); }
.more-link { font-weight: 650; text-decoration: none; white-space: nowrap; }
.more-link::after { content: " →"; }

/* ===== Grilles & cartes ===== */
.grid { display: grid; gap: clamp(1rem, 2.5vw, 1.75rem); grid-template-columns: repeat(auto-fill, minmax(min(100%, 280px), 1fr)); }
.grid--4 { grid-template-columns: repeat(auto-fill, minmax(min(100%, 240px), 1fr)); }
.card { position: relative; display: flex; flex-direction: column; background: var(--c-surface); border: 1px solid var(--c-line); border-radius: var(--radius); overflow: hidden; transition: transform .18s ease, box-shadow .18s ease; }
.card:hover { transform: translateY(-3px); box-shadow: var(--shadow); }
.card__media { aspect-ratio: 3 / 2; background: var(--c-brand-soft); overflow: hidden; }
.card__media img { width: 100%; height: 100%; object-fit: cover; }
.card__body { padding: 1rem 1.15rem 1.25rem; display: flex; flex-direction: column; gap: .45rem; flex: 1; }
.card__title { font-size: 1.15rem; margin: 0; }
.card__title a { color: inherit; text-decoration: none; }
.card__title a::after { content: ""; position: absolute; inset: 0; }
.card__excerpt { color: var(--c-muted); font-size: .95rem; margin: 0; display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; }
.card__meta { margin-top: auto; display: flex; flex-wrap: wrap; gap: .35rem .9rem; color: var(--c-muted); font-size: .85rem; }
.badge { display: inline-flex; align-items: center; gap: .35rem; align-self: flex-start; padding: .25rem .6rem; border-radius: 999px; font: 650 .74rem/1.2 var(--f-sans); text-transform: uppercase; letter-spacing: .06em; background: var(--c-brand-soft); color: var(--c-brand-ink); text-decoration: none; position: relative; z-index: 1; }
.badge--alert { background: var(--c-alert-bg); color: var(--c-alert); }
.badge--accent { background: var(--c-accent-soft); color: #9a4d0c; }

/* Carte « rappel » compacte */
.recall { display: grid; grid-template-columns: 96px 1fr; gap: .9rem; align-items: center; padding: .8rem; background: var(--c-surface); border: 1px solid var(--c-line); border-left: 4px solid var(--c-alert); border-radius: var(--radius); position: relative; transition: box-shadow .18s; }
.recall:hover { box-shadow: var(--shadow); }
.recall__img { width: 96px; height: 96px; border-radius: var(--radius-sm); object-fit: cover; background: var(--c-alert-bg); }
.recall__title { font: 650 1rem/1.35 var(--f-sans); margin: .25rem 0; }
.recall__title a { color: var(--c-ink); text-decoration: none; }
.recall__title a::after { content: ""; position: absolute; inset: 0; }
.recall__date { font-size: .82rem; color: var(--c-muted); }
.recalls { display: grid; gap: 1rem; grid-template-columns: repeat(auto-fill, minmax(min(100%, 360px), 1fr)); }
.alert-banner { display: flex; gap: 1rem; align-items: center; background: var(--c-alert-bg); border-radius: var(--radius); padding: 1rem 1.25rem; margin-bottom: 1.5rem; color: #7f1d1d; }
.alert-banner svg { width: 28px; height: 28px; flex: none; color: var(--c-alert); }

/* ===== CTA ===== */
.cta { background: var(--c-brand-ink); color: #fff; border-radius: 28px; padding: clamp(2rem, 5vw, 3.5rem); display: grid; grid-template-columns: 1.4fr auto; gap: 2rem; align-items: center; position: relative; overflow: hidden; }
.cta::before { content: ""; position: absolute; width: 420px; height: 420px; right: -120px; top: -160px; border-radius: 50%; background: rgba(255, 255, 255, .06); }
.cta h2 { color: #fff; }
.cta p { color: rgba(255, 255, 255, .85); margin: 0; max-width: 40em; }
.cta ul { margin: 1rem 0 0; padding-left: 1.1rem; color: rgba(255, 255, 255, .85); }
@media (max-width: 760px) { .cta { grid-template-columns: 1fr; } }

/* ===== Partenaires ===== */
.partner { text-align: center; background: var(--c-surface); border: 1px solid var(--c-line); border-radius: var(--radius); padding: 1.5rem; }
.partner img { width: 140px; height: 140px; object-fit: contain; margin: 0 auto 1rem; }
.partner h3 { font-size: 1.1rem; }
.partner p { font-size: .93rem; color: var(--c-muted); margin: 0; }

/* ===== En-têtes de page / archives ===== */
.page-head { padding: clamp(2rem, 5vw, 3.5rem) 0 1.5rem; }
.page-head__desc { color: var(--c-muted); max-width: 46em; font-size: 1.08rem; }
.breadcrumbs { font-size: .87rem; color: var(--c-muted); margin-bottom: 1rem; }
.breadcrumbs a { color: var(--c-muted); }
.pagination { margin: 2.5rem 0 0; display: flex; justify-content: center; }
.pagination .nav-links { display: flex; gap: .4rem; flex-wrap: wrap; }
.pagination .page-numbers { display: inline-grid; place-items: center; min-width: 42px; height: 42px; padding: 0 .8rem; border-radius: 999px; border: 1px solid var(--c-line); background: var(--c-surface); text-decoration: none; color: var(--c-ink); font-weight: 600; }
.pagination .page-numbers.current { background: var(--c-brand); border-color: var(--c-brand); color: #fff; }

/* ===== Article ===== */
.entry-header { padding: clamp(2rem, 5vw, 3.25rem) 0 1.25rem; }
.entry-header h1 { font-size: clamp(1.9rem, 4vw, 2.75rem); }
.entry-meta { display: flex; flex-wrap: wrap; gap: .4rem 1.2rem; color: var(--c-muted); font-size: .92rem; align-items: center; }
.entry-thumb { margin: 0 auto 2rem; width: min(100% - 2 * var(--gutter), 1000px); }
.entry-thumb img { width: 100%; max-height: 560px; object-fit: cover; border-radius: 22px; }
.entry-thumb--contain img { object-fit: contain; background: var(--c-surface); border: 1px solid var(--c-line); max-height: 440px; }
.entry-content { font-size: 1.1rem; }
.entry-content > * { margin-block: 0 1.15em; }
.entry-content h2 { margin-top: 1.9em; }
.entry-content h3 { margin-top: 1.5em; }
.entry-content img { border-radius: var(--radius-sm); }
.entry-content ul, .entry-content ol { padding-left: 1.3rem; }
.entry-content li { margin: .3em 0; }
.entry-content blockquote { margin-inline: 0; padding: .5rem 1.25rem; border-left: 4px solid var(--c-accent); background: var(--c-accent-soft); border-radius: 0 var(--radius-sm) var(--radius-sm) 0; }
.entry-content table { width: 100%; border-collapse: collapse; }
.entry-content .alignwide { width: min(100vw - 2 * var(--gutter), 1000px); margin-inline: calc(50% - min(50vw - var(--gutter), 500px)); }
.entry-content .alignfull { width: 100vw; margin-inline: calc(50% - 50vw); }
.entry-content .wp-block-image figcaption, .entry-content figcaption { font-size: .85rem; color: var(--c-muted); text-align: center; }
.entry-footer { margin: 2.5rem 0; padding-top: 1.5rem; border-top: 1px solid var(--c-line); display: flex; flex-wrap: wrap; gap: .5rem; }
.author-box { display: flex; gap: 1rem; align-items: center; background: var(--c-surface); border: 1px solid var(--c-line); border-radius: var(--radius); padding: 1.1rem 1.25rem; margin: 2rem 0; }
.author-box img { border-radius: 50%; }
.author-box p { margin: 0; font-size: .95rem; color: var(--c-muted); }
.related { padding: 3rem 0; background: var(--c-surface); border-top: 1px solid var(--c-line); }

/* Pages Cooked (recettes) */
.cooked-page .entry-content { font-size: 1rem; }
.cooked-recipe-search .cooked-fields-wrap, .cooked-browse-search { border-radius: var(--radius) !important; }

/* Formulaires de compte Cooked (connexion, inscription, soumission) */
.cooked-page #cooked-login, .cooked-page #cooked-registration { max-width: 460px; background: var(--c-surface); border: 1px solid var(--c-line); border-radius: var(--radius); padding: 1.5rem 1.5rem 1.25rem; box-shadow: var(--shadow); }
.cooked-page .cooked-fe-form h2, .cooked-page .cooked-fe-form h3 { font-size: 1.4rem; }
.cooked-page .cooked-fe-form label { font-weight: 600; font-size: .95rem; }
.cooked-page .cooked-fe-form input[type="text"], .cooked-page .cooked-fe-form input[type="email"], .cooked-page .cooked-fe-form input[type="password"], .cooked-page .cooked-fe-form textarea, .cooked-page .cooked-fe-form select { width: 100% !important; max-width: 100%; background: var(--c-bg) !important; border: 1px solid var(--c-line) !important; border-radius: var(--radius-sm) !important; padding: .75rem .9rem !important; font: inherit !important; color: var(--c-ink) !important; box-shadow: none !important; }
.cooked-page .cooked-fe-form input:focus, .cooked-page .cooked-fe-form textarea:focus { outline: none; border-color: var(--c-brand) !important; box-shadow: 0 0 0 3px var(--c-brand-soft) !important; background: #fff !important; }
.cooked-page .cooked-fe-form .cooked-button, .cooked-page .cooked-fe-form input[type="submit"] { background: var(--c-brand) !important; color: #fff !important; border: 0 !important; border-radius: 999px !important; padding: .8rem 1.4rem !important; font: 650 .97rem/1 var(--f-sans) !important; cursor: pointer; }
.cooked-page .cooked-fe-form .cooked-button:hover { background: var(--c-brand-ink) !important; }
.cooked-page .cooked-alert-error { border-radius: var(--radius-sm); border-left: 4px solid var(--c-alert); background: var(--c-alert-bg); color: #7f1d1d; padding: .7rem 1rem; }
.adc-hint { display: block; margin-top: .35rem; font-size: .85rem; color: var(--c-muted); }
.adc-lost { margin: .5rem 0 0; font-size: .92rem; }

/* ===== Commentaires ===== */
.comments { margin: 3rem 0; }
.comment-list { list-style: none; padding: 0; }
.comment-body { background: var(--c-surface); border: 1px solid var(--c-line); border-radius: var(--radius); padding: 1rem 1.25rem; margin-bottom: 1rem; }
.comment-form input:not([type="submit"]):not([type="checkbox"]), .comment-form textarea { width: 100%; padding: .7rem .9rem; border: 1px solid var(--c-line); border-radius: var(--radius-sm); font: inherit; }
.comment-form .submit { background: var(--c-brand); color: #fff; border: 0; padding: .8rem 1.4rem; border-radius: 999px; font-weight: 650; cursor: pointer; }

/* ===== Pied de page ===== */
.site-footer { background: #13281d; color: rgba(255, 255, 255, .78); padding: 3.5rem 0 1.5rem; margin-top: 0; font-size: .95rem; }
.site-footer a { color: #fff; text-decoration: none; }
.site-footer a:hover { text-decoration: underline; }
.footer-grid { display: grid; grid-template-columns: 1.4fr 1fr 1fr 1fr; gap: 2rem; }
.footer-grid h2 { color: #fff; font-size: 1rem; font-family: var(--f-sans); text-transform: uppercase; letter-spacing: .08em; margin-bottom: 1rem; }
.footer-grid ul { list-style: none; margin: 0; padding: 0; display: grid; gap: .45rem; }
.footer-brand .brand { color: #fff; margin-bottom: 1rem; }
.footer-brand .brand__tag { color: rgba(255, 255, 255, .6); }
.footer-bottom { margin-top: 2.5rem; padding-top: 1.25rem; border-top: 1px solid rgba(255, 255, 255, .12); display: flex; flex-wrap: wrap; justify-content: space-between; gap: 1rem; font-size: .85rem; color: rgba(255, 255, 255, .6); }
@media (max-width: 860px) { .footer-grid { grid-template-columns: 1fr 1fr; } .footer-brand { grid-column: 1 / -1; } }

/* ===== 404 / vide ===== */
.empty { text-align: center; padding: 4rem 0; }
.empty h1 { font-size: clamp(2.2rem, 6vw, 4rem); }

/* ===== Impression ===== */
@media print {
	.site-header, .site-footer, .related, .comments, .entry-footer, .cookie-notice-container { display: none !important; }
	body { background: #fff; }
}

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