/*
Theme Name: Clinique Dentaire Berthiaume
Theme URI: https://paul.guitar-jam.ca/
Description: Thème enfant de Twenty Twenty-Five pour la Clinique Dentaire Berthiaume (plan F). Polices et icônes hébergées localement.
Author: Clinique Dentaire Berthiaume
Template: twentytwentyfive
Version: 1.1.1
Requires at least: 6.7
Requires PHP: 7.4
License: GNU General Public License v2 or later
License URI: https://www.gnu.org/licenses/gpl-2.0.html
Text Domain: cdb-berthiaume
*/

/* ==========================================================================
   Réglages généraux
   ========================================================================== */
:root {
	--cdb-ink: var(--wp--preset--color--contrast);
	--cdb-accent: var(--wp--preset--color--accent-1);
	--cdb-accent-soft: var(--wp--preset--color--accent-2);
	--cdb-soft: var(--wp--preset--color--accent-3);
	--cdb-muted: var(--wp--preset--color--accent-4);
	--cdb-line: var(--wp--preset--color--accent-5);
	--cdb-text2: #3A4E60;
	--cdb-radius: 10px;
}

html { scroll-behavior: smooth; }
:where(section, .wp-block-group)[id] { scroll-margin-top: 110px; }

/* Sections pleine largeur empilées sans espace entre elles */
.wp-block-post-content > .alignfull,
.wp-site-blocks > main > .alignfull { margin-block-start: 0; }
.cdb-section { padding-block: clamp(56px, 8vw, 96px); }
.cdb-soft { background-color: var(--cdb-soft); }
.cdb-muted, .cdb-muted a { color: var(--cdb-muted); }
.cdb-lead { font-size: var(--wp--preset--font-size--large); color: var(--cdb-text2); }
.cdb-small { font-size: var(--wp--preset--font-size--small); }
.cdb-center { text-align: center; }
.cdb-center.wp-block-group { justify-content: center; }
.cdb-note { background: #FFF7E6; border: 1px dashed #E0B04A; color: #6B4A00; border-radius: 8px; padding: 10px 14px; font-size: var(--wp--preset--font-size--small); }

/* Sections foncées : titres et textes en blanc */
.cdb-dark,
.cdb-dark :where(h1, h2, h3, h4, p, li, span) { color: #fff; }
.cdb-dark :where(p, li) { color: #D5E1EA; }
.cdb-dark a:where(:not(.wp-element-button)) { color: #fff; }

/* ==========================================================================
   Icônes (fichiers SVG locaux utilisés comme masques)
   ========================================================================== */
.cdb-i::before,
.wp-block-button[class*="cdb-i-"] .wp-block-button__link::before,
.cdb-fact::before,
.cdb-aftercare-col > h3::before {
	content: "";
	display: inline-block;
	flex: none;
	width: 1.15em;
	height: 1.15em;
	background-color: currentColor;
	-webkit-mask: var(--cdb-icon) center / contain no-repeat;
	mask: var(--cdb-icon) center / contain no-repeat;
}
.cdb-i-phone { --cdb-icon: url(assets/icons/phone.svg); }
.cdb-i-calendar { --cdb-icon: url(assets/icons/calendar.svg); }
.cdb-i-clock { --cdb-icon: url(assets/icons/clock.svg); }
.cdb-i-pin { --cdb-icon: url(assets/icons/pin.svg); }
.cdb-i-globe { --cdb-icon: url(assets/icons/globe.svg); }
.cdb-i-parking { --cdb-icon: url(assets/icons/parking.svg); }
.cdb-i-access { --cdb-icon: url(assets/icons/access.svg); }
.cdb-i-fast { --cdb-icon: url(assets/icons/fast.svg); }
.cdb-i-page { --cdb-icon: url(assets/icons/page.svg); }
.cdb-i-arrow { --cdb-icon: url(assets/icons/arrow.svg); }
.cdb-i-check { --cdb-icon: url(assets/icons/check.svg); }
.cdb-i-hourglass { --cdb-icon: url(assets/icons/hourglass.svg); }
.cdb-i-alert { --cdb-icon: url(assets/icons/alert.svg); }

.wp-block-button[class*="cdb-i-"] .wp-block-button__link {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	gap: 0.6em;
}
.wp-block-button .wp-block-button__link { min-height: 50px; }

/* Bouton blanc (sur fond foncé ou coloré) */
.wp-block-button.cdb-btn-light .wp-block-button__link {
	background: #fff;
	color: var(--cdb-ink);
	border-color: #fff;
}
.wp-block-button.cdb-btn-light .wp-block-button__link:hover {
	background: var(--cdb-ink);
	color: #fff;
	border-color: #fff;
}

/* Lien fléché */
.cdb-arrow-link a {
	display: inline-flex;
	align-items: center;
	gap: 0.5em;
	font-weight: 700;
	text-decoration: none;
}
.cdb-arrow-link a::after {
	content: "";
	width: 1.1em;
	height: 1.1em;
	background-color: currentColor;
	-webkit-mask: url(assets/icons/arrow.svg) center / contain no-repeat;
	mask: url(assets/icons/arrow.svg) center / contain no-repeat;
}
.cdb-arrow-link a:hover { text-decoration: underline; }

/* ==========================================================================
   Barre du haut et en-tête
   ========================================================================== */
.cdb-topbar { font-size: var(--wp--preset--font-size--small); }
.cdb-topbar p { margin: 0; }
.cdb-topbar .wp-block-polylang-language-switcher,
.cdb-topbar ul { display: flex; gap: 12px; list-style: none; margin: 0; padding: 0; }
.cdb-topbar ul li { margin: 0; }
.cdb-topbar a { color: #E6EEF4; text-decoration: none; }
.cdb-topbar .current-lang a { color: #fff; font-weight: 700; }
.cdb-footer-bottom ul { list-style: none; margin: 0; padding: 0; }

body:not(.editor-styles-wrapper) header.wp-block-template-part {
	position: sticky;
	top: 0;
	z-index: 50;
}
body.admin-bar:not(.editor-styles-wrapper) header.wp-block-template-part { top: 32px; }
@media (max-width: 782px) {
	body.admin-bar:not(.editor-styles-wrapper) header.wp-block-template-part { top: 0; position: relative; }
}
.cdb-header { background: #fff; border-bottom: 1px solid var(--cdb-line); }

.cdb-logo { margin: 0; }
.cdb-logo a {
	display: flex;
	align-items: center;
	gap: 12px;
	text-decoration: none;
	color: var(--cdb-ink);
}
.cdb-logo-mark {
	width: 44px;
	height: 44px;
	border-radius: 50%;
	background: var(--cdb-accent);
	display: inline-flex;
	align-items: center;
	justify-content: center;
	flex: none;
}
.cdb-logo-mark::before {
	content: "";
	width: 24px;
	height: 24px;
	background-color: #fff;
	-webkit-mask: url(assets/icons/tooth.svg) center / contain no-repeat;
	mask: url(assets/icons/tooth.svg) center / contain no-repeat;
}
.cdb-logo-text { display: flex; flex-direction: column; line-height: 1.1; }
.cdb-logo-text small {
	font-size: 12px;
	letter-spacing: 0.14em;
	text-transform: uppercase;
	color: var(--cdb-muted);
}
.cdb-logo-text strong {
	font-family: var(--wp--preset--font-family--source-serif-4);
	font-size: 26px;
	font-weight: 700;
}

.cdb-header .wp-block-navigation a { text-decoration: none; }
.cdb-header .wp-block-navigation .current-menu-item > a,
.cdb-header .wp-block-navigation a:hover { color: var(--cdb-accent); text-decoration: underline; text-underline-offset: 6px; }
.cdb-header .wp-block-navigation__responsive-container-open {
	width: 46px;
	height: 46px;
	border: 1px solid var(--cdb-line);
	border-radius: 6px;
	justify-content: center;
	align-items: center;
}

@media (max-width: 1100px) {
	.cdb-header .cdb-header-phone { display: none; }
}
@media (max-width: 600px) {
	.cdb-logo-mark { width: 38px; height: 38px; }
	.cdb-logo-text strong { font-size: 21px; }
	.cdb-logo-text small { font-size: 10px; }
	.cdb-topbar .cdb-topbar-info { display: none; }
}

/* ==========================================================================
   Héros de l'accueil
   ========================================================================== */
.cdb-badge {
	display: inline-flex;
	align-items: center;
	gap: 8px;
	padding: 8px 14px;
	border-radius: 999px;
	background: #fff;
	border: 1px solid var(--cdb-line);
	font-weight: 700;
	font-size: var(--wp--preset--font-size--small);
	width: fit-content;
}
.cdb-badge::before {
	content: "";
	width: 10px;
	height: 10px;
	border-radius: 50%;
	background: #2F7D4F;
}
.cdb-hero-media { position: relative; }
.cdb-hero-media .wp-block-image img,
.cdb-ph img { border-radius: var(--cdb-radius); width: 100%; height: auto; object-fit: cover; }
.cdb-float {
	position: absolute;
	left: 16px;
	bottom: -22px;
	background: #fff;
	border: 1px solid var(--cdb-line);
	border-radius: 8px;
	padding: 12px 18px;
	box-shadow: 0 6px 20px rgba(20, 40, 58, 0.10);
	gap: 2px !important;
}
.cdb-float p { margin: 0; font-size: var(--wp--preset--font-size--small); color: var(--cdb-text2); }
.cdb-float p:first-child { font-weight: 700; color: var(--cdb-ink); display: flex; align-items: center; gap: 8px; }
.cdb-float p:first-child::before {
	content: "";
	width: 20px;
	height: 20px;
	background-color: var(--cdb-accent);
	-webkit-mask: url(assets/icons/clock.svg) center / contain no-repeat;
	mask: url(assets/icons/clock.svg) center / contain no-repeat;
}

/* ==========================================================================
   Atouts (4)
   ========================================================================== */
.cdb-facts { border-bottom: 1px solid var(--cdb-line); }
.cdb-fact {
	display: grid !important;
	grid-template-columns: 26px 1fr;
	column-gap: 12px;
	align-items: start;
}
.cdb-fact::before { width: 26px; height: 26px; color: var(--cdb-accent); grid-row: span 2; }
.cdb-fact p { margin: 0 !important; grid-column: 2; }
.cdb-fact p:first-of-type { font-weight: 700; }
.cdb-fact p + p { font-size: var(--wp--preset--font-size--small); color: var(--cdb-muted); }

/* ==========================================================================
   Services
   ========================================================================== */
.cdb-svc-feature {
	background: var(--cdb-accent);
	color: #fff;
	border-radius: 16px;
	padding: clamp(24px, 3vw, 34px) !important;
}
.cdb-svc-feature :where(h2, h3, p) { color: #fff; }
.cdb-svc-feature p { color: #E6F1F4; }
.cdb-tag {
	display: inline-block;
	width: fit-content;
	font-size: 12px !important;
	letter-spacing: 0.12em;
	text-transform: uppercase;
	font-weight: 700;
	background: rgba(255, 255, 255, 0.18);
	padding: 4px 10px;
	border-radius: 999px;
	margin: 0;
}

.cdb-pills .wp-block-button__link {
	background: var(--cdb-soft);
	color: var(--cdb-ink);
	border: 1px solid var(--cdb-line);
	border-radius: 999px;
	font-weight: 600;
	min-height: 46px;
	padding: 10px 18px;
}
.cdb-pills .wp-block-button__link:hover { border-color: var(--cdb-accent); color: var(--cdb-accent); background: #fff; }
.cdb-pills .wp-block-button.cdb-i-page .wp-block-button__link::before { color: var(--cdb-accent); width: 16px; height: 16px; }

/* ==========================================================================
   Première visite (étapes)
   ========================================================================== */
.cdb-step { text-align: center; align-items: center; }
.cdb-step > * { margin-inline: auto; }
.cdb-step-n {
	width: 72px;
	height: 72px;
	border-radius: 50%;
	background: var(--cdb-accent-soft);
	color: var(--cdb-accent);
	border: 2px solid var(--cdb-accent);
	display: flex;
	align-items: center;
	justify-content: center;
	font-family: var(--wp--preset--font-family--source-serif-4);
	font-weight: 700;
	font-size: 30px;
	margin-block: 0;
}
.cdb-step-sep {
	font-size: 13px !important;
	font-weight: 700;
	letter-spacing: 0.08em;
	text-transform: uppercase;
	color: var(--cdb-accent);
	margin: 0;
}
.cdb-step h3 { font-family: var(--wp--preset--font-family--source-sans-3); font-size: var(--wp--preset--font-size--large); margin: 0; }
.cdb-step p:last-child { color: var(--cdb-text2); max-width: 280px; }

/* ==========================================================================
   Équipe
   ========================================================================== */
.cdb-member .wp-block-image img,
.cdb-person .wp-block-image img { border-radius: var(--cdb-radius); width: 100%; aspect-ratio: 4 / 5; object-fit: cover; }
.cdb-person .wp-block-image img { aspect-ratio: 1; }
.cdb-member .wp-block-image img { aspect-ratio: 4 / 3; }
.cdb-team-group { margin-top: clamp(40px, 5vw, 56px); }
.cdb-team-group > h2 { margin-bottom: 24px; }
.cdb-member p, .cdb-person p { margin: 0; }
.cdb-member p:first-of-type, .cdb-person p:first-of-type { font-weight: 700; font-size: var(--wp--preset--font-size--large); margin-top: 6px; }
.cdb-member p + p, .cdb-person p + p { color: var(--cdb-muted); font-size: var(--wp--preset--font-size--small); }

.cdb-dentist {
	border: 1px solid var(--cdb-line);
	border-radius: 12px;
	padding: clamp(18px, 2.5vw, 28px) !important;
}
.cdb-dentist .wp-block-image img { border-radius: var(--cdb-radius); aspect-ratio: 1; object-fit: cover; width: 100%; }
.cdb-dentist + .cdb-dentist { margin-top: 24px; }
.cdb-chips p {
	display: inline-block;
	margin: 0;
	font-size: var(--wp--preset--font-size--small);
	padding: 4px 12px;
	border-radius: 999px;
	background: var(--cdb-soft);
	border: 1px solid var(--cdb-line);
}

/* ==========================================================================
   Blogue (cartes)
   ========================================================================== */
.cdb-posts .wp-block-post {
	display: flex;
	flex-direction: column;
	border: 1px solid var(--cdb-line);
	border-radius: 12px;
	overflow: hidden;
	background: #fff;
	transition: border-color 0.15s;
}
.cdb-posts .wp-block-post:hover { border-color: var(--cdb-accent); }
.cdb-posts .wp-block-post-featured-image { margin: 0; }
.cdb-posts .wp-block-post-featured-image img { aspect-ratio: 16 / 9; object-fit: cover; width: 100%; }
.cdb-post-body { padding: 20px !important; flex: 1; }
.cdb-post-body .wp-block-post-title { font-size: 1.3rem; line-height: 1.25; margin: 0; }
.cdb-post-body .wp-block-post-title a { color: var(--cdb-ink); text-decoration: none; }
.cdb-post-body .wp-block-post-title a:hover { color: var(--cdb-accent); }
.cdb-post-body .wp-block-post-excerpt { color: var(--cdb-muted); font-size: var(--wp--preset--font-size--small); margin: 0; }
.cdb-post-body .wp-block-post-excerpt__more-text { display: none; }
.cdb-cat a,
.cdb-cat {
	font-size: 12px;
	letter-spacing: 0.1em;
	text-transform: uppercase;
	font-weight: 700;
	color: var(--cdb-accent);
	text-decoration: none;
}
.cdb-cat a { background: var(--cdb-accent-soft); padding: 3px 10px; border-radius: 999px; display: inline-block; }
.cdb-post-body .wp-block-read-more { font-weight: 700; font-size: var(--wp--preset--font-size--small); text-decoration: none; margin-top: auto; }

.cdb-filters ul.wp-block-categories {
	display: flex;
	flex-wrap: wrap;
	gap: 8px;
	list-style: none;
	padding: 0;
	margin: 0;
}
.cdb-filters ul.wp-block-categories li a {
	display: inline-block;
	padding: 8px 16px;
	border-radius: 999px;
	border: 1px solid var(--cdb-line);
	text-decoration: none;
	font-weight: 600;
	color: var(--cdb-ink);
}
.cdb-filters ul.wp-block-categories li.current-cat a { background: var(--cdb-ink); color: #fff; border-color: var(--cdb-ink); }

/* ==========================================================================
   Pages intérieures
   ========================================================================== */
.cdb-page-hero { border-bottom: 1px solid var(--cdb-line); }
.cdb-page-hero .wp-block-post-title { margin: 0; }
.yoast-breadcrumbs, .cdb-page-hero .yoast-breadcrumbs { font-size: var(--wp--preset--font-size--small); color: var(--cdb-muted); }
.yoast-breadcrumbs a { color: var(--cdb-muted); }

.cdb-card-box {
	border: 1px solid var(--cdb-line);
	border-radius: 12px;
	padding: 22px !important;
	background: #fff;
}
.cdb-card-box h3 { font-size: var(--wp--preset--font-size--large); margin: 0; }
.cdb-card-box ul.wp-block-page-list,
.cdb-card-box ul { list-style: none; padding: 0; margin: 0; }
.cdb-card-box ul li a { display: block; padding: 8px 0; border-bottom: 1px solid var(--cdb-line); text-decoration: none; font-weight: 600; color: var(--cdb-ink); }
.cdb-card-box ul li:last-child a { border-bottom: 0; }
.cdb-card-box ul li a:hover { color: var(--cdb-accent); }

.cdb-cta-band {
	background: var(--cdb-soft);
	border: 1px solid var(--cdb-line);
	border-radius: 12px;
	padding: 24px !important;
}
.cdb-cta-band p:first-child { font-family: var(--wp--preset--font-family--source-serif-4); font-size: var(--wp--preset--font-size--x-large); font-weight: 700; margin: 0; }

.cdb-summary {
	background: var(--cdb-soft);
	border: 1px solid var(--cdb-line);
	border-radius: 12px;
	padding: 22px 24px !important;
}

ol.cdb-steps-list { list-style: none; counter-reset: s; padding-left: 0; }
ol.cdb-steps-list li { counter-increment: s; position: relative; padding-left: 44px; min-height: 32px; margin-bottom: 8px; }
ol.cdb-steps-list li::before {
	content: counter(s);
	position: absolute;
	left: 0;
	top: -1px;
	width: 30px;
	height: 30px;
	border-radius: 50%;
	background: var(--cdb-accent-soft);
	color: var(--cdb-accent);
	font-weight: 700;
	display: flex;
	align-items: center;
	justify-content: center;
	font-size: 15px;
}

/* Encadré « Après votre traitement » */
.cdb-aftercare { border: 2px solid var(--cdb-accent); border-radius: 14px; overflow: hidden; gap: 0 !important; }
.cdb-aftercare-head { background: var(--cdb-accent); padding: 18px 24px !important; }
.cdb-aftercare-head h2 { color: #fff; margin: 0; font-size: var(--wp--preset--font-size--x-large); }
.cdb-aftercare-grid { gap: 0 !important; margin: 0 !important; }
.cdb-aftercare-col { padding: 22px 24px !important; border-top: 1px solid var(--cdb-line); }
.cdb-aftercare-col > h3 {
	font-family: var(--wp--preset--font-family--source-sans-3);
	font-size: var(--wp--preset--font-size--large);
	display: flex;
	align-items: center;
	gap: 8px;
	margin: 0;
}
.cdb-aftercare-col ul { padding-left: 20px; margin: 0; }
.cdb-aftercare-col.cdb-call { background: #FFF6EE; }
.cdb-aftercare-col.cdb-call > h3 { color: #9A3412; }
.cdb-aftercare-foot { padding: 14px 24px !important; background: var(--cdb-soft); border-top: 1px solid var(--cdb-line); font-size: var(--wp--preset--font-size--small); margin: 0 !important; }
@media (min-width: 782px) {
	.cdb-aftercare-grid > .cdb-aftercare-col + .cdb-aftercare-col { border-left: 1px solid var(--cdb-line); }
}

.wp-block-details { border: 1px solid var(--cdb-line); border-radius: 10px; padding: 14px 18px; }
.wp-block-details summary { font-weight: 700; cursor: pointer; }

/* Heures */
.cdb-hours > * { margin-block-start: 0 !important; }
.cdb-hours-row { border-bottom: 1px solid var(--cdb-line); padding-block: 10px; width: 100%; }
.cdb-hours-row:last-child { border-bottom: 0; }
.cdb-hours-row p { margin: 0; }
.cdb-hours-row p:first-child { font-weight: 600; }
.cdb-hours-row.cdb-eve p:last-child { color: var(--cdb-accent); font-weight: 700; }
.cdb-box { border-top: 1px solid var(--cdb-line); padding-top: 18px; }
.cdb-address { display: flex; gap: 12px; align-items: flex-start; }
.cdb-address::before { color: var(--cdb-accent); width: 22px; height: 22px; margin-top: 2px; }

/* ==========================================================================
   Pied de page et barre d'appel (cellulaire)
   ========================================================================== */
.cdb-footer a { color: #D5E1EA; }
.cdb-footer .wp-block-navigation a { text-decoration: underline; }
.cdb-footer .wp-block-navigation .wp-block-navigation__container { gap: 6px !important; }
.cdb-footer p { margin-block: 0 0.75em; }
.cdb-footer-brand { font-family: var(--wp--preset--font-family--source-serif-4); font-size: 22px; font-weight: 700; color: #fff !important; }
.cdb-footer-bottom { border-top: 1px solid #2A3D4E; padding-top: 18px; }

.cdb-callbar { display: none !important; }
@media (max-width: 760px) {
	body:not(.editor-styles-wrapper) { padding-bottom: 72px; }
	body:not(.editor-styles-wrapper) .cdb-callbar {
		display: flex !important;
		position: fixed;
		left: 0;
		right: 0;
		bottom: 0;
		z-index: 60;
		margin: 0 !important;
		padding: 10px 12px !important;
		background: #fff;
		border-top: 1px solid var(--cdb-line);
		box-shadow: 0 -4px 16px rgba(20, 40, 58, 0.10);
		gap: 8px;
	}
	body:not(.editor-styles-wrapper) .cdb-callbar .wp-block-button { flex: 1 1 0; }
	body:not(.editor-styles-wrapper) .cdb-callbar .wp-block-button__link { width: 100%; }
}
.editor-styles-wrapper .cdb-callbar { display: flex !important; }

/* Filtres du blogue : rien à afficher tant qu'aucune catégorie n'a d'article publié. */
.cdb-filters .cat-item-none { display: none; }
