/*
Theme Name: Librairie Benkadi
Theme URI: https://example.com/librairie-benkadi
Author: Librairie Benkadi
Description: Theme WooCommerce mobile pour la vente de livres numeriques, inspire d'une boutique de livres moderne.
Version: 1.0.0
Requires at least: 6.3
Tested up to: 6.8
Requires PHP: 7.4
Text Domain: benkadi
License: GNU General Public License v2 or later
License URI: https://www.gnu.org/licenses/gpl-2.0.html
Tags: e-commerce, custom-logo, custom-menu, featured-images, translation-ready
*/

:root {
	--bk-blue: #1119bd;
	--bk-blue-dark: #070c66;
	--bk-blue-soft: #eef0ff;
	--bk-orange: #ff7900;
	--bk-ink: #111936;
	--bk-muted: #667085;
	--bk-line: #e8ebf5;
	--bk-cream: #f7f8ff;
	--bk-white: #fff;
	--bk-shadow: 0 18px 42px rgba(13, 18, 75, .1);
	--bk-radius: 18px;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
	margin: 0;
	color: var(--bk-ink);
	background: var(--bk-white);
	font-family: "Segoe UI", Arial, sans-serif;
	line-height: 1.6;
}
a { color: inherit; text-decoration: none; }
a:hover { color: var(--bk-blue); }
img { display: block; max-width: 100%; height: auto; }
.container { width: min(1200px, calc(100% - 40px)); margin: 0 auto; }
.screen-reader-text { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); }

