/*
Theme Name: VendezMalin
Theme URI: https://www.vendezmalin.fr/
Description: Thème enfant de Twenty Twenty-Five pour VendezMalin : papier, pêche et cuivre, Fraunces et Figtree.
Author: VendezMalin
Template: twentytwentyfive
Version: 1.0.2
Requires at least: 6.7
Requires PHP: 8.0
Text Domain: vendezmalin
*/

/* ---------- Bases ---------- */
:root { --vm-ombre: 0 1px 0 rgba(42,33,28,.06), 0 8px 24px rgba(42,33,28,.05); }
body { -webkit-font-smoothing: antialiased; text-rendering: optimizeLegibility; }
h1, h2, h3, h4, .wp-block-post-title { font-optical-sizing: auto; text-wrap: balance; }
::selection { background: #F6E6D6; }
:where(a):focus-visible, :where(button):focus-visible { outline: 2px solid #9A4E17; outline-offset: 3px; border-radius: 4px; }

.vm-eyebrow { font-size: 13px !important; font-weight: 600; letter-spacing: .14em; text-transform: uppercase; color: #9A4E17; margin: 0; }
.vm-cat, .vm-cat a { font-size: 12px; font-weight: 600; letter-spacing: .12em; text-transform: uppercase; color: #3F5A47 !important; text-decoration: none !important; }
.vm-meta { font-size: 15px; color: #5E524A; }
.vm-link-arrow a, a.vm-link-arrow { font-weight: 600; text-decoration: none; }
.vm-link-arrow a:hover, a.vm-link-arrow:hover { text-decoration: underline; }

/* Bouton secondaire (style « contour » du bloc bouton) */
.wp-block-button.is-style-outline > .wp-block-button__link { background: transparent; color: #2A211C; border: 1.5px solid #2A211C; }
.wp-block-button.is-style-outline > .wp-block-button__link:hover { background: #2A211C; color: #FBF7F2; }

/* ---------- En-tête ---------- */
.vm-header { border-bottom: 1px solid #EADFD3; }
.vm-header .wp-block-site-logo img { mix-blend-mode: multiply; height: auto; }
.wp-site-blocks > .wp-block-template-part, .wp-site-blocks > main { margin-block-start: 0 !important; }
.vm-header .wp-block-navigation a { text-decoration: none; }
.vm-header .wp-block-navigation a:hover { color: #9A4E17; }
.vm-header .wp-block-navigation .current-menu-item > a, .vm-header .wp-block-navigation a[aria-current="page"] { color: #9A4E17; }
.vm-header .wp-block-search__button { border-radius: 999px; background: #FFFFFF; border: 1.5px solid #EADFD3; color: #2A211C; width: 44px; height: 44px; padding: 0; display: flex; align-items: center; justify-content: center; }
.vm-header .wp-block-search__button:hover { border-color: #2A211C; }
.vm-header .wp-block-search__input { border-radius: 999px; border: 1.5px solid #EADFD3; background: #FFFFFF; font-size: 16px; padding: 10px 16px; }
.wp-block-navigation__responsive-container.is-menu-open { background: #FBF7F2 !important; padding: 32px 24px; }
.wp-block-navigation__responsive-container.is-menu-open .wp-block-navigation-item { font-family: Fraunces, Georgia, serif; font-size: 26px; font-weight: 600; }

/* ---------- Cartes ---------- */
.vm-card { background: #FFFFFF; border-radius: 20px; overflow: hidden; box-shadow: var(--vm-ombre); height: 100%; display: flex; flex-direction: column; transition: transform .2s ease, box-shadow .2s ease; }
.vm-card:hover { transform: translateY(-2px); box-shadow: 0 1px 0 rgba(42,33,28,.06), 0 14px 32px rgba(42,33,28,.09); }
.vm-card.is-flat { box-shadow: none; background: #FBF7F2; }
.vm-card .wp-block-post-featured-image { margin: 0; }
.vm-card .wp-block-post-featured-image img { width: 100%; object-fit: cover; display: block; }
.vm-card .wp-block-post-title a { text-decoration: none; color: #2A211C; }
.vm-card:hover .wp-block-post-title a { color: #9A4E17; }
.vm-card-body { padding: 22px 24px 26px; display: flex; flex-direction: column; gap: 10px; }
.vm-card h2, .vm-card h3 { margin: 0; font-size: 22px; line-height: 1.3; font-family: Fraunces, Georgia, serif; font-weight: 600; }
.vm-card img { width: 100%; object-fit: cover; display: block; }
.wp-block-post-template.is-layout-grid > li { display: flex; }
.wp-block-post-template.is-layout-grid > li > .vm-card { width: 100%; }

/* Cartes de rubrique (accueil) */
.vm-rubrique { border-radius: 20px; padding: 28px !important; display: flex; flex-direction: column; gap: 14px; text-decoration: none; color: #2A211C; height: 100%; box-sizing: border-box; transition: transform .2s ease; }
.vm-rubrique:hover { transform: translateY(-2px); }
.vm-rubrique h3 { margin: 0; font-size: 24px; }
.vm-rubrique p { margin: 0; font-size: 16px; line-height: 1.55; color: #5E524A; }
.vm-rubrique .vm-nb { margin-top: auto; font-weight: 600; font-size: 15px; }
.vm-rubrique.is-peche { background: #F6E6D6; } .vm-rubrique.is-peche .vm-nb { color: #9A4E17; }
.vm-rubrique.is-sauge { background: #E6ECE4; } .vm-rubrique.is-sauge .vm-nb { color: #3F5A47; }
.vm-grid4 { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 24px; }
.vm-grid3 { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 28px; }

/* Guides essentiels */
.vm-feat { display: grid; grid-template-columns: minmax(0, 1.2fr) minmax(0, 1fr); gap: 28px; }
.vm-feat-list { display: flex; flex-direction: column; gap: 20px; }
.vm-feat-big img { width: 100%; height: 340px; object-fit: cover; display: block; }
.vm-feat-big .vm-card-body { padding: 28px 32px 32px; }
.vm-feat-big h3 { font-size: 32px; margin: 0; line-height: 1.2; }
.vm-feat-big p { margin: 0; font-size: 17px; line-height: 1.6; color: #5E524A; }
.vm-mini { flex-direction: row; }
.vm-mini img { width: 160px; min-height: 128px; height: 100%; object-fit: cover; display: block; flex-shrink: 0; }
.vm-mini .vm-card-body { padding: 18px 22px; justify-content: center; gap: 8px; }
.vm-mini h3 { font-size: 19px; margin: 0; line-height: 1.3; }
a.vm-card { text-decoration: none; color: #2A211C; }
a.vm-card:hover h3 { color: #9A4E17; }
a.vm-card h3 { font-family: Fraunces, Georgia, serif; font-weight: 600; }

/* Accueil : accroche */
.vm-hero { display: grid; grid-template-columns: minmax(0, 1.15fr) minmax(0, .85fr); gap: 64px; align-items: center; }
.vm-hero-visuel { position: relative; display: flex; justify-content: center; }
.vm-hero-visuel::before { content: ""; position: absolute; width: 88%; height: 70%; top: 18%; left: 4%; background: #F6E6D6; border-radius: 48% 52% 44% 56% / 56% 42% 58% 44%; }
.vm-hero-visuel img { position: relative; width: 340px; height: 440px; object-fit: cover; border-radius: 200px 200px 24px 24px; display: block; }
.vm-hero-badge { position: absolute; bottom: 28px; left: 0; background: #FFFFFF; border-radius: 16px; padding: 14px 18px; display: flex; flex-direction: column; gap: 2px; box-shadow: 0 10px 30px rgba(42,33,28,.10); line-height: 1.3; }
.vm-hero-badge strong { font-size: 15px; } .vm-hero-badge span { font-size: 13px; color: #5E524A; }
.vm-about { box-sizing: border-box; display: grid; grid-template-columns: 280px minmax(0, 1fr); gap: 56px; align-items: center; background: #F6E6D6; border-radius: 32px; padding: 48px 56px; }
.vm-about img { width: 280px; height: 280px; object-fit: cover; border-radius: 999px; display: block; }
.vm-about p { color: #4A3F38; }

/* ---------- Article ---------- */
.vm-article-head { text-align: center; }
.vm-breadcrumb { font-size: 14px; color: #5E524A; display: flex; gap: 8px; justify-content: center; flex-wrap: wrap; margin: 0; }
.vm-breadcrumb a { color: #5E524A; text-decoration: none; } .vm-breadcrumb a:hover { color: #9A4E17; text-decoration: underline; }
.vm-byline { display: flex; align-items: center; gap: 14px; justify-content: center; text-align: left; }
.vm-byline img { width: 48px; height: 48px; border-radius: 999px; object-fit: cover; display: block; }
.vm-byline strong { display: block; font-size: 15px; line-height: 1.35; }
.vm-byline span { display: block; font-size: 14px; color: #5E524A; line-height: 1.35; }
.vm-chapo { font-size: 21px !important; line-height: 1.6 !important; color: #5E524A; }
.vm-une img { border-radius: 28px; width: 100%; max-height: 540px; object-fit: cover; }

.vm-article-layout { display: grid; grid-template-columns: 240px minmax(0, 720px); gap: 72px; justify-content: center; align-items: start; }
.vm-toc { position: sticky; top: 24px; }
.vm-toc summary { list-style: none; font-size: 13px; font-weight: 700; letter-spacing: .12em; text-transform: uppercase; cursor: default; margin-bottom: 14px; }
.vm-toc summary::-webkit-details-marker { display: none; }
.vm-toc ol { list-style: none; margin: 0; padding: 0; }
.vm-toc a { display: block; padding: 8px 0 8px 16px; border-left: 2px solid #EADFD3; color: #5E524A; text-decoration: none; font-size: 15px; line-height: 1.4; }
.vm-toc a:hover { color: #2A211C; border-left-color: #2A211C; }
.vm-toc a.is-active { color: #9A4E17; border-left-color: #9A4E17; font-weight: 600; }

.vm-content > * { margin-top: 0; margin-bottom: 24px; }
.vm-content h2 { margin-top: 64px; margin-bottom: 20px; scroll-margin-top: 24px; }
.vm-content h3 { margin-top: 40px; margin-bottom: 14px; scroll-margin-top: 24px; }
.vm-content > h2:first-child, .vm-content > p:first-child { margin-top: 0; }
.vm-content h2 + p { font-size: 20px; line-height: 1.65; }
.vm-content a { text-decoration-thickness: 1.5px; text-underline-offset: 3px; text-decoration-color: #E0B48F; }
.vm-content a:hover { text-decoration-color: #9A4E17; }
.vm-content strong { font-weight: 700; color: #2A211C; }
.vm-content ul { list-style: none; padding-left: 0; display: flex; flex-direction: column; gap: 14px; margin-bottom: 28px; }
.vm-content ul > li { position: relative; padding-left: 30px; }
.vm-content ul > li::before { content: ""; position: absolute; left: 6px; top: .68em; width: 9px; height: 9px; border-radius: 999px; background: #C8772E; }
.vm-content ol { padding-left: 0; list-style: none; counter-reset: vm; display: flex; flex-direction: column; gap: 14px; margin-bottom: 28px; }
.vm-content ol > li { counter-increment: vm; position: relative; padding-left: 44px; }
.vm-content ol > li::before { content: counter(vm); position: absolute; left: 0; top: .1em; width: 30px; height: 30px; border-radius: 999px; background: #F6E6D6; color: #9A4E17; font-weight: 700; font-size: 15px; line-height: 30px; text-align: center; }
.vm-content ul ul, .vm-content ol ul { margin: 12px 0 0; }
.vm-content figure { margin-top: 12px; margin-bottom: 36px; }
.vm-content .wp-block-image img { border-radius: 18px; height: auto; }
.vm-content .wp-block-gallery img { border-radius: 14px; }
.vm-content figcaption { text-align: left; margin-top: 12px; }
.vm-content .wp-block-table { overflow-x: auto; margin-bottom: 36px; }
.vm-content .wp-block-table table { border-collapse: separate; border-spacing: 0; width: 100%; background: #FFFFFF; border-radius: 16px; overflow: hidden; box-shadow: 0 0 0 1px #EADFD3; }
.vm-content .wp-block-table th { background: #2A211C; color: #FBF7F2; text-align: left; padding: 14px 16px; font-weight: 600; border: 0; }
.vm-content .wp-block-table td { padding: 14px 16px; border: 0; border-top: 1px solid #EADFD3; vertical-align: top; }
.vm-content .wp-block-table tbody tr:nth-child(even) td { background: #FBF7F2; }
.vm-content .wp-block-table thead { border: 0; }
.vm-content blockquote { border-left: 0; background: #F6E6D6; border-radius: 20px; padding: 24px 28px; margin-left: 0; margin-right: 0; font-size: 19px; }

/* FAQ en accordéon (construite par functions.php) */
.vm-faq { border-top: 1px solid #EADFD3; margin: 0 !important; }
.vm-faq:last-of-type { border-bottom: 1px solid #EADFD3; }
.vm-faq + :not(.vm-faq) { margin-top: 40px; }
.vm-faq summary { list-style: none; cursor: pointer; display: flex; justify-content: space-between; align-items: center; gap: 16px; padding: 18px 0; }
.vm-faq summary::-webkit-details-marker { display: none; }
.vm-faq summary h3 { margin: 0 !important; font-size: 22px; line-height: 1.35; }
.vm-faq summary::after { content: ""; flex-shrink: 0; width: 22px; height: 22px; background: no-repeat center/22px url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%239A4E17' stroke-width='2' stroke-linecap='round'%3E%3Cpath d='M5 12h14M12 5v14'/%3E%3C/svg%3E"); }
.vm-faq[open] summary::after { background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%239A4E17' stroke-width='2' stroke-linecap='round'%3E%3Cpath d='M5 12h14'/%3E%3C/svg%3E"); }
.vm-faq > :not(summary) { margin: 0 0 22px; }

/* Encadrés (styles de bloc Groupe) */
.is-style-vm-bon-a-savoir { background: #E6ECE4; border-radius: 20px; padding: 26px 28px !important; }
.is-style-vm-bon-a-savoir::before { content: "Bon à savoir"; display: block; font-weight: 700; font-size: 16px; color: #3F5A47; margin-bottom: 8px; }
.is-style-vm-conseil { background: #F6E6D6; border-radius: 20px; padding: 26px 28px !important; }
.is-style-vm-conseil::before { content: "Mon conseil"; display: block; font-weight: 700; font-size: 16px; color: #9A4E17; margin-bottom: 8px; }
.is-style-vm-bon-a-savoir > *, .is-style-vm-conseil > * { margin-bottom: 0; font-size: 18px; line-height: 1.65; }
.is-style-vm-bon-a-savoir > * + *, .is-style-vm-conseil > * + * { margin-top: 12px; }

/* Encadré de l'autrice */
.vm-auteur { display: flex; gap: 24px; align-items: center; padding: 32px; background: #F6E6D6; border-radius: 24px; flex-wrap: wrap; margin-top: 48px; }
.vm-auteur img { width: 96px; height: 96px; border-radius: 999px; object-fit: cover; display: block; }
.vm-auteur div { flex: 1 1 320px; display: flex; flex-direction: column; gap: 6px; }
.vm-auteur .vm-eyebrow { font-size: 12px !important; }
.vm-auteur .nom { font-family: Fraunces, Georgia, serif; font-size: 24px; font-weight: 600; line-height: 1.2; }
.vm-auteur p { margin: 0; font-size: 17px; line-height: 1.6; color: #4A3F38; }

/* Commentaires */
.wp-block-comments { margin-top: 56px; }
.wp-block-comments .wp-block-comment-template { padding-left: 0; }
.wp-block-post-comments-form input:not([type=submit]):not([type=checkbox]), .wp-block-post-comments-form textarea { border: 1.5px solid #EADFD3; border-radius: 12px; background: #FFFFFF; font-size: 16px; padding: 12px 14px; }

/* Archives */
.vm-archive-head .wp-block-term-description { color: #5E524A; font-size: 18px; max-width: 760px; }
.wp-block-query-pagination a, .wp-block-query-pagination span { text-decoration: none; font-weight: 600; }
.wp-block-query-pagination .page-numbers.current { color: #9A4E17; }

/* ---------- Pied de page ---------- */
.vm-footer a { color: #CFC3B7; text-decoration: none; }
.vm-footer a:hover { color: #FFFFFF; text-decoration: underline; }
.vm-footer-cols { display: grid; grid-template-columns: minmax(0, 1.4fr) repeat(3, minmax(0, 1fr)); gap: 40px; }
.vm-footer-cols > div { display: flex; flex-direction: column; gap: 10px; font-size: 15px; }
.vm-footer-cols .titre { font-weight: 700; color: #FBF7F2; }

/* ---------- Mobile ---------- */
@media (max-width: 1000px) {
	.vm-article-layout { grid-template-columns: minmax(0, 1fr); gap: 24px; }
	.vm-toc { position: static; background: #FFFFFF; border-radius: 16px; padding: 16px 20px; box-shadow: 0 0 0 1px #EADFD3; }
	.vm-toc summary { cursor: pointer; margin: 0; display: flex; justify-content: space-between; }
	.vm-toc summary::after { content: "+"; font-size: 20px; line-height: 1; color: #9A4E17; }
	.vm-toc[open] summary { margin-bottom: 10px; }
	.vm-toc[open] summary::after { content: "–"; }
}
@media (max-width: 900px) {
	.vm-hero, .vm-feat, .vm-about, .vm-footer-cols { grid-template-columns: minmax(0, 1fr); }
	.vm-hero { gap: 40px; }
	.vm-grid4 { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px; }
	.vm-grid3 { grid-template-columns: minmax(0, 1fr); }
	.vm-about { padding: 32px 24px; gap: 28px; justify-items: center; text-align: center; }
	.vm-about img { width: 200px; height: 200px; }
	.vm-feat-big img { height: 240px; }
	.vm-feat-big h3 { font-size: 26px; }
	.vm-mini img { width: 112px; }
	.vm-content h2 { margin-top: 48px; }
	.vm-content h2 + p { font-size: 19px; }
	.vm-une img { border-radius: 18px; }
}
@media (max-width: 560px) {
	.vm-grid4 { grid-template-columns: minmax(0, 1fr); }
	.vm-hero-visuel img { width: 280px; height: 360px; }
	.vm-header .wp-block-site-logo img { width: 130px !important; }
}
