/*
Theme Name: TYV — Trust Your Vision
Theme URI: https://trustyourvision.fr/
Author: TYV
Description: Thème sur mesure, bilingue français / anglais, reconstruisant le site trustyourvision.fr. Diagnostic financier, assurance et marketing pour TPE et PME.
Version: 1.0.0
Requires at least: 6.0
Requires PHP: 7.4
License: GNU General Public License v2 or later
License URI: http://www.gnu.org/licenses/gpl-2.0.html
Text Domain: tyv
Tags: business, one-column, custom-menu, translation-ready
*/

/* ========================================================================== */
/* Variables                                                                   */
/* ========================================================================== */

:root {
	--tyv-green: #154734;
	--tyv-green-dark: #0e3125;
	--tyv-green-light: #2a6a51;
	--tyv-ink: #111111;
	--tyv-body: #3a3f3d;
	--tyv-muted: #6b7370;
	--tyv-paper: #ffffff;
	--tyv-sand: #f4f4f2;
	--tyv-line: #e2e4e1;

	--tyv-serif: 'Cabin', Georgia, serif;
	--tyv-sans: 'Lato', Arial, Helvetica, sans-serif;

	--tyv-max: 1200px;
	--tyv-gutter: clamp(1.25rem, 4vw, 3rem);
	--tyv-section: clamp(4rem, 9vw, 7.5rem);
}

/* ========================================================================== */
/* Base                                                                        */
/* ========================================================================== */

*,
*::before,
*::after {
	box-sizing: border-box;
}

html {
	scroll-behavior: smooth;
}

body {
	margin: 0;
	overflow-x: hidden;
	background: var(--tyv-paper);
	color: var(--tyv-body);
	font-family: var(--tyv-sans);
	font-size: 1.0625rem;
	line-height: 1.75;
	-webkit-font-smoothing: antialiased;
}

img {
	max-width: 100%;
	height: auto;
	display: block;
}

a {
	color: var(--tyv-green);
	text-decoration-thickness: 1px;
	text-underline-offset: 3px;
}

h1, h2, h3, h4 {
	font-family: var(--tyv-serif);
	color: var(--tyv-ink);
	line-height: 1.2;
	margin: 0 0 0.6em;
	font-weight: 500;
}

p {
	margin: 0 0 1.15em;
}

p:last-child {
	margin-bottom: 0;
}

:focus-visible {
	outline: 3px solid var(--tyv-green-light);
	outline-offset: 3px;
}

.tyv-skip {
	position: absolute;
	left: -9999px;
	top: 0;
	background: var(--tyv-green);
	color: #fff;
	padding: 0.75rem 1.25rem;
	z-index: 999;
}

.tyv-skip:focus {
	left: 0;
}

.screen-reader-text {
	position: absolute !important;
	width: 1px;
	height: 1px;
	overflow: hidden;
	clip: rect(1px, 1px, 1px, 1px);
	white-space: nowrap;
}

/* ========================================================================== */
/* Mise en page                                                                */
/* ========================================================================== */

.tyv-wrap {
	width: 100%;
	max-width: var(--tyv-max);
	margin: 0 auto;
	padding-inline: var(--tyv-gutter);
}

.tyv-section {
	padding-block: var(--tyv-section);
}

.tyv-section--sand {
	background: var(--tyv-sand);
}

.tyv-section--green {
	background: var(--tyv-green);
	color: rgba(255, 255, 255, 0.88);
}

.tyv-section--green h1,
.tyv-section--green h2,
.tyv-section--green h3,
.tyv-section--green h4 {
	color: #fff;
}

.tyv-kicker {
	font-family: var(--tyv-sans);
	font-size: 0.75rem;
	letter-spacing: 0.22em;
	text-transform: uppercase;
	color: var(--tyv-green);
	margin: 0 0 0.9rem;
	font-weight: 700;
}

.tyv-section--green .tyv-kicker {
	color: rgba(255, 255, 255, 0.7);
}

.tyv-title {
	font-size: clamp(1.75rem, 3.4vw, 2.6rem);
	letter-spacing: 0.02em;
}

.tyv-lead {
	font-size: clamp(1.05rem, 1.6vw, 1.25rem);
	max-width: 62ch;
}

.tyv-center {
	text-align: center;
}

.tyv-center .tyv-lead,
.tyv-center .tyv-measure {
	margin-inline: auto;
}

.tyv-measure {
	max-width: 68ch;
}

/* ========================================================================== */
/* Boutons                                                                     */
/* ========================================================================== */

