/*
Theme Name: Ma Carte Bancaire
Description: Thème enfant GeneratePress de ma-carte-bancaire.fr, annuaire des numéros d'opposition et guide des moyens de paiement : bleu confiance, ocre du tarif d'appel, vert du badge « Vérifié le », bloc urgence avec numéro en lien d'appel. Présentation seulement, socle Fox embarqué (fox-socle/).
Author: Fox
Template: generatepress
Version: 1.0.2
Fox Socle: 1.3.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: macartebancaire-theme
*/

/*
 * Site styles only. Colours come from the GeneratePress palette (inc/site.php):
 * var(--contrast), var(--accent), var(--verified), var(--tarif)... Each site
 * colour keeps ONE role: green = « Vérifié le » only, ochre = call rate only.
 */
:root {
	--mcb-r: 14px;
	--mcb-r-lg: 20px;
	--mcb-sh-sm: 0 1px 2px rgba(14, 26, 43, .05), 0 3px 10px rgba(14, 26, 43, .04);
	--mcb-sh: 0 10px 30px rgba(14, 26, 43, .08);
	--mcb-mono: "Spline Sans Mono", ui-monospace, SFMono-Regular, Menlo, monospace;
	--mcb-display: "Space Grotesk", system-ui, sans-serif;
	color-scheme: light;
}

/* Base */
body {
	font-family: "Inter", system-ui, sans-serif;
	-webkit-font-smoothing: antialiased;
}
h1, h2, h3, h4, .main-title, .site-title {
	font-family: var(--mcb-display);
	letter-spacing: -.02em;
}
h1 { line-height: 1.08; }
h2 { line-height: 1.15; }
.entry-content { font-size: 1.02rem; line-height: 1.65; }
.entry-content > p, .entry-content > ul, .entry-content > ol { max-width: 72ch; }
.entry-content a:not([class]) { text-underline-offset: .15em; }
:focus-visible { outline: 3px solid var(--accent); outline-offset: 2px; border-radius: 4px; }

/* Phones: the urgence box must come up the first screen */
@media (max-width: 640px) {
	h1, .entry-title { font-size: clamp(1.7rem, 7.4vw, 2.2rem); }
	.entry-content h2 { font-size: 1.4rem; margin-bottom: .7em; }
	.separate-containers .inside-article, .one-container .site-content { padding: 22px 16px; }
	.inside-header { padding-top: 14px; padding-bottom: 14px; }
}

/* Header and footer */
.site-header { border-bottom: 1px solid var(--contrast-3); }
/* Header logo: the WordPress logo (pictogram pushed by FoxPilot) at 40 px
   high, 32 px on phones, width from its own ratio. The width/height
   attributes GeneratePress prints (the file's real size) only give the
   ratio: height is fixed here, width auto, so no stretch and no layout shift.
   Every img of .site-logo, so a night variant rendered there follows too. */
.site-header .site-logo { display: flex; align-items: center; flex-shrink: 0; line-height: 0; }
.site-header .site-logo a { display: block; line-height: 0; }
.site-header .site-logo img,
.site-header .header-image.is-logo-image {
	display: block; height: 40px; max-height: 40px; width: auto; max-width: none; object-fit: contain;
}
.site-branding-container { align-items: center; flex-wrap: nowrap; }
.site-branding-container .site-logo { margin: 0 12px 0 0; }
/* Site title: Space Grotesk, « ma carte » 500 and « bancaire » 700
   (inc/presentation.php splits the name), one line. */
