/*
Theme Name: Crawl2Action
Theme URI: https://crawl2action.com
Description: Thème enfant de Twenty Twenty-Five aux couleurs de Crawl2Action (charte de l'app : fond sombre chaud, jaune #ffce1b, Schibsted Grotesk).
Author: Olivier Valentin
Author URI: https://oliviervalentin.io
Template: twentytwentyfive
Version: 1.8.0
Requires at least: 6.6
Requires PHP: 8.0
Text Domain: crawl2action
*/

/* Ce que theme.json ne sait pas faire. Les couleurs, polices et tailles sont dans theme.json. */

::selection {
	background: var(--wp--preset--color--brand);
	color: var(--wp--preset--color--brand-ink);
}

/* Surlignage jaune, comme « en revenus » sur oliviervalentin.io : mettre la classe « surligne » sur un texte en gras ou un groupe. */
.surligne,
mark.surligne {
	background: linear-gradient(transparent 55%, rgba(255, 206, 27, 0.35) 55%);
	color: inherit;
	padding: 0 0.1em;
}

/* Carte : bloc Groupe avec la classe « carte » */
.carte {
	background: var(--wp--preset--color--surface);
	border: 1px solid var(--wp--preset--color--line);
	border-radius: 10px;
}

/* Bouton secondaire : style « Contour » du bloc Bouton */
.wp-block-button.is-style-outline > .wp-block-button__link {
	border: 1px solid var(--wp--preset--color--line-2);
	color: var(--wp--preset--color--ink);
	background: transparent;
}
.wp-block-button.is-style-outline > .wp-block-button__link:hover {
	border-color: var(--wp--preset--color--brand);
	color: var(--wp--preset--color--brand);
}

/* Petit sur-titre au-dessus des grands titres */
.surtitre {
	text-transform: uppercase;
	letter-spacing: 0.08em;
}

/* Liste du lexique : lettres d'index */
.lexique-terme a {
	text-decoration: none;
}
.lexique-terme a:hover {
	color: var(--wp--preset--color--brand);
}

:focus-visible {
	outline: 2px solid var(--wp--preset--color--brand);
	outline-offset: 2px;
}

/* Logo : araignée en pixels sur carré jaune, « 2 » en jaune */
.c2a-logo {
	display: inline-flex;
	align-items: center;
	gap: 0.55rem;
	color: var(--wp--preset--color--ink);
	text-decoration: none;
	font-weight: 800;
	font-size: 1.0625rem;
	letter-spacing: -0.01em;
}
.c2a-logo img {
	display: block;
	image-rendering: pixelated;
}
.c2a-logo b {
	color: var(--wp--preset--color--brand);
	font-weight: 800;
}
.c2a-logo:hover {
	color: var(--wp--preset--color--ink);
}

/* Bouton de l'en-tête, plus compact */
.c2a-header-cta .wp-block-button__link {
	padding: 0.55rem 1.1rem;
	font-size: 0.8125rem;
}
@media (max-width: 600px) {
	.c2a-header-cta {
		display: none;
	}
}

