/* =====================================================================
   SOLOGNE IMMOBILIER — Magazine (Actualités, catégories, articles)
   S'appuie sur les variables et composants « .smg » du CSS additionnel.
   ===================================================================== */

/* Le conteneur .smg masque ses débordements ; ici on autorise le sommaire collant */
.smg.smg-mag { overflow: visible; overflow-x: clip; }
.smg-mag .smg-mag-wrap { max-width: var(--smg-max); margin: 0 auto; padding: 0 var(--smg-pad); }
.smg-mag .screen-reader-text { position: absolute !important; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0, 0, 0, 0); white-space: nowrap; border: 0; }

/* ---------- En-tête ---------- */
.smg-mag .smg-mag-hero { background: var(--smg-forest); color: var(--smg-ivory); padding: 200px 0 clamp(48px, 6vw, 72px); }
.smg-mag .smg-mag-hero h1 { color: var(--smg-ivory); font-size: clamp(36px, 5vw, 60px); line-height: 1.08; max-width: 20ch; margin: 0 0 .4em; }
.smg-mag .smg-mag-hero .smg-kicker { color: var(--smg-sand); margin-bottom: 1.1em; }
.smg-mag .smg-mag-hero .smg-kicker a { color: inherit; text-decoration: none; }
.smg-mag .smg-mag-hero .smg-kicker a:hover { color: var(--smg-ivory); }
.smg-mag .smg-mag-hero__intro { max-width: 46em; }
.smg-mag .smg-mag-hero__intro p { margin: 0; font-family: var(--smg-serif); font-style: italic; font-size: clamp(17px, 1.5vw, 20px); line-height: 1.6; color: rgba(246, 242, 234, .86); }
.smg-mag .smg-mag-hero__intro p + p { margin-top: .8em; }

/* Fil d'Ariane */
.smg-mag .smg-mag-crumbs { margin: 0 0 28px; font-size: 12.5px; letter-spacing: .04em; color: rgba(246, 242, 234, .62); }
.smg-mag .smg-mag-crumbs a { color: var(--smg-sand); text-decoration: none; }
.smg-mag .smg-mag-crumbs a:hover { color: var(--smg-ivory); text-decoration: underline; }
.smg-mag .smg-mag-crumbs span { color: inherit; }
.smg-mag .smg-mag-crumbs .breadcrumb_last { color: rgba(246, 242, 234, .62); }

/* ---------- Barre filtres + recherche ---------- */
.smg-mag .smg-mag-toolbar { background: var(--smg-ivory); border-bottom: 1px solid var(--smg-line); }
.smg-mag .smg-mag-toolbar__inner { display: flex; align-items: center; justify-content: space-between; gap: 20px 32px; padding-top: 22px; padding-bottom: 22px; }
.smg-mag .smg-mag-filters { min-width: 0; }
.smg-mag .smg-mag-filters ul { display: flex; flex-wrap: wrap; gap: 8px; list-style: none; margin: 0; padding: 0; }
.smg-mag .smg-mag-filters li { margin: 0; }
.smg-mag .smg-mag-filters a { display: inline-block; padding: 9px 16px; border: 1px solid var(--smg-line); font-size: 11.5px; font-weight: 700; letter-spacing: .14em; text-transform: uppercase; line-height: 1.3; color: var(--smg-ink); text-decoration: none; white-space: nowrap; transition: background .2s ease, color .2s ease, border-color .2s ease; }
.smg-mag .smg-mag-filters a:hover { border-color: var(--smg-gold); color: var(--smg-forest); }
.smg-mag .smg-mag-filters a.is-active { background: var(--smg-forest); border-color: var(--smg-forest); color: var(--smg-ivory); }
.smg-mag .smg-mag-search { display: flex; flex: 0 0 auto; width: 320px; max-width: 100%; border: 1px solid var(--smg-line); background: #fff; }
.smg-mag .smg-mag-search input[type="search"] { flex: 1 1 auto; min-width: 0; height: 44px; margin: 0; padding: 0 14px; border: 0; background: transparent; font: inherit; font-size: 15px; color: var(--smg-ink); box-shadow: none; }
.smg-mag .smg-mag-search input[type="search"]:focus { outline: none; }
.smg-mag .smg-mag-search:focus-within { border-color: var(--smg-gold); }
.smg-mag .smg-mag-search button { flex: none; height: 44px; margin: 0; padding: 0 16px; border: 0; border-left: 1px solid var(--smg-line); background: transparent; font-family: var(--smg-sans); font-size: 11.5px; font-weight: 700; letter-spacing: .14em; text-transform: uppercase; color: var(--smg-forest); cursor: pointer; }
.smg-mag .smg-mag-search button:hover { background: var(--smg-forest); color: var(--smg-ivory); }

/* ---------- Liste d'articles ---------- */
.smg-mag .smg-mag-list { padding: clamp(48px, 7vw, 88px) 0; }
.smg-mag .smg-mag-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: clamp(40px, 5vw, 64px) clamp(24px, 3vw, 40px); }

