/*
Theme Name: R2BDX – Rives de Bordeaux
Description: A custom block theme scaffolded by Studio Code.
Requires at least: 6.7
Tested up to: 6.9
Requires PHP: 7.2
Version: 0.1.0
License: GNU General Public License v2 or later
License URI: http://www.gnu.org/licenses/gpl-2.0.html
Text Domain: r2bdx
Tags: full-site-editing, block-patterns, block-styles, wide-blocks, accessibility-ready, style-variations
*/

/* WordPress inserts a margin-block-start equal to the block gap (24px unless
   theme.json sets styles.spacing.blockGap) between the template's top-level
   sections (header part, main, footer part) — a gap that exists even when no
   markup asks for it. Zero it so sections butt edge-to-edge and own their
   vertical rhythm via padding; this does not affect block gaps inside nested
   layouts. */
.wp-site-blocks > * + * {
	margin-block-start: 0;
}

/* With that gap gone, main carries its own vertical padding so templates this
   theme does not author (WooCommerce shop, product, cart…) still clear the
   header and footer. A descendant selector, not a child one: WooCommerce wraps
   the single-product main in an extra group. Templates built from full-bleed
   sections opt out with is-flush and let the sections own the rhythm. */
.wp-site-blocks main {
	padding-block: var(--wp--preset--spacing--60) var(--wp--preset--spacing--70);
}
.wp-site-blocks main.is-flush {
	padding-block: 0;
}

/* === base (white) preset is regenerated lazily by the theme cache;
       map it explicitly so navy sections always get white text === */
.has-base-color {
	color: #ffffff !important;
}
.has-base-color :not(.wp-element-button):not(.wp-block-button__link) {
	color: #ffffff;
}
.has-base-background-color {
	background-color: #ffffff;
}

/* === header (light) === */
.site-header {
	border-bottom: 1px solid #e4e8ee;
	background: var(--wp--preset--color--background);
	padding-inline: 2rem;
}
.site-tagline {
	margin: 0;
	color: var(--wp--preset--color--primary);
	font-size: 1.4rem;
	font-weight: 400;
	letter-spacing: 0.06em;
	text-transform: uppercase;
	white-space: nowrap;
}
.site-header .wp-block-navigation-item__content {
	color: var(--wp--preset--color--text);
}
.site-header .wp-block-navigation-item__content:hover {
	color: var(--wp--preset--color--primary);
	text-decoration: underline;
	text-underline-offset: 0.25em;
}
.site-header .wp-block-navigation .current-menu-item > .wp-block-navigation-item__content,
.site-header .wp-block-navigation a[aria-current="page"] {
	color: var(--wp--preset--color--accent);
	text-decoration: underline;
	text-underline-offset: 0.3em;
	text-decoration-color: var(--wp--preset--color--accent);
	font-weight: 600;
}
.site-header .wp-block-site-title a {
	color: var(--wp--preset--color--primary);
	text-decoration: none;
	font-size: 2.4rem;
	font-weight: 600;
	letter-spacing: -0.01em;
}

/* === labels === */
.eyebrow {
	color: var(--wp--preset--color--accent);
	font-size: 1rem;
	font-weight: 600;
	letter-spacing: 0.08em;
	text-transform: uppercase;
}

.site-footer h4 {
	font-size: 0.75rem;
	font-weight: 600;
	letter-spacing: 0.08em;
	text-transform: uppercase;
}
.site-footer a {
	color: var(--wp--preset--color--base) !important;
}
.site-footer a:hover {
	color: var(--wp--preset--color--base) !important;
	text-decoration: underline;
	text-underline-offset: 0.2em;
}
.site-footer,
.site-footer p,
.site-footer h3,
.site-footer h4,
.site-footer .wp-block-site-title,
.site-footer .wp-block-site-title a,
.site-footer .has-base-color,
.site-footer .has-text-color {
	color: var(--wp--preset--color--base) !important;
}
/* compact footer: tighten vertical rhythm */
.site-footer .wp-block-columns {
	margin-block-end: 0;
}
.site-footer h4.wp-block-heading {
	margin-block-start: 0;
	margin-block-end: 0.25rem;
}
.site-footer p {
	margin-block: 0.15rem;
}
.site-footer .faq-row a + a::before {
	content: " · ";
	opacity: 0.7;
}

/* === link hover on prose === */
main a:not(.wp-element-button):hover {
	text-decoration: underline;
	text-underline-offset: 0.2em;
}

