/*
Theme Name: Natural Tripa – Actualités
Theme URI: https://naturaltripa.com
Author: Natural Tripa
Description: Thème de blog calqué sur la boutique naturaltripa.com (couleurs, police, navigation et pied de page repris du site). L'URL de la boutique se modifie à un seul endroit, dans functions.php (constante NT_SITE_URL).
Version: 1.0.0
Requires at least: 6.0
Tested up to: 6.6
Requires PHP: 7.4
License: GNU General Public License v2 or later
License URI: https://www.gnu.org/licenses/gpl-2.0.html
Text Domain: naturaltripa
Tags: blog, one-column, right-sidebar, custom-logo, translation-ready
*/

/* =============================================================================
   Variables — valeurs relevées sur naturaltripa.com
   ========================================================================== */
:root {
	--nt-primary: #0b69f6;          /* couleur d'accent / liens */
	--nt-primary-hover: #0954c5;
	--nt-body: #212529;             /* texte */
	--nt-muted: rgba(33, 37, 41, .75);
	--nt-bg: #fff;                  /* fond */
	--nt-bg-soft: #f8f9fa;
	--nt-border: #dee2e6;
	--nt-dark: #212529;             /* fond du pied de page */
	--nt-on-dark: #dee2e6;          /* texte du pied de page */
	--nt-radius: .5rem;
	--nt-radius-sm: .25rem;
	--nt-font: "Inter", system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
	--nt-container: 1320px;
}

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

html { -webkit-text-size-adjust: 100%; }

body {
	margin: 0;
	background: var(--nt-bg);
	color: var(--nt-body);
	font-family: var(--nt-font);
	font-size: 1rem;
	font-weight: 400;
	line-height: 1.5;
	overflow-wrap: break-word;
}

h1, h2, h3, h4, h5, h6 {
	margin: 0 0 1rem;
	font-weight: 600;
	line-height: 1.2;
	overflow-wrap: break-word;
}

h1 { font-size: 2rem; }
h2 { font-size: 1.5rem; }
h3 { font-size: 1.25rem; }
h4 { font-size: 1.125rem; }
h5, h6 { font-size: 1rem; }

p, ul, ol, dl, table, pre, blockquote, figure { margin: 0 0 1rem; }

a {
	color: var(--nt-primary);
	text-decoration: none;
}

a:hover { color: var(--nt-primary-hover); }

a:focus-visible,
button:focus-visible,
input:focus-visible,
textarea:focus-visible,
select:focus-visible {
	outline: .125rem solid var(--nt-primary);
	outline-offset: .125rem;
	border-radius: var(--nt-radius-sm);
}

img, svg, video, iframe { max-width: 100%; height: auto; }

figure img { border-radius: var(--nt-radius); }

blockquote {
	border-left: .25rem solid var(--nt-border);
	margin-left: 0;
	padding: .25rem 0 .25rem 1rem;
	color: var(--nt-muted);
}

code, pre, kbd {
	font-family: SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", "Courier New", monospace;
	font-size: .9375em;
}

pre {
	background: var(--nt-bg-soft);
	border: 1px solid var(--nt-border);
	border-radius: var(--nt-radius);
	padding: 1rem;
	overflow-x: auto;
}

table {
	width: 100%;
	border-collapse: collapse;
}

th, td {
	border: 1px solid var(--nt-border);
	padding: .5rem .75rem;
	text-align: left;
}

hr {
	border: 0;
	border-top: 1px solid var(--nt-border);
	margin: 2rem 0;
}

.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;
}

.nt-skip-link {
	position: absolute;
	left: -9999px;
	top: 0;
	z-index: 1000;
	background: var(--nt-primary);
	color: #fff;
	padding: .5rem .75rem;
	border-radius: var(--nt-radius-sm);
}

.nt-skip-link:focus {
	left: .5rem;
	top: .5rem;
	color: #fff;
}

/* Mêmes largeurs de conteneur que la boutique (container Bootstrap 5). */
.nt-container {
	width: 100%;
	margin-inline: auto;
	padding-inline: 12px;
}

@media (min-width: 576px)  { .nt-container { max-width: 540px; } }
@media (min-width: 768px)  { .nt-container { max-width: 720px; } }
@media (min-width: 992px)  { .nt-container { max-width: 960px; } }
@media (min-width: 1200px) { .nt-container { max-width: 1140px; } }
@media (min-width: 1400px) { .nt-container { max-width: var(--nt-container); } }