.tyv-btn {
	display: inline-block;
	background: var(--tyv-green);
	color: #fff;
	font-family: var(--tyv-serif);
	font-size: 0.8125rem;
	font-weight: 700;
	letter-spacing: 0.16em;
	text-transform: uppercase;
	text-decoration: none;
	padding: 1.05rem clamp(1.4rem, 5vw, 2.4rem);
	border: 2px solid var(--tyv-green);
	border-radius: 999px;
	cursor: pointer;
	max-width: 100%;
	text-align: center;
	transition: background-color 0.2s ease, color 0.2s ease;
}

.tyv-btn:hover,
.tyv-btn:focus {
	background: var(--tyv-green-dark);
	border-color: var(--tyv-green-dark);
	color: #fff;
}

.tyv-btn--ghost {
	background: transparent;
	color: var(--tyv-green);
}

.tyv-btn--ghost:hover,
.tyv-btn--ghost:focus {
	background: var(--tyv-green);
	color: #fff;
}

.tyv-btn--light {
	background: #fff;
	border-color: #fff;
	color: var(--tyv-green);
}

.tyv-btn--light:hover,
.tyv-btn--light:focus {
	background: transparent;
	color: #fff;
}

/* ========================================================================== */
/* En-tête                                                                     */
/* ========================================================================== */

.tyv-header {
	position: sticky;
	top: 0;
	z-index: 100;
	background: rgba(255, 255, 255, 0.96);
	backdrop-filter: blur(6px);
	border-bottom: 1px solid transparent;
	transition: border-color 0.2s ease;
}

.tyv-header.is-stuck {
	border-bottom-color: var(--tyv-line);
}

.tyv-header__inner {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 1.5rem;
	min-height: 92px;
}

.tyv-logo img {
	width: 104px;
	height: auto;
}

.tyv-nav {
	display: flex;
	align-items: center;
	gap: clamp(1rem, 2.4vw, 2.25rem);
}

.tyv-nav__list {
	display: flex;
	align-items: center;
	gap: clamp(1rem, 2.4vw, 2.25rem);
	list-style: none;
	margin: 0;
	padding: 0;
}

.tyv-nav__link {
	font-family: var(--tyv-serif);
	font-size: 0.8125rem;
	letter-spacing: 0.16em;
	text-transform: uppercase;
	color: var(--tyv-ink);
	text-decoration: none;
	padding-bottom: 4px;
	border-bottom: 2px solid transparent;
	white-space: nowrap;
}

.tyv-nav__link:hover,
.tyv-nav__link:focus {
	border-bottom-color: var(--tyv-green);
}

.tyv-nav__link[aria-current='page'] {
	border-bottom-color: var(--tyv-green);
}

.tyv-lang {
	font-family: var(--tyv-sans);
	font-size: 0.75rem;
	font-weight: 700;
	letter-spacing: 0.12em;
	text-transform: uppercase;
	color: var(--tyv-green);
	text-decoration: none;
	border: 1px solid var(--tyv-line);
	border-radius: 999px;
	padding: 0.4rem 0.9rem;
	white-space: nowrap;
}

.tyv-lang:hover,
.tyv-lang:focus {
	background: var(--tyv-green);
	border-color: var(--tyv-green);
	color: #fff;
}

.tyv-burger {
	display: none;
	background: none;
	border: 0;
	padding: 0.5rem;
	cursor: pointer;
}

.tyv-burger span {
	display: block;
	width: 26px;
	height: 2px;
	background: var(--tyv-ink);
	margin: 5px 0;
	transition: transform 0.2s ease, opacity 0.2s ease;
}

.tyv-burger[aria-expanded='true'] span:nth-child(1) {
	transform: translateY(7px) rotate(45deg);
}

.tyv-burger[aria-expanded='true'] span:nth-child(2) {
	opacity: 0;
}

.tyv-burger[aria-expanded='true'] span:nth-child(3) {
	transform: translateY(-7px) rotate(-45deg);
}

@media (max-width: 860px) {
	.tyv-burger {
		display: block;
		order: 3;
	}

	.tyv-nav {
		position: absolute;
		inset: 100% 0 auto 0;
		flex-direction: column;
		align-items: stretch;
		gap: 0;
		background: #fff;
		border-bottom: 1px solid var(--tyv-line);
		padding: 0.5rem var(--tyv-gutter) 1.5rem;
		display: none;
	}

	.tyv-nav.is-open {
		display: flex;
	}

	.tyv-nav__list {
		flex-direction: column;
		align-items: stretch;
		gap: 0;
	}

	.tyv-nav__link {
		display: block;
		padding: 0.9rem 0;
		border-bottom: 1px solid var(--tyv-line);
	}

	.tyv-lang {
		align-self: flex-start;
		margin-top: 1.1rem;
	}
}

/* ========================================================================== */
/* Hero                                                                        */
/* ========================================================================== */

