/*
Theme Name: Trattoria
Theme URI: https://resto.tiktakweb.com/
Author: TikTak Web
Description: Thème sur mesure pour restaurant italien : brun noyer sur papier crème, typographie serrée, photographie au premier plan. Conçu pour fonctionner avec l'extension Trattoria Core (carte, réservations, contact).
Version: 1.0.0
Requires at least: 6.4
Tested up to: 6.8
Requires PHP: 8.1
License: GNU General Public License v2 or later
License URI: https://www.gnu.org/licenses/gpl-2.0.html
Text Domain: trattoria
*/

/* ==========================================================================
   1. Fonts (Inter, SIL OFL 1.1 — self-hosted, no third-party request)
   ========================================================================== */
@font-face { font-family: "Inter"; src: url("assets/fonts/Inter-Regular.woff") format("woff"); font-weight: 400; font-style: normal; font-display: swap; }
@font-face { font-family: "Inter"; src: url("assets/fonts/Inter-Medium.woff") format("woff"); font-weight: 500; font-style: normal; font-display: swap; }
@font-face { font-family: "Inter"; src: url("assets/fonts/Inter-SemiBold.woff") format("woff"); font-weight: 600; font-style: normal; font-display: swap; }
@font-face { font-family: "Inter Display"; src: url("assets/fonts/InterDisplay-Medium.woff") format("woff"); font-weight: 500; font-style: normal; font-display: swap; }
@font-face { font-family: "Inter Display"; src: url("assets/fonts/InterDisplay-SemiBold.woff") format("woff"); font-weight: 600; font-style: normal; font-display: swap; }

/* ==========================================================================
   2. Design tokens (from the style reference)
   ========================================================================== */
:root {
	--color-walnut: #321e1e;
	--color-linen: #f4f1e0;
	--color-graphite: #464545;
	--color-espresso: #463938;
	--color-onyx: #000000;
	--color-soft-sand: #f4f4f4;
	--color-line: rgba(50, 30, 30, 0.18);
	--color-line-on-dark: rgba(244, 241, 224, 0.24);

	--font-text: "Inter", ui-sans-serif, system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
	--font-display: "Inter Display", "Inter", ui-sans-serif, system-ui, sans-serif;

	--text-caption: 14px;   --leading-caption: 1.71;
	--text-body-sm: 16px;   --leading-body-sm: 1.5;
	--text-body: 18px;      --leading-body: 1.44;
	--text-subheading: 21px; --leading-subheading: 1.33;
	--text-heading-sm: 28px; --leading-heading-sm: 1.3;
	--text-heading: 32px;   --leading-heading: 1.3;
	--text-heading-lg: 45px; --leading-heading-lg: 1.15;
	--text-display: 70px;   --leading-display: 1;
	--tracking-tight: -0.02em;
	--tracking-lg: -0.047em;
	--tracking-display: -0.05em;

	--spacing-8: 8px; --spacing-12: 12px; --spacing-16: 16px; --spacing-20: 20px; --spacing-56: 56px; --spacing-80: 80px;
	--section-gap: 120px;
	--page-max-width: 1200px;
	--gutter: 20px;
	--header-h: 60px;

	--radius-md: 4px;
	--radius-lg: 8px;
	--shadow-sm: rgba(0, 0, 0, 0.1) 0px 2px 8px 0px;
	--shadow-sm-2: rgba(0, 0, 0, 0.15) 0px 2px 8px 0px;
}
@media (max-width: 899px) {
	:root {
		--text-display: 44px;
		--text-heading-lg: 34px;
		--text-heading: 28px;
		--text-heading-sm: 24px;
		--text-body: 17px;
		--section-gap: 80px;
		--gutter: 16px;
		--header-h: 56px;
	}
}