.nt-btn {
	display: inline-block;
	border: 1px solid var(--nt-primary);
	border-radius: var(--nt-radius);
	padding: .375rem .75rem;
	background: transparent;
	color: var(--nt-primary);
	font: inherit;
	cursor: pointer;
	transition: all .2s ease-in-out;
}

.nt-btn:hover {
	background: var(--nt-primary);
	color: #fff;
}

.nt-btn--solid {
	background: var(--nt-primary);
	color: #fff;
}

.nt-btn--solid:hover {
	background: var(--nt-primary-hover);
	border-color: var(--nt-primary-hover);
	color: #fff;
}

/* =============================================================================
   Header
   ========================================================================== */
.nt-header {
	position: sticky;
	top: 0;
	z-index: 100;
	background: var(--nt-bg);
}

.nt-header__top {
	display: none;
	border-bottom: 1px solid var(--nt-border);
	padding: .25rem 0;
	color: var(--nt-body);
}

@media (min-width: 768px) {
	.nt-header__top { display: block; }
}

.nt-header__top-inner {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	gap: .25rem;
}

.nt-header__phone a { color: var(--nt-body); }
.nt-header__phone a:hover { color: var(--nt-primary-hover); }

.nt-header__bottom {
	border-bottom: 1px solid var(--nt-border);
	padding: .25rem 0;
}

.nt-header__row {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	gap: .5rem 1rem;
	min-height: 3.5rem;
}

/* La marque ne doit jamais pousser le menu hors de l'écran : largeur bornée. */
.nt-brand {
	display: flex;
	align-items: center;
	gap: .5rem;
	min-width: 0;
	max-width: 100%;
	color: var(--nt-body);
	text-decoration: none;
	padding: .25rem 0;
}

.nt-brand--header { flex: 0 1 auto; margin-right: auto; }

.nt-brand__logo {
	display: block;
	width: auto;
	height: auto;
	max-height: 3rem;
	max-width: 9rem;
	object-fit: contain;
}

.nt-brand__text {
	display: block;
	max-width: 16rem;
	font-size: 1.125rem;
	font-weight: 600;
	line-height: 1.2;
	color: var(--nt-body);
	overflow-wrap: anywhere;   /* un titre long passe à la ligne */
	hyphens: auto;
}

@media (min-width: 992px) {
	.nt-brand__text { max-width: 22rem; }
}

/* Navigation */
.nt-nav { min-width: 0; }

.nt-nav__toggle {
	display: inline-flex;
	align-items: center;
	gap: .5rem;
	border: 1px solid var(--nt-border);
	border-radius: var(--nt-radius);
	background: transparent;
	color: var(--nt-body);
	font: inherit;
	padding: .375rem .625rem;
	cursor: pointer;
}

.nt-nav__toggle-bars {
	position: relative;
	display: block;
	width: 1.125rem;
	height: 2px;
	background: currentColor;
}

.nt-nav__toggle-bars::before,
.nt-nav__toggle-bars::after {
	content: "";
	position: absolute;
	left: 0;
	width: 100%;
	height: 2px;
	background: currentColor;
}

.nt-nav__toggle-bars::before { top: -6px; }
.nt-nav__toggle-bars::after { top: 6px; }

.nt-nav__list {
	list-style: none;
	margin: 0;
	padding: 0;
	display: flex;
	flex-wrap: wrap;
	align-items: center;
}

.nt-nav__link {
	display: block;
	padding: 1.25rem .5rem;
	color: var(--nt-muted);
	text-decoration: none;
}

.nt-nav__link:hover,
.nt-nav__link:active { color: var(--nt-primary-hover); }

/* Onglet actif : même mise en valeur que sur la boutique. */
.nt-nav__item.is-current .nt-nav__link {
	color: var(--nt-primary);
	font-weight: 500;
}

/* Mobile : menu déroulant sous le header. */
@media (max-width: 991.98px) {
	.nt-nav__list {
		display: none;
		flex-direction: column;
		align-items: stretch;
		width: 100%;
		border-top: 1px solid var(--nt-border);
		padding-block: .25rem;
	}

	.nt-nav__list.is-open { display: flex; }

	.nt-nav__link { padding: .625rem .25rem; }
}

@media (min-width: 992px) {
	.nt-nav__toggle { display: none; }
	.nt-nav__list { display: flex !important; }
}

/* =============================================================================
   Contenu
   ========================================================================== */
.nt-main { padding-block: 2rem 3rem; }

.nt-layout {
	display: grid;
	grid-template-columns: 1fr;
	gap: 2rem;
}

