/*
Theme Name:   Net Passe
Theme URI:    https://netpasse.com/
Author:       Net Passe
Author URI:   https://netpasse.com/
Description:  Thème sur mesure de Net Passe : léger, sans dépendance, compatible Gutenberg et Classic Editor. Reprend la charte graphique d'origine (fond gris clair, cartes blanches, liens bleus, pied de page sombre).
Version:      1.0.0
Requires at least: 6.0
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:  netpasse
Tags:         blog, one-column, two-columns, right-sidebar, custom-logo, custom-menu, featured-images, threaded-comments, translation-ready, block-styles, wide-blocks
*/

/* ==========================================================================
   1. Variables (charte d'origine)
   ========================================================================== */
:root {
	--contrast: #222222;
	--contrast-2: #575760;
	--contrast-3: #b2b2be;
	--base: #f0f0f0;
	--base-2: #f7f8f9;
	--base-3: #ffffff;
	--accent: #1e73be;
	--footer-bg: #2b2d32;
	--footer-bar-bg: #414347;
	--footer-text: #ebebeb;
	--button-bg: #55555e;
	--button-bg-hover: #3f4047;
	--container: 1200px;
	--gap: 20px;
	--pad: 40px;
	--font: -apple-system, system-ui, BlinkMacSystemFont, "Segoe UI", Helvetica, Arial, sans-serif, "Apple Color Emoji", "Segoe UI Emoji", "Segoe UI Symbol";
}

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

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

body {
	margin: 0;
	background: var(--base-2);
	color: var(--contrast);
	font-family: var(--font);
	font-size: 17px;
	font-weight: 400;
	line-height: 1.5;
	text-transform: none;
	-webkit-font-smoothing: antialiased;
}

img, video, iframe { max-width: 100%; height: auto; }
img { vertical-align: middle; border: 0; }
figure { margin: 0 0 1.5em; }
table { border-collapse: collapse; width: 100%; margin: 0 0 1.5em; }
th, td { border: 1px solid var(--base); padding: .5em .75em; text-align: left; }
th { background: var(--base); }
pre { background: var(--base); padding: 1em; overflow: auto; font-size: .9em; }
code, kbd { font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; font-size: .9em; }
hr { border: 0; border-top: 1px solid var(--base); margin: 2em 0; }

a { color: var(--accent); text-decoration: underline; }
a:hover, a:focus, a:active { color: var(--contrast); }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }

h1, h2, h3, h4, h5, h6 { margin: 0 0 20px; font-weight: 400; text-transform: none; }
h1 { font-size: 32px; line-height: 1.2em; }
h2 { font-size: 26px; line-height: 1.2em; }
h3 { font-size: 22px; line-height: 1.25em; }
h4 { font-size: 21px; line-height: 1.3; }
h5 { font-size: 19px; line-height: 1.3; }
h6 { font-size: 17px; line-height: 1.3; }

p { margin: 0 0 1.5em; }
ul, ol { margin: 0 0 1.5em 3em; padding: 0; }
li > ul, li > ol { margin-bottom: 0; }
blockquote {
	margin: 0 0 1.5em;
	padding: 20px;
	border-left: 5px solid rgba(0, 0, 0, .05);
	font-size: 1.2em;
	font-style: italic;
}
blockquote p:last-child { margin-bottom: 0; }

button, input[type="button"], input[type="reset"], input[type="submit"], .button, .wp-block-button__link {
	display: inline-block;
	padding: 10px 20px;
	border: 1px solid transparent;
	border-radius: 0;
	background: var(--button-bg);
	color: #fff;
	font: inherit;
	line-height: 1.5;
	text-decoration: none;
	cursor: pointer;
	-webkit-appearance: none;
	appearance: none;
}
button:hover, button:focus, input[type="submit"]:hover, input[type="submit"]:focus, .button:hover, .button:focus {
	background: var(--button-bg-hover);
	color: #fff;
}

input[type="text"], input[type="email"], input[type="url"], input[type="password"], input[type="search"],
input[type="tel"], input[type="number"], textarea, select {
	width: 100%;
	padding: 10px 15px;
	border: 1px solid var(--base);
	border-radius: 0;
	background: var(--base-2);
	color: var(--contrast);
	font: inherit;
	max-width: 100%;
}
input[type="text"]:focus, input[type="email"]:focus, input[type="url"]:focus, input[type="password"]:focus,
input[type="search"]:focus, input[type="tel"]:focus, input[type="number"]:focus, textarea:focus, select:focus {
	border-color: var(--contrast-3);
	outline: 0;
}