.tyv-hero {
	position: relative;
	display: flex;
	align-items: center;
	min-height: min(78vh, 720px);
	/* L'empreinte occupe une petite partie d'un PNG très haut : on l'agrandit
	   fortement pour retrouver le cadrage du site d'origine. */
	background: #fff url('assets/img/hero-fingerprint.png') 56% center / auto 330% no-repeat;
	padding-block: clamp(3.5rem, 10vw, 7rem);
	overflow: hidden;
}

.tyv-hero__inner {
	position: relative;
	z-index: 1;
	max-width: 46rem;
}

.tyv-hero__title {
	font-size: clamp(2.1rem, 5.4vw, 3.6rem);
	line-height: 1.18;
	letter-spacing: 0.04em;
	text-transform: uppercase;
	margin-bottom: 2rem;
}

.tyv-hero__title span {
	background: rgba(255, 255, 255, 0.82);
	box-decoration-break: clone;
	-webkit-box-decoration-break: clone;
	padding: 0.05em 0.1em;
}

/* ========================================================================== */
/* Bandeau image (accroche)                                                    */
/* ========================================================================== */

.tyv-banner {
	position: relative;
	color: #fff;
	text-align: center;
	padding-block: clamp(5rem, 12vw, 9rem);
	background-image: linear-gradient(rgba(0, 0, 0, 0.42), rgba(0, 0, 0, 0.42)), url('assets/img/forest.jpg');
	background-size: cover;
	background-position: center;
}

.tyv-banner h2,
.tyv-banner p {
	color: #fff;
}

.tyv-banner__icon {
	font-size: 2rem;
	line-height: 1;
	margin-bottom: 1.25rem;
}

.tyv-banner__title {
	font-size: clamp(1.5rem, 3.2vw, 2.35rem);
	max-width: 26ch;
	margin-inline: auto;
}

.tyv-banner__text {
	max-width: 60ch;
	margin-inline: auto;
	color: rgba(255, 255, 255, 0.9);
}

/* ========================================================================== */
/* Deux colonnes                                                               */
/* ========================================================================== */

.tyv-split {
	display: grid;
	grid-template-columns: repeat(auto-fit, minmax(min(100%, 22rem), 1fr));
	gap: clamp(2rem, 5vw, 4.5rem);
	align-items: center;
}

.tyv-split__media img {
	width: 100%;
	object-fit: cover;
	border-radius: 2px;
}

/* ========================================================================== */
/* Grille de cartes                                                            */
/* ========================================================================== */

.tyv-grid {
	display: grid;
	grid-template-columns: repeat(auto-fit, minmax(min(100%, 15rem), 1fr));
	gap: clamp(1.5rem, 3vw, 2.5rem);
	margin-top: 3rem;
	align-items: start;
}

/* Les trois pôles de services gardent des cartes plus larges. */
.tyv-grid--three {
	grid-template-columns: repeat(auto-fit, minmax(min(100%, 18rem), 1fr));
}

.tyv-card {
	background: #fff;
	border: 1px solid var(--tyv-line);
	padding: 2rem 1.75rem;
	display: flex;
	flex-direction: column;
	gap: 0.5rem;
}

.tyv-section--sand .tyv-card {
	border-color: transparent;
	box-shadow: 0 1px 3px rgba(17, 17, 17, 0.06);
}

.tyv-card__num {
	font-family: var(--tyv-serif);
	font-size: 0.8125rem;
	font-weight: 700;
	letter-spacing: 0.2em;
	color: var(--tyv-green);
}

.tyv-card h3 {
	font-size: 1.0625rem;
	letter-spacing: 0.06em;
	text-transform: uppercase;
	margin-bottom: 0.35rem;
}

.tyv-card p {
	font-size: 0.9375rem;
	color: var(--tyv-body);
}

.tyv-card__media {
	margin: -2rem -1.75rem 1.5rem;
}

.tyv-card__media img {
	width: 100%;
	aspect-ratio: 2 / 1;
	object-fit: cover;
}

/* ========================================================================== */
/* Formulaires                                                                 */
/* ========================================================================== */

.tyv-form {
	display: grid;
	gap: 1.1rem;
	max-width: 34rem;
}

.tyv-field {
	display: grid;
	gap: 0.4rem;
}

.tyv-field label {
	font-size: 0.75rem;
	font-weight: 700;
	letter-spacing: 0.14em;
	text-transform: uppercase;
	color: var(--tyv-muted);
}

.tyv-field input,
.tyv-field textarea {
	font-family: inherit;
	font-size: 1rem;
	color: var(--tyv-ink);
	background: #fff;
	border: 1px solid var(--tyv-line);
	border-radius: 2px;
	padding: 0.85rem 1rem;
	width: 100%;
}

.tyv-field textarea {
	min-height: 9rem;
	resize: vertical;
}

