/* ==========================================================================
   Tech For You — Fondations (tokens, reset, éléments réutilisables)
   Chargé uniquement sur le gabarit "Accueil TechForYou (refonte)".
   ========================================================================== */

:root {
	/* Graphite / anthracite — porte la structure du site */
	--tfy-graphite-950: #0a0b10;
	--tfy-graphite-900: #15161d;
	--tfy-graphite-800: #1f212b;
	--tfy-graphite-700: #2b2d3a;
	--tfy-graphite-600: #454858;
	--tfy-graphite-soft: #7a7e8c;

	/* Bleu Tech For You — accent principal, utilisé avec intention */
	--tfy-blue: #0067ff;
	--tfy-blue-dark: #0052cc;
	--tfy-blue-bright: #5aa2ff;
	--tfy-blue-tint: #eef4fc;

	/* Indigo / violet — accent secondaire, ponctuel */
	--tfy-indigo: #6c53e0;
	--tfy-indigo-bright: #a48bff;
	--tfy-indigo-deep: #241a44;

	/* Neutres */
	--tfy-ink: #16171f;
	--tfy-text-secondary: #575b68;
	--tfy-white: #ffffff;
	--tfy-white-warm: #faf9f6;
	--tfy-border: #e3ded7;
	--tfy-border-dark: rgba(255, 255, 255, 0.12);

	/* Surfaces froides (gris-bleuté) — respiration claire dans un ensemble à dominante graphite */
	--tfy-graphite-mid: #333850;
	--tfy-surface-light: #eef0f6;
	--tfy-surface-lighter: #f7f8fb;
	--tfy-border-on-light: #dde0ea;

	--tfy-font: "Inter", system-ui, -apple-system, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;

	--tfy-container: 1200px;
	/* Fluide : reste à 1360px jusqu'à ~2190px de large, puis grandit doucement jusqu'à 1760px
	   (32", 4K...) sans jamais imposer un unique palier fixe. */
	--tfy-container-wide: clamp(1360px, 62vw, 1760px);
	--tfy-gutter: clamp(20px, 4vw, 40px);

	/* Paliers de conteneur partagés par toutes les pages du thème.
	   Breakpoints communs associés (définis dans techforyou-layout.css et
	   repris par les CSS de page) : ≤640px mobile, ≤1024px tablette, ≥1920px grand écran.
	   - Lecture (--tfy-measure) : paragraphes/texte seul.
	   - Composition (--tfy-content) : grilles, prestations, illustrations
	     (généralise le palier déjà utilisé par Dépannage/Professionnels).
	   - Étendu : --tfy-container-wide ci-dessus (grandes compositions/photos pleine largeur). */
	--tfy-measure: 40rem;
	--tfy-content: 78rem;

	--tfy-radius-sm: 3px;
	--tfy-radius-md: 6px;

	--tfy-ease: cubic-bezier(0.22, 1, 0.36, 1);
	--tfy-duration: 0.5s;
}

/* Sous prefers-reduced-motion, on annule les durées plutôt que de dupliquer les règles */
@media (prefers-reduced-motion: reduce) {
	:root {
		--tfy-duration: 0.001ms;
	}
}

.tfy-body {
	margin: 0;
	font-family: var(--tfy-font);
	color: var(--tfy-ink);
	background: var(--tfy-white-warm);
	-webkit-font-smoothing: antialiased;
	overflow-x: hidden;
}

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

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

.tfy-body h1,
.tfy-body h2,
.tfy-body h3,
.tfy-body p,
.tfy-body ul,
.tfy-body ol {
	margin: 0;
}

.tfy-body a {
	color: inherit;
	text-decoration: none;
}

.tfy-container {
	width: 100%;
	max-width: var(--tfy-container);
	margin-inline: auto;
	padding-inline: var(--tfy-gutter);
}

.tfy-sr-only {
	position: absolute;
	width: 1px;
	height: 1px;
	padding: 0;
	margin: -1px;
	overflow: hidden;
	clip: rect(0, 0, 0, 0);
	white-space: nowrap;
	border: 0;
}

a.tfy-skip-link {
	position: absolute;
	top: -100%;
	left: 1rem;
	z-index: 1000;
	background: var(--tfy-blue);
	color: var(--tfy-white);
	padding: 0.75rem 1.25rem;
	border-radius: var(--tfy-radius-sm);
	transition: top 0.2s var(--tfy-ease);
}

.tfy-skip-link:focus {
	top: 1rem;
}

