/*
Theme Name: Phytologist
Theme URI: https://phytologist.fr
Author: Phytologist
Description: Thème de blocs de Phytologist : une plante par édition, dessinée comme une planche d'herbier. Fonctionne avec WooCommerce et l'extension « Phytologist — Outils » (Herbier, prévente à seuil, numérotation, rétractation en ligne).
Requires at least: 6.6
Tested up to: 6.9
Requires PHP: 8.0
Version: 1.0.0
License: GNU General Public License v2 or later
License URI: https://www.gnu.org/licenses/gpl-2.0.html
Text Domain: phytologist
Tags: block-patterns, full-site-editing, e-commerce, one-column, wide-blocks
*/

/* ------------------------------------------------------------------
   1. Bases
   ------------------------------------------------------------------ */
body {
	-webkit-font-smoothing: antialiased;
	text-rendering: optimizeLegibility;
}

:where(.wp-site-blocks) *:focus-visible {
	outline: 2px solid var(--wp--preset--color--terracotta);
	outline-offset: 3px;
}

::selection {
	background: var(--wp--preset--color--mimosa);
	color: var(--wp--preset--color--ink);
}

/* ------------------------------------------------------------------
   2. En-tête et pied de page
   ------------------------------------------------------------------ */
.phyto-entete {
	border-bottom: 1px solid var(--wp--preset--color--line);
	padding-top: var(--wp--preset--spacing--30);
	padding-bottom: var(--wp--preset--spacing--30);
}

.phyto-entete .wp-block-navigation a:hover {
	text-decoration: underline;
	text-underline-offset: 4px;
}

.phyto-bandeau {
	font-family: var(--wp--preset--font-family--plex-mono);
	font-size: var(--wp--preset--font-size--x-small);
	letter-spacing: 0.12em;
	text-transform: uppercase;
	text-align: center;
	padding: 0.55rem 1rem;
	margin: 0;
}

.phyto-bandeau a {
	color: inherit;
}

.phyto-pied {
	padding-top: var(--wp--preset--spacing--70);
	padding-bottom: var(--wp--preset--spacing--50);
}

.phyto-pied a {
	color: var(--wp--preset--color--card);
	text-decoration: none;
}

.phyto-pied a:hover {
	text-decoration: underline;
	color: var(--wp--preset--color--mimosa);
}

.phyto-logo-pied {
	font-family: var(--wp--preset--font-family--fraunces);
	font-size: 1.5rem;
	color: var(--wp--preset--color--paper);
	margin-bottom: 0.25rem;
}

.phyto-pied .is-style-etiquette {
	color: var(--wp--preset--color--mimosa);
}

.phyto-liens {
	list-style: none;
	padding-left: 0;
	margin-top: 0.5rem;
}

.phyto-liens li {
	margin: 0 0 0.45rem;
}

.phyto-mentions {
	border-top: 1px solid var(--wp--preset--color--stone);
	padding-top: var(--wp--preset--spacing--30);
	margin-top: var(--wp--preset--spacing--50);
	color: #a8a396;
}

/* ------------------------------------------------------------------
   3. Styles de blocs (Éditeur › Styles)
   ------------------------------------------------------------------ */
.is-style-etiquette {
	font-family: var(--wp--preset--font-family--plex-mono);
	font-size: 0.8125rem;
	letter-spacing: 0.14em;
	text-transform: uppercase;
	color: var(--wp--preset--color--bark);
}

.has-forest-background-color .is-style-etiquette,
.has-moss-background-color .is-style-etiquette,
.has-ink-background-color .is-style-etiquette {
	color: var(--wp--preset--color--mimosa);
}

.is-style-carte {
	background: var(--wp--preset--color--card);
	border: 1px solid var(--wp--preset--color--line);
	padding: var(--wp--preset--spacing--40);
}

.is-style-carte.is-a-venir {
	border-style: dashed;
}

.is-style-carte .has-x-large-font-size {
	font-family: var(--wp--preset--font-family--fraunces);
	line-height: 1.15;
}

.is-style-nom-latin,
.phyto-nom-latin {
	font-family: var(--wp--preset--font-family--fraunces);
	font-style: italic;
	font-weight: 400;
	color: var(--wp--preset--color--stone);
}

.is-style-faits table {
	border-collapse: collapse;
	width: 100%;
}

.wp-block-table.is-style-faits td,
.wp-block-table.is-style-faits th {
	border: 0;
	border-bottom: 1px solid var(--wp--preset--color--line);
	padding: 1rem 0.5rem 1rem 0;
	text-align: left;
	vertical-align: top;
}

.wp-block-table.is-style-faits td:first-child,
.wp-block-table.is-style-faits th:first-child {
	color: var(--wp--preset--color--stone);
	width: 32%;
}

.wp-block-table.is-style-faits td:last-child {
	font-weight: 500;
}

/* ------------------------------------------------------------------
   4. Sections des pages
   ------------------------------------------------------------------ */
