/* ==================================================================
   CARTElib — Refonte page d'accueil (template-home.php)
   Fusion des patterns recharge.fr (confiance, achat express, stats)
   et becharge.fr (recherche marques, éditorial, catégories) dans
   une identité CARTElib originale.
   ================================================================== */

.clh {
	--navy: #0b1b3f;
	--blue: var(--ast-global-color-0, #0a5bd3);
	--blue-dark: var(--ast-global-color-1, #063e93);
	--sky: #eaf2ff;
	--ok: #12b76a;
	--ink: #1a2340;
	--muted: #5a6584;
	--card: #ffffff;
	--radius: 16px;
	--shadow: 0 10px 30px rgba(11, 27, 63, 0.10);
	font-size: 1rem;
	color: var(--ink);
}
.clh-wrap { max-width: 1180px; margin: 0 auto; padding: 0 1.25rem; }
.clh h1, .clh h2, .clh h3 { line-height: 1.15; color: var(--navy); }
.clh h2 { font-size: clamp(1.6rem, 3.2vw, 2.2rem); margin: 0 0 .5rem; }
.clh-section { padding: clamp(3rem, 7vw, 5rem) 0; }
.clh-section--soft { background: var(--sky); }
.clh-section__sub { color: var(--muted); margin: 0 0 2rem; max-width: 60ch; }

/* Boutons */
.clh-btn {
	display: inline-flex; align-items: center; justify-content: center; gap: .5rem;
	min-height: 48px; padding: .7rem 1.5rem; border-radius: 12px;
	font-weight: 700; text-decoration: none; transition: transform .15s ease, box-shadow .15s ease;
}
.clh-btn:hover { transform: translateY(-2px); }
.clh-btn--primary { background: var(--blue); color: #fff !important; box-shadow: 0 8px 20px rgba(10, 91, 211, .35); }
.clh-btn--primary:hover { background: var(--blue-dark); }
.clh-btn--light { background: #fff; color: var(--navy) !important; }
.clh-btn--small { min-height: 40px; padding: .4rem 1.1rem; background: var(--blue); color: #fff !important; font-size: .9rem; }

/* ------------------------------------------------------------------
   Hero + achat express
   ------------------------------------------------------------------ */
.clh-hero {
	background:
		radial-gradient(1000px 500px at 85% -10%, rgba(10, 91, 211, .18), transparent 60%),
		linear-gradient(180deg, #f6f9ff 0%, #ffffff 100%);
	padding: clamp(3rem, 7vw, 5.5rem) 0;
}
.clh-hero__grid { display: grid; grid-template-columns: 1.15fr .85fr; gap: 3rem; align-items: center; }
.clh-eyebrow {
	display: inline-block; font-size: .78rem; font-weight: 700; letter-spacing: .12em;
	text-transform: uppercase; color: var(--blue); background: var(--sky);
	padding: .35rem .8rem; border-radius: 999px; margin: 0 0 1rem;
}
.clh-hero h1 { font-size: clamp(2rem, 4.4vw, 3.1rem); margin: 0 0 1rem; letter-spacing: -.02em; }
.clh-hero h1 em { font-style: normal; color: var(--blue); position: relative; white-space: nowrap; }
.clh-hero h1 em::after {
	content: ""; position: absolute; left: 0; right: 0; bottom: .06em; height: .28em;
	background: rgba(18, 183, 106, .3); z-index: -1; border-radius: 3px;
}
.clh-hero__sub { color: var(--muted); font-size: 1.08rem; line-height: 1.7; max-width: 55ch; margin: 0 0 1.5rem; }

.clh-search {
	display: flex; align-items: center; gap: .6rem; max-width: 480px;
	background: #fff; border: 2px solid #d7e2f5; border-radius: 14px; padding: .35rem .9rem;
	transition: border-color .15s ease, box-shadow .15s ease;
}
.clh-search:focus-within { border-color: var(--blue); box-shadow: 0 0 0 4px rgba(10, 91, 211, .12); }
.clh-search svg { color: var(--muted); flex: 0 0 auto; }
.clh-search input {
	border: 0 !important; outline: 0 !important; background: transparent !important;
	width: 100%; min-height: 44px; font-size: 1rem; color: var(--ink); box-shadow: none !important;
}

.clh-hero__stats { list-style: none; display: flex; gap: 2.25rem; margin: 1.75rem 0 0; padding: 0; flex-wrap: wrap; }
.clh-hero__stats strong { display: block; font-size: 1.35rem; color: var(--navy); }
.clh-hero__stats span { font-size: .85rem; color: var(--muted); }

/* Carte achat express — élément signature */
.clh-quickbuy {
	background: var(--card); border-radius: 20px; box-shadow: var(--shadow);
	padding: 1.75rem; border-top: 5px solid var(--blue); position: relative;
}
.clh-quickbuy__title { font-weight: 800; font-size: 1.15rem; color: var(--navy); margin: 0 0 1rem; }
.clh-quickbuy__step { display: flex; align-items: center; gap: .55rem; font-weight: 600; font-size: .9rem; color: var(--muted); margin: 1rem 0 .55rem; }
.clh-quickbuy__step span, .clh-quickbuy__cta span {
	display: inline-flex; align-items: center; justify-content: center;
	width: 22px; height: 22px; border-radius: 50%; background: var(--sky);
	color: var(--blue); font-size: .78rem; font-weight: 800; flex: 0 0 auto;
}
.clh-quickbuy__cta span { background: rgba(255, 255, 255, .2); color: #fff; }
.clh-quickbuy__brands, .clh-quickbuy__amounts { display: flex; flex-wrap: wrap; gap: .5rem; }
.clh-chip {
	border: 1.5px solid #d7e2f5; background: #fff; color: var(--ink);
	border-radius: 999px; padding: .45rem 1rem; font-size: .9rem; font-weight: 600;
	cursor: pointer; transition: all .15s ease;
}
.clh-chip:hover { border-color: var(--blue); color: var(--blue); }
.clh-chip.is-active { background: var(--blue); border-color: var(--blue); color: #fff; }
.clh-chip.is-out { opacity: .45; text-decoration: line-through; cursor: not-allowed; }
.clh-quickbuy__amounts .clh-chip small { font-weight: 500; opacity: .75; margin-left: .3rem; }
.clh-quickbuy__cta { width: 100%; margin-top: 1.25rem; }
.clh-quickbuy__note { text-align: center; font-size: .8rem; color: var(--muted); margin: .7rem 0 0; }
.clh-quickbuy__empty { font-size: .9rem; color: var(--muted); margin: 0; }

/* ------------------------------------------------------------------
   Grille des marques
   ------------------------------------------------------------------ */
.clh-brandgrid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 1.25rem; }
.clh-brandcard {
	display: flex; flex-direction: column; gap: .45rem;
	background: var(--card); border: 1px solid #e3eaf8; border-radius: var(--radius);
	padding: 1.5rem; text-decoration: none; position: relative;
	transition: transform .18s ease, box-shadow .18s ease, border-color .18s ease;
}
.clh-brandcard:hover { transform: translateY(-5px); box-shadow: var(--shadow); border-color: var(--blue); }
.clh-brandcard__badge {
	align-self: flex-start; font-size: .7rem; font-weight: 700; color: var(--ok);
	background: rgba(18, 183, 106, .1); padding: .25rem .6rem; border-radius: 999px;
}
.clh-brandcard__name { font-size: 1.35rem; font-weight: 800; color: var(--navy); }
.clh-brandcard__tag { font-size: .9rem; color: var(--muted); line-height: 1.5; min-height: 2.7em; }
.clh-brandcard__price { font-weight: 700; color: var(--blue-dark); }
.clh-brandcard__cta { font-weight: 700; color: var(--blue); margin-top: .25rem; }
.clh-brandcard.is-hidden { display: none; }

/* ------------------------------------------------------------------
   Étapes
   ------------------------------------------------------------------ */
.clh-steps { list-style: none; margin: 2rem 0 0; padding: 0; display: grid; grid-template-columns: repeat(3, 1fr); gap: 1.5rem; counter-reset: step; }
.clh-steps li { background: #fff; border-radius: var(--radius); padding: 1.75rem; box-shadow: 0 4px 16px rgba(11, 27, 63, .06); }
.clh-steps__num {
	display: inline-flex; align-items: center; justify-content: center;
	width: 40px; height: 40px; border-radius: 12px; background: var(--blue); color: #fff;
	font-weight: 800; font-size: 1.1rem; margin-bottom: .9rem;
}
.clh-steps h3 { font-size: 1.1rem; margin: 0 0 .5rem; }
.clh-steps p { color: var(--muted); font-size: .95rem; line-height: 1.65; margin: 0; }

/* ------------------------------------------------------------------
   Produits populaires
   ------------------------------------------------------------------ */
.clh-products { display: grid; grid-template-columns: repeat(4, 1fr); gap: 1.25rem; margin-top: 2rem; }
.clh-product {
	background: #fff; border: 1px solid #e3eaf8; border-radius: var(--radius);
	padding: 1.25rem; text-align: center; display: flex; flex-direction: column; gap: .6rem; align-items: center;
	transition: transform .18s ease, box-shadow .18s ease;
}
.clh-product:hover { transform: translateY(-4px); box-shadow: var(--shadow); }
.clh-product img { width: 96px; height: 96px; object-fit: contain; }
.clh-product h3 { font-size: 1rem; margin: 0; }
.clh-product h3 a { color: var(--navy); text-decoration: none; }
.clh-product h3 a:hover { color: var(--blue); }
.clh-product__price { font-weight: 800; color: var(--blue-dark); margin: 0; }
.clh-product__oos { font-size: .85rem; font-weight: 700; color: #b3261e; }
.clh-product.is-out { opacity: .6; }

/* ------------------------------------------------------------------
   Pourquoi CARTElib (bande navy)
   ------------------------------------------------------------------ */
.clh-section--navy { background: var(--navy); }
.clh-section--navy h2 { color: #fff; }
.clh-why { display: grid; grid-template-columns: repeat(2, 1fr); gap: 1.5rem 3rem; margin-top: 2rem; }
.clh-why h3 { color: #fff; font-size: 1.1rem; margin: 0 0 .4rem; }
.clh-why p { color: #b9c6e4; line-height: 1.7; margin: 0; }

/* ------------------------------------------------------------------
   Éditorial SEO
   ------------------------------------------------------------------ */
.clh-editorial { max-width: 820px; }
.clh-editorial h3 { font-size: 1.25rem; margin: 2rem 0 .6rem; }
.clh-editorial p { color: var(--muted); line-height: 1.8; margin: 0 0 1rem; }

/* ------------------------------------------------------------------
   CTA final
   ------------------------------------------------------------------ */
.clh-final {
	background: linear-gradient(120deg, var(--blue) 0%, var(--blue-dark) 100%);
	padding: clamp(3rem, 7vw, 4.5rem) 0; text-align: center;
}
.clh-final h2 { color: #fff; margin: 0 0 .5rem; }
.clh-final p { color: #d5e3ff; margin: 0 0 1.5rem; }

/* ------------------------------------------------------------------
   Page marque (template-brand.php)
   ------------------------------------------------------------------ */
.clh-hero--brand { padding: clamp(2.5rem, 6vw, 4rem) 0; }
.clh-hero--brand h1 { max-width: 22ch; }
.clh-hero--brand .clh-hero__sub { max-width: 65ch; }

.clh-crumbs {
	display: flex; align-items: center; gap: .5rem;
	font-size: .85rem; color: var(--muted); margin-bottom: 1.25rem;
}
.clh-crumbs a { color: var(--muted); text-decoration: none; }
.clh-crumbs a:hover { color: var(--blue); }
.clh-crumbs [aria-current] { color: var(--navy); font-weight: 600; }

/* Icônes dans les composants */
.clh-quickbuy__title,
.clh-brandcard__badge,
.clh-brandcard__cta,
.clh-why h3,
.clh-editorial a {
	display: inline-flex; align-items: center; gap: .4rem;
}
.clh-quickbuy__title .clh-icon { color: var(--blue); }
.clh-quickbuy__note { display: flex; align-items: center; justify-content: center; gap: .35rem; flex-wrap: wrap; }
.clh-steps__num .clh-icon { color: #fff; }
.clh-why .clh-icon { color: #7fa8f5; }
.clh-btn .clh-icon { vertical-align: middle; }

/* ------------------------------------------------------------------
   Responsive
   ------------------------------------------------------------------ */
@media (max-width: 980px) {
	.clh-hero__grid { grid-template-columns: 1fr; gap: 2rem; }
	.clh-brandgrid, .clh-steps { grid-template-columns: repeat(2, 1fr); }
	.clh-products { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 600px) {
	.clh-brandgrid, .clh-steps, .clh-products, .clh-why { grid-template-columns: 1fr; }
	.clh-trustbar ul { justify-content: flex-start; gap: .25rem 1.25rem; }
	.clh-hero__stats { gap: 1.25rem; }
}
@media (prefers-reduced-motion: reduce) {
	.clh-btn, .clh-brandcard, .clh-product, .clh-chip { transition: none; }
}