/* ==========================================================================
   3. Base
   ========================================================================== */
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-padding-top: calc(var(--header-h) + 16px); }
body {
	margin: 0;
	background: var(--color-linen);
	color: var(--color-walnut);
	font-family: var(--font-text);
	font-size: var(--text-body-sm);
	line-height: var(--leading-body-sm);
	letter-spacing: var(--tracking-tight);
	font-feature-settings: "ss01" 1;
	-webkit-font-smoothing: antialiased;
	text-rendering: optimizeLegibility;
	overflow-x: clip;
}
img, svg, video, iframe { max-width: 100%; }
img { height: auto; display: block; }
a { color: inherit; text-decoration-thickness: 1px; text-underline-offset: 4px; }
a:hover { text-decoration-thickness: 2px; }
:focus-visible { outline: 2px solid currentColor; outline-offset: 3px; }
p { margin: 0 0 1em; }
h1, h2, h3, h4 { margin: 0; font-weight: 500; letter-spacing: var(--tracking-tight); }
hr { border: 0; border-top: 1px solid var(--color-line); margin: 0; }
::selection { background: var(--color-walnut); color: var(--color-linen); }
.screen-reader-text { border: 0; clip: rect(1px, 1px, 1px, 1px); clip-path: inset(50%); height: 1px; margin: -1px; overflow: hidden; padding: 0; position: absolute !important; width: 1px; word-wrap: normal !important; }
.skip-link:focus { clip: auto; clip-path: none; height: auto; width: auto; z-index: 1000; left: 16px; top: 16px; padding: 12px 20px; background: var(--color-linen); color: var(--color-walnut); border-radius: var(--radius-md); }

.container { width: 100%; max-width: calc(var(--page-max-width) + 2 * var(--gutter)); margin: 0 auto; padding: 0 var(--gutter); }
.section { padding: var(--section-gap) 0; }
.section + .section { padding-top: 0; }

/* Type helpers */
.t-display { font-family: var(--font-display); font-size: var(--text-display); line-height: var(--leading-display); letter-spacing: var(--tracking-display); font-weight: 600; }
.t-heading-lg { font-family: var(--font-display); font-size: var(--text-heading-lg); line-height: var(--leading-heading-lg); letter-spacing: var(--tracking-lg); font-weight: 500; }
.t-heading { font-family: var(--font-display); font-size: var(--text-heading); line-height: var(--leading-heading); letter-spacing: -0.021em; font-weight: 500; }
.t-heading-sm { font-size: var(--text-heading-sm); line-height: var(--leading-heading-sm); font-weight: 500; }
.t-sub { font-size: var(--text-subheading); line-height: var(--leading-subheading); font-weight: 500; }
.t-body { font-size: var(--text-body); line-height: var(--leading-body); }
.t-caption { font-size: var(--text-caption); line-height: var(--leading-caption); }
.kicker { display: block; margin: 0 0 var(--spacing-12); font-size: var(--text-caption); line-height: var(--leading-caption); font-weight: 500; text-transform: uppercase; color: var(--color-graphite); }
.on-dark .kicker { color: var(--color-linen); opacity: .72; }
.section-header { display: flex; align-items: baseline; justify-content: space-between; gap: 20px; margin-bottom: var(--spacing-20); padding-bottom: var(--spacing-12); border-bottom: 1px solid var(--color-walnut); }
.section-header h2 { font-size: var(--text-subheading); line-height: var(--leading-subheading); font-weight: 500; text-transform: uppercase; }
.section-header a { font-size: var(--text-caption); font-weight: 500; text-transform: uppercase; text-decoration: none; }
.section-header a:hover { text-decoration: underline; }

/* ==========================================================================
   4. Buttons
   ========================================================================== */
.btn {
	display: inline-flex; align-items: center; justify-content: center; gap: 10px;
	min-height: 48px; padding: 12px 30px;
	border: 1px solid var(--color-walnut); border-radius: var(--radius-md);
	background: var(--color-walnut); color: var(--color-linen);
	font: inherit; font-size: var(--text-body-sm); font-weight: 500; line-height: 1.2;
	letter-spacing: var(--tracking-tight); text-transform: uppercase; text-decoration: none;
	box-shadow: var(--shadow-sm-2); cursor: pointer;
}
.btn:hover { text-decoration: underline; text-decoration-thickness: 1px; text-underline-offset: 4px; }
.btn--ghost { background: transparent; border-color: var(--color-linen); color: var(--color-linen); box-shadow: none; padding: 12px 24px; }
.btn--ghost-dark { background: transparent; color: var(--color-walnut); box-shadow: none; }
.btn--light { background: var(--color-linen); border-color: var(--color-linen); color: var(--color-walnut); }
.btn-row { display: flex; flex-wrap: wrap; gap: 12px; }

