/*
Theme Name: Maille Douce
Theme URI: https://wordpress-icir.srv2057547.hstgr.cloud
Author: blogin
Description: Thème blog léger et doux pour un blog crochet. Couleurs beige, rose poudré et vert sauge. Grille d'articles, lecture confortable, pensé mobile d'abord.
Version: 1.0.0
Requires at least: 6.6
Tested up to: 6.8
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: maille-douce
Tags: blog, block-patterns, full-site-editing, grid-layout, one-column, custom-colors, editor-style
*/

/* ---------- En-tête ---------- */
.site-header { border-bottom: 1px solid var(--wp--preset--color--border); position: relative; }
.site-header::after {
	content: ""; position: absolute; left: 0; right: 0; bottom: -4px; height: 3px;
	background: repeating-linear-gradient(90deg, var(--wp--preset--color--rose) 0 10px, transparent 10px 16px, var(--wp--preset--color--sauge) 16px 26px, transparent 26px 32px);
	opacity: .55;
}
.site-header .wp-block-site-title a { text-decoration: none; }
.site-header .wp-block-navigation a { text-decoration: none; }
.site-header .wp-block-navigation .wp-block-navigation-item__content { padding: .35em .8em; border-radius: 999px; transition: background .2s; }
.site-header .wp-block-navigation .wp-block-navigation-item__content:hover,
.site-header .wp-block-navigation .current-menu-item > .wp-block-navigation-item__content { background: var(--wp--preset--color--rose-clair); }

/* ---------- Accueil ---------- */
.hero { border-radius: 28px; overflow: hidden; position: relative; }
.hero::before {
	content: ""; position: absolute; right: -60px; top: -60px; width: 220px; height: 220px; border-radius: 50%;
	border: 14px dotted rgba(255,255,255,.55);
}
.hero > * { position: relative; }
.cat-pills a {
	display: inline-block; margin: .25rem .2rem; padding: .45em 1em; border-radius: 999px;
	background: var(--wp--preset--color--base); color: var(--wp--preset--color--contrast);
	text-decoration: none; font-weight: 600; font-size: .95rem; border: 1px solid var(--wp--preset--color--border);
	transition: transform .15s, background .2s;
}
.cat-pills a:hover { background: var(--wp--preset--color--rose-clair); transform: translateY(-2px); }

/* ---------- Cartes d'articles ---------- */
.post-card {
	height: 100%; display: flex; flex-direction: column; background: var(--wp--preset--color--base);
	border: 1px solid var(--wp--preset--color--border); border-radius: 20px; overflow: hidden;
	transition: transform .2s, box-shadow .2s;
}
.post-card:hover { transform: translateY(-4px); box-shadow: 0 14px 30px -18px rgba(90, 60, 50, .45); }
.post-card .wp-block-post-featured-image { margin: 0; }
.post-card .wp-block-post-featured-image img { border-radius: 0; }
.post-card__body { flex: 1; }
.post-card__title a { text-decoration: none; }
.post-card__title a:hover { color: var(--wp--preset--color--rose-fonce); }
.post-card .wp-block-post-excerpt__excerpt { margin: 0; }
.post-card:not(:has(.wp-block-post-featured-image)) { border-top: 6px solid var(--wp--preset--color--rose); }
.wp-block-post-template > li:nth-child(3n+2) .post-card:not(:has(.wp-block-post-featured-image)) { border-top-color: var(--wp--preset--color--sauge); }
.wp-block-post-template > li:nth-child(3n) .post-card:not(:has(.wp-block-post-featured-image)) { border-top-color: var(--wp--preset--color--beige-fonce); }

.cat-badge a, .cat-badge {
	text-decoration: none; text-transform: uppercase; letter-spacing: .08em; font-weight: 700; font-size: .75rem;
	color: var(--wp--preset--color--sauge-fonce);
}

/* ---------- Article ---------- */
.single-hero-img img { border-radius: 24px; }
.entry-content > p:first-child::first-letter {
	float: left; font-size: 3.4em; line-height: .9; padding: .08em .12em 0 0;
	color: var(--wp--preset--color--rose-fonce); font-weight: 700;
}
.entry-content h2 { position: relative; padding-left: .9em; }
.entry-content h2::before {
	content: ""; position: absolute; left: 0; top: .45em; width: .45em; height: .45em; border-radius: 50%;
	background: var(--wp--preset--color--rose);
	box-shadow: 0 0 0 4px var(--wp--preset--color--rose-clair);
}
.entry-content img { border-radius: 16px; }
.entry-content blockquote { border-left: 4px solid var(--wp--preset--color--sauge); background: var(--wp--preset--color--sauge-clair); padding: 1em 1.4em; border-radius: 0 16px 16px 0; }
.entry-content ul li::marker { color: var(--wp--preset--color--rose-fonce); }
.post-tags a { display: inline-block; padding: .25em .8em; margin: .15em; border-radius: 999px; background: var(--wp--preset--color--beige); text-decoration: none; font-size: .9rem; }

/* ---------- Pied de page ---------- */
.site-footer a { text-decoration: none; }
.site-footer a:hover { text-decoration: underline; }

/* ---------- Divers ---------- */
:where(a:focus-visible, button:focus-visible) { outline: 3px solid var(--wp--preset--color--sauge); outline-offset: 2px; border-radius: 6px; }
.wp-block-query-pagination a, .wp-block-query-pagination .page-numbers { padding: .3em .75em; border-radius: 999px; text-decoration: none; }
.wp-block-query-pagination .page-numbers.current { background: var(--wp--preset--color--rose-clair); }
@media (prefers-reduced-motion: reduce) { * { transition: none !important; } }

/* Grilles : les cartes remplissent toute la largeur */
.wp-block-post-template.is-layout-grid { grid-template-columns: repeat(auto-fit, minmax(min(17rem, 100%), 1fr)); }
.site-footer ul { list-style: none; }
.site-footer li { margin: .3em 0; }
.single-hero-img { margin-bottom: var(--wp--preset--spacing--40) !important; }