.tyv-field input:focus,
.tyv-field textarea:focus {
	border-color: var(--tyv-green);
	outline: none;
	box-shadow: 0 0 0 3px rgba(21, 71, 52, 0.12);
}

.tyv-honeypot {
	position: absolute;
	left: -9999px;
}

.tyv-notice {
	padding: 0.9rem 1.1rem;
	border-radius: 2px;
	font-size: 0.9375rem;
	margin-bottom: 1.5rem;
}

.tyv-notice--ok {
	background: rgba(21, 71, 52, 0.1);
	color: var(--tyv-green-dark);
}

.tyv-notice--error {
	background: rgba(158, 42, 34, 0.1);
	color: #9e2a22;
}

/* Newsletter (pied de page) */

.tyv-news {
	background: var(--tyv-sand);
	text-align: center;
	padding-block: clamp(3rem, 7vw, 5rem);
}

.tyv-news__form {
	display: flex;
	flex-wrap: wrap;
	gap: 0.75rem;
	justify-content: center;
	max-width: 34rem;
	margin: 1.75rem auto 0;
}

.tyv-news__form input[type='email'] {
	flex: 1 1 16rem;
	font-family: inherit;
	font-size: 1rem;
	border: 1px solid var(--tyv-line);
	border-radius: 999px;
	padding: 0.95rem 1.4rem;
}

/* ========================================================================== */
/* Réseaux sociaux                                                             */
/* ========================================================================== */

.tyv-socials {
	display: flex;
	gap: 1rem;
	list-style: none;
	margin: 1.5rem 0 0;
	padding: 0;
}

.tyv-socials a {
	display: grid;
	place-items: center;
	width: 44px;
	height: 44px;
	border: 1px solid currentColor;
	border-radius: 50%;
	color: inherit;
	transition: background-color 0.2s ease, color 0.2s ease;
}

.tyv-socials a:hover,
.tyv-socials a:focus {
	background: var(--tyv-green);
	border-color: var(--tyv-green);
	color: #fff;
}

.tyv-socials svg {
	width: 20px;
	height: 20px;
	fill: currentColor;
}

/* ========================================================================== */
/* Pied de page                                                                */
/* ========================================================================== */

.tyv-footer {
	background: var(--tyv-green);
	color: rgba(255, 255, 255, 0.82);
	padding-block: clamp(2.5rem, 6vw, 4rem);
	font-size: 0.9375rem;
}

.tyv-footer a {
	color: #fff;
}

.tyv-footer__inner {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	justify-content: space-between;
	gap: 1.5rem;
}

.tyv-footer__links {
	display: flex;
	flex-wrap: wrap;
	gap: 1.5rem;
	list-style: none;
	margin: 0;
	padding: 0;
}

.tyv-footer .tyv-socials {
	margin: 0;
	color: #fff;
}

/* ========================================================================== */
/* Bandeau cookies                                                             */
/* ========================================================================== */

.tyv-cookie {
	position: fixed;
	left: 50%;
	bottom: 1.5rem;
	transform: translateX(-50%);
	z-index: 200;
	width: min(34rem, calc(100vw - 2rem));
	background: var(--tyv-green);
	color: rgba(255, 255, 255, 0.9);
	padding: 1.75rem;
	border-radius: 4px;
	box-shadow: 0 18px 40px rgba(0, 0, 0, 0.22);
}

.tyv-cookie[hidden] {
	display: none;
}

.tyv-cookie h2 {
	color: #fff;
	font-size: 1.25rem;
}

.tyv-cookie__actions {
	display: flex;
	flex-wrap: wrap;
	gap: 0.75rem;
	margin-top: 1.25rem;
}

.tyv-cookie .tyv-btn {
	padding: 0.75rem 1.75rem;
	flex: 1 1 auto;
}

/* ========================================================================== */
/* Page 404 / contenus WordPress standard                                      */
/* ========================================================================== */

.tyv-prose h2 {
	font-size: 1.5rem;
	margin-top: 2.5rem;
}

.tyv-prose h3 {
	font-size: 1.2rem;
	margin-top: 2rem;
}

.tyv-prose ul {
	padding-left: 1.25rem;
}

.tyv-prose li {
	margin-bottom: 0.5rem;
}

/* ========================================================================== */
/* Animations d'apparition (désactivées si l'utilisateur les refuse)           */
/* ========================================================================== */

.tyv-reveal {
	opacity: 0;
	transform: translateY(18px);
	transition: opacity 0.6s ease, transform 0.6s ease;
}

.tyv-reveal.is-visible {
	opacity: 1;
	transform: none;
}

@media (prefers-reduced-motion: reduce) {
	html {
		scroll-behavior: auto;
	}

	.tyv-reveal {
		opacity: 1;
		transform: none;
		transition: none;
	}
}