/* ==========================================================================
   5. Demo band & header
   ========================================================================== */
.demo-band { background: var(--color-espresso); color: var(--color-linen); font-size: 13px; text-align: center; padding: 6px var(--gutter); }

.site-header { position: sticky; top: 0; z-index: 50; background: var(--color-walnut); color: var(--color-linen); }
.admin-bar .site-header { top: 32px; }
@media (max-width: 782px) { .admin-bar .site-header { top: 0; } }
.site-header__inner { display: grid; grid-template-columns: 1fr auto 1fr; align-items: center; height: var(--header-h); }
.brand { justify-self: center; display: inline-flex; align-items: center; gap: 10px; color: var(--color-linen); text-decoration: none; font-weight: 600; font-size: 18px; letter-spacing: var(--tracking-tight); text-transform: uppercase; white-space: nowrap; }
.brand img { max-height: 36px; width: auto; }
.brand svg { flex: none; }
.nav-primary ul { display: flex; gap: 28px; list-style: none; margin: 0; padding: 0; }
.nav-primary a { color: var(--color-linen); text-decoration: none; font-size: var(--text-caption); font-weight: 500; text-transform: uppercase; padding: 8px 0; text-underline-offset: 8px; }
.nav-primary a:hover, .nav-primary .current-menu-item > a, .nav-primary .current_page_item > a, .nav-primary a[aria-current="page"] { text-decoration: underline; }
.header-actions { justify-self: end; display: flex; align-items: center; gap: 20px; }
.header-actions .phone-link { color: var(--color-linen); font-size: var(--text-caption); font-weight: 500; text-decoration: none; font-variant-numeric: tabular-nums; }
.header-actions .phone-link:hover { text-decoration: underline; }
.header-actions .btn { min-height: 38px; padding: 8px 18px; font-size: var(--text-caption); }
.menu-toggle { display: none; justify-self: start; align-items: center; justify-content: center; width: 44px; height: 44px; margin-left: -10px; background: none; border: 0; color: var(--color-linen); cursor: pointer; }

@media (max-width: 999px) {
	.nav-primary, .header-actions .phone-link { display: none; }
	.menu-toggle { display: inline-flex; }
}
@media (max-width: 420px) {
	.brand { font-size: 16px; }
	.header-actions .btn { padding: 8px 12px; }
}

/* Mobile menu panel */
.mobile-nav { position: fixed; inset: var(--header-h) 0 0 0; z-index: 49; background: var(--color-walnut); color: var(--color-linen); padding: 24px var(--gutter) 40px; overflow-y: auto; }
.admin-bar .mobile-nav { top: calc(var(--header-h) + 46px); }
.mobile-nav[hidden] { display: none; }
.mobile-nav ul { list-style: none; margin: 0 0 32px; padding: 0; }
.mobile-nav li { border-bottom: 1px solid var(--color-line-on-dark); }
.mobile-nav a { display: block; padding: 18px 0; color: var(--color-linen); text-decoration: none; font-family: var(--font-display); font-size: var(--text-heading-sm); font-weight: 500; }
.mobile-nav .mobile-nav__contact { font-size: var(--text-body-sm); line-height: 2; }
.mobile-nav .mobile-nav__contact a { display: inline; padding: 0; font: inherit; text-decoration: underline; }
body.nav-open { overflow: hidden; }

/* ==========================================================================
   6. Hero
   ========================================================================== */