.screen-reader-text {
	position: absolute !important;
	clip: rect(1px, 1px, 1px, 1px);
	clip-path: inset(50%);
	width: 1px;
	height: 1px;
	margin: -1px;
	overflow: hidden;
	word-wrap: normal !important;
}
.screen-reader-text:focus, .skip-link:focus {
	clip: auto;
	clip-path: none;
	width: auto;
	height: auto;
	margin: 0;
	padding: 15px 23px;
	background: var(--base-3);
	color: var(--contrast);
	font-size: 14px;
	z-index: 100000;
	left: 6px;
	top: 7px;
	text-decoration: none;
}

.icon { width: 1em; height: 1em; fill: currentColor; vertical-align: -.125em; display: inline-block; }

/* ==========================================================================
   3. En-tête et navigation
   ========================================================================== */
.site-header {
	background: var(--base-3);
	position: relative;
	z-index: 50;
}
.inside-header {
	max-width: var(--container);
	margin: 0 auto;
	padding: 20px 40px 20px 0;
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 20px;
}
.site-branding { flex: 0 0 auto; }
.site-branding a { text-decoration: none; }
.custom-logo { width: 280px; max-width: 100%; height: auto; display: block; }
.site-title { margin: 0; font-size: 1.6em; line-height: 1.2; font-weight: 700; }
.site-title a { color: var(--contrast); }

.nav-wrap { display: flex; align-items: center; margin-left: auto; }
.main-navigation ul { list-style: none; margin: 0; padding: 0; display: flex; align-items: center; }
.main-navigation li { position: relative; margin: 0; }
.main-navigation a {
	display: block;
	padding: 0 20px;
	color: var(--contrast);
	font-size: 15px;
	line-height: 60px;
	text-decoration: none;
}
.main-navigation li:hover > a, .main-navigation li:focus-within > a { color: var(--accent); }
.main-navigation .current-menu-item > a,
.main-navigation .current-menu-ancestor > a,
.main-navigation .current_page_item > a { color: var(--accent); }

.main-navigation ul ul {
	position: absolute;
	top: 100%;
	left: 0;
	z-index: 99;
	min-width: 220px;
	display: none;
	flex-direction: column;
	align-items: stretch;
	background: var(--base);
	box-shadow: 0 2px 4px rgba(0, 0, 0, .1);
}
.main-navigation li:hover > ul, .main-navigation li:focus-within > ul { display: flex; }
.main-navigation ul ul a { padding: 10px 20px; font-size: 14px; line-height: 1.4; }

.nav-tools { display: flex; align-items: center; }
.search-toggle, .menu-toggle {
	padding: 0 15px;
	height: 60px;
	background: transparent;
	color: var(--contrast);
	border: 0;
	font-size: 1em;
	line-height: 60px;
}
.search-toggle:hover, .search-toggle:focus, .menu-toggle:hover, .menu-toggle:focus { background: transparent; color: var(--accent); }
.menu-toggle { display: none; }

.header-search { background: var(--base-3); border-top: 1px solid var(--base); }
.header-search[hidden] { display: none; }
.header-search .search-form { max-width: var(--container); margin: 0 auto; padding: 10px 20px; }

@media (min-width: 769px) {
	.site-header { position: sticky; top: 0; box-shadow: 0 1px 0 var(--base); }
	.admin-bar .site-header { top: 32px; }
}

@media (max-width: 768px) {
	.inside-header { padding: 15px 30px; flex-wrap: wrap; }
	.custom-logo { width: 220px; }
	.nav-wrap { display: contents; }
	.nav-tools { order: 1; margin-left: auto; }
	.menu-toggle { display: block; }
	.main-navigation { order: 2; flex: 0 0 100%; display: none; background: var(--base-3); }
	.main-navigation.is-open { display: block; }
	.main-navigation ul { flex-direction: column; align-items: stretch; }
	.main-navigation a { line-height: 1.4; padding: 12px 0; border-top: 1px solid var(--base); }
	.main-navigation ul ul { position: static; display: flex; box-shadow: none; background: transparent; min-width: 0; padding-left: 15px; }
}

