/*
Theme Name: Pizza Bella
Theme URI: https://www.pizzabella-leblanc.fr/
Author: Tryptic's
Description: Thème à blocs sur mesure pour Pizza Bella Le Blanc. Remplace The7, WPBakery, Ultimate Addons et Slider Revolution.
Version: 1.5.0
Requires at least: 7.0
Tested up to: 7.1
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: pizzabella
*/

/* ---------- Base ---------- */
html { scroll-behavior: smooth; }
body { -webkit-font-smoothing: antialiased; }
.wp-site-blocks > * { margin-block-start: 0; }
main.wp-block-group > * { margin-block-start: 0; }
:where(.wp-site-blocks) :focus-visible { outline: 2px solid var(--wp--preset--color--primary); outline-offset: 2px; }
.pb-hide-mobile { display: block; }
@media (max-width: 781px) { .pb-hide-mobile { display: none !important; } }

/* ---------- En-tête ---------- */
.pb-header {
	position: sticky;
	top: var(--wp-admin--admin-bar--height, 0px);
	z-index: 100;
	background: #fff;
	box-shadow: 0 0 15px 1px rgba(0, 0, 0, 0.07);
	transition: background-color .25s ease, box-shadow .25s ease;
}
.pb-header__bar { min-height: 100px; transition: min-height .25s ease; }
.pb-header.is-scrolled .pb-header__bar { min-height: 70px; }
.pb-header .wp-block-site-logo img { width: 70px; height: auto; transition: width .25s ease; }
.pb-header.is-scrolled .wp-block-site-logo img { width: 52px; }
.pb-header .wp-block-navigation a,
.pb-header .pb-phone a { color: var(--wp--preset--color--ink); text-decoration: none; }
.pb-header .wp-block-navigation .wp-block-navigation-item__content { padding: 4px; border-bottom: 2px solid transparent; }
.pb-header .wp-block-navigation .current-menu-item > .wp-block-navigation-item__content,
.pb-header .wp-block-navigation .wp-block-navigation-item__content:hover { border-bottom-color: var(--wp--preset--color--primary); }
.pb-header .wp-block-navigation { gap: 14px 28px; }
.pb-phone { margin: 0; font-size: 13px; white-space: nowrap; }
.pb-phone a::before { content: "\260E\00A0"; }

