/**
 * SW Médias — Top Finance — main.css
 * Chargé après le critical CSS inline. Styles "below-the-fold" et raffinements.
 */

/* Layout */
.sw-container { width: 100%; max-width: 1200px; margin: 0 auto; padding: 0 1rem; }
.sw-main { padding: 2rem 0 4rem; }

/* Typography */
h1, h2, h3, h4 { color: #0F172A; line-height: 1.25; margin: 0 0 .75em; font-weight: 700; }
h1 { font-size: clamp(1.75rem, 3vw, 2.5rem); }
h2 { font-size: clamp(1.375rem, 2.4vw, 1.875rem); }
h3 { font-size: 1.25rem; }
p { margin: 0 0 1rem; }
.sw-section-title { font-size: 1.5rem; margin-bottom: 1.5rem; padding-bottom: .5rem; border-bottom: 2px solid #E2E8F0; }

/* Breadcrumb */
.sw-breadcrumb { font-size: .875rem; color: #64748B; margin-bottom: 1.5rem; }
.sw-breadcrumb a { color: #64748B; }
.sw-breadcrumb a:hover { color: #2563EB; }
.sw-breadcrumb-sep { margin: 0 .5rem; color: #94A3B8; }

/* Article */
.sw-article { max-width: 760px; padding-top: 2rem; }
.sw-article__title { margin-bottom: 1rem; }
.sw-article__meta { display: flex; gap: 1rem; color: #64748B; font-size: .875rem; margin-bottom: 1.5rem; flex-wrap: wrap; }
.sw-article__hero { margin: 0 0 2rem; border-radius: .5rem; overflow: hidden; }
.sw-article__hero img { aspect-ratio: 16/9; object-fit: cover; }
.sw-article__content { font-size: 1.0625rem; line-height: 1.75; }
.sw-article__content img { border-radius: .375rem; margin: 1.5rem 0; }
.sw-article__content blockquote { border-left: 4px solid #2563EB; margin: 1.5rem 0; padding: .5rem 0 .5rem 1rem; color: #475569; font-style: italic; background: #F8FAFC; }
.sw-article__footer { margin-top: 3rem; padding-top: 1.5rem; border-top: 1px solid #E2E8F0; }

/* Tags */
.sw-tags a { display: inline-block; background: #F1F5F9; color: #475569; padding: .25rem .625rem; border-radius: 999px; font-size: .8125rem; margin: 0 .25rem .25rem 0; }
.sw-tags a:hover { background: #E2E8F0; text-decoration: none; }

/* Cards grid */
.sw-card-grid { display: grid; gap: 1.5rem; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); margin: 1.5rem 0; }
.sw-card { background: #fff; border: 1px solid #E2E8F0; border-radius: .5rem; overflow: hidden; transition: transform .15s ease, box-shadow .15s ease; }
.sw-card:hover { transform: translateY(-2px); box-shadow: 0 6px 20px rgba(15, 23, 42, .08); }
.sw-card__link { display: block; color: inherit; }
.sw-card__link:hover { text-decoration: none; }
.sw-card__media img { aspect-ratio: 3/2; object-fit: cover; }
.sw-card__body { padding: 1rem 1.25rem 1.25rem; }
.sw-card__title { font-size: 1.0625rem; margin-bottom: .5rem; color: #0F172A; }
.sw-card__excerpt { color: #475569; font-size: .9375rem; margin-bottom: .75rem; }
.sw-card__date { color: #94A3B8; font-size: .8125rem; }

/* Archive */
.sw-archive__header { margin-bottom: 2rem; }
.sw-archive__title { margin-bottom: .5rem; }
.sw-archive__description { color: #475569; font-size: 1.0625rem; }
.sw-pagination { margin-top: 3rem; display: flex; justify-content: center; }
.sw-pagination .page-numbers { display: inline-block; padding: .5rem .75rem; margin: 0 .125rem; border: 1px solid #E2E8F0; border-radius: .375rem; color: #475569; }
.sw-pagination .current { background: #2563EB; color: #fff; border-color: #2563EB; }

/* Front page hero */
.sw-front__hero { text-align: center; padding: 2rem 0 3rem; }
.sw-front__title { font-size: clamp(2rem, 4vw, 3rem); margin-bottom: .5rem; }
.sw-front__tagline { font-size: 1.125rem; color: #475569; }
.sw-front__latest { margin-top: 2rem; }

/* Empty */
.sw-empty { text-align: center; padding: 3rem 1rem; color: #64748B; }

/* Footer */
.sw-site-footer { margin-top: 4rem; padding: 2rem 0; background: #F8FAFC; border-top: 1px solid #E2E8F0; color: #475569; font-size: .9375rem; }
.sw-site-footer__inner { display: flex; justify-content: space-between; gap: 1rem; flex-wrap: wrap; }
.sw-footer-menu { list-style: none; padding: 0; margin: 0; display: flex; gap: 1rem; flex-wrap: wrap; }
.sw-footer-menu a { color: #475569; }
.sw-footer-menu a:hover { color: #0F172A; }

/* Responsive */
@media (max-width: 768px) {
	.sw-card-grid { grid-template-columns: 1fr; }
	.sw-article { padding-top: 1rem; }
	.sw-site-footer__inner { flex-direction: column; }
}

/* Focus visible accessibilité */
:focus-visible { outline: 2px solid #2563EB; outline-offset: 2px; border-radius: 2px; }

/* === Standalone (plus de parent) === */

/* Reset complémentaire */
button, input, select, textarea { font: inherit; color: inherit; }
button { cursor: pointer; background: none; border: 0; padding: 0; }
hr { border: 0; border-top: 1px solid #E2E8F0; margin: 2rem 0; }
table { width: 100%; border-collapse: collapse; margin: 1rem 0; }
table th, table td { padding: .5rem .75rem; border-bottom: 1px solid #E2E8F0; text-align: left; }
table th { font-weight: 700; background: #F8FAFC; }
code, pre { font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace; font-size: .9em; }
code { background: #F1F5F9; padding: .125rem .375rem; border-radius: .25rem; }
pre { background: #0F172A; color: #F1F5F9; padding: 1rem; border-radius: .375rem; overflow-x: auto; }
pre code { background: transparent; color: inherit; padding: 0; }
figure { margin: 1.5rem 0; }
figcaption { text-align: center; font-size: .875rem; color: #64748B; margin-top: .5rem; }

/* Page (template page.php) */
.sw-page { max-width: 760px; padding-top: 1.5rem; }
.sw-page__title { margin-bottom: 1.5rem; }
.sw-page__hero { margin: 0 0 2rem; border-radius: .5rem; overflow: hidden; }
.sw-page__hero img { aspect-ratio: 16/9; object-fit: cover; }
.sw-page__content { font-size: 1.0625rem; line-height: 1.75; }

/* Search results */
.sw-search { padding-top: 1.5rem; }
.sw-search__header { margin-bottom: 2rem; }
.sw-search__title { margin-bottom: .25rem; }
.sw-search__count { color: #64748B; font-size: .875rem; }
.search-form, .wp-block-search { display: flex; gap: .5rem; align-items: center; max-width: 480px; margin: 1.5rem 0; }
.search-form input[type="search"], .search-form input[type="text"] { flex: 1; padding: .625rem .875rem; border: 1px solid #E2E8F0; border-radius: .375rem; background: #fff; }
.search-form input:focus { border-color: #2563EB; outline: 0; box-shadow: 0 0 0 3px rgba(37,99,235,.15); }
.search-form button, .search-form input[type="submit"] { padding: .625rem 1rem; background: #2563EB; color: #fff; border-radius: .375rem; font-weight: 600; }
.search-form button:hover, .search-form input[type="submit"]:hover { background: #1D4ED8; }

/* 404 */
.sw-404 { padding: 3rem 1rem; text-align: center; max-width: 640px; margin: 0 auto; }
.sw-404__title { font-size: clamp(2rem, 4vw, 2.75rem); margin-bottom: .75rem; }
.sw-404__lead { color: #475569; font-size: 1.125rem; margin-bottom: 1.5rem; }
.sw-404__actions { margin-bottom: 2rem; }
.sw-404__search { display: flex; justify-content: center; }

/* Comments */
.sw-comments { max-width: 760px; margin: 3rem auto 0; padding-top: 2rem; border-top: 1px solid #E2E8F0; }
.sw-comments__title { font-size: 1.25rem; margin-bottom: 1.5rem; }
.sw-comments__list { list-style: none; padding: 0; margin: 0 0 2rem; }
.sw-comments__list .comment { padding: 1rem 0; border-bottom: 1px solid #E2E8F0; }
.sw-comments__list .comment:last-child { border-bottom: 0; }
.sw-comments__list .comment-author { font-weight: 700; }
.sw-comments__list .comment-meta { font-size: .8125rem; color: #64748B; margin-bottom: .5rem; }
.sw-comments__list .comment-content { font-size: .9375rem; line-height: 1.7; }
.sw-comments__list .children { list-style: none; padding-left: 1.5rem; margin-top: 1rem; }
.sw-comments__closed { color: #64748B; font-style: italic; }
.sw-comment-form { display: grid; gap: 1rem; }
.sw-comment-form .comment-form-comment label,
.sw-comment-form .comment-form-author label,
.sw-comment-form .comment-form-email label,
.sw-comment-form .comment-form-url label { display: block; margin-bottom: .375rem; font-weight: 600; font-size: .875rem; }
.sw-comment-form input[type="text"],
.sw-comment-form input[type="email"],
.sw-comment-form input[type="url"],
.sw-comment-form textarea { width: 100%; padding: .625rem .875rem; border: 1px solid #E2E8F0; border-radius: .375rem; background: #fff; }
.sw-comment-form input:focus, .sw-comment-form textarea:focus { border-color: #2563EB; outline: 0; box-shadow: 0 0 0 3px rgba(37,99,235,.15); }
.sw-comment-form textarea { min-height: 120px; resize: vertical; }
.sw-comment-form .form-submit { margin-top: .5rem; }
.sw-comment-form .submit { padding: .75rem 1.5rem; background: #2563EB; color: #fff; border-radius: .375rem; font-weight: 600; cursor: pointer; }
.sw-comment-form .submit:hover { background: #1D4ED8; }

/* Hamburger nav toggle (mobile) */
.sw-nav-toggle { display: none; flex-direction: column; gap: 4px; padding: .5rem; background: transparent; border: 0; cursor: pointer; }
.sw-nav-toggle__bar { display: block; width: 24px; height: 2px; background: #0F172A; border-radius: 2px; transition: transform .2s ease, opacity .2s ease; }
.sw-nav-toggle[aria-expanded="true"] .sw-nav-toggle__bar:nth-child(1) { transform: translateY(6px) rotate(45deg); }
.sw-nav-toggle[aria-expanded="true"] .sw-nav-toggle__bar:nth-child(2) { opacity: 0; }
.sw-nav-toggle[aria-expanded="true"] .sw-nav-toggle__bar:nth-child(3) { transform: translateY(-6px) rotate(-45deg); }

/* Header search */
.sw-header-search { margin-left: auto; max-width: 280px; }
.sw-header-search .search-form { margin: 0; }
.sw-header-search input[type="search"] { font-size: .9375rem; padding: .5rem .75rem; }
.sw-header-search button { padding: .5rem .875rem; }

/* Mobile : toggle visible + nav cachée par défaut */
@media (max-width: 768px) {
	.sw-nav-toggle { display: inline-flex; }
	.sw-primary-nav { display: none; flex-direction: column; width: 100%; padding: 1rem 0; gap: 1rem; }
	.sw-primary-nav.is-open { display: flex; }
	.sw-site-header__inner { flex-wrap: wrap; }
	.sw-header-search { margin: 0; max-width: 100%; width: 100%; }
}

/* WP block alignments (sans parent Astra/GP) */
.alignleft { float: left; margin: .5rem 1.5rem 1rem 0; }
.alignright { float: right; margin: .5rem 0 1rem 1.5rem; }
.aligncenter { display: block; margin: 1rem auto; }
.alignwide { max-width: 1100px; margin-left: auto; margin-right: auto; }
.alignfull { width: 100vw; max-width: 100vw; margin-left: calc(50% - 50vw); margin-right: calc(50% - 50vw); }
.wp-caption { max-width: 100%; }
.wp-caption img { max-width: 100%; height: auto; }
.wp-caption-text { font-size: .875rem; color: #64748B; text-align: center; padding-top: .5rem; }