/* ==========================================================================
   4. Structure : conteneur, contenu, barre latérale (cartes séparées)
   ========================================================================== */
.site-content {
	max-width: var(--container);
	margin: 0 auto;
	padding: var(--gap);
	display: flex;
	align-items: flex-start;
	gap: var(--gap);
}
.content-area { flex: 1 1 0; min-width: 0; }
.widget-area.sidebar { flex: 0 0 30%; width: 30%; min-width: 0; }
body:not(.has-sidebar) .content-area { width: 100%; }

.site-main > * { margin-bottom: var(--gap); }
.site-main > *:last-child { margin-bottom: 0; }

.card, .comments-area, .page-header, .post-navigation, .paging-navigation, .widget-area .widget {
	background: var(--base-3);
}
.card, .comments-area, .page-header { padding: var(--pad); }

@media (max-width: 768px) {
	.site-content { flex-direction: column; padding: 15px; gap: 15px; }
	.content-area, .widget-area.sidebar { width: 100%; flex-basis: auto; }
	.card, .comments-area, .page-header { padding: 30px; }
	.site-main > * { margin-bottom: 15px; }
}

/* ==========================================================================
   5. Articles : liste, article seul, pages
   ========================================================================== */
.entry-title { margin: 0; }
.entry-title a { color: var(--contrast); text-decoration: none; }
.entry-title a:hover, .entry-title a:focus { color: var(--contrast-2); }

.entry-meta { margin-top: .5em; font-size: 85%; line-height: 1.5; color: var(--contrast-2); }
.entry-meta a { color: inherit; }
.entry-meta .updated-on, .entry-meta .byline { margin-left: .25em; }
.entry-footer-meta { margin-top: 1.5em; }
.entry-footer-meta > span { display: block; }
.entry-footer-meta .icon { margin-right: .35em; }

.post-image { margin: 0 0 2em; }
.post-image a { display: block; }
.post-image img { width: 100%; height: auto; display: block; }
.single-image { margin: 1.5em 0 1.5em; }
.single-image img { margin: 0 auto; }

.entry-summary p, .entry-summary { margin-bottom: 0; }
.entry-summary { margin-top: 1em; }
.read-more { white-space: nowrap; }

.entry-content > *:last-child { margin-bottom: 0; }
.entry-content img { height: auto; }
.entry-content h2, .entry-content h3, .entry-content h4 { margin-top: 1.6em; }
.entry-content h2:first-child, .entry-content h3:first-child { margin-top: 0; }
.entry-content a { overflow-wrap: anywhere; }
.entry-content iframe { max-width: 100%; }
.entry-content .alignwide, .entry-content .alignfull { max-width: 100%; width: 100%; margin-left: 0; margin-right: 0; }

.alignleft { float: left; margin: .3em 1.5em 1em 0; }
.alignright { float: right; margin: .3em 0 1em 1.5em; }
.aligncenter { display: block; margin-left: auto; margin-right: auto; text-align: center; }
.wp-caption { max-width: 100%; margin-bottom: 1.5em; }
.wp-caption img { display: block; margin: 0 auto; }
.wp-caption-text, figcaption { font-size: 85%; color: var(--contrast-2); text-align: center; padding-top: .5em; }
.gallery { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; margin-bottom: 1.5em; }
.gallery-item { margin: 0; }
.wp-block-image img, .wp-block-embed iframe { max-width: 100%; }
.wp-block-embed__wrapper { position: relative; }
.is-provider-youtube .wp-block-embed__wrapper, .wp-embed-aspect-16-9 .wp-block-embed__wrapper { aspect-ratio: 16 / 9; }
.wp-embed-aspect-16-9 .wp-block-embed__wrapper iframe, .is-provider-youtube .wp-block-embed__wrapper iframe { position: absolute; inset: 0; width: 100%; height: 100%; }
.wp-block-table table { margin-bottom: 0; }
.wp-block-separator { border: 0; border-top: 1px solid var(--base); }

/* Encadrés issus de l'ancien thème (conversion d'[av_notification]) */
blockquote.nps-note {
	margin: 1.5em 0;
	padding: 1em 1.2em;
	background: #f7f7f7;
	border-left: 4px solid #f28705;
	font-style: normal;
	font-size: 1em;
}
blockquote.nps-note p:last-child { margin-bottom: 0; }

