/*
Theme Name: Perles
Theme URI: https://lesperlesdecathy.be
Author: CCOM
Description: Thème sur mesure pour Les Perles de Cathy — le blog de Catherine Coyette. Léger, lisible, sans dépendance.
Version: 1.0.0
Requires at least: 6.2
Requires PHP: 7.4
Text Domain: perles
License: GPLv2 or later
*/

/* ---------- Polices (auto-hébergées) ---------- */
@font-face { font-family: "Cormorant Garamond"; font-style: normal; font-weight: 500; font-display: swap; src: url(assets/fonts/cormorant-garamond-latin-500-normal.woff2) format("woff2"); }
@font-face { font-family: "Cormorant Garamond"; font-style: italic; font-weight: 500; font-display: swap; src: url(assets/fonts/cormorant-garamond-latin-500-italic.woff2) format("woff2"); }
@font-face { font-family: "Cormorant Garamond"; font-style: normal; font-weight: 600; font-display: swap; src: url(assets/fonts/cormorant-garamond-latin-600-normal.woff2) format("woff2"); }
@font-face { font-family: "Source Sans 3"; font-style: normal; font-weight: 400; font-display: swap; src: url(assets/fonts/source-sans-3-latin-400-normal.woff2) format("woff2"); }
@font-face { font-family: "Source Sans 3"; font-style: italic; font-weight: 400; font-display: swap; src: url(assets/fonts/source-sans-3-latin-400-italic.woff2) format("woff2"); }
@font-face { font-family: "Source Sans 3"; font-style: normal; font-weight: 600; font-display: swap; src: url(assets/fonts/source-sans-3-latin-600-normal.woff2) format("woff2"); }

/* ---------- Jetons ---------- */
:root {
	--berry: #b80c4c;        /* framboise du logo, assombrie pour le contraste */
	--berry-deep: #7d0a35;
	--blush: #fbecf1;
	--blush-2: #f5dbe4;
	--cream: #fdf9f6;
	--paper: #ffffff;
	--ink: #2d2a2c;
	--muted: #6e6569;
	--line: #eee2e4;
	--footer: #3a1422;

	--serif: "Cormorant Garamond", "Iowan Old Style", Georgia, serif;
	--sans: "Source Sans 3", -apple-system, "Segoe UI", Roboto, sans-serif;

	--wrap: 1180px;
	--measure: 700px;
	--radius: 14px;
	--shadow: 0 1px 2px rgba(61, 20, 34, .05), 0 8px 28px -12px rgba(61, 20, 34, .18);
	--gutter: clamp(16px, 4vw, 40px);
}

/* ---------- Base ---------- */
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
body {
	margin: 0;
	background: var(--cream);
	color: var(--ink);
	font: 400 1.125rem/1.7 var(--sans);
	-webkit-font-smoothing: antialiased;
	overflow-x: hidden;
}
img, video, iframe { max-width: 100%; height: auto; }
a { color: var(--berry); text-decoration-thickness: 1px; text-underline-offset: .18em; }
a:hover { color: var(--berry-deep); }
:focus-visible { outline: 2px solid var(--berry); outline-offset: 3px; border-radius: 4px; }
h1, h2, h3, h4, h5, h6 { font-family: var(--serif); font-weight: 600; line-height: 1.15; color: var(--ink); margin: 1.6em 0 .5em; letter-spacing: -.005em; }
h1 { font-size: clamp(2.2rem, 4.5vw, 3.4rem); }
h2 { font-size: clamp(1.7rem, 3vw, 2.2rem); }
h3 { font-size: 1.5rem; }
h4 { font-size: 1.25rem; }
p { margin: 0 0 1.2em; }
hr { border: 0; height: 1px; background: var(--line); margin: 3rem 0; }

.screen-reader-text { position: absolute !important; width: 1px; height: 1px; overflow: hidden; clip: rect(1px,1px,1px,1px); white-space: nowrap; }
.skip-link:focus { position: fixed !important; top: 12px; left: 12px; width: auto; height: auto; clip: auto; z-index: 100; padding: .6em 1em; background: var(--paper); border-radius: 8px; box-shadow: var(--shadow); }