.phyto-section {
	padding-top: var(--wp--preset--spacing--70);
	padding-bottom: var(--wp--preset--spacing--70);
}

.phyto-section.phyto-serree {
	padding-top: var(--wp--preset--spacing--60);
	padding-bottom: var(--wp--preset--spacing--60);
}

.phyto-filets {
	border-top: 1px solid var(--wp--preset--color--line);
	border-bottom: 1px solid var(--wp--preset--color--line);
}

.phyto-ouverture h1 {
	margin-top: 0.25rem;
}

.phyto-chapeau {
	font-size: var(--wp--preset--font-size--large);
	max-width: 32em;
}

.phyto-note {
	font-size: var(--wp--preset--font-size--small);
	color: var(--wp--preset--color--stone);
}

.has-forest-background-color .phyto-note,
.has-moss-background-color .phyto-note {
	color: #cfd9cc;
}

.phyto-planche {
	background: var(--wp--preset--color--card);
	border: 1px solid var(--wp--preset--color--line);
	box-shadow: 0 1px 0 var(--wp--preset--color--line), 0 18px 40px rgba(47, 74, 58, 0.1);
	padding: var(--wp--preset--spacing--40);
}

.phyto-placeholder {
	border: 1px dashed var(--wp--preset--color--line);
	background: var(--wp--preset--color--sand);
	color: var(--wp--preset--color--bark);
	font-family: var(--wp--preset--font-family--plex-mono);
	font-size: var(--wp--preset--font-size--small);
	text-align: center;
	padding: var(--wp--preset--spacing--60) var(--wp--preset--spacing--40);
	min-height: 220px;
	display: flex;
	align-items: center;
	justify-content: center;
}

.has-forest-background-color .phyto-placeholder {
	background: var(--wp--preset--color--moss);
	border-color: #8fa592;
	color: #cfd9cc;
}

.phyto-numero {
	font-family: var(--wp--preset--font-family--fraunces);
	font-size: 2.5rem;
	line-height: 1;
	color: var(--wp--preset--color--terracotta);
	margin-bottom: 0.25rem;
}

.phyto-regle {
	border-top: 2px solid var(--wp--preset--color--forest);
	padding-top: 1.25rem;
}

.phyto-prix {
	font-family: var(--wp--preset--font-family--fraunces);
	font-size: 1.875rem;
}

/* Bouton jaune sur fond vert */
.wp-block-button.is-style-mimosa .wp-block-button__link {
	background: var(--wp--preset--color--mimosa);
	color: var(--wp--preset--color--ink);
}

.wp-block-button.is-style-mimosa .wp-block-button__link:hover {
	background: var(--wp--preset--color--paper);
	color: var(--wp--preset--color--ink);
}

.wp-block-button.is-style-outline .wp-block-button__link {
	border: 1px solid currentColor;
	background: transparent;
	color: var(--wp--preset--color--forest);
	padding-top: calc(0.85rem - 1px);
	padding-bottom: calc(0.85rem - 1px);
}

.has-forest-background-color .wp-block-button.is-style-outline .wp-block-button__link {
	color: var(--wp--preset--color--paper);
}

/* FAQ en accordéon */
.wp-block-details {
	border-bottom: 1px solid var(--wp--preset--color--line);
	padding: 1rem 0;
}

.wp-block-details summary {
	cursor: pointer;
	font-weight: 600;
	color: var(--wp--preset--color--forest);
}

.wp-block-details[open] summary {
	margin-bottom: 0.75rem;
}

/* Tableaux ordinaires */
.wp-block-table table {
	border-collapse: collapse;
}

.wp-block-table th,
.wp-block-table td {
	border: 1px solid var(--wp--preset--color--line);
	padding: 0.6rem 0.75rem;
	text-align: left;
	vertical-align: top;
}

.wp-block-table thead th {
	background: var(--wp--preset--color--sand);
	font-weight: 600;
}

/* Encadré légal (garanties) */
.phyto-encadre {
	border: 2px solid var(--wp--preset--color--forest);
	background: var(--wp--preset--color--card);
	padding: var(--wp--preset--spacing--40);
}

/* ------------------------------------------------------------------
   5. Herbier
   ------------------------------------------------------------------ */
.phyto-herbier .wp-block-post-template {
	gap: var(--wp--preset--spacing--40);
}

.phyto-herbier .wp-block-post-title a {
	text-decoration: none;
}

.phyto-fiche {
	display: grid;
	grid-template-columns: minmax(8rem, 32%) 1fr;
	border-top: 1px solid var(--wp--preset--color--line);
	margin: 1.5rem 0;
}

.phyto-fiche dt,
.phyto-fiche dd {
	margin: 0;
	padding: 0.75rem 0.5rem 0.75rem 0;
	border-bottom: 1px solid var(--wp--preset--color--line);
}

.phyto-fiche dt {
	color: var(--wp--preset--color--stone);
	font-size: var(--wp--preset--font-size--small);
}

.phyto-fiche dd em {
	font-family: var(--wp--preset--font-family--fraunces);
}