/* === hero cover === */
.hero {
	min-height: 72dvh;
}
.hero .wp-block-cover__inner-container {
	max-width: var(--wp--style--global--wide-size);
	margin-inline: auto;
	text-align: left;
}
.hero-eyebrow {
	color: var(--wp--preset--color--accent);
	font-size: 1rem;
	font-weight: 600;
	letter-spacing: 0.12em;
	text-transform: uppercase;
	opacity: 0.9;
}

/* === card style === */
.is-style-card {
	background: var(--wp--preset--color--background);
	border: 1px solid #e4e8ee;
	border-radius: 6px;
	padding: var(--wp--preset--spacing--lg);
	box-shadow: 0 1px 3px rgb(16 24 40 / 0.06);
	transition: transform 0.18s ease-out, box-shadow 0.18s ease-out;
	height: 100%;
}
.is-style-card:hover {
	transform: translateY(-2px);
	box-shadow: 0 6px 16px rgb(16 24 40 / 0.08);
}
.is-style-card.card-art {
	display: block;
}
.is-style-card.card-art .card-art {
	margin: 0 0 1.5rem;
	width: 100%;
}
.is-style-card.card-art .card-art img {
	display: block;
	width: 100%;
	height: auto;
	aspect-ratio: 4 / 3;
	object-fit: cover;
	border-radius: 12px;
}
.is-style-card.card-art h3 {
	margin-top: 0;
}
.is-style-card .eyebrow {
	color: var(--wp--preset--color--accent);
}

