/* Fons Amoris — compléments WordPress (articles, pages, formulaires, accessibilité). */

.sr-only, .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; }
.screen-reader-text:focus { clip: auto; width: auto; height: auto; padding: 10px 14px; background: var(--card); z-index: 100; }
.hp { position: absolute !important; left: -9999px; width: 1px; height: 1px; overflow: hidden; }
.small { font-size: .9rem; }
.h-small { font-size: 1.3rem; }
.link-muted { color: var(--ink-2); font-size: .85rem; }

/* En-tête : compte client */
.account-btn { display: inline-grid; place-items: center; width: 44px; height: 44px; border-radius: 3px; color: var(--ink); text-decoration: none; }
.account-btn:hover { background: var(--paper-2); }
.account-btn svg { width: 22px; height: 22px; }
.site-header .wrap { gap: 12px; }
.cart-btn { text-decoration: none; }
@media (max-width: 900px) { .account-btn { display: none; } }

/* Page standard */
.page-hero--compact { padding-bottom: 8px; }
.page-content { padding-bottom: clamp(48px, 6vw, 80px); max-width: 760px; }
.prose > * + * { margin-top: 1em; }
.prose h2 { font-size: var(--s-3, 1.6rem); margin-top: 1.6em; }
.prose h3 { margin-top: 1.4em; }
.prose ul, .prose ol { padding-left: 1.3em; }
.prose li + li { margin-top: .35em; }
.prose img { max-width: 100%; height: auto; border-radius: var(--radius); }
.prose blockquote, .prose .wp-block-quote { margin: 1.6em 0; padding: 4px 0 4px 22px; border-left: 3px solid var(--ember); font-size: 1.15rem; font-weight: 500; }
.prose figure { margin: 1.6em 0; }
.prose figcaption, .wp-element-caption { font-size: var(--s-small, .85rem); color: var(--ink-2); margin-top: 8px; }
.prose table { width: 100%; border-collapse: collapse; font-size: .95rem; }
.prose th, .prose td { text-align: left; padding: 10px 12px; border-bottom: 1px solid var(--line); }
.prose a { color: var(--ember); }
.prose .wp-block-button__link { background: var(--ember); color: #fff; border-radius: 3px; padding: 14px 24px; font-weight: 600; text-decoration: none; }
.prose .wp-block-embed iframe, .prose iframe { max-width: 100%; }
.alignwide { max-width: min(1100px, 100%); }
.alignfull { width: 100%; }
.aligncenter { margin-inline: auto; }

/* Journal */
.post { align-content: start; }
.post .post-title { font-size: 1.12rem; }
.post .post-title a { text-decoration: none; }
.post .post-title a:hover { text-decoration: underline; }
.post-thumb { display: block; line-height: 0; margin-bottom: 6px; border-radius: var(--radius); overflow: hidden; background: var(--paper-2); aspect-ratio: 16 / 10; }
.post-thumb img { width: 100%; height: 100%; object-fit: cover; }
.filters a.filter { text-decoration: none; }
.navigation.pagination { margin-top: 36px; }
.nav-links { display: flex; flex-wrap: wrap; gap: 8px; }
.nav-links .page-numbers { min-width: 42px; height: 42px; display: inline-grid; place-items: center; padding: 0 12px; border: 1.5px solid var(--line); border-radius: 3px; text-decoration: none; font-weight: 600; font-size: .9rem; }
.nav-links .page-numbers.current { background: var(--ink); color: var(--paper); border-color: var(--ink); }

/* Article */
.article-head { max-width: 900px; }
.article-head .eyebrow { text-decoration: none; }
.article-meta { color: var(--ink-2); font-size: .9rem; }
.article-cover { margin-top: 8px; margin-bottom: 0; }
.article-cover img { width: 100%; max-width: 980px; height: auto; border-radius: var(--radius); display: block; }
.article-body { padding-top: 32px; font-size: 1.05rem; }
.article-cta { padding-bottom: clamp(48px, 6vw, 80px); max-width: 880px; }
.article-cta .split-cta { background: var(--paper-2); border-radius: var(--radius); padding: clamp(20px, 3vw, 32px); }

/* Recherche */
.search-form { display: flex; gap: 8px; }
.search-form input[type=search] { flex: 1; min-width: 0; min-height: 44px; border: 1.5px solid var(--line); border-radius: 3px; padding: 0 14px; font: inherit; color: var(--ink); background: var(--paper); }

/* Commentaires */
.comments h2 { font-size: 1.4rem; margin-bottom: 18px; }
.comment-list { list-style: none; padding: 0; display: grid; gap: 18px; }
.comment-body { border: 1px solid var(--line); border-radius: var(--radius); padding: 18px; }
.comment-form { display: grid; gap: 14px; margin-top: 24px; }
.comment-form input:not([type=checkbox]):not([type=submit]), .comment-form textarea { width: 100%; min-height: 46px; border: 1.5px solid var(--line); border-radius: 3px; padding: 10px 12px; font: inherit; }

/* Formulaire de contact */
.form-error { background: var(--ember-soft); color: var(--ember); border-radius: 12px; padding: 16px 18px; font-weight: 600; }
.form-ok { font-weight: 600; }

/* Toast */
.toast:empty { display: none; }

/* Le tableau comparatif du site garde sa largeur minimale (défilement horizontal) ; les autres tableaux s'adaptent. */
table { min-width: 0; }
.table-wrap > table { min-width: 560px; }

/* corrections après tests */
.search-form { flex-wrap: wrap; }
.search-form input[type=search] { flex: 1 1 180px; }
.search-form .btn { flex: none; }
.article-head, .article-body, .article-cta { max-width: 800px; }
.article-cover { max-width: 960px; }
.article-cover img { max-height: 72vh; object-fit: cover; margin-inline: auto; }

/* Éléments masqués par les filtres (recettes, boutique) : l'attribut hidden l'emporte sur les mises en page en grille. */
[hidden] { display: none !important; }

/* ===== v1.0.6 : responsive — aucun contenu ne doit élargir la page ===== */
/* La page ne défile jamais horizontalement (clip garde l'en-tête collant, contrairement à hidden). */
html, body { max-width: 100%; overflow-x: clip; }
@supports not (overflow: clip) { body { overflow-x: hidden; } }

/* Les grilles de texte gardent une colonne de la largeur de l'écran, même si un enfant est trop large. */
.prose, .faq .answer, .head { grid-template-columns: minmax(0, 1fr); }
.prose > *, .wc-content > *, .page-content > * { min-width: 0; max-width: 100%; }
main, .section, .wrap, .wc-content, .woocommerce, .woocommerce-Tabs-panel { min-width: 0; }

/* Médias des contenus saisis dans l'administration (articles, pages, descriptions produits). */
:where(.prose, .page-content, .article-body, .wc-content, .woocommerce-Tabs-panel, .woocommerce-product-details__short-description, .term-description, .comment-content) :is(img, video, canvas, svg, picture, object, embed, iframe) { max-width: 100% !important; }
:where(.prose, .page-content, .article-body, .woocommerce-Tabs-panel, .woocommerce-product-details__short-description, .term-description, .comment-content) :is(img, video) { height: auto !important; }
:where(.prose, .page-content, .article-body, .woocommerce-Tabs-panel, .term-description) iframe:is([src*="youtube"], [src*="youtu.be"], [src*="vimeo"], [src*="dailymotion"], [width]) { width: 100% !important; height: auto !important; aspect-ratio: 16 / 9; }
:where(.prose, .page-content, .article-body, .woocommerce-Tabs-panel) :is(figure, .wp-block-image, .wp-block-embed, .wp-caption, .gallery) { max-width: 100% !important; }

/* Tableaux : défilement à l'intérieur du tableau au lieu d'élargir l'écran. */
:where(.prose, .page-content, .article-body, .woocommerce-Tabs-panel, .term-description) table:not(.shop_table):not(.woocommerce-product-attributes) { display: block; max-width: 100%; width: auto !important; overflow-x: auto; -webkit-overflow-scrolling: touch; }

/* Longues adresses, liens et mots : coupés plutôt que de déborder. */
:where(.prose, .page-content, .article-body, .woocommerce-Tabs-panel, .woocommerce-product-details__short-description, .comment-content) { overflow-wrap: break-word; }
:where(.prose, .page-content, .article-body, .woocommerce-Tabs-panel, .woocommerce-product-details__short-description, .comment-content) a { overflow-wrap: anywhere; }
:where(.prose, .page-content, .article-body, .woocommerce-Tabs-panel, .term-description) :is(th, td) { overflow-wrap: normal; word-break: normal; }
:where(.prose, .page-content, .article-body, .woocommerce-Tabs-panel) pre { white-space: pre-wrap; overflow-x: auto; max-width: 100%; }

/* Anciennes mises en page Elementor recopiées dans le contenu : largeurs figées neutralisées. */
:where(.prose, .page-content, .article-body, .woocommerce-Tabs-panel, .wc-content) :is([style*="width"], [width]):not(img):not(iframe):not(video) { max-width: 100% !important; }
:where(.prose, .page-content, .article-body, .woocommerce-Tabs-panel, .wc-content) :is(.elementor, .elementor-section, .elementor-container, .elementor-column, .elementor-widget-wrap, .elementor-widget, .e-con, .e-con-inner) { max-width: 100% !important; min-width: 0 !important; box-sizing: border-box; }
@media (max-width: 767px) {
	:where(.prose, .page-content, .article-body, .woocommerce-Tabs-panel, .wc-content) :is(.elementor-container, .e-con, .e-con-inner, .wp-block-columns) { flex-wrap: wrap !important; }
	:where(.prose, .page-content, .article-body, .woocommerce-Tabs-panel, .wc-content) :is(.elementor-column, .e-con > .e-con, .wp-block-column) { width: 100% !important; flex-basis: 100% !important; }
	:where(.prose, .page-content, .article-body, .woocommerce-Tabs-panel, .wc-content) [style*="display:flex"], :where(.prose, .page-content, .article-body, .woocommerce-Tabs-panel, .wc-content) [style*="display: flex"] { flex-wrap: wrap !important; }
	:where(.prose, .page-content, .article-body, .woocommerce-Tabs-panel, .wc-content) [style*="display:flex"] > *, :where(.prose, .page-content, .article-body, .woocommerce-Tabs-panel, .wc-content) [style*="display: flex"] > * { min-width: 0; flex-basis: 100% !important; }
}

/* v1.0.6 : menu mobile et panier fermés — plus d'ombre visible au bord droit de l'écran, plus de focus clavier caché. */
.drawer:not(.is-open) { box-shadow: none; visibility: hidden; transition: transform .3s ease, visibility 0s linear .3s, box-shadow 0s linear .3s; }
.drawer.is-open { visibility: visible; transition: transform .3s ease; }
@media (max-width: 980px) {
	.nav:not(.is-open) { box-shadow: none; visibility: hidden; transition: transform .3s ease, visibility 0s linear .3s, box-shadow 0s linear .3s; }
	.nav.is-open { visibility: visible; transition: transform .3s ease; }
}

/* Titres longs : césure plutôt que débordement sur petit écran. */
@media (max-width: 600px) { .prose :is(h1, h2, h3), .page-hero h1, .article-head h1, body.fa div.product .product_title { hyphens: auto; -webkit-hyphens: auto; overflow-wrap: break-word; } }