/* Fil d'Ariane */
.nps-breadcrumb { font-size: .85em; margin: 0 0 1.2em; color: var(--contrast-2); }
.nps-breadcrumb a { color: inherit; text-decoration: underline; }
.nps-breadcrumb .nps-sep { padding: 0 .15em; }

/* Titre principal de l'accueil (inséré par le plugin SEO) */
.page-header { margin: 0; }
.page-title { margin: 0; font-size: 26px; line-height: 1.25em; }
.nps-home-title .page-title { font-size: 22px; color: var(--contrast-2); }
.taxonomy-description { margin-top: 1em; color: var(--contrast-2); }
.taxonomy-description p:last-child { margin-bottom: 0; }

/* Liens de pagination d'un article (<!--nextpage-->) */
.page-links { clear: both; margin: 1.5em 0 0; }

/* Navigation entre articles */
.post-navigation { padding: 20px var(--pad); }
.post-navigation .nav-links { display: flex; justify-content: space-between; gap: 20px; }
.post-navigation .nav-previous, .post-navigation .nav-next { flex: 1 1 0; }
.post-navigation .nav-next { text-align: right; }
.post-navigation a { text-decoration: none; }
.post-navigation .nav-subtitle { display: block; font-size: 85%; color: var(--contrast-2); }

/* Pagination des listes */
.paging-navigation, .navigation.pagination { background: var(--base-3); padding: 20px var(--pad); }
.navigation.pagination .nav-links { display: flex; flex-wrap: wrap; gap: 4px; align-items: center; justify-content: center; }
.page-numbers { padding: 0 5px; text-decoration: none; }
.page-numbers.current { font-weight: 700; }
.page-numbers.dots { padding: 0; }
@media (max-width: 768px) { .paging-navigation, .navigation.pagination { padding: 20px 30px; } }

/* ==========================================================================
   6. Barre latérale et widgets
   ========================================================================== */
.widget-area .widget { padding: var(--pad); margin: 0 0 var(--gap); }
.widget-area .widget:last-child { margin-bottom: 0; }
.widget-title, .widget h2.wp-block-heading { margin: 0 0 30px; font-size: 20px; line-height: 1.5; }
.widget ul { list-style: none; margin: 0; padding: 0; }
.widget li { margin: 0 0 .6em; }
.widget a { text-decoration: none; }
.widget a:hover { text-decoration: underline; }
.widget .wp-block-latest-posts__list li { overflow: hidden; }
.widget .wp-block-latest-posts__featured-image { float: left; margin: 0 1em .5em 0; }
.widget .wp-block-latest-posts__featured-image img { display: block; width: 80px; height: auto; }
.widget .wp-block-latest-posts__post-date { display: block; font-size: 85%; color: var(--contrast-2); }
.widget .wp-block-latest-posts__post-title { display: block; }
.widget select { width: 100%; }
.widget .wp-block-categories__label { display: block; margin: 0 0 30px; font-size: 20px; }
@media (max-width: 768px) { .widget-area .widget { padding: 30px; } }

/* Formulaire de recherche */
.search-form { display: flex; gap: 0; }
.search-form label { flex: 1 1 auto; margin: 0; }
.search-form .search-field { height: 100%; }
.search-form .search-submit { flex: 0 0 auto; }

/* ==========================================================================
   7. Commentaires
   ========================================================================== */
.comments-title, .comment-reply-title { font-size: 22px; line-height: 1.25em; margin: 0 0 1em; }
.comment-list { list-style: none; margin: 0 0 2em; padding: 0; }
.comment-list .children { list-style: none; margin: 0; padding-left: 40px; }
.comment-body { padding: 1.2em 0; border-top: 1px solid var(--base); }
.comment-meta { display: flex; flex-wrap: wrap; gap: .25em 1em; align-items: center; font-size: 85%; color: var(--contrast-2); }
.comment-author { display: flex; align-items: center; gap: .6em; }
.comment-author img { border-radius: 50%; }
.comment-author .fn { font-style: normal; font-weight: 700; color: var(--contrast); }
.comment-author .says { display: none; }
.comment-metadata a { color: inherit; text-decoration: none; }
.comment-content { margin-top: .6em; }
.comment-content p:last-child { margin-bottom: 0; }
.reply a { font-size: 85%; }
.comment-form label { display: block; margin-bottom: .25em; }
.comment-form p { margin-bottom: 1em; }
.comment-form-cookies-consent { display: flex; gap: .5em; align-items: flex-start; }
.comment-form-cookies-consent label { display: inline; }
.comment-form-cookies-consent input { width: auto; margin-top: .4em; }
@media (max-width: 768px) { .comment-list .children { padding-left: 15px; } }