.hero { position: relative; display: grid; min-height: min(calc(100svh - var(--header-h)), 860px); background: var(--color-walnut); color: var(--color-linen); overflow: hidden; }
.hero__media { position: absolute; inset: 0; }
.hero__media img { width: 100%; height: 100%; object-fit: cover; }
.hero__inner { position: relative; display: flex; align-items: flex-end; padding-top: 80px; padding-bottom: var(--spacing-56); }
.hero__panel { max-width: 640px; padding: 40px 40px 36px; background: var(--color-walnut); border-radius: 0; }
.hero:not(.has-image) { min-height: min(calc(78svh - var(--header-h)), 720px); }
.hero:not(.has-image) .hero__panel { padding: 0; max-width: 900px; }
.hero__title { font-family: var(--font-display); font-size: clamp(48px, 9vw, 112px); line-height: .95; letter-spacing: var(--tracking-display); font-weight: 600; text-transform: uppercase; margin: 0 0 var(--spacing-20); overflow-wrap: anywhere; }
.hero.has-image .hero__title { font-size: clamp(44px, 6.5vw, 70px); }
.hero__lead { font-size: var(--text-body); line-height: var(--leading-body); max-width: 34em; margin: 0 0 28px; }
@media (max-width: 599px) {
	.hero { min-height: auto; }
	.hero.has-image { min-height: calc(100svh - var(--header-h) - 64px); }
	.hero__inner { padding-bottom: 0; padding-left: 0; padding-right: 0; }
	.hero.has-image .hero__inner { align-items: flex-end; }
	.hero__panel { padding: 28px var(--gutter) 32px; max-width: none; width: 100%; }
	.hero:not(.has-image) .hero__panel { padding: 24px var(--gutter) 40px; }
	.hero .btn-row .btn { flex: 1 1 auto; }
}

/* ==========================================================================
   7. Home sections
   ========================================================================== */
.split { display: grid; gap: var(--spacing-56); align-items: center; }
@media (min-width: 900px) { .split { grid-template-columns: 1fr 1fr; gap: var(--spacing-80); } }
.split__media { border-radius: var(--radius-lg); overflow: hidden; background: var(--color-soft-sand); }
.split__media img { width: 100%; aspect-ratio: 4 / 5; object-fit: cover; }
.split__text h2 { margin-bottom: var(--spacing-20); }
.split__text p { font-size: var(--text-body); line-height: var(--leading-body); max-width: 32em; }
.split--text-only { grid-template-columns: 1fr; }
@media (min-width: 900px) { .split--text-only { grid-template-columns: 5fr 7fr; align-items: start; } }

.cards { display: grid; gap: var(--spacing-20); grid-template-columns: 1fr; }
@media (min-width: 640px) { .cards { grid-template-columns: repeat(2, 1fr); } }
@media (min-width: 900px) { .cards { grid-template-columns: repeat(3, 1fr); } }
.card { display: flex; flex-direction: column; background: var(--color-soft-sand); border-radius: var(--radius-lg); box-shadow: var(--shadow-sm); overflow: hidden; color: inherit; text-decoration: none; }
.card__media img { width: 100%; aspect-ratio: 4 / 3; object-fit: cover; }
.card__body { display: flex; flex-direction: column; gap: 6px; padding: var(--spacing-20); flex: 1; }
.card__title { font-size: var(--text-subheading); line-height: var(--leading-subheading); font-weight: 500; }
.card__text { color: var(--color-graphite); margin: 0; flex: 1; }
.card__link { margin-top: var(--spacing-12); font-size: var(--text-caption); font-weight: 500; text-transform: uppercase; text-decoration: underline; }
a.card:hover .card__title { text-decoration: underline; }

.dark-feature { background: var(--color-walnut); color: var(--color-linen); padding: var(--spacing-80) 0; }
@media (min-width: 900px) { .dark-feature { padding: 100px 0; } }
.dark-feature .split__media { background: var(--color-espresso); }
.dark-feature h2 { color: var(--color-linen); }