.is-style-card.has-icon {
	position: relative;
	padding-top: calc(var(--wp--preset--spacing--lg) + 6.5rem);
}
.is-style-card.has-icon::before {
	content: "";
	position: absolute;
	top: 1.8rem;
	left: 2rem;
	width: 80px;
	height: 80px;
	border-radius: 20px;
	background-color: var(--wp--preset--color--surface-alt);
	background-repeat: no-repeat;
	background-position: center;
	background-size: 40px 40px;
}
.icon-syndic::before { background-image: url("data:image/svg+xml,%3Csvg%20xmlns='http://www.w3.org/2000/svg'%20viewBox='0%200%2024%2024'%20fill='none'%20stroke='%23C9A96B'%20stroke-width='1.8'%20stroke-linecap='round'%20stroke-linejoin='round'%3E%3Cpath%20d='M4%2010.5%2012%204.5l8%206V19a1.5%201.5%200%200%201-1.5%201.5h-13A1.5%201.5%200%200%201%204%2019z'/%3E%3Cpath%20d='M9.5%2020.5v-6h5v6'/%3E%3C/svg%3E"); }
.icon-key::before { background-image: url("data:image/svg+xml,%3Csvg%20xmlns='http://www.w3.org/2000/svg'%20viewBox='0%200%2024%2024'%20fill='none'%20stroke='%23C9A96B'%20stroke-width='1.8'%20stroke-linecap='round'%20stroke-linejoin='round'%3E%3Ccircle%20cx='7.5'%20cy='16.5'%20r='4.5'/%3E%3Cpath%20d='M11%2013%2019%205M16.5%205.5l2%202M14.5%207.5l2%202'/%3E%3C/svg%3E"); }
.icon-page::before { background-image: url("data:image/svg+xml,%3Csvg%20xmlns='http://www.w3.org/2000/svg'%20viewBox='0%200%2024%2024'%20fill='none'%20stroke='%23C9A96B'%20stroke-width='1.8'%20stroke-linecap='round'%20stroke-linejoin='round'%3E%3Cpath%20d='M6%203h9l3%203v15H6z'/%3E%3Cpath%20d='M9%2012h6M9%2016h4'/%3E%3C/svg%3E"); }
.icon-layers::before { background-image: url("data:image/svg+xml,%3Csvg%20xmlns='http://www.w3.org/2000/svg'%20viewBox='0%200%2024%2024'%20fill='none'%20stroke='%23C9A96B'%20stroke-width='1.8'%20stroke-linecap='round'%20stroke-linejoin='round'%3E%3Cpath%20d='M12%203%203%208l9%205%209-5z'/%3E%3Cpath%20d='M3%2013l9%205%209-5'/%3E%3Cpath%20d='M3%2016l9%205%209-5'/%3E%3C/svg%3E"); }
.icon-chat::before { background-image: url("data:image/svg+xml,%3Csvg%20xmlns='http://www.w3.org/2000/svg'%20viewBox='0%200%2024%2024'%20fill='none'%20stroke='%23C9A96B'%20stroke-width='1.8'%20stroke-linecap='round'%20stroke-linejoin='round'%3E%3Cpath%20d='M21%2011.5a8.5%208.5%200%200%201-8.6%208.5%208.6%208.6%200%200%201-4.2-1L4%2020l1.1-3.1A8.5%208.5%200%201%201%2021%2011.5z'/%3E%3C/svg%3E"); }
.icon-target::before { background-image: url("data:image/svg+xml,%3Csvg%20xmlns='http://www.w3.org/2000/svg'%20viewBox='0%200%2024%2024'%20fill='none'%20stroke='%23C9A96B'%20stroke-width='1.8'%20stroke-linecap='round'%20stroke-linejoin='round'%3E%3Ccircle%20cx='12'%20cy='12'%20r='8.5'/%3E%3Ccircle%20cx='12'%20cy='12'%20r='4.5'/%3E%3Ccircle%20cx='12'%20cy='12'%20r='1'/%3E%3C/svg%3E"); }
.icon-shield::before { background-image: url("data:image/svg+xml,%3Csvg%20xmlns='http://www.w3.org/2000/svg'%20viewBox='0%200%2024%2024'%20fill='none'%20stroke='%23C9A96B'%20stroke-width='1.8'%20stroke-linecap='round'%20stroke-linejoin='round'%3E%3Cpath%20d='M12%203l7.5%203V12c0%204.3-3.2%207-7.5%208.5C7.7%2019%204.5%2016.3%204.5%2012V6z'/%3E%3C/svg%3E"); }
.icon-hardhat::before { background-image: url("data:image/svg+xml,%3Csvg%20xmlns='http://www.w3.org/2000/svg'%20viewBox='0%200%2024%2024'%20fill='none'%20stroke='%23C9A96B'%20stroke-width='1.8'%20stroke-linecap='round'%20stroke-linejoin='round'%3E%3Cpath%20d='M4%2017.5h16a2%202%200%200%200%202-2v-.5a9.5%209.5%200%200%200-19%200v.5a2%202%200%200%200%202%202z'/%3E%3Cpath%20d='M8%2017.5%207%2021h10l-1-3.5'/%3E%3C/svg%3E"); }
.icon-people::before { background-image: url("data:image/svg+xml,%3Csvg%20xmlns='http://www.w3.org/2000/svg'%20viewBox='0%200%2024%2024'%20fill='none'%20stroke='%23C9A96B'%20stroke-width='1.8'%20stroke-linecap='round'%20stroke-linejoin='round'%3E%3Ccircle%20cx='9'%20cy='8'%20r='3.5'/%3E%3Cpath%20d='M3%2020v-1.5A4.5%204.5%200%200%201%207.5%2014h3a4.5%204.5%200%200%201%204.5%204.5V20'/%3E%3Ccircle%20cx='16.5'%20cy='10'%20r='2.5'/%3E%3Cpath%20d='M15.5%2020v-.5a3%203%200%200%201%203-3h.5a3%203%200%200%201%203%203v.5'/%3E%3C/svg%3E"); }
.icon-chart::before { background-image: url("data:image/svg+xml,%3Csvg%20xmlns='http://www.w3.org/2000/svg'%20viewBox='0%200%2024%2024'%20fill='none'%20stroke='%23C9A96B'%20stroke-width='1.8'%20stroke-linecap='round'%20stroke-linejoin='round'%3E%3Cpath%20d='M4%204v15a1%201%200%200%200%201%201h15'/%3E%3Cpath%20d='M8%2016l3.5-4%203%202.5%204-6'/%3E%3C/svg%3E"); }
.icon-coin::before { background-image: url("data:image/svg+xml,%3Csvg%20xmlns='http://www.w3.org/2000/svg'%20viewBox='0%200%2024%2024'%20fill='none'%20stroke='%23C9A96B'%20stroke-width='1.8'%20stroke-linecap='round'%20stroke-linejoin='round'%3E%3Cellipse%20cx='9'%20cy='7.5'%20rx='5.5'%20ry='3.5'/%3E%3Cpath%20d='M3.5%2011.5c0%202%202.5%203.5%205.5%203.5s5.5-1.5%205.5-3.5'/%3E%3C/svg%3E"); }

.wp-block-image.is-style-rounded img {
	border-radius: 6px;
}