/* Accueil : en-tête transparent posé sur le visuel, opaque au défilement */
.home .pb-header { position: fixed; left: 0; right: 0; background: transparent; box-shadow: none; }
.home .pb-header:not(.is-scrolled) .wp-block-navigation a,
.home .pb-header:not(.is-scrolled) .pb-phone a,
.home .pb-header:not(.is-scrolled) .wp-block-navigation__responsive-container-open { color: #fff; }
.home .pb-header.is-scrolled { background: rgba(255, 255, 255, 0.92); box-shadow: 0 0 15px 1px rgba(0, 0, 0, 0.07); }
.pb-header .wp-block-navigation__responsive-container.is-menu-open a { color: var(--wp--preset--color--ink) !important; }

/* ---------- Visuel d'accueil ---------- */
.pb-hero { text-align: center; }
.pb-hero .pb-hero__welcome { margin: 0; line-height: 1.1; text-shadow: 0 2px 12px rgba(0, 0, 0, .45); font-size: clamp(48px, 7vw, 90px) !important; }
.pb-hero .pb-hero__title { text-transform: uppercase; margin: .1em 0 .3em; font-family: var(--wp--preset--font-family--serif); font-weight: 700; color: #fff; line-height: 1; letter-spacing: .02em; font-size: clamp(44px, 8vw, 100px); text-shadow: 0 2px 12px rgba(0, 0, 0, .45); }
.pb-hero .pb-hero__hours { margin: 0; font-family: var(--wp--preset--font-family--serif); font-size: clamp(15px, 1.6vw, 20px); line-height: 1.5; color: #fff; text-transform: uppercase; }

/* ---------- Bandeau de titre des pages ---------- */
.pb-page-title {
	min-height: 180px;
	display: flex;
	align-items: center;
	justify-content: center;
	background: #3a2a1c var(--pb-title-image, none) center / cover no-repeat;
	position: relative;
	margin: 0;
}
.pb-page-title::before { content: ""; position: absolute; inset: 0; background: rgba(0, 0, 0, .35); }
.pb-page-title > * { position: relative; }
.pb-page-title .wp-block-post-title,
.pb-page-title h1 { margin: 0; color: #fff; font-weight: 700; text-transform: uppercase; font-size: clamp(22px, 2.6vw, 30px); line-height: 1.2; text-align: center; }

/* ---------- Sections ---------- */
.pb-section { padding-top: clamp(40px, 6vw, 80px); padding-bottom: clamp(40px, 6vw, 70px); margin-top: 0 !important; margin-bottom: 0 !important; }
.wp-block-post-content > .pb-section:first-child:not(.has-background):not(.wp-block-cover) { padding-top: clamp(30px, 4vw, 50px); }
.wp-block-cover.pb-section { min-height: 0; }
.wp-block-cover.pb-section .wp-block-cover__inner-container { width: 100%; }
.wp-block-cover:not(.is-light) :is(h1, h2, h3, h4, p) { color: inherit; }
.wp-block-cover:not(.is-light) .has-dark-color,
.wp-block-cover:not(.is-light) .has-ink-color { color: #fff !important; }

/* ---------- Titres doubles (script + capitales) ---------- */
.pb-heading { margin-bottom: 24px; }
.pb-heading > * { margin-top: 0 !important; margin-bottom: 0 !important; }
.pb-heading > * + * { margin-top: 4px !important; }
.pb-subheading { line-height: 1.2; }
.pb-heading .wp-block-separator { margin-top: 15px !important; }

/* ---------- Séparateurs ---------- */
.wp-block-separator.is-style-pb-ornament {
	border: 0; height: 9px; width: 80px; max-width: 80px; margin-left: auto; margin-right: auto; opacity: 1;
	background:
		linear-gradient(currentColor, currentColor) left 1px / calc(50% - 10px) 1px no-repeat,
		linear-gradient(currentColor, currentColor) left 6px / calc(50% - 10px) 1px no-repeat,
		linear-gradient(currentColor, currentColor) right 1px / calc(50% - 10px) 1px no-repeat,
		linear-gradient(currentColor, currentColor) right 6px / calc(50% - 10px) 1px no-repeat,
		radial-gradient(circle, currentColor 0 3px, transparent 3.5px) center / 9px 9px no-repeat;
}
.wp-block-separator.is-style-pb-dashed { border: 0; border-top: 1px dashed #000; background: none; opacity: 1; width: 100% !important; margin: 10px 0; color: #000; }

/* ---------- Images ---------- */
.wp-block-image.is-style-rounded img { border-radius: 50%; }
.wp-block-image.is-resized img { max-width: 100%; }
.wp-block-image.pb-rounded img { border-radius: 6px; }
.wp-block-image figcaption { font-size: 13px; }
.wp-block-gallery.has-nested-images figure.wp-block-image img { cursor: zoom-in; }
.wp-block-gallery.has-nested-images.columns-3 figure.wp-block-image:not(#individual-image) { flex-grow: 0; aspect-ratio: 3 / 2; }
.wp-block-cover:not(.is-light) .wp-block-separator.is-style-pb-ornament { color: rgba(255, 255, 255, .45); }

/* ---------- Lignes de carte (libellé à gauche, prix à droite) ---------- */
.wp-block-columns.is-not-stacked-on-mobile { gap: 12px; margin-bottom: 0; }
.wp-block-columns.is-not-stacked-on-mobile + .wp-block-columns.is-not-stacked-on-mobile { margin-top: 6px; }

/* ---------- Avis clients (défilement horizontal natif) ---------- */
.pb-testimonials {
	display: flex; gap: 0; overflow-x: auto; scroll-snap-type: x mandatory; scroll-behavior: smooth;
	-webkit-overflow-scrolling: touch; scrollbar-width: none;
}
.pb-testimonials::-webkit-scrollbar { display: none; }
.pb-testimonials > .pb-testimonial {
	flex: 0 0 100%; scroll-snap-align: center; margin: 0 !important; padding: 0 clamp(10px, 12vw, 200px);
	box-sizing: border-box; text-align: center;
}
.pb-testimonial > * { margin-top: 10px !important; margin-bottom: 0 !important; }
.pb-testimonial h3, .pb-testimonial h2 { font-family: var(--wp--preset--font-family--poppins); font-size: 17px; font-weight: 700; }
.pb-testimonials-nav { display: flex; justify-content: center; gap: 10px; margin-top: 10px; }
.pb-testimonials-nav button {
	width: 34px; height: 34px; border: 0; border-radius: 1px; cursor: pointer; font-size: 18px; line-height: 1;
	background: var(--wp--preset--color--primary); color: #fff;
}
.pb-testimonials-nav button:hover { background: var(--wp--preset--color--primary-dark); }

/* ---------- Actualités ---------- */
.wp-block-post-template .wp-block-post-title { font-family: var(--wp--preset--font-family--poppins); font-size: 22px; }
.wp-block-post-template .wp-block-post-title a { text-decoration: none; }

/* ---------- Formulaire Contact Form 7 ---------- */
.wpcf7 form { max-width: 100%; }
.wpcf7 label { display: block; font-size: 13px; }
.wpcf7 input[type="text"], .wpcf7 input[type="email"], .wpcf7 input[type="tel"], .wpcf7 textarea, .wpcf7 select {
	width: 100%; box-sizing: border-box; padding: 9px 12px; margin-top: 4px;
	border: 1px solid rgba(51, 51, 51, .2); border-radius: 1px; background: #fdfdfd;
	font: inherit; color: var(--wp--preset--color--ink);
}
.wpcf7 input:focus, .wpcf7 textarea:focus { border-color: var(--wp--preset--color--primary); outline: none; }
.wpcf7 input[type="submit"] {
	background: var(--wp--preset--color--primary); color: #fff; border: 0; border-radius: 1px; padding: 12px 18px; cursor: pointer;
	font-family: var(--wp--preset--font-family--serif); font-size: 14px; line-height: 16px;
}
.wpcf7 input[type="submit"]:hover { background: var(--wp--preset--color--primary-dark); }

/* ---------- Mention sous le formulaire ---------- */
.pb-form-note { font-size: 13px; line-height: 1.5; margin: 6px 0 12px; }

/* ---------- Mentions légales ---------- */
.pb-legal h2 { margin-top: 40px; margin-bottom: 12px; color: var(--wp--preset--color--ink); }
.pb-legal h2:first-child { margin-top: 0; }
.pb-legal .wp-block-table table { border-collapse: collapse; width: 100%; font-size: 14px; }
.pb-legal .wp-block-table th, .pb-legal .wp-block-table td { border: 1px solid rgba(51, 51, 51, .2); padding: 8px 10px; text-align: left; vertical-align: top; }
.pb-legal .wp-block-table th { background: var(--wp--preset--color--light); color: var(--wp--preset--color--ink); }

/* ---------- Bandeau cookies ---------- */
.pb-consent {
	position: fixed; z-index: 1000; left: 16px; right: 16px; bottom: 16px; margin: 0 auto; max-width: 760px; box-sizing: border-box;
	display: flex; flex-wrap: wrap; align-items: center; gap: 12px 20px; padding: 16px 20px;
	background: #1a1c20; color: #fff; border-radius: 4px; box-shadow: 0 4px 24px rgba(0, 0, 0, .3); font-size: 14px; line-height: 1.5;
}
.pb-consent[hidden] { display: none; }
.pb-consent__text { margin: 0; flex: 1 1 320px; }
.pb-consent__text a { color: #fff; text-decoration: underline; }
.pb-consent__actions { display: flex; gap: 10px; flex: 0 0 auto; }
.pb-consent__btn {
	background: var(--wp--preset--color--primary); color: #fff; border: 0; border-radius: 1px; padding: 10px 16px; cursor: pointer;
	font-family: var(--wp--preset--font-family--serif); font-size: 14px; line-height: 16px;
}
.pb-consent__btn:hover, .pb-consent__btn:focus-visible { background: var(--wp--preset--color--primary-dark); outline: 2px solid #fff; outline-offset: 2px; }
@media (max-width: 520px) { .pb-consent__actions { width: 100%; } .pb-consent__btn { flex: 1; } }

/* ---------- Pied de page ---------- */
.pb-footer { margin-top: 0; }
.pb-infoband {
	background: #1a1c20 var(--pb-footer-image, none) center / cover no-repeat;
	padding-top: clamp(160px, 26vw, 330px); padding-bottom: 0; margin: 0;
}
.pb-infobox { background: #000; color: #fff; padding: 24px 20px; margin: 0 auto; max-width: 1000px; font-size: 15px; line-height: 22px; }
.pb-infobox p { margin: 0; }
.pb-infobox a { color: #fff; text-decoration: none; }
.pb-bottombar { background: #000; color: #fff; font-size: 13px; line-height: 23px; padding-top: 14px; padding-bottom: 14px; margin: 0; }
.pb-bottombar p { margin: 0; }
.pb-bottombar a { color: #fff; text-decoration: none; }
.pb-bottombar a:hover { text-decoration: underline; }
.pb-bottombar .wp-block-site-logo img { width: 52px; height: auto; }

@media (max-width: 781px) {
	.pb-header__bar { min-height: 70px; }
	.pb-phone { display: none; }
	.pb-infobox { text-align: center; }
}
@media (prefers-reduced-motion: reduce) {
	html, .pb-testimonials { scroll-behavior: auto; }
	.pb-header, .pb-header__bar, .pb-header .wp-block-site-logo img { transition: none; }
}
