/* ==========================================================
   Greg Services — styles principaux (mobile first)
   ========================================================== */

:root {
	--site-max: 2200px;
	--section-pad: 56px;
	--green-900: #134a24;
	--green-700: #1d6232;
	--green-500: #3aa856;
	--green-400: #4cbd68;
	--green-50:  #f1f5f0;
	--ink:       #14181a;
	--ink-soft:  #555d60;
	--line:      #e3e8e2;
	--white:     #fff;
	--radius:    10px;
	--shadow:    0 1px 2px rgba(0,0,0,.04), 0 4px 16px rgba(0,0,0,.05);
	--header-h:  72px;
	--font:      "Inter", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
}

*, *::before, *::after { box-sizing: border-box; }

html { scroll-behavior: smooth; scroll-padding-top: calc(var(--header-h) + 12px); }

html { background: #fff; }

body {
	max-width: var(--site-max, 2200px);
	margin: 0 auto;
	position: relative;
	font-family: var(--font);
	font-size: 1rem;
	line-height: 1.6;
	color: var(--ink);
	background: var(--white);
	-webkit-font-smoothing: antialiased;
}

img { max-width: 100%; height: auto; display: block; }
a { color: var(--green-700); }
h1, h2, h3 { line-height: 1.2; margin: 0 0 .5em; }
p { margin: 0 0 1em; }

.container { width: 100%; max-width: 1360px; margin: 0 auto; padding: 0 20px; }

.screen-reader-text {
	position: absolute !important; width: 1px; height: 1px; overflow: hidden;
	clip: rect(1px,1px,1px,1px); white-space: nowrap;
}
.skip-link {
	position: absolute; left: -9999px; top: 8px; z-index: 1000;
	background: var(--green-700); color: #fff; padding: 8px 14px; border-radius: 6px;
}
.skip-link:focus { left: 8px; }

.icon { flex-shrink: 0; }

/* ---------- Boutons ---------- */
.btn {
	display: inline-flex; align-items: center; justify-content: center; gap: .6em;
	min-height: 48px; padding: .7em 1.4em;
	font: 600 1rem/1.2 var(--font);
	border-radius: 8px; border: 2px solid transparent;
	text-decoration: none; cursor: pointer;
	transition: background-color .2s, color .2s, border-color .2s, transform .1s;
}
.btn:active { transform: translateY(1px); }
.btn .icon { width: 22px; height: 22px; }
.btn--primary { background: var(--green-500); color: #fff; }
.btn--primary:hover { background: var(--green-400); }
.btn--dark { background: var(--green-700); color: #fff; }
.btn--dark:hover { background: var(--green-900); }
.btn--ghost { border-color: #fff; color: #fff; background: rgba(0,0,0,.08); }
.btn--ghost:hover { background: #fff; color: var(--green-900); }
.btn--outline { border-color: var(--green-900); color: var(--ink); background: #fff; }
.btn--outline:hover { background: var(--green-900); color: #fff; }
.btn:focus-visible, a:focus-visible, button:focus-visible { outline: 3px solid var(--green-400); outline-offset: 2px; }

/* ---------- En-tête ---------- */
.site-header {
	position: sticky; top: 0; z-index: 100;
	background: #fff; border-bottom: 1px solid var(--line);
}
.admin-bar .site-header { top: 46px; }
@media (min-width: 783px) { .admin-bar .site-header { top: 32px; } }

.site-header__inner {
	display: flex; align-items: center; justify-content: space-between;
	min-height: var(--header-h); gap: 16px;
}

.brand { display: flex; align-items: center; gap: 12px; text-decoration: none; color: var(--ink); min-width: 0; }
.brand__icon { color: var(--green-700); display: flex; }
.brand__icon .icon { width: 44px; height: 44px; stroke-width: 2.2; }
.brand__logo img { max-height: 52px; width: auto; }
.brand__text { display: flex; flex-direction: column; min-width: 0; }
.brand__name { font-weight: 700; font-size: 1.2rem; letter-spacing: -.01em; line-height: 1.15; }
.brand__tagline { font-size: .78rem; color: var(--ink-soft); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }

.nav-toggle {
	display: inline-flex; align-items: center; justify-content: center;
	width: 48px; height: 48px; border: none;
	background: #fff; color: var(--green-900); cursor: pointer;
}
.nav-toggle .icon { width: 26px; height: 26px; }
.nav-toggle__close { display: none; }
.nav-open .nav-toggle__open { display: none; }
.nav-open .nav-toggle__close { display: flex; }

/* Menu mobile : panneau plein écran sous l'en-tête */
.nav {
	position: fixed; left: 0; right: 0; top: var(--header-h); bottom: 0;
	background: #fff; padding: 12px 20px 32px;
	display: flex; flex-direction: column; gap: 20px;
	overflow-y: auto;
	transform: translateX(100%); visibility: hidden;
	transition: transform .25s ease, visibility .25s;
}
.admin-bar .nav { top: calc(var(--header-h) + 46px); }
.nav-open .nav { transform: none; visibility: visible; }
.nav-open { overflow: hidden; }

.nav__list { list-style: none; margin: 0; padding: 0; }
.nav__list li { border-bottom: 1px solid var(--line); }
.nav__list a {
	display: block; padding: 16px 4px; text-decoration: none;
	color: var(--ink); font-size: 1.15rem; font-weight: 500;
}
.nav__list .current-menu-item > a,
.nav__list .current_page_item > a { color: var(--green-700); font-weight: 600; }
/* sous-menus (menus WP + liste de pages) */
.nav__list .children { list-style: none; padding: 0 0 8px 16px; margin: 0; }
.nav__list .children li { border: 0; }
.nav__list .sub-menu { list-style: none; padding: 0 0 8px 16px; margin: 0; }
.nav__list .sub-menu li { border: 0; }
.nav__list .sub-menu a { padding: 8px 4px; font-size: 1rem; }
.nav__phone { width: 100%; font-size: 1.1rem; }

/* ---------- Sections ---------- */
.section { padding: var(--section-pad) 0; }

/* ---------- Pages internes ---------- */
.page-head { background: var(--green-50); padding: 40px 0 32px; }

.page-head .container > * { max-width: 760px; margin-left: 0; margin-right: auto; }
/* Si la page commence par une section pleine largeur, le titre s'aligne sur la largeur « large » */
body:has(.entry-content > .alignfull:first-child) .page-head .container > * { max-width: 1264px; }
.page-head__title { font-size: clamp(1.8rem, 5vw, 2.6rem); font-weight: 800; margin: 0; }
.page-head__meta { color: var(--ink-soft); margin: .5em 0 0; }
.entry-content > * { max-width: 760px; margin-left: 0; margin-right: auto; }
.entry-content > .alignwide { max-width: 1200px; }
.entry-content > .alignfull { max-width: none; width: min(100vw, var(--site-max)); margin-left: calc(50% - min(50vw, var(--site-max) / 2)); margin-right: calc(50% - min(50vw, var(--site-max) / 2)); }
.entry-content > .alignfull:first-child { margin-top: calc(-1 * var(--section-pad)); }
.entry-content > .alignfull:last-child { margin-bottom: calc(-1 * var(--section-pad)); }
.home .page-head { display: none; }
body { overflow-x: hidden; }
.entry-content > * + * { margin-top: 1em; }
.entry-content > .alignfull + .alignfull { margin-top: 0; }
.entry-content h2 { margin-top: 1.6em; }
.entry-thumb { margin-bottom: 28px; }
.entry-thumb img { border-radius: 14px; }

.posts { display: grid; gap: 24px; }
.post-card { background: #fff; border-radius: var(--radius); box-shadow: var(--shadow); overflow: hidden; }
.post-card__img img { width: 100%; aspect-ratio: 16/9; object-fit: cover; }
.post-card__body { padding: 20px; }
.post-card__title { font-size: 1.2rem; }
.post-card__title a { color: var(--ink); text-decoration: none; }
.post-card__meta { color: var(--ink-soft); font-size: .9rem; }
.nav-links { display: flex; gap: 8px; margin-top: 32px; flex-wrap: wrap; }
.page-numbers { padding: 8px 14px; border: 1px solid var(--line); border-radius: 6px; text-decoration: none; }
.page-numbers.current { background: var(--green-700); color: #fff; border-color: var(--green-700); }

/* ---------- Pied de page ---------- */
.site-footer { background: var(--green-900); color: rgba(255,255,255,.85); padding: 40px 0 100px; }
.site-footer a { color: #fff; text-decoration: none; display: inline-flex; align-items: center; gap: .5em; }
.site-footer a:hover { text-decoration: underline; }
.site-footer .icon { width: 18px; height: 18px; }
.site-footer__inner { display: grid; gap: 24px; }
.site-footer__brand { font-weight: 700; font-size: 1.15rem; color: #fff; margin-bottom: .2em; }
.site-footer__nav ul { list-style: none; margin: 0; padding: 0; display: grid; gap: 6px; }
.footer-widget__title { color: #fff; font-size: 1rem; }
.site-footer__bottom { border-top: 1px solid rgba(255,255,255,.15); margin-top: 28px; padding-top: 18px; font-size: .88rem; }
.site-footer__bottom p { margin: 0; }

/* Boutons « Écrire » et « Appeler » (mobile) */
.mobile-actions {
	position: fixed; left: 0; right: 0; bottom: 0; z-index: 90;
	width: 100%;
	display: grid; grid-template-columns: 1fr 1fr; gap: 10px;
	padding: 10px 12px calc(10px + env(safe-area-inset-bottom));
	background: #fff;
	border-top: 1px solid var(--line);
	box-shadow: 0 -6px 20px rgba(0,0,0,.08);
}
.mobile-actions__btn {
	display: flex; align-items: center; justify-content: center; gap: .5em;
	min-height: 50px; border-radius: 4px; text-decoration: none;
	font-weight: 700; font-size: 1.02rem;
}
.mobile-actions__btn .icon { width: 22px; height: 22px; }
.mobile-actions__btn--write { background: #fff; color: var(--green-900); border: 2px solid var(--green-700); }
.mobile-actions__btn--call { background: var(--green-500); color: #fff; }
.mobile-actions__btn:active { transform: translateY(1px); }
.nav-open .mobile-actions { display: none; }

/* ==========================================================
   Tablette ≥ 600px
   ========================================================== */
@media (min-width: 600px) {
	.container { padding: 0 32px; }
	.posts { grid-template-columns: repeat(2, 1fr); }
	.site-footer__inner { grid-template-columns: repeat(2, 1fr); }
}

/* ==========================================================
   Desktop ≥ 1024px
   ========================================================== */
@media (min-width: 1024px) {
    
	:root { --header-h: 84px; }
	.container { padding: 0 48px; }

	.nav-toggle { display: none; }
	.nav {
		position: static; transform: none; visibility: visible;
		flex-direction: row; align-items: center; gap: 24px;
		padding: 0; background: none; overflow: visible;
	}
	.nav__list { display: flex; gap: 2px; }
	.nav__list li { border: 0; position: relative; }
	.nav__list > li > a {
		padding: 8px 12px; font-size: .97rem; position: relative; white-space: nowrap;
	}
	.nav__list > li > a:hover { color: var(--green-700); }
	.nav__list > .current-menu-item > a::after,
	.nav__list > .current_page_item > a::after {
		content: ""; position: absolute; left: 12px; right: 12px; bottom: -4px;
		height: 3px; background: var(--green-700); border-radius: 2px;
	}
	.nav__list .sub-menu, .nav__list .children {
		position: absolute; top: 100%; left: 0; min-width: 220px; padding: 8px;
		background: #fff; border-radius: 8px; box-shadow: var(--shadow);
		opacity: 0; visibility: hidden; transform: translateY(6px); transition: .2s;
	}
	.nav__list li:hover > .sub-menu, .nav__list li:hover > .children,
	.nav__list li:focus-within > .sub-menu, .nav__list li:focus-within > .children { opacity: 1; visibility: visible; transform: none; }
	.nav__phone { width: auto; font-size: 1.02rem; padding: .7em 1.2em; white-space: nowrap; }
	.brand { flex-shrink: 1; }
	.nav { flex-shrink: 0; }
}

/* Écrans moyens : menu plus compact, slogan masqué, numéro réduit à l'icône si besoin */
@media (min-width: 1024px) and (max-width: 1279px) {
	.brand__tagline { display: none; }
	.nav { gap: 14px; }
	.nav__list > li > a { padding: 8px 9px; font-size: .93rem; }
	.nav__list > .current-menu-item > a::after,
	.nav__list > .current_page_item > a::after { left: 9px; right: 9px; }
	.nav__phone { padding: .7em .9em; }
	.nav__phone span { display: none; }
}

@media (min-width: 1024px) {



	.posts { grid-template-columns: repeat(3, 1fr); }
	:root { --section-pad: 80px; }

	.site-footer { padding-bottom: 32px; }
	.site-footer__inner { grid-template-columns: repeat(4, 1fr); }
	.mobile-actions { display: none; }
}

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

/* Écrans très larges : site centré, bords blancs */
@media (min-width: 2201px) {
	body { box-shadow: 0 0 0 1px #eceeed, 0 0 60px rgba(0,0,0,.04); }
}