.phyto-sources {
	font-size: var(--wp--preset--font-size--small);
	color: var(--wp--preset--color--stone);
}

/* ------------------------------------------------------------------
   6. Prévente, compteur, formulaires (extension Phytologist — Outils)
   ------------------------------------------------------------------ */
.phyto-encart {
	background: var(--wp--preset--color--card);
	border: 1px solid var(--wp--preset--color--line);
	border-left: 4px solid var(--wp--preset--color--mimosa);
	padding: 1rem 1.25rem;
	margin: 0 0 1.25rem;
	font-size: var(--wp--preset--font-size--small);
}

.phyto-encart p {
	margin: 0 0 0.5rem;
}

.phyto-encart p:last-child {
	margin-bottom: 0;
}

.phyto-compteur {
	margin: 1rem 0;
}

.phyto-compteur__chiffre {
	font-family: var(--wp--preset--font-family--fraunces);
	font-size: 1.5rem;
	margin: 0 0 0.5rem;
}

.phyto-barre {
	position: relative;
	height: 10px;
	background: var(--wp--preset--color--sand);
	border-radius: 999px;
	overflow: hidden;
}

.phyto-barre span {
	position: absolute;
	inset: 0 auto 0 0;
	background: var(--wp--preset--color--forest);
	border-radius: 999px;
}

.has-forest-background-color .phyto-barre {
	background: var(--wp--preset--color--moss);
}

.has-forest-background-color .phyto-barre span {
	background: var(--wp--preset--color--mimosa);
}

.phyto-form label {
	display: block;
	font-weight: 600;
	font-size: var(--wp--preset--font-size--small);
	margin: 1rem 0 0.35rem;
}

.phyto-form input[type="text"],
.phyto-form input[type="email"],
.phyto-form input[type="number"],
.phyto-form select,
.phyto-form textarea {
	width: 100%;
	max-width: 32rem;
	box-sizing: border-box;
	min-height: 48px;
	padding: 0.6rem 0.9rem;
	border: 1px solid var(--wp--preset--color--stone);
	border-radius: 6px;
	background: var(--wp--preset--color--card);
	font: inherit;
	color: var(--wp--preset--color--ink);
}

.phyto-form textarea {
	min-height: 6rem;
}

.phyto-form button {
	margin-top: 1.25rem;
	min-height: 52px;
	padding: 0 1.75rem;
	border: 0;
	border-radius: 999px;
	background: var(--wp--preset--color--forest);
	color: var(--wp--preset--color--paper);
	font: inherit;
	font-weight: 600;
	cursor: pointer;
}

.phyto-form button:hover {
	background: var(--wp--preset--color--ink);
}

.phyto-form .phyto-aide {
	font-size: var(--wp--preset--font-size--small);
	color: var(--wp--preset--color--stone);
	margin: 0.35rem 0 0;
}

.phyto-form .phyto-piege {
	position: absolute;
	left: -9999px;
}

.phyto-message {
	padding: 1rem 1.25rem;
	border-left: 4px solid var(--wp--preset--color--forest);
	background: var(--wp--preset--color--card);
	margin: 1rem 0;
}

.phyto-message.is-erreur {
	border-left-color: var(--wp--preset--color--terracotta);
}

/* ------------------------------------------------------------------
   7. WooCommerce
   ------------------------------------------------------------------ */
.wc-block-components-product-price,
.woocommerce-Price-amount {
	font-family: var(--wp--preset--font-family--fraunces);
}

.wp-block-woocommerce-product-price {
	font-size: 1.5rem;
}

.wc-block-components-notice-banner {
	border-radius: 6px;
}

/* ------------------------------------------------------------------
   8. Petits écrans
   ------------------------------------------------------------------ */
@media (max-width: 781px) {
	.phyto-fiche {
		grid-template-columns: 1fr;
	}

	.phyto-fiche dt {
		border-bottom: 0;
		padding-bottom: 0;
	}
}

/* ------------------------------------------------------------------
   8. Liste d'attente et visuels (ajouts du 13 octobre 2026)
   ------------------------------------------------------------------ */
.phyto-form .phyto-case {
	display: flex;
	gap: 0.6rem;
	align-items: flex-start;
	max-width: 32rem;
	margin-top: 1rem;
	font-weight: 400;
}

.phyto-form .phyto-case input[type="checkbox"] {
	width: 20px;
	height: 20px;
	margin-top: 0.15rem;
	flex: none;
}

.phyto-visuel {
	margin: 0;
}

.phyto-visuel img {
	display: block;
	width: 100%;
	height: auto;
	border-radius: 2px;
}

.phyto-visuel.phyto-planche-svg {
	background: var(--wp--preset--color--card);
	border: 1px solid var(--wp--preset--color--line);
	padding: var(--wp--preset--spacing--40);
	color: var(--wp--preset--color--ink);
}

.phyto-visuel.phyto-planche-svg figcaption {
	margin-top: 0.75rem;
	color: var(--wp--preset--color--stone);
}
