/*
Theme Name: Assurance Quads
Description: Thème enfant GeneratePress d'assurance-quads.com, concept « La Jauge », avec le socle Fox embarqué (fox-socle/). Présentation seulement.
Author: Fox
Template: generatepress
Version: 1.0.0
Fox Socle: 1.2.0
Requires at least: 6.5
Tested up to: 6.8
Requires PHP: 7.2
License: GNU General Public License v2 or later
License URI: https://www.gnu.org/licenses/gpl-2.0.html
Text Domain: assurance-quads-theme
*/

/*
 * Concept « La Jauge ». Colours come from the GeneratePress palette
 * (inc/site.php: --contrast, --contrast-2, --contrast-3, --base, --base-2,
 * --base-3, --accent, --navy, --orange). Rule: the orange is never text on a
 * light background; it is a flat colour under navy text, or text on navy.
 */

:root {
	--aq-body: "Barlow", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
	--aq-display: "Barlow Condensed", "Arial Narrow", system-ui, sans-serif;
	--aq-title: #002E51;
	--aq-track: #DCE4EB;
	--aq-req: #002E51;
	--aq-on-navy: #EAF1F6;
	--aq-radius: 10px;
}

@media (prefers-color-scheme: dark) {
	:root {
		color-scheme: dark;
		--contrast: #E6EDF2;
		--contrast-2: #A2B2C0;
		--contrast-3: #253949;
		--base: #10202D;
		--base-2: #0A1620;
		--base-3: #0A1620;
		--accent: #F0A577;
		--aq-title: #9CC2E3;
		--aq-track: #203445;
		--aq-req: #5E8DB8;
	}
}

/* Typography ------------------------------------------------------------ */

body {
	font-family: var(--aq-body);
	font-size: 17px;
	line-height: 1.65;
	-webkit-font-smoothing: antialiased;
}

body.fox-socle-vars {
	--fxb-font-body: var(--aq-body);
	--fxb-font-display: var(--aq-display);
}

h1, h2, h3, h4,
.main-title,
.entry-title {
	font-family: var(--aq-display);
	font-weight: 700;
	letter-spacing: -0.005em;
	text-wrap: balance;
}

h1 { font-size: clamp(32px, 4.4vw, 52px); line-height: 1.02; }
h2 { font-size: clamp(26px, 3vw, 32px); line-height: 1.1; margin-top: 1.4em; }
h3 { font-size: 23px; line-height: 1.15; }
h4 { font-size: 19px; }

.entry-content a:not([class]),
.aq-section-head a {
	color: var(--accent);
	text-underline-offset: 3px;
}

.entry-content a:not([class]):hover { color: var(--contrast); }

/* Header ------------------------------------------------------------------ */

.site-header .inside-header {
	padding-top: 14px;
	padding-bottom: 14px;
	gap: 12px 28px;
}

.main-title {
	font-size: 24px;
	line-height: 1;
	text-transform: uppercase;
	letter-spacing: 0.06em;
}

.main-title a { text-decoration: none; }
.aq-title-accent { color: var(--orange); }
.main-title .aq-logo { display: block; width: auto; height: 40px; max-width: 100%; }

.main-navigation .main-nav ul li a {
	font-weight: 500;
	font-size: 16px;
}

.main-navigation .main-nav ul li[class*="current-menu-"] > a {
	box-shadow: inset 0 -3px 0 var(--orange);
}

.main-navigation .menu-bar-items { align-items: center; }

.aq-cta-menu {
	display: flex;
	margin: 0 0 0 12px;
	padding: 0;
	list-style: none;
	line-height: 1.2;
}

.main-navigation .aq-cta-menu a,
.aq-cta-menu a {
	display: inline-block;
	padding: 8px 14px;
	border-radius: 999px;
	background: var(--orange);
	color: var(--navy);
	font-weight: 600;
	font-size: 15px;
	line-height: 1.2;
	text-decoration: none;
	white-space: nowrap;
}