.cta-band { text-align: left; }
.cta-band__inner { display: grid; gap: var(--spacing-20); align-items: end; padding: var(--spacing-56) 0; border-top: 1px solid var(--color-walnut); border-bottom: 1px solid var(--color-walnut); }
@media (min-width: 900px) { .cta-band__inner { grid-template-columns: 1fr auto; gap: var(--spacing-80); } }
.cta-band p { font-size: var(--text-body); max-width: 36em; margin: var(--spacing-12) 0 0; color: var(--color-graphite); }

.infos { display: grid; gap: var(--spacing-56); }
@media (min-width: 900px) { .infos { grid-template-columns: repeat(3, 1fr); gap: var(--spacing-20); } }
.infos h3 { font-size: var(--text-caption); font-weight: 500; text-transform: uppercase; color: var(--color-graphite); margin: 0 0 var(--spacing-12); }
.infos p, .infos li { font-size: var(--text-body); line-height: var(--leading-body); }
.infos ul { list-style: none; margin: 0; padding: 0; }
.infos .trc-hours > div { padding: 6px 0; font-size: var(--text-body-sm); }

/* ==========================================================================
   8. Inner pages
   ========================================================================== */
.page-hero { padding: var(--spacing-80) 0 var(--spacing-56); }
.page-hero__title { font-family: var(--font-display); font-size: var(--text-display); line-height: var(--leading-display); letter-spacing: var(--tracking-display); font-weight: 600; text-transform: uppercase; overflow-wrap: anywhere; }
.page-hero__lead { margin: var(--spacing-20) 0 0; font-size: var(--text-body); max-width: 36em; color: var(--color-graphite); }
.page-hero + .page-body { padding-top: 0; }
.page-body { padding-bottom: var(--section-gap); }
.page-hero--rule .container::after { content: ""; display: block; margin-top: var(--spacing-56); border-bottom: 1px solid var(--color-walnut); }
.page-hero--rule { padding-bottom: var(--spacing-56); }
.page-featured { margin-bottom: var(--spacing-80); }
.page-featured img { width: 100%; max-height: 640px; object-fit: cover; border-radius: var(--radius-lg); }

/* Editorial content (Gutenberg) */
.entry { font-size: var(--text-body); line-height: var(--leading-body); }
.entry > * { max-width: 760px; }
.entry > .alignwide { max-width: var(--page-max-width); }
.entry > .alignfull { max-width: none; margin-left: calc(50% - 50vw); margin-right: calc(50% - 50vw); }
.entry > h2 { font-family: var(--font-display); font-size: var(--text-heading); line-height: var(--leading-heading); letter-spacing: -0.021em; margin: var(--spacing-56) 0 var(--spacing-16); padding-top: var(--spacing-20); border-top: 1px solid var(--color-line); }
.entry > h3 { font-size: var(--text-subheading); line-height: var(--leading-subheading); margin: var(--spacing-56) 0 var(--spacing-12); }
.entry .lead, .entry .is-style-lead { font-family: var(--font-display); font-size: var(--text-heading-sm); line-height: var(--leading-heading-sm); }
.entry > ul, .entry > ol { padding-left: 1.2em; }
.entry > figure { margin: var(--spacing-56) 0; }
.entry figure img { border-radius: var(--radius-lg); }
.entry figcaption { font-size: var(--text-caption); color: var(--color-graphite); margin-top: var(--spacing-8); }
.entry .wp-block-columns { gap: var(--spacing-56); }
.entry .wp-block-button__link { display: inline-flex; min-height: 48px; padding: 12px 30px; border-radius: var(--radius-md); background: var(--color-walnut); color: var(--color-linen); font-size: var(--text-body-sm); font-weight: 500; text-transform: uppercase; text-decoration: none; box-shadow: var(--shadow-sm-2); }
.entry .is-style-outline .wp-block-button__link { background: transparent; color: var(--color-walnut); border: 1px solid var(--color-walnut); box-shadow: none; }
.entry .has-walnut-background-color { color: var(--color-linen); }
.entry blockquote { margin: var(--spacing-56) 0; padding: 0 0 0 var(--spacing-20); border-left: 1px solid var(--color-walnut); font-family: var(--font-display); font-size: var(--text-heading-sm); line-height: var(--leading-heading-sm); }
.entry > table { border-collapse: collapse; width: 100%; }
.entry td, .entry th { border-bottom: 1px solid var(--color-line); padding: 10px 0; text-align: left; }
.entry > .trc-menu-nav, .entry > .trc-menu, .entry > .trc-contact, .entry > .trc-map, .entry > .trc-menu-note { max-width: none; }