@media (min-width: 992px) {
	.nt-layout { grid-template-columns: minmax(0, 1fr) 300px; }
}

.nt-page-title { margin-bottom: 1.5rem; }

.nt-page-title__sub {
	color: var(--nt-muted);
	margin-top: -.5rem;
}

.nt-meta {
	color: var(--nt-muted);
	font-size: .875rem;
	display: flex;
	flex-wrap: wrap;
	gap: .375rem;
}

.nt-meta a { color: var(--nt-muted); }
.nt-meta a:hover { color: var(--nt-primary-hover); }

/* Liste d'articles */
.nt-card {
	border-bottom: 1px solid var(--nt-border);
	padding-bottom: 1.5rem;
	margin-bottom: 1.5rem;
}

.nt-card:last-of-type { border-bottom: 0; }

.nt-card__thumb { display: block; margin-bottom: 1rem; }

.nt-card__thumb img {
	width: 100%;
	border-radius: var(--nt-radius);
	display: block;
}

.nt-card__title { margin-bottom: .5rem; }
.nt-card__title a { color: var(--nt-body); }
.nt-card__title a:hover { color: var(--nt-primary); }

.nt-card__excerpt { margin-top: .75rem; }

/* Article */
.nt-entry__thumb { margin-bottom: 1.5rem; }

.nt-entry__thumb img {
	width: 100%;
	border-radius: var(--nt-radius);
	display: block;
}

.nt-entry__content { margin-top: 1.5rem; }

.nt-entry__content > *:last-child { margin-bottom: 0; }

.nt-entry__content a { text-decoration: underline; }

.nt-tags {
	margin-top: 1.5rem;
	font-size: .875rem;
	color: var(--nt-muted);
}

.nt-page-links {
	margin-top: 1.5rem;
	font-size: .875rem;
}

/* Navigation entre articles */
.nt-post-nav {
	display: grid;
	gap: 1rem;
	margin-top: 2rem;
	padding-top: 1.5rem;
	border-top: 1px solid var(--nt-border);
}

@media (min-width: 576px) {
	.nt-post-nav { grid-template-columns: 1fr 1fr; }
	.nt-post-nav__next { text-align: right; }
}

.nt-post-nav__label {
	display: block;
	font-size: .875rem;
	color: var(--nt-muted);
}

/* Pagination */
.navigation.pagination {
	margin-top: 2rem;
	padding-top: 1.5rem;
	border-top: 1px solid var(--nt-border);
}

.nav-links {
	display: flex;
	flex-wrap: wrap;
	gap: .375rem;
}

.nav-links .page-numbers {
	display: inline-block;
	border: 1px solid var(--nt-border);
	border-radius: var(--nt-radius);
	padding: .375rem .75rem;
	color: var(--nt-body);
}

.nav-links .page-numbers:hover {
	border-color: var(--nt-primary);
	color: var(--nt-primary);
}

.nav-links .page-numbers.current {
	background: var(--nt-primary);
	border-color: var(--nt-primary);
	color: #fff;
}

.nav-links .page-numbers.dots {
	border-color: transparent;
}

/* Formulaire de recherche */
.nt-search {
	display: flex;
	gap: .5rem;
	flex-wrap: wrap;
}

.nt-search__field {
	flex: 1 1 12rem;
	min-width: 0;
	border: 1px solid var(--nt-border);
	border-radius: var(--nt-radius);
	padding: .375rem .75rem;
	font: inherit;
	color: var(--nt-body);
	background: #fff;
}

.nt-search__field:focus { border-color: var(--nt-primary); }

/* Colonne latérale */
.nt-sidebar { min-width: 0; }

.nt-widget {
	border: 1px solid var(--nt-border);
	border-radius: var(--nt-radius);
	padding: 1rem;
	margin-bottom: 1.5rem;
}

.nt-widget:last-child { margin-bottom: 0; }

.nt-widget__title {
	font-size: 1rem;
	font-weight: 600;
	margin-bottom: .75rem;
}

.nt-widget ul {
	list-style: none;
	margin: 0;
	padding: 0;
}

.nt-widget li { padding-block: .25rem; }

.nt-widget a { color: var(--nt-body); }
.nt-widget a:hover { color: var(--nt-primary); }

/* Commentaires */
.nt-comments {
	margin-top: 2.5rem;
	padding-top: 1.5rem;
	border-top: 1px solid var(--nt-border);
}

.nt-comments__title { font-size: 1.25rem; }

.comment-list,
.comment-list .children {
	list-style: none;
	margin: 0;
	padding: 0;
}