.wrap { max-width: var(--wrap); margin: 0 auto; padding: 0 var(--gutter); }

/* Trois perles */
.pearls { display: flex; justify-content: center; gap: 10px; margin: 1.6rem auto; }
.pearls span { width: 9px; height: 9px; border-radius: 50%; background: radial-gradient(circle at 35% 30%, #fff 0 18%, var(--blush-2) 45%, #d9a9b8 100%); box-shadow: 0 1px 2px rgba(125, 10, 53, .25); }
.pearls span:nth-child(2) { width: 12px; height: 12px; margin-top: -1.5px; }

/* Chips & boutons */
.chip {
	display: inline-block;
	font: 600 .74rem/1 var(--sans);
	letter-spacing: .09em;
	text-transform: uppercase;
	color: var(--berry);
	background: var(--blush);
	padding: .55em .9em;
	border-radius: 999px;
	text-decoration: none;
	transition: background .2s, color .2s;
}
.chip:hover { background: var(--berry); color: #fff; }
.chip--outline { background: transparent; border: 1px solid var(--blush-2); color: var(--ink); font-weight: 400; letter-spacing: .06em; padding: .7em 1.1em; }
.chip--outline:hover { border-color: var(--berry); background: var(--berry); color: #fff; }

.btn, .wp-block-button__link, input[type="submit"], button[type="submit"].btn {
	display: inline-block;
	font: 600 .95rem/1 var(--sans);
	letter-spacing: .02em;
	color: #fff;
	background: var(--berry);
	border: 0;
	border-radius: 999px;
	padding: .95em 1.6em;
	text-decoration: none;
	cursor: pointer;
	transition: background .2s, transform .2s;
}
.btn:hover, .wp-block-button__link:hover { background: var(--berry-deep); color: #fff; transform: translateY(-1px); }
.link-arrow { font-weight: 600; text-decoration: none; }
.link-arrow:hover { text-decoration: underline; }

/* ---------- En-tête ---------- */
.site-header { background: var(--paper); border-bottom: 1px solid var(--line); position: relative; z-index: 20; }
.site-header__inner { max-width: var(--wrap); margin: 0 auto; padding: 18px var(--gutter) 0; display: flex; flex-direction: column; align-items: center; }
.site-branding { line-height: 0; }
.custom-logo-link img, .custom-logo { width: auto; height: 132px; display: block; }
.site-title { font: 600 2rem/1 var(--serif); color: var(--berry); text-decoration: none; line-height: 1.2; }

.site-nav { width: 100%; display: flex; align-items: center; justify-content: center; gap: 1.5rem; border-top: 1px solid var(--line); margin-top: 14px; }
.site-nav .menu { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; justify-content: center; }
.site-nav .menu > li { position: relative; display: flex; align-items: center; }
.site-nav .menu a {
	display: block;
	padding: 1.05rem .95rem;
	font: 600 .82rem/1 var(--sans);
	letter-spacing: .12em;
	text-transform: uppercase;
	color: var(--ink);
	text-decoration: none;
	transition: color .2s;
}
.site-nav .menu > li > a { position: relative; }
.site-nav .menu > li > a::after { content: ""; position: absolute; left: .95rem; right: .95rem; bottom: .7rem; height: 1px; background: var(--berry); transform: scaleX(0); transition: transform .25s; }
.site-nav .menu > li:hover > a, .site-nav .menu > .current-menu-item > a, .site-nav .menu > .current-menu-ancestor > a, .site-nav .menu > .current_page_item > a { color: var(--berry); }
.site-nav .menu > li:hover > a::after, .site-nav .menu > .current-menu-item > a::after, .site-nav .menu > .current_page_item > a::after { transform: scaleX(1); }

.submenu-toggle { background: none; border: 0; color: var(--muted); padding: 4px; margin-left: -10px; margin-right: 4px; cursor: pointer; display: inline-flex; }
.site-nav .sub-menu, .site-nav .children {
	list-style: none; margin: 0; padding: .5rem 0;
	position: absolute; top: 100%; left: 50%; min-width: 240px;
	background: var(--paper); border: 1px solid var(--line); border-radius: 12px; box-shadow: var(--shadow);
	opacity: 0; visibility: hidden; transform: translate(-50%, 6px); transition: opacity .2s, transform .2s, visibility .2s;
}
.site-nav li:hover > .sub-menu, .site-nav li:focus-within > .sub-menu, .site-nav li.is-open > .sub-menu { opacity: 1; visibility: visible; transform: translate(-50%, 0); }
.site-nav .sub-menu a { padding: .7rem 1.2rem; text-transform: none; letter-spacing: .01em; font-size: .98rem; font-weight: 400; }
.site-nav .sub-menu a:hover { background: var(--blush); color: var(--berry); }

.nav-search { display: flex; align-items: center; border: 1px solid var(--line); border-radius: 999px; background: var(--cream); padding: 0 4px 0 14px; }
.nav-search input[type="search"] { border: 0; border-radius: 0; box-shadow: none; background: transparent; font: inherit; font-size: .92rem; width: 130px; padding: .5rem 0; color: var(--ink); outline: none; transition: width .25s; }
.nav-search input:focus { width: 190px; }
.nav-search:focus-within { border-color: var(--berry); }
.nav-search button { border: 0; background: none; color: var(--muted); padding: 6px 8px; cursor: pointer; display: inline-flex; }

.menu-toggle { display: none; }

@media (max-width: 900px) {
	.site-header { position: sticky; top: 0; }
	.site-header__inner { flex-direction: row; justify-content: space-between; padding: 10px var(--gutter); }
	.custom-logo-link img, .custom-logo { height: 64px; }
	.menu-toggle { display: inline-flex; align-items: center; gap: 10px; background: none; border: 1px solid var(--line); border-radius: 999px; padding: 10px 16px; font: 600 .8rem/1 var(--sans); letter-spacing: .1em; text-transform: uppercase; color: var(--ink); cursor: pointer; }
	.menu-toggle__bars { display: grid; gap: 4px; }
	.menu-toggle__bars span { width: 18px; height: 1.5px; background: currentColor; transition: transform .25s, opacity .2s; }
	.nav-open .menu-toggle__bars span:nth-child(1) { transform: translateY(5.5px) rotate(45deg); }
	.nav-open .menu-toggle__bars span:nth-child(2) { opacity: 0; }
	.nav-open .menu-toggle__bars span:nth-child(3) { transform: translateY(-5.5px) rotate(-45deg); }

	.site-nav { display: none; position: absolute; left: 0; right: 0; top: 100%; margin: 0; flex-direction: column; align-items: stretch; gap: 0; background: var(--paper); border-bottom: 1px solid var(--line); box-shadow: var(--shadow); padding: .5rem var(--gutter) 1.25rem; max-height: calc(100vh - 85px); overflow-y: auto; }
	.nav-open .site-nav { display: flex; }
	.site-nav .menu { flex-direction: column; }
	.site-nav .menu > li { flex-wrap: wrap; border-bottom: 1px solid var(--line); }
	.site-nav .menu > li > a { flex: 1; padding: 1.05rem 0; }
	.site-nav .menu > li > a::after { display: none; }
	.submenu-toggle { margin: 0; padding: 12px; }
	.site-nav .sub-menu, .site-nav .children { position: static; transform: none; opacity: 1; visibility: visible; box-shadow: none; border: 0; border-radius: 0; min-width: 0; width: 100%; padding: 0 0 .6rem .8rem; display: none; }
	.site-nav li.is-open > .sub-menu, .site-nav li.is-open > .children { display: block; transform: none; }
	.site-nav li:hover > .sub-menu { transform: none; }
	.site-nav .sub-menu a { padding: .55rem 0; }
	.nav-search { margin-top: 1rem; }
	.nav-search input[type="search"], .nav-search input[type="search"]:focus { width: auto; flex: 1; min-width: 0; }
}

/* ---------- Intro accueil ---------- */
.intro { text-align: center; padding: clamp(2.5rem, 6vw, 4.5rem) var(--gutter) 2rem; max-width: 900px; margin: 0 auto; }
.intro__kicker, .page-head__kicker { font: 600 .78rem/1 var(--sans); letter-spacing: .2em; text-transform: uppercase; color: var(--berry); margin: 0 0 1rem; }
.intro__title { font-size: clamp(2.4rem, 6vw, 4rem); margin: 0; font-weight: 500; }
.topics { display: flex; flex-wrap: wrap; justify-content: center; gap: .55rem; }

.page-head { text-align: center; padding: clamp(2.5rem, 6vw, 4rem) var(--gutter) .5rem; max-width: 820px; margin: 0 auto; }
.page-head__title { margin: 0; font-weight: 500; }
.page-head__desc { color: var(--muted); }
.page-head--404 { padding-bottom: 4rem; }
.page-head--404 .search-form { justify-content: center; margin: 1.5rem auto; }

/* ---------- Cartes ---------- */
.grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: clamp(1.25rem, 2.5vw, 2rem); }
@media (max-width: 980px) { .grid { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 620px) { .grid { grid-template-columns: 1fr; } }

.card { background: var(--paper); border-radius: var(--radius); overflow: hidden; box-shadow: var(--shadow); display: flex; flex-direction: column; transition: transform .3s ease, box-shadow .3s ease; }
.card:hover { transform: translateY(-3px); box-shadow: 0 1px 2px rgba(61,20,34,.05), 0 18px 40px -16px rgba(61,20,34,.28); }
.card__media { display: block; aspect-ratio: 3 / 2; overflow: hidden; background: var(--blush); }
.card__media img { width: 100%; height: 100%; object-fit: cover; display: block; transition: transform .6s ease; }
.card:hover .card__media img { transform: scale(1.04); }
.card__placeholder { display: flex; width: 100%; height: 100%; align-items: center; justify-content: center; background: radial-gradient(120% 90% at 20% 10%, #fff 0, var(--blush) 45%, var(--blush-2) 100%); }
.card__placeholder .pearls span { width: 14px; height: 14px; }
.card__placeholder .pearls span:nth-child(2) { width: 19px; height: 19px; margin-top: -2.5px; }
.card__body { padding: 1.3rem 1.4rem 1.5rem; display: flex; flex-direction: column; align-items: flex-start; flex: 1; }
.card__title { font-size: 1.55rem; margin: .8rem 0 .4rem; line-height: 1.18; }
.card__title a { color: var(--ink); text-decoration: none; background: linear-gradient(var(--blush-2), var(--blush-2)) 0 92% / 0 .35em no-repeat; transition: background-size .35s; }
.card__title a:hover { background-size: 100% .35em; }
.card__meta { font-size: .85rem; color: var(--muted); margin: 0 0 .7rem; }
.card__excerpt { color: #4d4549; font-size: 1rem; line-height: 1.6; }
.card__excerpt p { margin: 0; }

.card--feature { display: grid; grid-template-columns: 1.25fr 1fr; margin-bottom: clamp(1.5rem, 3vw, 2.5rem); }
.card--feature .card__media { aspect-ratio: auto; min-height: 420px; }
.card--feature .card__body { padding: clamp(1.75rem, 4vw, 3.25rem); justify-content: center; }
.card--feature .card__title { font-size: clamp(1.9rem, 3.4vw, 2.7rem); font-weight: 500; }
.card--feature .card__excerpt { font-size: 1.08rem; margin-bottom: 1.6rem; }
@media (max-width: 820px) {
	.card--feature { grid-template-columns: 1fr; }
	.card--feature .card__media { min-height: 0; aspect-ratio: 3 / 2; }
}

/* Pagination */
.pagination { margin: 3.5rem 0 1rem; }
.pagination .nav-links { display: flex; flex-wrap: wrap; justify-content: center; gap: .4rem; }
.page-numbers { display: inline-flex; align-items: center; justify-content: center; min-width: 44px; height: 44px; padding: 0 .9rem; border-radius: 999px; text-decoration: none; color: var(--ink); background: var(--paper); border: 1px solid var(--line); font-weight: 600; font-size: .95rem; }
.page-numbers:hover { border-color: var(--berry); color: var(--berry); }
.page-numbers.current { background: var(--berry); border-color: var(--berry); color: #fff; }
.page-numbers.dots { border: 0; background: none; }

.empty { text-align: center; padding: 3rem 0; }

/* ---------- Article / page ---------- */
.entry { padding: clamp(2.5rem, 6vw, 4.5rem) var(--gutter) 1rem; }
.entry-head { max-width: 860px; margin: 0 auto; text-align: center; }
.entry-cats { display: flex; flex-wrap: wrap; justify-content: center; gap: .5rem; margin-bottom: 1.4rem; }
.entry-title { margin: 0; font-weight: 500; font-size: clamp(2.2rem, 5vw, 3.5rem); text-wrap: balance; }
.entry-meta { color: var(--muted); font-size: .95rem; margin: 1.1rem 0 0; }
.entry-hero { max-width: 1100px; margin: clamp(2rem, 4vw, 3rem) auto; }
.entry-hero img { width: 100%; max-height: 640px; object-fit: cover; border-radius: var(--radius); display: block; }
.entry--page .entry-hero { margin-top: 0; }

.entry-content { max-width: var(--measure); margin: 0 auto; }
.entry-content > * { margin-left: auto; margin-right: auto; }
.entry-content > p:first-child, .entry-content > .wp-block-paragraph:first-child { font-size: 1.22rem; }
.entry-content .alignwide { max-width: 1000px; width: calc(100vw - 2 * var(--gutter)); margin-left: 50%; transform: translateX(-50%); }
.entry-content .alignfull { width: 100vw; max-width: 100vw; margin-left: 50%; transform: translateX(-50%); }
.entry-content img { border-radius: 8px; }
.entry-content figure { margin: 2rem 0; }
.entry-content figcaption, .wp-caption-text { font-size: .88rem; color: var(--muted); text-align: center; margin-top: .6rem; }
.entry-content .aligncenter { display: block; margin-left: auto; margin-right: auto; }
.entry-content .alignleft { float: left; margin: .4rem 1.75rem 1rem 0; max-width: 50%; }
.entry-content .alignright { float: right; margin: .4rem 0 1rem 1.75rem; max-width: 50%; }
.entry-content::after { content: ""; display: table; clear: both; }
@media (max-width: 620px) { .entry-content .alignleft, .entry-content .alignright { float: none; margin: 1.5rem auto; max-width: 100%; } }
.wp-caption { max-width: 100%; }
.entry-content ul, .entry-content ol { padding-left: 1.3em; margin: 0 0 1.4em; }
.entry-content li { margin-bottom: .35em; }
.entry-content li::marker { color: var(--berry); }
.entry-content blockquote, .wp-block-quote {
	margin: 2.4rem 0; padding: .4rem 0 .4rem 1.6rem; border-left: 3px solid var(--berry);
	font: italic 500 1.55rem/1.45 var(--serif); color: var(--ink);
}
.entry-content blockquote p:last-child { margin-bottom: 0; }
.entry-content blockquote cite, .wp-block-quote cite { display: block; font: normal 600 .85rem/1.4 var(--sans); color: var(--muted); margin-top: .8rem; letter-spacing: .05em; }
.wp-block-pullquote { border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); padding: 2rem 0; }
.entry-content table { width: 100%; border-collapse: collapse; font-size: 1rem; margin: 2rem 0; }
.entry-content th, .entry-content td { border-bottom: 1px solid var(--line); padding: .7rem .5rem; text-align: left; }
.entry-content iframe { display: block; margin: 2rem auto; border-radius: 8px; }
.entry-content pre { background: var(--blush); padding: 1rem; border-radius: 8px; overflow-x: auto; font-size: .9rem; }
.entry-content .wp-block-gallery, .entry-content .gallery { margin: 2.2rem 0; }
.entry-content .wp-block-gallery figure img { border-radius: 6px; }
.entry-content .wp-block-latest-posts { list-style: none; padding: 0; }
.entry-content strong { font-weight: 600; }
.entry-content a { word-break: break-word; }
.has-text-align-left { text-align: left; }
.has-text-align-center { text-align: center; }

.entry-foot { max-width: var(--measure); margin: 3rem auto 0; }
.entry-tags { display: flex; flex-wrap: wrap; gap: .4rem; margin-bottom: 2rem; }
.entry-tags a { font-size: .85rem; color: var(--muted); text-decoration: none; border: 1px solid var(--line); border-radius: 999px; padding: .3em .85em; }
.entry-tags a:hover { color: var(--berry); border-color: var(--berry); }
.post-navigation .nav-links { display: grid; grid-template-columns: 1fr 1fr; gap: 1rem; border-top: 1px solid var(--line); padding-top: 1.75rem; }
.post-navigation a { display: block; text-decoration: none; padding: 1.1rem 1.25rem; border-radius: 12px; background: var(--paper); box-shadow: var(--shadow); height: 100%; }
.post-navigation .nav-next { text-align: right; grid-column: 2; }
.post-navigation .nav-label { display: block; font: 600 .74rem/1 var(--sans); letter-spacing: .12em; text-transform: uppercase; color: var(--berry); margin-bottom: .5rem; }
.post-navigation .nav-title { font: 600 1.2rem/1.25 var(--serif); color: var(--ink); }
@media (max-width: 620px) { .post-navigation .nav-links { grid-template-columns: 1fr; } .post-navigation .nav-next { grid-column: 1; } }

.related { padding-top: clamp(2.5rem, 6vw, 4rem); }
.section-title { text-align: center; font-weight: 500; margin: 0 0 2rem; }
.page-links { margin: 2rem 0; font-weight: 600; }

/* Formulaires */
.search-form { display: flex; gap: .5rem; max-width: 460px; margin: 1rem auto; }
input[type="search"], input[type="text"], input[type="email"], textarea {
	font: inherit; font-size: 1rem; color: var(--ink); background: var(--paper);
	border: 1px solid var(--line); border-radius: 999px; padding: .8em 1.2em; width: 100%;
}
textarea { border-radius: 14px; }
input:focus, textarea:focus { outline: none; border-color: var(--berry); box-shadow: 0 0 0 3px var(--blush); }

/* ---------- Pied de page ---------- */
.site-footer { background: var(--footer); color: #e9d9de; margin-top: clamp(4rem, 8vw, 6rem); font-size: 1rem; }
.site-footer a { color: #fff; text-decoration: none; }
.site-footer a:hover { color: #f7c6d6; }
.site-footer__inner { max-width: var(--wrap); margin: 0 auto; padding: clamp(3rem, 6vw, 4.5rem) var(--gutter) 2rem; display: grid; grid-template-columns: 1.4fr 1fr 1fr; gap: 2.5rem; }
@media (max-width: 820px) { .site-footer__inner { grid-template-columns: 1fr 1fr; } .footer-about { grid-column: 1 / -1; } }
@media (max-width: 480px) { .site-footer__inner { grid-template-columns: 1fr; } }
.footer-brand { font: 500 2rem/1.1 var(--serif); display: inline-block; margin-bottom: .8rem; }
.footer-about p { max-width: 380px; color: #d8c3ca; }
.footer-title, .site-footer .widget-title { font: 600 .78rem/1 var(--sans); letter-spacing: .18em; text-transform: uppercase; color: #f7c6d6; margin: .6rem 0 1.1rem; }
.site-footer ul { list-style: none; margin: 0; padding: 0; }
.site-footer li { margin-bottom: .55rem; }
.site-footer .link-arrow { color: #f7c6d6; }
.site-footer__bottom { border-top: 1px solid rgba(255, 255, 255, .1); text-align: center; padding: .5rem var(--gutter) 2rem; font-size: .88rem; color: #bfa6ae; }
.site-footer__bottom .pearls { margin: 1.2rem auto .8rem; }
.site-footer__bottom p { margin: 0; }

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