.topbar {
	background: var(--bk-blue);
	color: var(--bk-white);
	font-size: .92rem;
}
.topbar__inner {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 16px;
	min-height: 42px;
}
.topbar__links { display: flex; gap: 22px; }
.topbar a:hover { color: #dce1ff; }
.site-head {
	background: var(--bk-white);
	border-bottom: 1px solid var(--bk-line);
}
.site-head__main {
	display: grid;
	grid-template-columns: 235px minmax(260px, 1fr) auto;
	gap: 34px;
	align-items: center;
	padding: 16px 0;
}
.brand img { height: 70px; width: auto; object-fit: contain; }
.brand__fallback { color: var(--bk-blue); font-weight: 800; font-size: 1.8rem; }
.book-search {
	display: flex;
	align-items: center;
	overflow: hidden;
	border: 1px solid #d4d9f1;
	border-radius: 999px;
	height: 52px;
	background: #fff;
}
.book-search input {
	flex: 1;
	border: 0;
	padding: 0 22px;
	font-size: .96rem;
	outline: none;
	background: transparent;
}
.book-search button {
	height: 52px;
	width: 62px;
	border: 0;
	color: #fff;
	background: var(--bk-blue);
	font-size: 1.25rem;
	cursor: pointer;
}
.head-tools { display: flex; align-items: center; gap: 20px; }
.support-call small { display: block; color: var(--bk-muted); font-size: .75rem; }
.support-call strong { white-space: nowrap; color: var(--bk-ink); }
.cart-pill {
	display: grid;
	place-items: center;
	min-height: 48px;
	padding: 0 17px;
	border-radius: 999px;
	color: #fff;
	background: var(--bk-blue-dark);
	font-weight: 700;
}
.main-nav { background: var(--bk-blue-dark); color: #fff; }
.main-nav__inner { display: flex; min-height: 58px; align-items: center; gap: 34px; }
.category-trigger {
	display: flex;
	gap: 12px;
	align-items: center;
	min-height: 58px;
	padding: 0 30px;
	background: var(--bk-blue);
	font-weight: 700;
}
.menu-primary-container { flex: 1; }
.primary-menu {
	list-style: none;
	display: flex;
	align-items: center;
	gap: 34px;
	margin: 0;
	padding: 0;
	font-weight: 600;
}
.primary-menu a:hover { color: #bcc7ff; }
.menu-toggle { display: none; }

.hero {
	position: relative;
	overflow: hidden;
	background: linear-gradient(115deg, #f6f7ff 0%, #eef0ff 48%, #dce2ff 100%);
}
.hero::before,
.hero::after {
	content: "";
	position: absolute;
	border-radius: 50%;
	background: rgba(17, 25, 189, .07);
}
.hero::before { width: 340px; height: 340px; right: -100px; bottom: -160px; }
.hero::after { width: 190px; height: 190px; left: 42%; top: 34px; }
.hero__inner {
	position: relative;
	z-index: 1;
	display: grid;
	grid-template-columns: 1fr 1fr;
	gap: 30px;
	align-items: center;
	min-height: 530px;
}
.eyebrow {
	display: inline-flex;
	align-items: center;
	gap: 10px;
	margin-bottom: 16px;
	color: var(--bk-blue);
	font-weight: 700;
	text-transform: uppercase;
	letter-spacing: .12em;
	font-size: .76rem;
}
.eyebrow::before { content: ""; height: 2px; width: 34px; background: var(--bk-orange); }
.hero h1 {
	margin: 0 0 18px;
	font-size: clamp(2.4rem, 4.8vw, 3.65rem);
	line-height: 1.12;
	letter-spacing: -.045em;
}
.hero h1 span { color: var(--bk-blue); }
.hero p {
	max-width: 490px;
	margin: 0 0 34px;
	color: var(--bk-muted);
	font-size: 1.03rem;
}
.btn {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	gap: 8px;
	min-height: 52px;
	padding: 0 28px;
	border-radius: 999px;
	color: #fff;
	background: var(--bk-blue);
	font-weight: 700;
	transition: transform .2s ease, box-shadow .2s ease;
}
.btn:hover {
	color: #fff;
	transform: translateY(-2px);
	box-shadow: 0 13px 25px rgba(17, 25, 189, .27);
}
.btn--orange { background: var(--bk-orange); }
.hero-books {
	display: flex;
	align-items: center;
	justify-content: center;
	min-height: 410px;
}
.hero-book {
	position: relative;
	height: 328px;
	width: 214px;
	overflow: hidden;
	border-radius: 6px 14px 14px 6px;
	box-shadow: 0 22px 32px rgba(10, 14, 60, .23);
	background: var(--bk-blue);
	color: #fff;
	padding: 36px 24px;
}
.hero-book:nth-child(1) { transform: translate(42px, 20px) rotate(-6deg); background: #080d68; }
.hero-book:nth-child(2) { z-index: 2; height: 365px; background: var(--bk-blue); }
.hero-book:nth-child(3) { transform: translate(-38px, 27px) rotate(6deg); background: #ff7900; }
.hero-book::after { content: ""; position: absolute; inset: 0 auto 0 12px; width: 3px; background: rgba(255,255,255,.25); }
.hero-book strong { font-size: 1.3rem; line-height: 1.25; display: block; margin-top: 82px; }
.hero-book small { opacity: .78; }

.benefits { margin: -22px auto 0; position: relative; z-index: 3; }
.benefits__grid {
	display: grid;
	grid-template-columns: repeat(4, 1fr);
	background: #fff;
	border-radius: var(--bk-radius);
	box-shadow: var(--bk-shadow);
}
.benefit { padding: 25px 24px; border-right: 1px solid var(--bk-line); }
.benefit:last-child { border: 0; }
.benefit strong { display: block; font-size: .99rem; }
.benefit span { color: var(--bk-muted); font-size: .9rem; }

.section { padding: 70px 0; }
.section--soft { background: var(--bk-cream); }
.section-heading {
	display: flex;
	align-items: end;
	justify-content: space-between;
	gap: 20px;
	margin-bottom: 34px;
}
.section-heading h2 {
	margin: 0;
	font-size: clamp(1.7rem, 3vw, 2.25rem);
	letter-spacing: -.04em;
}
.section-heading p { margin: 5px 0 0; color: var(--bk-muted); }
.text-link { color: var(--bk-blue); font-weight: 700; white-space: nowrap; }
.category-grid {
	display: grid;
	grid-template-columns: repeat(5, 1fr);
	gap: 16px;
}
.category-card {
	padding: 28px 15px;
	text-align: center;
	border: 1px solid var(--bk-line);
	border-radius: var(--bk-radius);
	background: #fff;
	font-weight: 700;
	transition: border-color .2s ease, transform .2s ease;
}
.category-card:hover { transform: translateY(-4px); border-color: var(--bk-blue); }
.category-card__icon {
	display: grid;
	place-items: center;
	width: 56px;
	height: 56px;
	margin: 0 auto 14px;
	border-radius: 50%;
	background: var(--bk-blue-soft);
	color: var(--bk-blue);
	font-size: 1.45rem;
}
.products-grid {
	display: grid;
	grid-template-columns: repeat(4, 1fr);
	gap: 26px;
}
.book-card { position: relative; }
.book-card__media {
	position: relative;
	aspect-ratio: .68;
	overflow: hidden;
	margin-bottom: 18px;
	border-radius: 9px;
	background: #e8ebfb;
	box-shadow: 0 10px 25px rgba(13, 18, 75, .08);
}
.book-card__media img { width: 100%; height: 100%; object-fit: cover; }
.book-card__placeholder {
	display: flex;
	height: 100%;
	align-items: center;
	justify-content: center;
	padding: 25px;
	color: #fff;
	text-align: center;
	background: linear-gradient(135deg, var(--bk-blue), var(--bk-blue-dark));
	font-weight: 700;
}
.book-card__badge {
	position: absolute;
	top: 13px;
	left: 13px;
	padding: 5px 10px;
	background: var(--bk-orange);
	color: #fff;
	border-radius: 999px;
	font-size: .72rem;
	font-weight: 700;
}
.book-card h3 {
	margin: 8px 0 5px;
	line-height: 1.35;
	font-size: 1.08rem;
}
.book-card__author { color: var(--bk-muted); font-size: .88rem; }
.book-card__bottom {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 10px;
	margin-top: 12px;
	color: var(--bk-blue);
	font-weight: 700;
}
.book-card .button {
	padding: 9px 13px !important;
	border-radius: 999px !important;
	background: var(--bk-blue) !important;
	color: #fff !important;
	font-size: .84rem !important;
}
.payment-band {
	display: grid;
	grid-template-columns: .9fr 1.1fr;
	align-items: center;
	gap: 55px;
	background: var(--bk-blue-dark);
	color: #fff;
	padding: 54px;
	border-radius: 28px;
}
.payment-band h2 { font-size: clamp(1.7rem, 3vw, 2.35rem); line-height: 1.2; margin: 0 0 17px; }
.payment-band p { color: #dbe0ff; margin: 0 0 26px; }
.steps { display: grid; gap: 14px; }
.step {
	display: flex;
	gap: 15px;
	align-items: center;
	padding: 16px;
	background: rgba(255,255,255,.09);
	border-radius: 14px;
}
.step b {
	display: grid;
	place-items: center;
	flex: 0 0 38px;
	height: 38px;
	border-radius: 50%;
	color: var(--bk-blue-dark);
	background: #fff;
}

.site-footer { margin-top: 72px; background: #070b36; color: #ccd2ed; }
.footer-grid {
	display: grid;
	grid-template-columns: 1.35fr .8fr .9fr 1fr;
	gap: 42px;
	padding: 58px 0 45px;
}
.footer-grid h3 { margin: 0 0 17px; color: #fff; font-size: 1rem; }
.footer-brand img { max-height: 82px; width: auto; background: #fff; border-radius: 8px; margin-bottom: 16px; }
.footer-menu { list-style: none; margin: 0; padding: 0; }
.footer-menu li { margin: 9px 0; }
.footer-bottom { border-top: 1px solid rgba(255,255,255,.1); padding: 19px 0; text-align: center; font-size: .9rem; }

.content-area { padding: 55px 0; min-height: 45vh; }
.entry-title, .woocommerce-products-header__title { line-height: 1.2; letter-spacing: -.035em; }
.woocommerce .button, .woocommerce button.button, .woocommerce input.button {
	background: var(--bk-blue) !important;
	color: #fff !important;
	border-radius: 999px !important;
}
.woocommerce span.onsale { background: var(--bk-orange); }
.woocommerce ul.products li.product .price, .woocommerce div.product p.price { color: var(--bk-blue); }
.woocommerce-message, .woocommerce-info { border-top-color: var(--bk-blue); }
.woocommerce-message::before, .woocommerce-info::before { color: var(--bk-blue); }

@media (max-width: 980px) {
	.site-head__main { grid-template-columns: 180px 1fr; gap: 18px; }
	.brand img { height: 58px; }
	.head-tools { grid-column: 1 / -1; justify-content: flex-end; }
	.hero__inner { min-height: auto; padding: 54px 0; }
	.hero-books { min-height: 335px; }
	.hero-book { width: 155px; height: 260px; padding: 22px 16px; }
	.hero-book:nth-child(2) { height: 290px; }
	.hero-book strong { margin-top: 60px; font-size: 1rem; }
	.benefits__grid, .products-grid { grid-template-columns: repeat(2, 1fr); }
	.benefit:nth-child(2) { border-right: 0; }
	.category-grid { grid-template-columns: repeat(3, 1fr); }
	.payment-band { grid-template-columns: 1fr; padding: 38px; }
	.footer-grid { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 720px) {
	.container { width: min(100% - 30px, 560px); }
	.topbar__inner { justify-content: center; text-align: center; }
	.topbar__links, .support-call { display: none; }
	.site-head__main { display: flex; flex-wrap: wrap; justify-content: space-between; padding: 10px 0 14px; }
	.brand img { height: 54px; }
	.book-search { order: 3; flex-basis: 100%; height: 48px; }
	.book-search button { height: 48px; }
	.head-tools { gap: 10px; }
	.cart-pill { min-height: 42px; }
	.main-nav__inner { justify-content: space-between; min-height: 52px; }
	.category-trigger { padding: 0 15px; min-height: 52px; }
	.menu-toggle { display: inline-block; border: 0; background: transparent; color: #fff; font-size: 1.45rem; }
	.primary-menu {
		display: none;
		position: absolute;
		z-index: 9;
		right: 15px;
		left: 15px;
		top: auto;
		flex-direction: column;
		align-items: stretch;
		gap: 0;
		padding: 12px;
		background: var(--bk-blue-dark);
		box-shadow: var(--bk-shadow);
	}
	.primary-menu.is-open { display: flex; }
	.primary-menu a { display: block; padding: 12px; }
	.hero__inner { display: block; padding: 47px 0 40px; }
	.hero p { margin-bottom: 25px; }
	.hero-books { margin-top: 40px; min-height: 270px; }
	.hero-book { width: 126px; height: 220px; }
	.hero-book:nth-child(2) { height: 245px; }
	.hero-book strong { margin-top: 48px; }
	.benefits { margin-top: 0; }
	.benefits__grid, .products-grid, .category-grid, .footer-grid { grid-template-columns: repeat(2, 1fr); }
	.benefit { padding: 18px 14px; }
	.section { padding: 46px 0; }
	.section-heading { align-items: start; flex-direction: column; margin-bottom: 25px; }
	.payment-band { padding: 28px 21px; gap: 28px; }
	.site-footer { margin-top: 40px; }
	.footer-grid { gap: 30px 18px; padding: 42px 0 30px; }
}
@media (max-width: 430px) {
	.products-grid { gap: 18px 12px; }
	.book-card h3 { font-size: .94rem; }
	.book-card .button { display: none !important; }
	.category-grid { grid-template-columns: 1fr 1fr; }
}