.comment-list .children { padding-left: 1rem; border-left: 1px solid var(--nt-border); }

.comment-body {
	border: 1px solid var(--nt-border);
	border-radius: var(--nt-radius);
	padding: 1rem;
	margin-bottom: 1rem;
}

.comment-author { display: flex; align-items: center; gap: .5rem; font-weight: 600; }
.comment-author img { border-radius: 50%; }
.comment-metadata { font-size: .875rem; color: var(--nt-muted); margin-bottom: .5rem; }
.comment-metadata a { color: var(--nt-muted); }
.reply { font-size: .875rem; }

.comment-respond { margin-top: 1.5rem; }
.comment-form p { margin-bottom: .75rem; }

.comment-form label {
	display: block;
	font-size: .875rem;
	margin-bottom: .25rem;
}

.comment-form input[type="text"],
.comment-form input[type="email"],
.comment-form input[type="url"],
.comment-form textarea {
	width: 100%;
	border: 1px solid var(--nt-border);
	border-radius: var(--nt-radius);
	padding: .375rem .75rem;
	font: inherit;
	color: var(--nt-body);
	background: #fff;
}

.comment-form input[type="submit"] {
	border: 1px solid var(--nt-primary);
	border-radius: var(--nt-radius);
	background: var(--nt-primary);
	color: #fff;
	font: inherit;
	padding: .375rem .75rem;
	cursor: pointer;
}

.comment-form input[type="submit"]:hover {
	background: var(--nt-primary-hover);
	border-color: var(--nt-primary-hover);
}

.comment-form .comment-form-cookies-consent { display: flex; gap: .5rem; align-items: flex-start; }
.comment-form .comment-form-cookies-consent label { margin: 0; }

/* 404 / aucun résultat */
.nt-empty { max-width: 40rem; }

.nt-actions {
	display: flex;
	flex-wrap: wrap;
	gap: .5rem;
	margin-top: 1.5rem;
}

/* Alignements WordPress */
.alignleft { float: left; margin: 0 1rem 1rem 0; }
.alignright { float: right; margin: 0 0 1rem 1rem; }
.aligncenter { display: block; margin-inline: auto; }
.alignwide, .alignfull { max-width: 100%; }
.wp-caption-text, .wp-element-caption { font-size: .875rem; color: var(--nt-muted); }
.sticky .nt-card__title::after { content: " — épinglé"; font-size: .875rem; color: var(--nt-muted); }

/* =============================================================================
   Footer
   ========================================================================== */
.nt-footer {
	background: var(--nt-dark);
	color: var(--nt-on-dark);
	padding-block: 2.5rem 1.25rem;
}

.nt-footer a { color: var(--nt-on-dark); }
.nt-footer a:hover { color: #fff; }

.nt-footer__brand {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	gap: .75rem;
	margin-bottom: 2rem;
}

.nt-brand--footer {
	background: #fff;
	border-radius: var(--nt-radius);
	padding: .375rem .5rem;
}

.nt-brand--footer .nt-brand__logo { max-height: 2.75rem; max-width: 8rem; }
.nt-brand--footer .nt-brand__text { color: var(--nt-body); font-size: 1rem; }

.nt-footer__brand-text { min-width: 0; }

.nt-footer__name {
	font-weight: 600;
	color: #fff;
	margin: 0;
}

.nt-footer__baseline {
	margin: 0;
	font-size: .875rem;
	color: var(--nt-on-dark);
}

.nt-footer__cols {
	display: grid;
	grid-template-columns: 1fr;
	gap: 1.5rem;
}

@media (min-width: 768px) {
	.nt-footer__cols { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

@media (min-width: 992px) {
	.nt-footer__cols { grid-template-columns: repeat(4, minmax(0, 1fr)); }
}

.nt-footer__title {
	font-size: 1rem;
	font-weight: 600;
	color: #fff;
	margin-bottom: .75rem;
}

.nt-footer__list {
	list-style: none;
	margin: 0;
	padding: 0;
}

.nt-footer__list a {
	display: block;
	line-height: 1.5;
	padding-block: .25rem;
}

.nt-footer__address {
	font-style: normal;
	margin-bottom: .5rem;
}

.nt-footer__contact { padding-block: .25rem; }

.nt-copyright {
	text-align: center;
	padding-top: 2rem;
	font-size: 1rem;
	color: var(--nt-on-dark);
}

@media (max-width: 575.98px) {
	.nt-copyright { font-size: .875rem; padding-top: 1rem; }
}