/* Focus clavier toujours visible, jamais retiré (aucune interaction essentielle liée au seul hover) */
.tfy-body a:focus-visible,
.tfy-body button:focus-visible {
	outline: 3px solid var(--tfy-blue);
	outline-offset: 3px;
	border-radius: var(--tfy-radius-sm);
}

.tfy-eyebrow {
	font-size: 0.8rem;
	font-weight: 700;
	letter-spacing: 0.08em;
	text-transform: uppercase;
	color: var(--tfy-blue);
}

/* .tfy-eyebrow est toujours un <p> ; .tfy-body p{margin:0} plus haut a une
   spécificité supérieure à .tfy-eyebrow seul (1 classe) et annulait
   silencieusement ce margin-bottom partout où l'eyebrow n'était pas déjà
   re-scopé (ex. .tfy-hero__inner .tfy-eyebrow). Fix à la source : p.tfy-eyebrow
   (1 classe + 1 élément) égale la spécificité du reset et le bat par ordre
   de déclaration (règle plus bas dans ce même fichier). */
p.tfy-eyebrow {
	margin-bottom: 0.75rem;
}

.tfy-eyebrow--on-dark {
	color: var(--tfy-blue-bright);
}

.tfy-eyebrow--violet {
	color: var(--tfy-indigo);
}

.tfy-section-title {
	font-size: clamp(1.65rem, 2.7vw, 2.35rem);
	line-height: 1.18;
	font-weight: 800;
	max-width: 42rem;
	color: var(--tfy-ink);
}

.tfy-section-title--on-dark {
	color: var(--tfy-white);
}

.tfy-text-accent {
	color: var(--tfy-blue);
}

.tfy-text-accent--violet {
	color: var(--tfy-indigo-bright);
}

/* ---- Boutons ---- */
.tfy-btn {
	display: inline-flex;
	align-items: center;
	gap: 0.5rem;
	padding: 0.85rem 1.5rem;
	border-radius: var(--tfy-radius-sm);
	font-weight: 700;
	font-size: 0.95rem;
	border: 2px solid transparent;
	transition: transform var(--tfy-duration) var(--tfy-ease), box-shadow var(--tfy-duration) var(--tfy-ease);
	white-space: nowrap;
}

/* Un <button class="tfy-btn"> (ex. bouton d'envoi de formulaire) doit perdre
   l'apparence native du navigateur avant d'hériter des styles de variante
   ci-dessous — doit rester avant .tfy-btn--primary (même spécificité
   élément+classe : l'ordre de déclaration déciderait sinon). */
button.tfy-btn {
	appearance: none;
	-webkit-appearance: none;
	background: none;
	font-family: inherit;
	cursor: pointer;
}

/* Boutons qualifiés par l'élément : idem .tfy-link-arrow, pour ne jamais
   hériter silencieusement de .tfy-body a { color: inherit }. */
a.tfy-btn--primary,
button.tfy-btn--primary {
	background: linear-gradient(135deg, var(--tfy-blue) 0%, var(--tfy-indigo) 100%);
	background-size: 160% 160%;
	background-position: 0% 50%;
	color: var(--tfy-white);
	box-shadow: 0 8px 22px -6px rgba(0, 103, 255, 0.45), 0 2px 10px -2px rgba(108, 83, 224, 0.35);
	transition: transform var(--tfy-duration) var(--tfy-ease), box-shadow var(--tfy-duration) var(--tfy-ease), background-position var(--tfy-duration) var(--tfy-ease);
}

a.tfy-btn--primary:hover,
a.tfy-btn--primary:focus-visible,
button.tfy-btn--primary:hover,
button.tfy-btn--primary:focus-visible {
	transform: translateY(-2px);
	background-position: 100% 50%;
	box-shadow: 0 14px 30px -6px rgba(0, 103, 255, 0.5), 0 6px 16px -4px rgba(164, 139, 255, 0.45);
}

a.tfy-btn--primary .tfy-btn__arrow,
button.tfy-btn--primary .tfy-btn__arrow {
	transition: transform var(--tfy-duration) var(--tfy-ease);
}

a.tfy-btn--primary:hover .tfy-btn__arrow,
a.tfy-btn--primary:focus-visible .tfy-btn__arrow,
button.tfy-btn--primary:hover .tfy-btn__arrow,
button.tfy-btn--primary:focus-visible .tfy-btn__arrow {
	transform: translateX(3px);
}

a.tfy-btn--outline {
	background: transparent;
	color: var(--tfy-white);
	border-color: rgba(255, 255, 255, 0.4);
}