/* ==========================================================================
   8. Barre de partage (reprise de l'ancienne barre « After Post »)
   ========================================================================== */
.share-bar { margin: 30px 0 0; font-size: 0; }
.share-bar .share-label { display: inline-block; font-size: 16px; font-weight: 700; padding-right: 10px; vertical-align: middle; }
.share-bar .share-link { display: inline-block; padding: 7px 20px; font-size: 17px; line-height: 1; fill: #fff; color: #fff; vertical-align: middle; text-decoration: none; }
.share-bar .share-link svg { position: relative; top: .15em; display: inline-block; width: 18px; height: 18px; fill: #fff; }
.share-bar .share-link:first-of-type { border-radius: 100px 0 0 100px; }
.share-bar .share-link:last-of-type { border-radius: 0 100px 100px 0; }
.share-facebook { background: rgba(59, 89, 152, 1); }
.share-facebook:hover { background: rgba(59, 89, 152, .8); }
.share-whatsapp { background: rgba(37, 211, 102, 1); }
.share-whatsapp:hover { background: rgba(37, 211, 102, .8); }
.share-twitter { background: rgba(29, 161, 242, 1); }
.share-twitter:hover { background: rgba(29, 161, 242, .8); }
.share-pinterest { background: rgba(189, 8, 28, 1); }
.share-pinterest:hover { background: rgba(189, 8, 28, .8); }
.share-linkedin { background: rgba(0, 119, 181, 1); }
.share-linkedin:hover { background: rgba(0, 119, 181, .8); }
.share-reddit { background: rgba(255, 87, 0, 1); }
.share-reddit:hover { background: rgba(255, 87, 0, .8); }
@media (max-width: 600px) {
	.share-bar .share-link { padding: 6px 17px; }
	.share-bar .share-label { display: block; padding: 0 0 8px; }
}

/* ==========================================================================
   9. Pied de page
   ========================================================================== */
.site-footer { margin-top: 0; }
.footer-widgets { background: var(--footer-bg); color: var(--footer-text); }
.footer-widgets a { color: var(--footer-text); }
.footer-widgets a:hover { color: #fff; }
.footer-widgets-inner {
	max-width: var(--container);
	margin: 0 auto;
	padding: 40px;
	display: grid;
	grid-template-columns: repeat(3, 1fr);
	gap: 40px;
}
.footer-widgets .widget { margin: 0 0 30px; }
.footer-widgets .widget:last-child { margin-bottom: 0; }
.footer-widgets .widget-title { margin-bottom: 30px; }
.footer-widgets ul { list-style: none; margin: 0; padding: 0; }
.footer-widgets li { margin: 0 0 .6em; }
.footer-widgets .wp-block-categories__label { color: var(--footer-text); }
.footer-widgets select { background: #fff; color: var(--contrast); border-color: #fff; }
.site-info { background: var(--footer-bar-bg); color: var(--footer-text); font-size: 15px; }
.site-info a { color: var(--footer-text); }
.inside-site-info {
	max-width: var(--container);
	margin: 0 auto;
	padding: 20px;
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	justify-content: space-between;
	gap: 10px 30px;
}
.footer-menu ul { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; gap: 0 20px; }
.footer-menu .current-menu-item > a { color: var(--footer-text); }
@media (max-width: 768px) {
	.footer-widgets-inner { grid-template-columns: 1fr; padding: 30px; gap: 30px; }
	.inside-site-info { padding: 20px 30px; flex-direction: column; text-align: center; }
}

/* ==========================================================================
   10. Page 404, impression
   ========================================================================== */
.error-404 .search-form { margin-top: 1.5em; }
.error-404 ul { margin-top: 1em; }

@media print {
	.site-header, .widget-area, .site-footer, .share-bar, .post-navigation, .comments-area, .nps-breadcrumb { display: none !important; }
	body { background: #fff; font-size: 12pt; }
	.card { padding: 0; }
}

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