/* ==========================================================================
   9. Footer
   ========================================================================== */
.site-footer { padding-top: var(--spacing-80); }
.footer-grid { display: grid; gap: var(--spacing-56); padding-bottom: var(--spacing-56); }
@media (min-width: 900px) { .footer-grid { grid-template-columns: 1fr 1.6fr 1fr 1fr; gap: var(--spacing-20) 40px; } }
.trc-hours dd { white-space: nowrap; }
.footer-col h2 { font-size: var(--text-caption); font-weight: 500; text-transform: uppercase; color: var(--color-graphite); margin: 0 0 var(--spacing-12); }
.footer-links { list-style: none; margin: 0; padding: 0; }
.footer-links li { border-top: 1px solid var(--color-graphite); }
.footer-links li:last-child { border-bottom: 1px solid var(--color-graphite); }
.footer-links a, .footer-links span { display: block; padding: 10px 0; font-size: var(--text-body-sm); line-height: 1.6; text-decoration: none; }
.footer-links a:hover { text-decoration: underline; }
.footer-col .trc-hours > div { padding: 8px 0; border-color: var(--color-graphite); font-size: 15px; }
.footer-col .trc-socials { margin-top: var(--spacing-20); }
.footer-meta { display: flex; flex-wrap: wrap; gap: 8px 20px; justify-content: space-between; padding: var(--spacing-20) 0; font-size: var(--text-caption); color: var(--color-graphite); border-top: 1px solid var(--color-walnut); }
.footer-meta a { text-decoration: none; }
.footer-meta a:hover { text-decoration: underline; }
.wordmark { display: block; width: 100%; padding: 0 var(--gutter); margin: 0 0 -0.08em; overflow: hidden; color: var(--color-walnut); font-family: var(--font-display); font-weight: 600; font-size: 14vw; line-height: .82; letter-spacing: var(--tracking-display); text-transform: uppercase; white-space: nowrap; user-select: none; }
.wordmark span { display: inline-block; transform-origin: left bottom; }

/* ==========================================================================
   10. Mobile sticky actions
   ========================================================================== */
.sticky-actions { position: fixed; left: 0; right: 0; bottom: 0; z-index: 40; display: none; gap: 8px; padding: 10px var(--gutter) calc(10px + env(safe-area-inset-bottom)); background: var(--color-linen); border-top: 1px solid var(--color-walnut); }
.sticky-actions .btn { flex: 1; min-height: 48px; padding: 10px 12px; font-size: var(--text-caption); }
@media (max-width: 899px) {
	.sticky-actions { display: flex; }
	body.has-sticky-actions { padding-bottom: calc(72px + env(safe-area-inset-bottom)); }
}

/* ==========================================================================
   11. Misc
   ========================================================================== */
.not-found { padding: var(--section-gap) 0; }
.posts-list { list-style: none; margin: 0; padding: 0; }
.posts-list li { border-top: 1px solid var(--color-line); padding: var(--spacing-20) 0; }
.js .reveal { opacity: 0; transform: translateY(16px); transition: opacity .6s ease, transform .6s ease; }
.js .reveal.is-visible { opacity: 1; transform: none; }
@media (prefers-reduced-motion: reduce) {
	*, *::before, *::after { animation-duration: .01ms !important; transition-duration: .01ms !important; scroll-behavior: auto !important; }
	.js .reveal { opacity: 1; transform: none; }
}
@media print {
	.site-header, .sticky-actions, .wordmark, .demo-band, .trc-menu-nav { display: none !important; }
	body { background: #fff; }
}