/* === invert button (on navy) === */
.is-style-invert .wp-element-button {
	background: #ffffff;
	color: var(--wp--preset--color--primary);
}
.is-style-invert .wp-element-button:hover {
	background: color-mix(in srgb, #ffffff 88%, transparent);
	color: var(--wp--preset--color--primary);
}

/* === unified button sizing === */
.wp-block-button__link.wp-element-button {
	font-size: 0.875rem;
	padding: 0.9rem 1.8rem;
	letter-spacing: 0.05em;
}
.wp-block-button.is-style-outline .wp-block-button__link.wp-element-button {
	font-size: 0.875rem;
	padding: 0.9rem 1.8rem;
	letter-spacing: 0.05em;
}

/* === site logo === */
.site-logo {
	line-height: 0;
	margin: 0;
}
.site-logo img {
	max-height: 280px;
	width: auto;
	max-width: 900px;
	object-fit: contain;
	display: block;
}

/* === contact form === */
.wp-block-jetpack-contact-form .jetpack-field__input,
.wp-block-jetpack-contact-form textarea.jetpack-field__input {
	border: 1px solid #e4e8ee;
	border-radius: 6px;
	padding: 0.75rem 0.9rem;
	font-family: "Public Sans", sans-serif;
	font-size: 1rem;
	width: 100%;
}
.wp-block-jetpack-contact-form .jetpack-field__input:focus {
	outline: none;
	border-color: var(--wp--preset--color--primary);
}

/* === stats === */
.stat-value {
	font-size: clamp(2.4rem, 5vw, 4rem);
	font-weight: 600;
	letter-spacing: -0.02em;
	line-height: 1;
	font-variant-numeric: tabular-nums;
}
.stat-label {
	font-size: 0.875rem;
	color: rgba(255, 255, 255, 0.75);
}

/* === responsive === */
@media (max-width: 781px) {
	.hero {
		min-height: 66dvh;
	}
}
@media (max-width: 640px) {
	.site-header {
		padding-inline: 1rem;
	}
	.site-logo img {
		max-height: 120px;
	}
	.site-tagline {
		font-size: 0.9rem;
		letter-spacing: 0.08em;
	}
	.is-style-card {
		padding: 2rem 1.5rem;
	}
}

/* === glossary (lexique) card accordion === */
.wp-block-details summary .step-num {
	color: var(--wp--preset--color--accent);
	font-weight: 600;
	letter-spacing: 0.03em;
}
.wp-block-details summary > .step-title {
	display: inline-flex;
	align-items: center;
}
.wp-block-details summary > .step-title .step-num {
	margin-right: 0.55rem;
}
.wp-block-details {
	margin-block-end: 0 !important;
	background: var(--wp--preset--color--surface);
	border-style: solid;
	border-width: 1px;
	border-color: var(--wp--preset--color--surface-alt);
	border-radius: 8px;
	box-shadow: 0 1px 3px rgb(16 24 40 / 0.06);
	padding: 0 1.35rem;
}
.wp-block-details + .wp-block-details {
	margin-block-start: 0.8rem !important;
}
.wp-block-details summary {
	padding: 1.1rem 0;
	line-height: 1.35;
	cursor: pointer;
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 1rem;
	font-weight: 600;
	list-style: none;
	color: var(--wp--preset--color--primary);
}
.wp-block-details summary::-webkit-details-marker {
	display: none;
}
.wp-block-details summary::after {
	content: "+";
	font-size: 1.4rem;
	font-weight: 400;
	line-height: 1;
	color: var(--wp--preset--color--accent);
	flex-shrink: 0;
	width: 1.75rem;
	height: 1.75rem;
	border: 1px solid var(--wp--preset--color--accent);
	border-radius: 50%;
	display: inline-flex;
	align-items: center;
	justify-content: center;
	background: var(--wp--preset--color--background);
	transition: background-color 150ms ease-out, color 150ms ease-out, border-color 150ms ease-out;
}
.wp-block-details[open] summary::after {
	content: "−";
	background: var(--wp--preset--color--accent);
	color: #fff;
	border-color: var(--wp--preset--color--accent);
}
.wp-block-details[open] .wp-block-paragraph:first-child {
	margin-block-start: 0.35rem;
}
.wp-block-details[open] {
	padding-bottom: 1.1rem;
}

/* accordéon carte : fond blanc dans les sections grises pour le contraste */
.wp-block-group.has-surface-background-color .wp-block-details {
	background: var(--wp--preset--color--background);
}

/* FAQ : numéro de section doré + titre marine (style Lexique) */
h2.wp-block-heading .faq-cat-num {
	color: var(--wp--preset--color--accent);
	font-weight: 600;
	font-variant-numeric: tabular-nums;
	letter-spacing: 0.02em;
	margin-inline-end: 0.5rem;
}

/* Titre de page harmonisé : taille sobre commune à toutes les pages (hors accueil) */
.entry-content h1.wp-block-heading.has-display-font-size {
	font-size: clamp(1.75rem, 3vw, 2.5rem) !important;
}
/* La page d'accueil conserve son grand titre de héros sur l'image */
body.home .entry-content h1.wp-block-heading.has-display-font-size {
	font-size: var(--wp--preset--font-size--display) !important;
}

/* FAQ : avis légal en pied de page */
.faq-legal {
	border-top: 1px solid var(--wp--preset--color--surface-alt);
	padding-top: var(--wp--preset--spacing--lg);
	padding-bottom: var(--wp--preset--spacing--lg);
}
.faq-legal p {
	color: var(--wp--preset--color--secondary);
	line-height: 1.6;
}
.faq-legal a {
	color: var(--wp--preset--color--accent-dark);
	text-decoration: underline;
}

/* === Thème : liste numérotée "Parcourir par thème" === */
.theme-index {
	row-gap: 0 !important;
	column-gap: 0 !important;
}
p.ix-item {
	display: flex;
	align-items: baseline;
	gap: 1.1rem;
	margin: 0 !important;
	padding: 1.05rem 0.2rem;
	border-bottom: 1px solid var(--wp--preset--color--surface-alt);
	font-size: 1.125rem;
	line-height: 1.35;
}
p.ix-item:last-child {
	border-bottom: 0;
}
p.ix-item .ix-num {
	color: var(--wp--preset--color--accent);
	font-weight: 600;
	letter-spacing: 0.04em;
	font-variant-numeric: tabular-nums;
	min-width: 2.2ch;
	font-size: 0.95rem;
	line-height: 1;
}
p.ix-item a {
	color: var(--wp--preset--color--primary);
	text-decoration: none;
	transition: color 0.18s ease;
}
p.ix-item a:hover {
	color: var(--wp--preset--color--accent-dark);
}
p.ix-item.is-ready::after {
	content: '\2192';
	margin-left: auto;
	color: var(--wp--preset--color--accent);
	font-weight: 600;
}
p.ix-item.ix-off {
	color: var(--wp--preset--color--secondary);
}

/* === Logo en texte (wordmark) === */
.site-wordmark {
	row-gap: 0.18rem !important;
	column-gap: 0 !important;
}
.site-wordmark-name {
	margin: 0;
	color: var(--wp--preset--color--primary);
	font-size: 2.15rem;
	line-height: 1;
	font-weight: 700;
	letter-spacing: -0.01em;
}
.site-wordmark-sub {
	margin: 0;
	color: var(--wp--preset--color--accent-dark);
	font-size: 0.66rem;
	line-height: 1;
	font-weight: 600;
	letter-spacing: 0.32em;
	text-transform: uppercase;
}
.site-wordmark-tag {
	margin: 0;
	color: var(--wp--preset--color--secondary);
	font-size: 0.66rem;
	line-height: 1;
	font-weight: 600;
	letter-spacing: 0.13em;
	text-transform: uppercase;
	white-space: nowrap;
}
@media (max-width: 782px) {
	.site-wordmark-name { font-size: 1.6rem; }
	.site-wordmark-tag { letter-spacing: 0.08em; white-space: normal; }
}

/* === Page Espace Client (connexion temporaire) === */
.login-card {
	max-width: 460px;
	margin-inline: auto;
	background: var(--wp--preset--color--background);
	box-shadow: 0 12px 32px rgb(16 24 40 / 0.08);
}
.login-card h1 {
	margin-block-start: 0;
}
.login-card > p:not(.login-note) {
	color: var(--wp--preset--color--secondary);
}
.wp-block-jetpack-contact-form {
	display: flex;
	flex-direction: column;
	gap: 1.1rem;
}
.wp-block-jetpack-contact-form .jetpack-field-label {
	font-size: 0.9rem;
	font-weight: 600;
	margin-block-end: 0.35rem;
}
.wp-block-jetpack-contact-form .jetpack-field__input {
	border: 1px solid var(--wp--preset--color--surface-alt);
	border-radius: 6px;
	padding: 0.8rem 0.9rem;
	font-family: "Public Sans", sans-serif;
	font-size: 1rem;
	width: 100%;
}
.wp-block-jetpack-contact-form .jetpack-field__input:focus {
	outline: none;
	border-color: var(--wp--preset--color--primary);
}
.login-note {
	font-size: 0.95rem;
	color: var(--wp--preset--color--secondary);
}
.login-note a {
	color: var(--wp--preset--color--accent-dark);
}
