/*
Theme Name: Bruno de Rugy
Theme URI: https://brunoderugy.fr
Author: Bruno de Rugy
Author URI: https://brunoderugy.fr
Description: Thème à blocs (éditeur Gutenberg) du site brunoderugy.fr, accompagnement du deuil. Palette crème et vert olive, titres en Newsreader, texte en Inter. Tous les textes et blocs se modifient dans l'éditeur.
Requires at least: 6.6
Tested up to: 7.1
Requires PHP: 7.4
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: brunoderugy
Tags: full-site-editing, block-patterns, one-column, custom-colors, editor-style
*/

/* ---------- Fond de page ---------- */
body {
	background:
		radial-gradient(900px 520px at 85% 0%, rgba(255, 248, 232, 0.9), transparent 70%),
		linear-gradient(180deg, var(--wp--preset--color--creme-clair) 0%, var(--wp--preset--color--creme) 40%);
	background-color: var(--wp--preset--color--creme);
	-webkit-font-smoothing: antialiased;
}

/* ---------- Surtitre (style de paragraphe) ---------- */
.is-style-surtitre {
	display: flex;
	align-items: center;
	gap: 10px;
	font-size: 0.6875rem !important;
	font-weight: 600;
	letter-spacing: 0.14em;
	line-height: 1.2;
	text-transform: uppercase;
	color: var(--wp--preset--color--ocre);
}
.is-style-surtitre::before {
	content: "";
	flex: none;
	width: 20px;
	height: 1px;
	background: currentColor;
	opacity: 0.8;
}
.is-style-surtitre.has-text-align-center {
	justify-content: center;
}
.is-style-surtitre.has-text-align-center::after {
	content: "";
	flex: none;
	width: 20px;
	height: 1px;
	background: currentColor;
	opacity: 0.8;
}

/* ---------- Chiffre décoratif ---------- */
.is-style-numero {
	font-family: var(--wp--preset--font-family--newsreader);
	font-weight: 300;
	font-size: 2.5rem !important;
	line-height: 1 !important;
	color: var(--wp--preset--color--or);
	margin-bottom: 0.25rem;
}

/* ---------- Cartes ---------- */
.is-style-carte {
	background: var(--wp--preset--color--ivoire);
	border: 1px solid var(--wp--preset--color--lin);
	border-radius: 18px;
	box-shadow: var(--wp--preset--shadow--douce);
	padding: clamp(1.25rem, 2.5vw, 1.75rem);
	transition: transform 0.2s ease, box-shadow 0.2s ease;
}
.is-style-carte:hover {
	transform: translateY(-2px);
	box-shadow: var(--wp--preset--shadow--marquee);
}
.is-style-carte-olive {
	background: var(--wp--preset--color--olive);
	color: var(--wp--preset--color--blanc-casse);
	border-radius: 18px;
	padding: clamp(2rem, 5vw, 4rem);
}
.is-style-carte-olive :where(h1, h2, h3, h4, p) {
	color: var(--wp--preset--color--blanc-casse);
}
.is-style-carte-olive .is-style-surtitre {
	color: var(--wp--preset--color--or-clair);
}
.is-style-carte-olive .wp-block-button__link {
	background: var(--wp--preset--color--ivoire);
	color: var(--wp--preset--color--encre);
}
.is-style-carte-olive .wp-block-button__link:hover {
	background: var(--wp--preset--color--sable);
	color: var(--wp--preset--color--encre);
}

/* ---------- Boutons secondaires ---------- */
.wp-block-button.is-style-outline > .wp-block-button__link {
	background: var(--wp--preset--color--ivoire);
	color: var(--wp--preset--color--encre);
	border: 1px solid var(--wp--preset--color--lin);
	padding: calc(0.8rem - 1px) calc(1.4rem - 1px);
}
.wp-block-button.is-style-outline > .wp-block-button__link:hover {
	border-color: #d8cdb9;
	background: var(--wp--preset--color--ivoire);
	color: var(--wp--preset--color--encre);
}

/* ---------- Bandeau de réassurance ---------- */
.is-style-pastille {
	display: inline-flex !important;
	width: auto !important;
	align-self: flex-start;
	background: var(--wp--preset--color--ivoire);
	border: 1px solid var(--wp--preset--color--lin);
	border-radius: 999px;
	box-shadow: var(--wp--preset--shadow--marquee);
	padding: 0.5rem 1.1rem 0.5rem 0.5rem !important;
}
.is-style-pastille > p:first-child {
	background: var(--wp--preset--color--sable);
	border-radius: 999px;
	padding: 0.35rem 0.8rem;
	font-weight: 600;
	color: var(--wp--preset--color--encre);
	display: inline-flex;
	align-items: center;
	gap: 0.5rem;
}
.is-style-pastille > p:first-child::before {
	content: "";
	width: 8px;
	height: 8px;
	border-radius: 999px;
	background: var(--wp--preset--color--or);
}

/* ---------- Images arrondies ---------- */
.wp-block-image.is-style-arrondie img {
	border-radius: 18px;
	box-shadow: var(--wp--preset--shadow--marquee);
}