a.tfy-btn--outline:hover,
a.tfy-btn--outline:focus-visible {
	transform: translateY(-2px);
	background: rgba(164, 139, 255, 0.12);
	border-color: var(--tfy-indigo-bright);
}

/* Variante sur fond clair : le texte/bordure "currentColor" ne suffit pas (invisible sur blanc) */
a.tfy-btn--outline-dark {
	color: var(--tfy-ink);
	border-color: var(--tfy-border);
}

.tfy-btn--outline-dark:hover,
.tfy-btn--outline-dark:focus-visible {
	background: var(--tfy-white);
	border-color: var(--tfy-ink);
}

.tfy-btn--lg {
	padding: 1rem 1.9rem;
	font-size: 1.05rem;
}

.tfy-phone-link {
	display: inline-flex;
	align-items: center;
	gap: 0.5rem;
	font-weight: 700;
}

.tfy-phone-link__icon {
	width: 18px;
	height: 18px;
	border-radius: 50%;
	border: 2px solid currentColor;
	position: relative;
	flex: none;
}

.tfy-phone-link__icon::before {
	content: "";
	position: absolute;
	inset: 4px;
	border-radius: 50%;
	background: currentColor;
}

/* ---- Lien flèche ----
   Qualifié par l'élément (a.tfy-link-arrow) pour battre en spécificité
   la règle globale .tfy-body a { color: inherit } — sans ce préfixe, le
   lien hérite silencieusement de --tfy-ink (quasi noir) sur fond sombre. */
a.tfy-link-arrow {
	display: inline-flex;
	align-items: center;
	gap: 0.4rem;
	margin-top: 1rem;
	font-weight: 700;
	color: var(--tfy-blue);
	text-underline-offset: 3px;
	transition: color var(--tfy-duration) var(--tfy-ease);
}

a.tfy-link-arrow--light {
	color: var(--tfy-blue-bright);
}

a.tfy-link-arrow:hover,
a.tfy-link-arrow:focus-visible {
	color: var(--tfy-indigo-bright);
	text-decoration: underline;
}

.tfy-link-arrow::after {
	content: "→";
	transition: transform var(--tfy-duration) var(--tfy-ease);
}

.tfy-link-arrow:hover::after,
.tfy-link-arrow:focus-visible::after {
	transform: translateX(4px);
}

/* ---- Grammaire graphique réutilisable : trait-circuit + nœud ---- */
.tfy-circuit {
	position: absolute;
	background: linear-gradient(to bottom, transparent, rgba(124, 158, 255, 0.45) 25%, rgba(164, 139, 255, 0.45) 75%, transparent);
	width: 1px;
	pointer-events: none;
}

.tfy-circuit::before,
.tfy-circuit::after {
	content: "";
	position: absolute;
	width: 5px;
	height: 5px;
	border-radius: 50%;
	left: 50%;
	margin-left: -2.5px;
	background: var(--tfy-blue-bright);
	box-shadow: 0 0 12px 2px rgba(90, 162, 255, 0.55);
}

.tfy-circuit::after {
	background: var(--tfy-indigo-bright);
	box-shadow: 0 0 12px 2px rgba(164, 139, 255, 0.55);
}

.tfy-circuit--horizontal {
	width: auto;
	height: 1px;
	background: linear-gradient(to right, transparent, rgba(124, 158, 255, 0.4) 30%, rgba(164, 139, 255, 0.4) 70%, transparent);
}

.tfy-circuit--horizontal::before,
.tfy-circuit--horizontal::after {
	top: 50%;
	margin-top: -2.5px;
	left: auto;
	margin-left: 0;
}

/* ---- Texture discrète (grille de points) ---- */
.tfy-dot-texture {
	background-image: radial-gradient(rgba(21, 22, 29, 0.08) 1px, transparent 1.4px);
	background-size: 26px 26px;
}

.tfy-dot-texture--on-dark {
	background-image: radial-gradient(rgba(255, 255, 255, 0.06) 1px, transparent 1.4px);
	background-size: 26px 26px;
}

/* ---- Animation d'entrée au scroll (désactivée si prefers-reduced-motion) ---- */
.tfy-reveal {
	opacity: 0;
	transform: translateY(24px);
	transition: opacity var(--tfy-duration) var(--tfy-ease), transform var(--tfy-duration) var(--tfy-ease);
}

.tfy-reveal.is-visible {
	opacity: 1;
	transform: translateY(0);
}

@media (prefers-reduced-motion: reduce) {
	.tfy-reveal {
		opacity: 1;
		transform: none;
		transition: none;
	}
}