.smg-mag .smg-mag-card { display: flex; flex-direction: column; margin: 0; }
.smg-mag .smg-mag-card__media { display: block; aspect-ratio: 3 / 2; overflow: hidden; background: var(--smg-beige); margin-bottom: 22px; }
.smg-mag .smg-mag-card__media img, .smg-mag .smg-mag-noimg { display: block; width: 100%; height: 100%; object-fit: cover; transition: transform .6s ease; }
.smg-mag .smg-mag-card:hover .smg-mag-card__media img { transform: scale(1.03); }
.smg-mag .smg-mag-card__meta { display: flex; flex-wrap: wrap; align-items: center; gap: 4px 14px; margin: 0 0 12px; font-size: 12.5px; line-height: 1.4; color: var(--smg-muted); }
.smg-mag .smg-mag-card__meta > * + *::before { content: "·"; margin-right: 14px; color: var(--smg-gold); }
.smg-mag .smg-mag-card__cat { font-size: 11.5px; font-weight: 700; letter-spacing: .16em; text-transform: uppercase; color: var(--smg-gold); text-decoration: none; }
.smg-mag .smg-mag-card__cat:hover { color: var(--smg-forest); }
.smg-mag .smg-mag-card__meta > .smg-mag-card__cat { flex-basis: 100%; }
.smg-mag .smg-mag-card__meta > .smg-mag-card__cat + *::before { content: none; margin: 0; }
.smg-mag .smg-mag-card__title { font-size: clamp(21px, 1.8vw, 25px); line-height: 1.28; margin: 0 0 12px; }
.smg-mag .smg-mag-card__title a { color: var(--smg-ink); text-decoration: none; background-image: linear-gradient(var(--smg-gold), var(--smg-gold)); background-size: 0 1px; background-position: 0 100%; background-repeat: no-repeat; transition: background-size .35s ease; }
.smg-mag .smg-mag-card__title a:hover { background-size: 100% 1px; }
.smg-mag .smg-mag-card__excerpt { margin: 0 0 18px; font-size: 15.5px; line-height: 1.65; color: var(--smg-muted); }
.smg-mag .smg-mag-card__more { align-self: flex-start; margin-top: auto; padding-bottom: 3px; border-bottom: 1px solid var(--smg-gold); font-size: 11.5px; font-weight: 700; letter-spacing: .16em; text-transform: uppercase; color: var(--smg-forest); text-decoration: none; }
.smg-mag .smg-mag-card__more::after { content: " →"; }
.smg-mag .smg-mag-card__more:hover { color: var(--smg-gold); }
.smg-mag .smg-mag-card__flag { margin: 0 0 14px; font-size: 11.5px; font-weight: 700; letter-spacing: .2em; text-transform: uppercase; color: var(--smg-gold); }