/* ---------- Citation / témoignage ---------- */
.wp-block-quote.is-style-temoignage {
	background: var(--wp--preset--color--ivoire);
	border: 1px solid var(--wp--preset--color--lin) !important;
	border-radius: 18px;
	box-shadow: var(--wp--preset--shadow--douce);
	padding: clamp(1.75rem, 4vw, 3rem);
	margin-top: 1.5rem;
	margin-bottom: 1.5rem;
}
.wp-block-quote.is-style-temoignage cite {
	display: flex;
	align-items: center;
	gap: 10px;
	margin-top: 1.25rem;
	font-family: var(--wp--preset--font-family--inter);
	font-style: normal;
	font-size: 0.8125rem;
	font-weight: 600;
	color: var(--wp--preset--color--pierre);
}
.wp-block-quote.is-style-temoignage cite::before {
	content: "";
	width: 16px;
	height: 1px;
	background: var(--wp--preset--color--or);
}

/* ---------- FAQ (bloc Détails) ---------- */
.wp-block-details {
	background: var(--wp--preset--color--ivoire);
	border: 1px solid var(--wp--preset--color--lin);
	border-radius: 14px;
	padding: 1rem 1.25rem;
}
.wp-block-details summary {
	cursor: pointer;
	list-style: none;
	display: flex;
	justify-content: space-between;
	align-items: center;
	gap: 1rem;
	font-size: 0.9375rem;
	font-weight: 600;
	color: var(--wp--preset--color--encre);
}
.wp-block-details summary::-webkit-details-marker {
	display: none;
}
.wp-block-details summary::after {
	content: "+";
	flex: none;
	display: grid;
	place-items: center;
	width: 24px;
	height: 24px;
	border: 1px solid var(--wp--preset--color--lin);
	border-radius: 999px;
	font-weight: 400;
	color: var(--wp--preset--color--olive);
	transition: transform 0.25s ease;
}
.wp-block-details[open] summary::after {
	transform: rotate(45deg);
}
.wp-block-details > :not(summary) {
	font-size: 0.9375rem;
	margin-top: 0.75rem;
}

/* ---------- En-tête ---------- */
.site-entete {
	position: sticky;
	top: 0;
	z-index: 50;
	background: rgba(252, 250, 246, 0.85);
	-webkit-backdrop-filter: blur(12px);
	backdrop-filter: blur(12px);
	border-bottom: 1px solid var(--wp--preset--color--lin);
}
.admin-bar .site-entete {
	top: var(--wp-admin--admin-bar--height, 32px);
}
.site-entete .wp-block-navigation-item__content {
	padding: 0.5rem 0.9rem !important;
	border-radius: 999px;
	text-decoration: none;
}
.site-entete .wp-block-navigation-item__content:hover,
.site-entete .current-menu-item > .wp-block-navigation-item__content {
	background: var(--wp--preset--color--sable);
}
.site-entete .wp-block-navigation__responsive-container.is-menu-open {
	background: var(--wp--preset--color--creme) !important;
}
.marque-logo {
	width: 32px;
	height: 32px;
}

/* ---------- Pied de page ---------- */
.site-pied a {
	color: var(--wp--preset--color--blanc-casse);
	text-decoration: none;
}
.site-pied a:hover {
	text-decoration: underline;
}
.site-pied .wp-block-button__link {
	background: var(--wp--preset--color--ivoire);
	color: var(--wp--preset--color--encre) !important;
}
.site-pied .wp-block-button__link:hover {
	background: var(--wp--preset--color--sable);
	text-decoration: none !important;
}

/* ---------- Texte justifié (récit) ---------- */
.texte-justifie p {
	text-align: justify;
	-webkit-hyphens: auto;
	hyphens: auto;
}

/* ---------- Apparition douce ---------- */
@media (prefers-reduced-motion: reduce) {
	.is-style-carte,
	.wp-block-details summary::after {
		transition: none;
	}
	.is-style-carte:hover {
		transform: none;
	}
}

/* ---------- Mobile ---------- */
@media (max-width: 781px) {
	.is-style-pastille {
		border-radius: 18px;
	}
}

/* ---------- Carte photo avec bandeau ---------- */
.carte-photo {
	overflow: hidden;
	box-shadow: var(--wp--preset--shadow--marquee);
}
.carte-photo .wp-block-image {
	margin: 0;
}
.carte-photo .wp-block-image img {
	display: block;
	width: 100%;
	object-position: 50% 30%;
}

/* ---------- Grilles de cartes : les cartes remplissent toute la ligne ---------- */
.wp-block-group.grille-auto {
	grid-template-columns: repeat(auto-fit, minmax(min(15rem, 100%), 1fr)) !important;
}
.wp-block-group.grille-large {
	grid-template-columns: repeat(auto-fit, minmax(min(26rem, 100%), 1fr)) !important;
	align-items: start;
}

/* La carte photo n'a pas de marge intérieure sur les côtés */
.wp-block-group.carte-photo {
	padding-top: 0;
	padding-left: 0;
	padding-right: 0;
}

/* Sur téléphone, le bouton de l'en-tête est masqué : l'appel à l'action est juste en dessous */
@media (max-width: 600px) {
	.site-entete .wp-block-buttons {
		display: none;
	}
}