.site-header .main-title {
	font-family: var(--mcb-display); font-size: 1.35rem; font-weight: 700;
	line-height: 1.2; letter-spacing: -.02em; white-space: nowrap; color: var(--contrast);
}
.site-header .main-title a { text-decoration: none; }
.main-title .mcb-title-a { font-weight: 500; }
.main-title .mcb-title-b { font-weight: 700; }
@media (max-width: 640px) {
	.site-header .site-logo img,
	.site-header .header-image.is-logo-image { height: 32px; max-height: 32px; }
	.site-branding-container .site-logo { margin-right: 10px; }
	.site-header .main-title { font-size: 1.15rem; }
}
.main-navigation .main-nav ul li a { font-weight: 500; }
.site-info { font-size: .85rem; }
.site-info .copyright, .mcb-foot-end { opacity: .85; }
.site-info .inside-site-info { display: block; }
.mcb-foot-name, .mcb-foot-line, .mcb-foot-end { display: block; }
.mcb-foot-name { font-family: var(--mcb-display); font-weight: 600; color: #fff; }
.mcb-foot-line { margin: .25rem 0; }

/* Tables (fees, comparisons) */
.entry-content table { border: 1px solid var(--contrast-3); border-radius: var(--mcb-r); border-collapse: separate; border-spacing: 0; overflow: hidden; width: 100%; background: var(--base-3); }
.entry-content table th { background: var(--base); font-family: var(--mcb-mono); font-size: .74rem; letter-spacing: .04em; text-transform: uppercase; color: var(--contrast-2); }
.entry-content table th, .entry-content table td { padding: 12px 16px; border-bottom: 1px solid var(--contrast-3); text-align: left; }
.entry-content table tr:last-child td { border-bottom: 0; }

/* « Vérifié le » badge and call-rate chip (usable as plain classes) */
.mcb-verifie {
	display: inline-flex; align-items: center; gap: 6px; margin: .6rem 0 0;
	font-family: var(--mcb-mono); font-size: .78rem; font-weight: 600;
	color: var(--verified); background: var(--verified-soft);
	border-radius: 999px; padding: 3px 10px 3px 8px;
}
.mcb-verifie::before { content: ""; width: 7px; height: 7px; border-radius: 50%; background: var(--verified); }
.mcb-tarif {
	display: inline-block; font-family: var(--mcb-mono); font-size: .78rem; font-weight: 600;
	color: var(--tarif); background: var(--tarif-soft); border-radius: 7px; padding: 3px 9px;
}

/* =========================================================
   Urgence box: a key-points block (or a group) with is-style-mcb-urgence.
   inc/presentation.php puts the class on the block's first element, a
   role class on each point (mcb-k-<key>) and tel: links on the numbers.
   ========================================================= */
.is-style-mcb-urgence {
	background: var(--base-3);
	border: 1px solid var(--contrast-3);
	border-left: 4px solid var(--accent);
	border-radius: var(--mcb-r-lg);
	box-shadow: var(--mcb-sh);
	padding: 20px 22px;
	margin: 8px 0 28px;
}
.is-style-mcb-urgence .fxb-key-points { margin: 0; }
.is-style-mcb-urgence .fxb-key-points__heading {
	font-family: var(--mcb-display); font-weight: 600; font-size: 1.1rem; margin: 0 0 .6rem;
}
:is(.fxb-key-points.is-style-mcb-urgence, .is-style-mcb-urgence .fxb-key-points) {
	display: flex; flex-wrap: wrap; gap: 10px 18px; align-items: flex-start;
	grid-template-columns: none;
}
.is-style-mcb-urgence .fxb-key-points__item {
	flex: 1 1 100%; display: block; margin: 0; padding: 0;
	background: none; border: 0; box-shadow: none; min-width: 0;
}
.is-style-mcb-urgence .fxb-key-points__number,
.is-style-mcb-urgence .fxb-key-points__icon { display: none; }
.is-style-mcb-urgence .fxb-key-points__title {
	font-family: var(--mcb-mono); font-size: .72rem; font-weight: 600; letter-spacing: .05em;
	text-transform: uppercase; color: var(--contrast-2); margin: 0 0 .2rem;
}
.is-style-mcb-urgence .fxb-key-points__content { color: var(--contrast); font-size: .98rem; }

/* The big number: the bank's French opposition line */
.is-style-mcb-urgence .mcb-k-opposition-phone-fr .fxb-key-points__content {
	font-family: var(--mcb-mono); font-weight: 600; font-size: clamp(1.6rem, 6.5vw, 2.5rem);
	line-height: 1.15; letter-spacing: -.01em;
}
.is-style-mcb-urgence a.mcb-tel { color: inherit; text-decoration: none; font-family: var(--mcb-mono); font-weight: 600; white-space: nowrap; }
.is-style-mcb-urgence a.mcb-tel:hover { color: var(--accent); }

/* The shared interbank server: a number, never the big button (premium rate) */
.is-style-mcb-urgence .mcb-k-opposition-interbank .fxb-key-points__content { font-family: var(--mcb-mono); font-weight: 600; font-size: 1.25rem; }

/* Rate chip (ochre) and hours, side by side under the number */
.is-style-mcb-urgence :is(.mcb-k-opposition-call-rate, .mcb-k-opposition-hours) { flex: 0 1 auto; }
.is-style-mcb-urgence .mcb-k-opposition-call-rate .fxb-key-points__content {
	display: inline-block; font-family: var(--mcb-mono); font-size: .8rem; font-weight: 600;
	color: var(--tarif); background: var(--tarif-soft); border-radius: 7px; padding: 3px 9px;
}
.is-style-mcb-urgence .mcb-k-opposition-hours .fxb-key-points__content { font-family: var(--mcb-mono); font-size: .85rem; color: var(--contrast-2); }
.is-style-mcb-urgence .mcb-k-opposition-call-rate-detail .fxb-key-points__content,
.is-style-mcb-urgence .mcb-k-app-card-lock-path .fxb-key-points__content { font-size: .92rem; color: var(--contrast-2); }
.is-style-mcb-urgence :is(.mcb-k-opposition-phone-abroad, .mcb-k-opposition-phones-by-card) {
	border-top: 1px solid var(--contrast-3); padding-top: 10px;
}
.is-style-mcb-urgence .mcb-k-verified .fxb-key-points__content { color: var(--verified); font-family: var(--mcb-mono); font-size: .82rem; font-weight: 600; }

/* Mobile: the bank's number becomes a full-width call button */
@media (max-width: 640px) {
	.is-style-mcb-urgence { padding: 16px; border-radius: var(--mcb-r); }
	.is-style-mcb-urgence .mcb-k-opposition-phone-fr a.mcb-tel {
		display: block; width: 100%; text-align: center; box-sizing: border-box;
		background: var(--accent); color: var(--on-accent); border-radius: 12px;
		padding: 14px 12px; font-size: clamp(1.3rem, 6vw, 1.7rem); white-space: normal;
	}
	.is-style-mcb-urgence .mcb-k-opposition-phone-fr a.mcb-tel:hover { background: #1E4FD0; color: var(--on-accent); }
}

/* =========================================================
   Fox Blocks skin
   ========================================================= */
/* Key points (outside the urgence box) */
.fxb-key-points__item { border-radius: var(--mcb-r); }
.fxb-key-points__number { font-family: var(--mcb-mono); }
.fxb-key-points__title { font-family: var(--mcb-display); }

/* Link cards: annuaire and routing */
.fxb-link-cards .fxb-lcard {
	background: var(--base-3); border: 1px solid var(--contrast-3); border-radius: var(--mcb-r);
	box-shadow: var(--mcb-sh-sm); overflow: hidden; transition: border-color .15s ease, box-shadow .15s ease;
}
.fxb-link-cards .fxb-lcard:hover { border-color: var(--accent); box-shadow: var(--mcb-sh); }
.fxb-lcard__title { font-family: var(--mcb-display); font-weight: 600; font-size: 1.05rem; }
.fxb-lcard__excerpt { color: var(--contrast-2); }
.fxb-lcard__cta-text { font-weight: 600; }
.fxb-link-simple__list { padding-left: 0; }

/* Comparison table */
.fxb-comparison-table, .fxb-ctable__scroll { border-radius: var(--mcb-r); }
.fxb-ctable__table th, .fxb-ctable__col { font-family: var(--mcb-display); }
.fxb-ctable__table td { font-variant-numeric: tabular-nums; }

/* FAQ */
.fxb-faq__question { font-family: var(--mcb-display); }

@media (prefers-reduced-motion: reduce) {
	.fxb-link-cards .fxb-lcard { transition: none; }
}