/* Article à la une */
.smg-mag .smg-mag-card--featured { display: grid; grid-template-columns: minmax(0, 7fr) minmax(0, 5fr); gap: clamp(28px, 4vw, 56px); align-items: center; padding-bottom: clamp(48px, 6vw, 72px); margin-bottom: clamp(48px, 6vw, 72px); border-bottom: 1px solid var(--smg-line); }
.smg-mag .smg-mag-card--featured .smg-mag-card__media { margin: 0; }
.smg-mag .smg-mag-card--featured .smg-mag-card__title { font-size: clamp(28px, 3.2vw, 40px); line-height: 1.15; }
.smg-mag .smg-mag-card--featured .smg-mag-card__excerpt { font-size: 17px; }

/* Pagination (liens /page/2/ explorables par les moteurs) */
.smg-mag .smg-mag-pagination { margin-top: clamp(56px, 7vw, 88px); }
.smg-mag .smg-mag-pagination .nav-links { display: flex; flex-wrap: wrap; justify-content: center; gap: 8px; }
.smg-mag .smg-mag-pagination .page-numbers { display: inline-flex; align-items: center; justify-content: center; min-width: 44px; height: 44px; padding: 0 14px; border: 1px solid var(--smg-line); font-size: 13px; font-weight: 700; letter-spacing: .08em; color: var(--smg-ink); text-decoration: none; }
.smg-mag .smg-mag-pagination .page-numbers.current { background: var(--smg-forest); border-color: var(--smg-forest); color: var(--smg-ivory); }
.smg-mag .smg-mag-pagination a.page-numbers:hover { border-color: var(--smg-gold); color: var(--smg-forest); }
.smg-mag .smg-mag-pagination .dots { border: 0; }
.smg-mag .smg-mag-empty { text-align: center; color: var(--smg-muted); }