/* Héros */
.c2a-hero {
	position: relative;
	overflow: hidden;
}
.c2a-hero::before {
	content: "";
	position: absolute;
	inset: 0;
	background-image: radial-gradient(rgba(255, 255, 255, 0.05) 1px, transparent 1px);
	background-size: 22px 22px;
	mask-image: linear-gradient(to bottom, #000 40%, transparent);
	pointer-events: none;
}
.c2a-hero > * {
	position: relative;
}
.c2a-hero-titre {
	text-wrap: balance;
}
.c2a-reassurance {
	margin-top: 1rem;
}

/* Capture dans une fenêtre de navigateur */
.c2a-fenetre {
	margin: 0;
	border: 1px solid var(--wp--preset--color--line-2);
	border-radius: 12px;
	overflow: hidden;
	background: var(--wp--preset--color--surface);
	box-shadow: 0 30px 80px -20px rgba(0, 0, 0, 0.7), 0 0 0 1px rgba(255, 206, 27, 0.06), 0 0 120px -30px rgba(255, 206, 27, 0.25);
}
.c2a-fenetre-barre {
	display: flex;
	align-items: center;
	gap: 6px;
	padding: 10px 14px;
	border-bottom: 1px solid var(--wp--preset--color--line);
	background: #141210;
}
.c2a-fenetre-barre span {
	width: 9px;
	height: 9px;
	border-radius: 50%;
	background: var(--wp--preset--color--line-2);
}
.c2a-fenetre-barre em {
	margin-left: 10px;
	font-style: normal;
	font-size: 0.6875rem;
	color: var(--wp--preset--color--faint);
}
.c2a-fenetre img {
	display: block;
	width: 100%;
	height: auto;
}
@media (min-width: 1100px) {
	.c2a-hero .wp-block-column:last-child .c2a-fenetre {
		margin-right: -8%;
	}
}
.c2a-hero .c2a-hero-titre {
	font-size: clamp(2.4rem, 3.6vw, 3.25rem);
}
@media (min-width: 782px) {
	.c2a-hero .wp-block-buttons {
		flex-wrap: nowrap;
	}
	.c2a-hero .wp-block-button__link {
		white-space: nowrap;
	}
}

/* Pourquoi Crawl2Action */
.c2a-pourquoi h2 {
	text-wrap: balance;
}
.c2a-avatar {
	display: inline-grid;
	place-items: center;
	width: 44px;
	height: 44px;
	border-radius: 50%;
	background: var(--wp--preset--color--brand);
	color: var(--wp--preset--color--brand-ink);
	font-weight: 800;
	font-size: 0.875rem;
	flex: none;
}
.c2a-signature p {
	margin: 0;
}
.c2a-garanties .carte {
	padding: var(--wp--preset--spacing--40);
}
.c2a-garanties h3 {
	font-size: 1rem;
	margin-bottom: 0.4rem;
}
.c2a-garanties .carte p {
	margin-top: 0;
}

/* Réassurance sous le héros */
.c2a-reassure .carte {
	padding: 1.25rem 1.5rem;
}
.c2a-reassure h3 {
	display: flex;
	align-items: center;
	gap: 0.55rem;
	font-size: 0.9375rem;
	margin: 0 0 0.4rem;
}
.c2a-reassure p {
	margin: 0;
}
.c2a-ico {
	flex: none;
	display: inline-block;
	width: 15px;
	height: 15px;
	background: var(--wp--preset--color--brand);
	-webkit-mask: var(--m) center / contain no-repeat;
	mask: var(--m) center / contain no-repeat;
}
.c2a-drapeau {
	width: 15px;
	height: 10px;
	border-radius: 1.5px;
	background: linear-gradient(90deg, #0055a4 33.3%, #fff 33.3% 66.6%, #ef4135 66.6%);
	-webkit-mask: none;
	mask: none;
}
.c2a-oeil {
	--m: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2.4' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M2 12s3.5-7 10-7 10 7 10 7-3.5 7-10 7S2 12 2 12z'/%3E%3Ccircle cx='12' cy='12' r='3'/%3E%3C/svg%3E");
}
.c2a-cadenas {
	--m: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2.4' stroke-linecap='round' stroke-linejoin='round'%3E%3Crect x='4' y='11' width='16' height='10' rx='2'/%3E%3Cpath d='M8 11V7a4 4 0 0 1 8 0v4'/%3E%3C/svg%3E");
}

/* Arguments en Z */
.c2a-pourquoi h2 {
	text-wrap: balance;
}
.c2a-z h3 {
	text-wrap: balance;
	margin-top: 0.25rem;
}
.c2a-num {
	font-size: 0.8125rem;
	font-weight: 800;
	letter-spacing: 0.08em;
	margin-bottom: 0;
}
@media (min-width: 782px) {
	.c2a-z.c2a-z-inverse {
		flex-direction: row-reverse;
	}
}
.c2a-a-venir {
	aspect-ratio: 4 / 3;
	display: grid;
	place-items: center;
	color: var(--wp--preset--color--faint);
	font-size: 0.875rem;
	background: repeating-linear-gradient(45deg, #151311, #151311 12px, #181614 12px, #181614 24px);
}

/* Hiérarchie de la section Pourquoi : H2 nettement plus grand que les H3 des blocs */
.c2a-pourquoi > .wp-block-group:first-child h2 {
	font-size: clamp(2.2rem, 3.6vw, 3rem);
	font-weight: 900;
	letter-spacing: -0.03em;
	line-height: 1.08;
	max-width: 22ch;
}
.c2a-z h3,
.c2a-z h3.has-x-large-font-size {
	font-size: clamp(1.35rem, 1.9vw, 1.625rem) !important;
	font-weight: 800;
	letter-spacing: -0.015em;
	line-height: 1.2;
}
.c2a-num {
	display: inline-block;
	padding: 0.15rem 0.5rem;
	border: 1px solid rgba(255, 206, 27, 0.35);
	border-radius: 6px;
	font-size: 0.75rem;
}

/* Section Fonctionnalités : reproduction de l'interface de l'app */
.c2a-fonctions .c2a-entete {
	text-align: center;
}
.c2a-fonctions .c2a-entete h2 {
	font-size: clamp(2.2rem, 3.6vw, 3rem);
	font-weight: 900;
	letter-spacing: -0.03em;
	line-height: 1.08;
	text-wrap: balance;
}
.c2a-app {
	border: 1px solid var(--wp--preset--color--line-2);
	border-radius: 14px;
	overflow: hidden;
	background: #0f0d0c;
	box-shadow: 0 40px 100px -30px rgba(0, 0, 0, 0.85), 0 0 140px -40px rgba(255, 206, 27, 0.22);
}
.c2a-app-barre {
	display: flex;
	align-items: center;
	gap: 6px;
	padding: 10px 14px;
	border-bottom: 1px solid var(--wp--preset--color--line);
	background: #141210;
}
.c2a-app-barre span {
	width: 10px;
	height: 10px;
	border-radius: 50%;
	background: var(--wp--preset--color--line-2);
}
.c2a-app-barre em {
	margin-left: 12px;
	font-style: normal;
	font-size: 0.75rem;
	color: var(--wp--preset--color--faint);
}
.c2a-app-corps {
	display: flex;
	height: 680px;
}
/* Rail d'icônes */
.c2a-rail {
	flex: none;
	width: 64px;
	display: flex;
	flex-direction: column;
	align-items: center;
	gap: 6px;
	padding: 14px 0;
	background: #181614;
	border-right: 1px solid var(--wp--preset--color--line);
}
.c2a-rail-logo {
	width: 34px;
	height: 34px;
	margin-bottom: 14px;
	image-rendering: pixelated;
}
.c2a-rail button {
	position: relative;
	width: 40px;
	height: 40px;
	display: grid;
	place-items: center;
	padding: 0;
	border: 0;
	border-radius: 9px;
	background: transparent;
	color: #968e87;
	cursor: pointer;
}
.c2a-rail button svg {
	width: 22px;
	height: 22px;
}
.c2a-rail button:hover {
	color: var(--wp--preset--color--ink);
	background: rgba(255, 255, 255, 0.04);
}
.c2a-rail button.est-actif {
	color: var(--wp--preset--color--brand);
	background: rgba(255, 206, 27, 0.12);
}
.c2a-rail button::after {
	content: attr(data-nom);
	position: absolute;
	left: 50px;
	top: 50%;
	transform: translateY(-50%);
	padding: 0.3rem 0.6rem;
	border-radius: 6px;
	background: #2d2824;
	color: #fff;
	font-size: 0.75rem;
	font-weight: 600;
	white-space: nowrap;
	opacity: 0;
	pointer-events: none;
	transition: opacity 0.12s;
	z-index: 5;
}
.c2a-rail button:hover::after {
	opacity: 1;
}
/* Espaces */
.c2a-espace {
	display: none;
	flex: 1;
	min-width: 0;
}
.c2a-espace.est-actif {
	display: block;
}
.c2a-espace-nom {
	display: none;
}
.c2a-app .c2a-espace-corps {
	display: flex !important;
	flex-wrap: nowrap !important;
	gap: 0 !important;
	height: 100%;
	margin: 0 !important;
}
.c2a-app .c2a-cote {
	flex: 0 0 232px !important;
	padding: 18px 12px;
	background: #181614;
	border-right: 1px solid var(--wp--preset--color--line);
	overflow-y: auto;
	scrollbar-width: thin;
}
.c2a-cote-tete {
	padding: 0 8px 14px;
	margin-bottom: 10px;
	border-bottom: 1px solid var(--wp--preset--color--line);
}
.c2a-cote-tete small {
	display: block;
	color: var(--wp--preset--color--faint);
	font-size: 0.75rem;
}
.c2a-cote-tete b {
	display: block;
	color: #fff;
	font-size: 0.9375rem;
	font-weight: 800;
	line-height: 1.25;
}
.c2a-cote-tete strong {
	display: block;
	margin-top: 14px;
	color: #fff;
	font-size: 1.125rem;
	font-weight: 800;
}
.c2a-rubriques {
	display: flex;
	flex-direction: column;
	gap: 2px;
}
.c2a-groupe {
	margin: 12px 0 4px !important;
	padding: 0 8px;
	color: #fff;
	font-size: 0.8125rem;
	font-weight: 800;
}
.c2a-rub {
	position: relative;
	margin: 0 !important;
	padding: 7px 10px 7px 12px;
	border-radius: 7px;
	color: #b7afaa;
	font-size: 0.8125rem;
	line-height: 1.3;
	cursor: pointer;
}
.c2a-groupe ~ .c2a-rub {
	padding-left: 20px;
}
.c2a-rub:hover {
	color: #fff;
	background: rgba(255, 255, 255, 0.03);
}
.c2a-rub.est-actif {
	color: #fff;
	font-weight: 700;
	background: #221e1b;
}
.c2a-rub.est-actif::before {
	content: "";
	position: absolute;
	left: 0;
	top: 6px;
	bottom: 6px;
	width: 3px;
	border-radius: 2px;
	background: var(--wp--preset--color--brand);
}
.c2a-rub:focus:not(:focus-visible) {
	outline: none;
}
.c2a-app .c2a-ecran {
	flex: 1 1 auto !important;
	min-width: 0;
	overflow-y: auto;
	scrollbar-width: thin;
	scrollbar-color: #2d2824 transparent;
	background: #0f0d0c;
}
.c2a-capture {
	display: none;
	margin: 0 !important;
}
.c2a-capture.est-actif {
	display: block;
}
.c2a-capture img {
	display: block;
	width: 100%;
	height: auto;
}
/* Dans l'éditeur : tout reste visible pour pouvoir modifier */
.editor-styles-wrapper .c2a-espace,
.editor-styles-wrapper .c2a-espace-nom,
.editor-styles-wrapper .c2a-capture {
	display: block;
}
@media (max-width: 900px) {
	.c2a-app-corps {
		height: 560px;
	}
	.c2a-app .c2a-cote {
		display: none;
	}
}
@media (max-width: 600px) {
	.c2a-rail {
		width: 48px;
	}
	.c2a-rail button {
		width: 34px;
		height: 34px;
	}
}

/* Section « 10 choses en plus » */
.c2a-plus .c2a-entete h2 {
	font-size: clamp(2.2rem, 3.6vw, 3rem);
	font-weight: 900;
	letter-spacing: -0.03em;
	line-height: 1.08;
	text-wrap: balance;
}
.c2a-plus-grille {
	display: grid;
	grid-template-columns: repeat(5, minmax(0, 1fr));
	gap: 14px;
}
.c2a-plus-grille > * {
	margin: 0 !important;
}
.c2a-plus-carte {
	display: flex;
	flex-direction: column;
	gap: 8px;
	padding: 20px 18px 22px;
	border: 1px solid var(--wp--preset--color--line);
	border-radius: 12px;
	background: var(--wp--preset--color--surface);
}
.c2a-plus-carte > * {
	margin: 0 !important;
}
.c2a-plus-num {
	color: var(--wp--preset--color--brand);
	font-size: 0.8125rem;
	font-weight: 800;
	letter-spacing: 0.04em;
	font-variant-numeric: tabular-nums;
}
.c2a-plus-titre {
	font-size: 1.0625rem !important;
	font-weight: 800;
	line-height: 1.25;
	letter-spacing: -0.01em;
	color: #fff;
}
.c2a-plus-texte {
	color: var(--wp--preset--color--muted);
	font-size: 0.875rem;
	line-height: 1.5;
}
@media (max-width: 1100px) {
	.c2a-plus-grille { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}
@media (max-width: 760px) {
	.c2a-plus-grille { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 480px) {
	.c2a-plus-grille { grid-template-columns: 1fr; }
}