.aq-cta-menu a:hover,
.aq-cta-menu a:focus-visible { background: #F4B48C; color: var(--navy); }

/* Article and page ------------------------------------------------------- */

body:not(.full-width-content).single .inside-article,
body:not(.full-width-content).page .inside-article {
	max-width: 720px;
	margin-left: auto;
	margin-right: auto;
}

.single .entry-header,
.page .entry-header { margin-bottom: 26px; }

.entry-meta {
	font-size: 15px;
	color: var(--contrast-2);
}

.entry-content p { margin-bottom: 15px; }
.entry-content h2 { margin: 38px 0 10px; }
.entry-content h3 { margin: 24px 0 6px; }

.entry-content table {
	width: 100%;
	border-collapse: collapse;
	font-size: 15px;
}

.entry-content th,
.entry-content td {
	padding: 9px 10px;
	border: 0;
	border-bottom: 1px solid var(--contrast-3);
	text-align: left;
	vertical-align: top;
}

.entry-content th { background: var(--base); }

.footer-entry-meta { font-size: 15px; color: var(--contrast-2); }

/* Archive: cards ---------------------------------------------------------- */

.blog .site-main,
.archive .site-main,
.search .site-main {
	display: grid;
	grid-template-columns: repeat(auto-fill, minmax(min(300px, 100%), 1fr));
	gap: 20px;
}

.blog .site-main > :not(article),
.archive .site-main > :not(article),
.search .site-main > :not(article) { grid-column: 1 / -1; }

.blog .site-main > article,
.archive .site-main > article,
.search .site-main > article { margin: 0; }

.blog .inside-article,
.archive .inside-article,
.search .inside-article {
	height: 100%;
	padding: 18px;
	border: 1px solid var(--contrast-3);
	border-radius: var(--aq-radius);
	background: var(--base-3);
}

.blog .entry-title,
.archive .entry-title,
.search .entry-title { font-size: 23px; line-height: 1.1; }

.blog .entry-title a,
.archive .entry-title a,
.search .entry-title a { text-decoration: none; }

.blog .entry-summary p,
.archive .entry-summary p,
.search .entry-summary p { font-size: 15px; color: var(--contrast-2); }

.page-header { margin-bottom: 10px; }
.page-header .page-title { color: var(--aq-title); }

/* Home: hero and gauge ---------------------------------------------------- */

.aq-hero,
.aq-section {
	padding-left: 16px;
	padding-right: 16px;
}

.aq-hero {
	padding-top: 44px;
	padding-bottom: 40px;
	background: var(--base);
	border-bottom: 1px solid var(--contrast-3);
}

.aq-eyebrow,
.fxb-key-points__heading {
	font-family: var(--aq-display);
	font-weight: 600;
	font-size: 14px;
	line-height: 1.2;
	letter-spacing: 0.14em;
	text-transform: uppercase;
	color: var(--accent);
}

.entry-content .aq-eyebrow { margin: 0; }

.aq-hero .aq-hero-title {
	margin-top: 6px;
	margin-bottom: 26px;
	font-size: clamp(34px, 5vw, 62px);
	line-height: 1;
}

.entry-content .aq-gauge {
	display: grid;
	grid-template-columns: repeat(4, minmax(0, 1fr));
	gap: 4px;
	margin: 0 0 10px;
	padding: 0;
	list-style: none;
}

.aq-gauge li {
	position: relative;
	display: grid;
	align-content: start;
	gap: 6px;
	margin: 0;
	padding-top: 22px;
	font-size: 14px;
	line-height: 1.4;
	color: var(--contrast-2);
	min-width: 0;
}

.aq-gauge li::before,
.aq-gauge-legend li::before {
	content: "";
	background: var(--aq-track);
	border-radius: 2px;
}

.aq-gauge li::before {
	position: absolute;
	top: 0;
	left: 0;
	right: 0;
	height: 12px;
}

.aq-gauge .aq-step-req::before,
.aq-gauge-legend .aq-step-req::before,
.aq-mini .aq-step-req { background: var(--aq-req); }

.aq-gauge .aq-step-advised::before,
.aq-gauge-legend .aq-step-advised::before,
.aq-mini .aq-step-on { background: var(--orange); }

/* The needle: where we advise to stop at the least. */
.aq-gauge .aq-step-advised::after {
	content: "";
	position: absolute;
	top: -8px;
	right: -4px;
	width: 4px;
	height: 28px;
	border-radius: 2px;
	background: var(--contrast);
}

.aq-gauge strong {
	font-family: var(--aq-display);
	font-size: 21px;
	line-height: 1.1;
	color: var(--aq-title);
}

.aq-gauge em {
	font-style: normal;
	font-weight: 600;
	font-size: 13px;
	letter-spacing: 0.04em;
	text-transform: uppercase;
	color: var(--contrast-2);
}

.aq-gauge .aq-step-advised em { color: var(--accent); }

.entry-content .aq-gauge-legend {
	display: flex;
	flex-wrap: wrap;
	gap: 6px 22px;
	margin: 0;
	padding: 0;
	list-style: none;
	font-size: 14px;
	color: var(--contrast-2);
}

.aq-gauge-legend li { margin: 0; }

.aq-gauge-legend li::before {
	display: inline-block;
	width: 12px;
	height: 12px;
	margin-right: 6px;
	vertical-align: -1px;
}

/* Home: sections, engine cards, insurers ---------------------------------- */

/* Classic themes wrap a group's blocks in an inner container: let the
   children take part in the card and row layouts directly. */
.aq-card > .wp-block-group__inner-container,
.aq-insurer > .wp-block-group__inner-container { display: contents; }

/* Inside the full-width home page, a full-width group needs no breakout
   (GeneratePress's 100vw breakout adds the scrollbar width). */
.full-width-content .entry-content .alignfull {
	margin-left: 0;
	margin-right: 0;
	max-width: none;
	width: auto;
}

.aq-section { padding-top: 50px; padding-bottom: 50px; }
.aq-section-soft { background: var(--base); }

.aq-section-head {
	gap: 8px 20px;
	margin-bottom: 22px;
}

.entry-content .aq-section-head h2 {
	margin: 0;
	font-size: clamp(28px, 3.4vw, 42px);
	line-height: 1.05;
}

.entry-content .aq-section-head p { margin: 0; font-weight: 600; }

.aq-cards { gap: 16px; }

.aq-card {
	position: relative;
	display: grid;
	align-content: start;
	gap: 10px;
	padding: 18px;
	border: 1px solid var(--contrast-3);
	border-radius: var(--aq-radius);
	background: var(--base-3);
}

.aq-card:hover,
.aq-card:focus-within { border-color: var(--accent); }

.entry-content .aq-card h3 { margin: 0; }

.entry-content .aq-card h3 a {
	color: var(--aq-title);
	text-decoration: none;
}

/* The whole card is the link's target. */
.entry-content .aq-card h3 a::after {
	content: "";
	position: absolute;
	inset: 0;
	border-radius: var(--aq-radius);
}

.entry-content .aq-card p { margin: 0; font-size: 15px; color: var(--contrast-2); }
.entry-content .aq-card .aq-mini-label { font-size: 13px; }

.entry-content .aq-mini {
	display: grid;
	grid-template-columns: repeat(4, 1fr);
	gap: 3px;
	margin: 0;
	padding: 0;
	list-style: none;
}

.aq-mini li {
	height: 6px;
	margin: 0;
	border-radius: 1px;
	background: var(--aq-track);
}

.aq-insurer {
	display: grid;
	grid-template-columns: 200px minmax(0, 1fr) auto;
	grid-template-areas: "name text cta" "name chips cta";
	align-items: center;
	gap: 6px 20px;
	padding: 16px 0;
	border-bottom: 1px solid var(--contrast-3);
}

.aq-section-head + .aq-insurer { border-top: 1px solid var(--contrast-3); }

.entry-content .aq-insurer h3 { grid-area: name; margin: 0; font-size: 24px; }
.entry-content .aq-insurer p { grid-area: text; margin: 0; font-size: 15px; color: var(--contrast-2); }
.aq-insurer .aq-chips { grid-area: chips; }
.aq-insurer .fxb-smartlink { grid-area: cta; justify-self: start; }

.entry-content .aq-chips {
	display: flex;
	flex-wrap: wrap;
	gap: 6px;
	margin: 0;
	padding: 0;
	list-style: none;
}

.aq-chips li {
	margin: 0;
	padding: 2px 9px;
	border: 1px solid var(--contrast-3);
	border-radius: 999px;
	background: var(--base-3);
	font-size: 13px;
	font-weight: 600;
}

/* Fox Blocks skin (colours come from the --fxb-* the socle maps) ----------- */

.fxb-smartlink--button {
	padding: 10px 18px;
	border-radius: 999px;
	background: var(--orange);
	color: var(--navy);
	white-space: nowrap;
}

.fxb-smartlink--button:hover,
.fxb-smartlink--button:focus-visible { background: #F4B48C; color: var(--navy); }

.fxb-smartlink--pending.fxb-smartlink--button {
	background: transparent;
	border: 1px dashed var(--contrast-3);
	color: var(--contrast-2);
}

.fxb-key-points-block {
	padding: 18px 20px;
	border-radius: var(--aq-radius);
	background: var(--base);
}

.entry-content .fxb-key-points__heading { margin: 0 0 10px; }

.fxb-key-points-block .fxb-key-points {
	grid-template-columns: minmax(0, 1fr);
	gap: 8px;
}

.fxb-key-points__number {
	width: 26px;
	height: 26px;
	background: var(--orange);
	color: var(--navy);
	font-family: var(--aq-display);
	font-weight: 700;
	font-size: 15px;
}

.fxb-key-points__content {
	font-size: 16px;
	color: var(--contrast);
}

.fxb-expert-tip {
	position: relative;
	border-radius: var(--aq-radius);
	font-size: 16px;
}

.fxb-expert-tip__content { font-size: 16px; }

.fxb-expert-tip--tip {
	padding: 4px 0 4px 20px;
	border-radius: 0;
	background: transparent;
}

.fxb-expert-tip--tip::before {
	width: 4px;
	border-radius: 2px;
	background: var(--orange);
}

.fxb-expert-tip--tip .fxb-expert-tip__icon { color: var(--accent); }
.fxb-expert-tip--tip .fxb-expert-tip__title { color: var(--aq-title); }

.fxb-expert-tip--warning {
	background: var(--navy);
	color: var(--aq-on-navy);
}

.fxb-expert-tip--warning::before { display: none; }

.fxb-expert-tip--warning .fxb-expert-tip__icon,
.fxb-expert-tip--warning .fxb-expert-tip__title { color: var(--orange); }

.fxb-expert-tip--warning .fxb-expert-tip__title {
	font-family: var(--aq-display);
	font-weight: 600;
	font-size: 15px;
	letter-spacing: 0.1em;
	text-transform: uppercase;
}

.fxb-expert-tip--warning a { color: #FFFFFF; }

.fxb-faq__item,
.fxb-faq__item:first-child {
	margin-bottom: 8px;
	border: 1px solid var(--contrast-3);
	border-radius: 8px;
}

.fxb-faq__question {
	padding: 12px 14px;
	font-family: var(--aq-body);
	font-size: 17px;
	font-weight: 600;
	color: var(--contrast);
}

.fxb-faq__answer {
	padding: 0 14px 12px;
	color: var(--contrast);
}

.fxb-lcard {
	border-color: var(--contrast-3);
	border-radius: var(--aq-radius);
	background: var(--base-3);
}

.fxb-lcard:hover { border-color: var(--accent); box-shadow: none; }
.fxb-lcard__media:empty { display: none; }

.fxb-lcard__title {
	font-family: var(--aq-display);
	font-size: 21px;
	color: var(--aq-title);
}

.fxb-pros-cons__column {
	border: 1px solid var(--contrast-3);
	border-radius: var(--aq-radius);
	background: var(--base-3);
}

.fxb-pros-cons__column--pros .fxb-pros-cons__heading,
.fxb-pros-cons__column--cons .fxb-pros-cons__heading {
	font-family: var(--aq-display);
	font-size: 21px;
	color: var(--aq-title);
}

.fxb-scores__name {
	font-family: var(--aq-display);
	color: var(--aq-title);
}

/* Score badge: navy on the orange flat colour (5.9:1), in both modes. */
.fxb-scores__global {
	background: var(--orange);
	color: var(--navy);
}

.fxb-scores__global strong {
	font-family: var(--aq-display);
	color: inherit;
}

.fxb-scores__bar { background: var(--aq-track); }
.fxb-scores__bar-fill { background: var(--orange); }

/* Footer ------------------------------------------------------------------- */

.site-info { font-size: 14px; }

.site-info .inside-site-info {
	padding-top: 34px;
	padding-bottom: 34px;
}

.inside-site-info {
	flex-wrap: wrap;
	justify-content: space-between;
	gap: 12px 40px;
}

.aq-footer-menu {
	display: flex;
	flex-wrap: wrap;
	gap: 4px 18px;
	margin: 0;
	padding: 0;
	list-style: none;
}

.aq-footer-logo { display: block; }
.aq-footer-logo-img { display: block; width: auto; height: 28px; }
.aq-footer-logo ~ .aq-footer-nav { margin-right: auto; }
.aq-footer-menu a { text-decoration: none; }
.aq-footer-menu a:hover { text-decoration: underline; }

/* Dark mode ---------------------------------------------------------------- */

@media (prefers-color-scheme: dark) {
	.fxb-expert-tip--warning { border: 1px solid #1D4A70; }
	.fxb-pros-cons__column--pros,
	.fxb-pros-cons__column--cons { background: var(--base); }
	.fxb-scores__weight { border-color: var(--contrast-3); color: var(--contrast-2); }
}

/* Small screens ------------------------------------------------------------ */

@media (max-width: 860px) {
	.aq-insurer {
		grid-template-columns: minmax(0, 1fr);
		grid-template-areas: "name" "text" "chips" "cta";
	}
}

@media (max-width: 560px) {
	.entry-content .aq-gauge {
		grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
		row-gap: 18px;
	}
	.aq-cta-menu a { padding: 7px 11px; font-size: 14px; }
	.main-title { font-size: 21px; }
	.main-title .aq-logo { height: 30px; }
}