/* Boutons */
.smg-mag .smg-mag-btn { display: inline-flex; align-items: center; justify-content: center; min-height: 50px; padding: 15px 26px; border: 1px solid var(--smg-forest); background: var(--smg-forest); color: var(--smg-ivory); font-family: var(--smg-sans); font-size: 12.5px; font-weight: 700; letter-spacing: .14em; text-transform: uppercase; line-height: 1.3; text-align: center; text-decoration: none; transition: background .3s ease, color .3s ease, border-color .3s ease; }
.smg-mag .smg-mag-btn:hover { background: var(--smg-gold); border-color: var(--smg-gold); color: #fff; }
.smg-mag .smg-mag-btn--ghost { background: transparent; color: var(--smg-forest); }

/* Bandeau de fin de page */
.smg-mag .smg-mag-band { background: var(--smg-beige); padding: clamp(56px, 8vw, 96px) 0; }
.smg-mag .smg-mag-band__inner { display: grid; grid-template-columns: minmax(0, 1.4fr) minmax(0, 1fr); gap: 32px 64px; align-items: center; }
.smg-mag .smg-mag-band h2 { font-size: clamp(28px, 3.4vw, 42px); margin-bottom: .5em; }
.smg-mag .smg-mag-band p:not(.smg-kicker) { margin: 0; color: var(--smg-muted); max-width: 36em; }
.smg-mag .smg-mag-band__actions { display: flex; flex-direction: column; gap: 12px; }

/* ---------- Article ---------- */
.smg-mag .smg-mag-hero--article h1 { font-size: clamp(32px, 4.4vw, 54px); max-width: 24ch; }
.smg-mag .smg-mag-chapo { max-width: 44em; margin: 0 0 28px; font-family: var(--smg-serif); font-style: italic; font-size: clamp(18px, 1.6vw, 21px); line-height: 1.55; color: rgba(246, 242, 234, .88); }
.smg-mag .smg-mag-meta { display: flex; flex-wrap: wrap; gap: 6px 22px; list-style: none; margin: 0; padding: 22px 0 0; border-top: 1px solid rgba(246, 242, 234, .2); font-size: 13px; letter-spacing: .03em; color: rgba(246, 242, 234, .72); }
.smg-mag .smg-mag-meta li { margin: 0; }

.smg-mag .smg-mag-cover { max-width: calc(1100px + 2 * var(--smg-pad)); margin: clamp(32px, 5vw, 56px) auto 0; padding: 0 var(--smg-pad); }
.smg-mag .smg-mag-cover img { display: block; width: 100% !important; height: auto !important; max-width: 100%; }
.smg-mag .smg-mag-cover figcaption { margin-top: 10px; font-size: 13px; color: var(--smg-muted); }

.smg-mag .smg-mag-body { max-width: calc(760px + 2 * var(--smg-pad)); margin: 0 auto; padding: clamp(40px, 6vw, 72px) var(--smg-pad) clamp(56px, 7vw, 96px); }
.smg-mag .smg-mag-body.has-toc { max-width: var(--smg-max); display: grid; grid-template-columns: 250px minmax(0, 760px); gap: clamp(40px, 6vw, 88px); justify-content: center; align-items: start; }

/* Sommaire */
.smg-mag .smg-mag-toc { position: sticky; top: 110px; font-size: 14px; }
.smg-mag .smg-mag-toc details { border-top: 1px solid var(--smg-line); }
.smg-mag .smg-mag-toc summary { padding: 14px 0 10px; font-size: 11.5px; font-weight: 700; letter-spacing: .2em; text-transform: uppercase; color: var(--smg-gold); cursor: pointer; list-style: none; }
.smg-mag .smg-mag-toc summary::-webkit-details-marker { display: none; }
.smg-mag .smg-mag-toc summary { display: flex; justify-content: space-between; align-items: center; }
.smg-mag .smg-mag-toc summary::after { content: "+"; font-size: 18px; font-weight: 400; letter-spacing: 0; line-height: 1; }
.smg-mag .smg-mag-toc details[open] summary::after { content: "–"; }
.smg-mag .smg-mag-toc ol { list-style: none; margin: 0; padding: 0; counter-reset: smgtoc; }
.smg-mag .smg-mag-toc li { counter-increment: smgtoc; margin: 0; border-bottom: 1px solid var(--smg-line); }
.smg-mag .smg-mag-toc a { display: flex; gap: 10px; padding: 10px 0; line-height: 1.4; color: var(--smg-ink); text-decoration: none; }
.smg-mag .smg-mag-toc a::before { content: counter(smgtoc, decimal-leading-zero); flex: none; font-family: var(--smg-serif); font-style: italic; color: var(--smg-gold); }
.smg-mag .smg-mag-toc a:hover { color: var(--smg-green); }

/* Contenu de l'article */
.smg-mag .smg-mag-content { min-width: 0; font-size: 18px; line-height: 1.8; color: #2f332d; }
.smg-mag .smg-mag-content > *:first-child { margin-top: 0; }
.smg-mag .smg-mag-content p { margin: 0 0 1.2em; }
.smg-mag .smg-mag-content h2 { font-size: clamp(26px, 2.6vw, 34px); line-height: 1.2; margin: 1.9em 0 .6em; color: var(--smg-forest); scroll-margin-top: 110px; }
.smg-mag .smg-mag-content h3 { font-size: clamp(20px, 1.8vw, 23px); line-height: 1.3; margin: 1.6em 0 .5em; color: var(--smg-ink); scroll-margin-top: 110px; }
.smg-mag .smg-mag-content h4 { font-family: var(--smg-sans); font-size: 14px; font-weight: 700; letter-spacing: .12em; text-transform: uppercase; margin: 1.6em 0 .5em; }
.smg-mag .smg-mag-content a { color: var(--smg-green); text-decoration: underline; text-decoration-color: rgba(0, 104, 56, .35); }
.smg-mag .smg-mag-content a:hover { color: var(--smg-forest); text-decoration-color: currentColor; }
.smg-mag .smg-mag-content ul, .smg-mag .smg-mag-content ol { margin: 0 0 1.4em; padding: 0; }
.smg-mag .smg-mag-content ul { list-style: none; }
.smg-mag .smg-mag-content ul li { position: relative; margin: 0 0 .5em; padding-left: 26px; }
.smg-mag .smg-mag-content ul li::before { content: ""; position: absolute; left: 0; top: .9em; width: 14px; height: 1px; background: var(--smg-gold); }
.smg-mag .smg-mag-content ol { padding-left: 1.4em; }
.smg-mag .smg-mag-content ol li { margin: 0 0 .5em; padding-left: 4px; }
.smg-mag .smg-mag-content ol li::marker { color: var(--smg-gold); font-weight: 700; }
.smg-mag .smg-mag-content strong { color: var(--smg-ink); }
.smg-mag .smg-mag-content blockquote { margin: 1.8em 0; padding: 4px 0 4px 26px; border-left: 2px solid var(--smg-gold); font-family: var(--smg-serif); font-style: italic; font-size: 21px; line-height: 1.55; color: var(--smg-forest); }
.smg-mag .smg-mag-content figure { margin: 2em 0; }
.smg-mag .smg-mag-content img { max-width: 100%; height: auto; }
.smg-mag .smg-mag-content figcaption { margin-top: 8px; font-size: 13.5px; color: var(--smg-muted); }
.smg-mag .smg-mag-content hr { border: 0; border-top: 1px solid var(--smg-line); margin: 2.4em 0; }
.smg-mag .smg-mag-content table { width: 100%; border-collapse: collapse; margin: 0 0 1.6em; font-size: 16px; }
.smg-mag .smg-mag-content th, .smg-mag .smg-mag-content td { padding: 10px 12px; border-bottom: 1px solid var(--smg-line); text-align: left; vertical-align: top; }
.smg-mag .smg-mag-content .wp-block-table { overflow-x: auto; }
.smg-mag .smg-mag-content .smg-mag-encart { margin: 1.8em 0; padding: 22px 26px; background: var(--smg-beige); border-left: 2px solid var(--smg-gold); font-size: 16.5px; }
.smg-mag .smg-mag-content .smg-mag-encart > *:last-child { margin-bottom: 0; }
.smg-mag .smg-mag-content .smg-mag-sources { font-size: 14.5px; color: var(--smg-muted); }

/* FAQ (bloc Yoast) */
.smg-mag .smg-mag-content .schema-faq { margin: 0 0 1.6em; border-top: 1px solid var(--smg-line); }
.smg-mag .smg-mag-content .schema-faq-section { padding: 18px 0; border-bottom: 1px solid var(--smg-line); }
.smg-mag .smg-mag-content .schema-faq-question { display: block; margin-bottom: 6px; font-family: var(--smg-serif); font-weight: 400; font-size: 20px; line-height: 1.35; color: var(--smg-forest); }
.smg-mag .smg-mag-content .schema-faq-answer { margin: 0; font-size: 16.5px; line-height: 1.7; }

/* Appel à l'action */
.smg-mag .smg-mag-cta { margin: 3em 0 0; padding: clamp(26px, 4vw, 40px); background: var(--smg-beige); border-left: 2px solid var(--smg-gold); }
.smg-mag .smg-mag-cta .smg-mag-cta__title { margin: 0 0 .4em !important; font-family: var(--smg-serif); font-size: clamp(22px, 2.2vw, 28px); line-height: 1.25; color: var(--smg-forest); }
.smg-mag .smg-mag-cta p { font-size: 16.5px; line-height: 1.7; color: var(--smg-muted); }
.smg-mag .smg-mag-cta__actions { display: flex; flex-wrap: wrap; align-items: center; gap: 14px 26px; margin: 1.2em 0 0 !important; }
.smg-mag .smg-mag-cta .smg-mag-btn, .smg-mag .smg-mag-cta .smg-mag-btn:hover { color: var(--smg-ivory); text-decoration: none; }
.smg-mag .smg-mag-cta .smg-mag-btn:hover { color: #fff; }
.smg-mag .smg-mag-cta__link { font-size: 12.5px; font-weight: 700; letter-spacing: .14em; text-transform: uppercase; color: var(--smg-forest) !important; text-decoration: none !important; border-bottom: 1px solid var(--smg-gold); padding-bottom: 2px; }

/* Signature */
.smg-mag .smg-mag-author { margin-top: 2.6em; padding-top: 22px; border-top: 1px solid var(--smg-line); font-size: 14.5px; line-height: 1.65; color: var(--smg-muted); }
.smg-mag .smg-mag-author p { margin: 0 0 .4em; }
.smg-mag .smg-mag-author__name { font-size: 11.5px; font-weight: 700; letter-spacing: .2em; text-transform: uppercase; color: var(--smg-gold); }
.smg-mag .smg-mag-tags a { display: inline-block; margin: 6px 8px 0 0; padding: 4px 10px; border: 1px solid var(--smg-line); font-size: 12.5px; color: var(--smg-muted); text-decoration: none; }

/* Articles complémentaires */
.smg-mag .smg-mag-related { padding: clamp(56px, 8vw, 96px) 0; background: #fff; border-top: 1px solid var(--smg-line); }
.smg-mag .smg-mag-related .smg-mag-wrap > h2 { font-size: clamp(28px, 3.2vw, 40px); margin-bottom: clamp(32px, 4vw, 48px); }
.smg-mag .smg-mag-related .smg-mag-card__title { font-size: clamp(20px, 1.7vw, 23px); }
.smg-mag .smg-mag-related__all { margin: clamp(40px, 5vw, 56px) 0 0; text-align: center; }
.smg-mag .smg-mag-related__all a { font-size: 12.5px; font-weight: 700; letter-spacing: .16em; text-transform: uppercase; color: var(--smg-forest); text-decoration: none; border-bottom: 1px solid var(--smg-gold); padding-bottom: 3px; }

/* ---------- Tablette ---------- */
@media (max-width: 1100px) {
	.smg-mag .smg-mag-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
	.smg-mag .smg-mag-body.has-toc { grid-template-columns: minmax(0, 760px); }
	.smg-mag .smg-mag-toc { position: static; margin-bottom: 8px; background: var(--smg-beige); padding: 4px 20px 12px; }
	.smg-mag .smg-mag-toc details { border-top: 0; }
	.smg-mag .smg-mag-toc li:last-child { border-bottom: 0; }
}
@media (max-width: 900px) {
	.smg-mag .smg-mag-toolbar__inner { flex-direction: column; align-items: stretch; }
	.smg-mag .smg-mag-search { width: 100%; }
	.smg-mag .smg-mag-card--featured { grid-template-columns: 1fr; }
	.smg-mag .smg-mag-band__inner { grid-template-columns: 1fr; }
	.smg-mag .smg-mag-band__actions { flex-direction: row; flex-wrap: wrap; }
}

/* ---------- Smartphone ---------- */
@media (max-width: 767px) {
	.smg-mag .smg-mag-hero { padding-top: 48px; }
	.smg-mag .smg-mag-crumbs { margin-bottom: 20px; }
	.smg-mag .smg-mag-grid { grid-template-columns: 1fr; }
	.smg-mag .smg-mag-filters { margin: 0 calc(-1 * var(--smg-pad)); }
	.smg-mag .smg-mag-filters ul { flex-wrap: nowrap; overflow-x: auto; padding: 0 var(--smg-pad) 4px; scrollbar-width: none; -webkit-overflow-scrolling: touch; }
	.smg-mag .smg-mag-filters ul::-webkit-scrollbar { display: none; }
	.smg-mag .smg-mag-content { font-size: 17px; line-height: 1.75; }
	.smg-mag .smg-mag-meta { gap: 4px 16px; font-size: 12.5px; }
	.smg-mag .smg-mag-band__actions { flex-direction: column; }
	.smg-mag .smg-mag-cta__actions .smg-mag-btn { width: 100%; }
}

@media (prefers-reduced-motion: reduce) {
	.smg-mag .smg-mag-card__media img, .smg-mag .smg-mag-card__title a { transition: none; }
}
