/*
Theme Name: Tchats
Template: twentytwentyfive
Description: Thème enfant de www.tchats.net : charte néon violet/rose, templates versionnés dans git (duchnoun/tchats_wordpress).
Version: 1.0.2
Requires at least: 7.0
Requires PHP: 8.1
Text Domain: tchats
*/

/* ------------------------------------------------------------------
 * Charte Tchats.net
 * Violet électrique #7C2DF5 → rose néon #FF2D7A sur fond nuit #140B2E,
 * menthe #16D9A3 pour « en ligne », soleil #FFC93C pour les touches de joie.
 * Titres : Sora. Texte : Plus Jakarta Sans.
 * ---------------------------------------------------------------- */
:root {
	--tc-neon: linear-gradient(120deg, #7C2DF5 0%, #C42BF0 50%, #FF2D7A 100%);
	--tc-night: #140B2E;
	--tc-radius: 18px;
	--tc-shadow: 0 10px 30px rgba(60, 20, 140, .14);
}

html { scroll-behavior: smooth; }
body { -webkit-font-smoothing: antialiased; overflow-x: hidden; }
::selection { background: #FF2D7A; color: #fff; }
:where(a, button, summary):focus-visible { outline: 3px solid #FF2D7A; outline-offset: 3px; border-radius: 6px; }

/* ---------- En-tête ---------- */
.tc-header {
	position: sticky;
	top: 0;
	z-index: 50;
	background: color-mix(in srgb, var(--wp--preset--color--base) 82%, transparent);
	-webkit-backdrop-filter: saturate(160%) blur(14px);
	backdrop-filter: saturate(160%) blur(14px);
	border-bottom: 1px solid var(--wp--preset--color--accent-6);
}
.admin-bar .tc-header { top: 32px; }
@media (max-width: 782px) { .admin-bar .tc-header { top: 46px; } }

.wp-block-site-title a {
	display: inline-flex;
	align-items: center;
	gap: .55rem;
}
.wp-block-site-title a::before {
	content: "";
	width: 38px;
	height: 38px;
	flex: none;
	background: url("assets/brand/mark.svg") center / contain no-repeat;
}
.tc-dotnet { color: #FF2D7A; }

/* ---------- Boutons ---------- */
.tc-cta,
.wp-block-button.tc-cta .wp-block-button__link {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	gap: .5rem;
	min-height: 52px;
	box-sizing: border-box;
	padding: 12px 30px;
	border-radius: 999px;
	background: var(--tc-neon);
	background-size: 160% 100%;
	color: #fff !important;
	font-family: var(--wp--preset--font-family--display);
	font-weight: 700;
	font-size: 1.05rem;
	line-height: 1.2;
	text-decoration: none !important;
	white-space: nowrap;
	box-shadow: 0 10px 28px rgba(196, 43, 240, .38);
	transition: transform .18s ease, box-shadow .18s ease, background-position .4s ease;
}
.tc-cta:hover {
	transform: translateY(-2px);
	background-position: 100% 0;
	box-shadow: 0 14px 34px rgba(255, 45, 122, .45);
}
.tc-cta--ghost {
	background: transparent;
	color: inherit !important;
	box-shadow: inset 0 0 0 2px currentColor;
}
.tc-cta--ghost:hover { box-shadow: inset 0 0 0 2px #FF2D7A; color: #FF2D7A !important; }
.tc-header-cta { min-height: 44px; padding: 8px 18px; font-size: .95rem; }
.tc-online::before {
	content: "";
	display: inline-block;
	width: 9px;
	height: 9px;
	margin-right: .45rem;
	border-radius: 50%;
	background: #16D9A3;
	box-shadow: 0 0 0 0 rgba(22, 217, 163, .6);
	animation: tc-pulse 2s infinite;
	vertical-align: middle;
}
@keyframes tc-pulse {
	70% { box-shadow: 0 0 0 9px rgba(22, 217, 163, 0); }
	100% { box-shadow: 0 0 0 0 rgba(22, 217, 163, 0); }
}

/* ---------- Héros (accueil) ---------- */
.tc-hero {
	position: relative;
	isolation: isolate;
	overflow: hidden;
	background: radial-gradient(120% 90% at 80% 0%, #4A1E9E 0%, #22144D 40%, #140B2E 100%);
	color: #F4EEFF;
}
.tc-hero::before,
.tc-hero::after {
	content: "";
	position: absolute;
	z-index: -1;
	border-radius: 50%;
	filter: blur(70px);
	opacity: .55;
}
.tc-hero::before { width: 420px; height: 420px; left: -120px; bottom: -160px; background: #FF2D7A; }
.tc-hero::after { width: 360px; height: 360px; right: -80px; top: -120px; background: #7C2DF5; }
.tc-hero h1, .tc-hero h2 { color: #fff; }
.tc-hero .tc-kicker { color: #FFC93C; }
.tc-grad-text {
	background: linear-gradient(100deg, #C9A6FF 0%, #FF7AB6 60%, #FFC93C 100%);
	-webkit-background-clip: text;
	background-clip: text;
	color: transparent;
}
.tc-hero-lead { color: #D9CFF5; max-width: 34em; }
.tc-hero-actions { display: flex; flex-wrap: wrap; gap: .8rem 1rem; align-items: center; }
.tc-hero .tc-cta--ghost { color: #fff !important; }
.tc-hero-note { color: #B6A9DD; font-size: .92rem; }
.tc-kicker {
	display: block;
	font-family: var(--wp--preset--font-family--display);
	font-weight: 700;
	font-size: .82rem;
	letter-spacing: .12em;
	text-transform: uppercase;
	color: #7C2DF5;
}

/* Maquette du tchat (purement décorative, aria-hidden) */
.tc-mock {
	max-width: 420px;
	margin-inline: auto;
	padding: 18px;
	border-radius: 26px;
	background: rgba(255, 255, 255, .07);
	border: 1px solid rgba(255, 255, 255, .14);
	box-shadow: 0 30px 60px rgba(0, 0, 0, .35);
	-webkit-backdrop-filter: blur(6px);
	backdrop-filter: blur(6px);
	transform: rotate(1.5deg);
}
.tc-mock-top {
	display: flex;
	justify-content: space-between;
	align-items: center;
	margin-bottom: 14px;
	font-size: .85rem;
	color: #D9CFF5;
	font-weight: 600;
}
.tc-mock-room { font-family: var(--wp--preset--font-family--display); color: #fff; font-size: 1rem; }
.tc-bubble {
	max-width: 82%;
	margin: 8px 0;
	padding: 10px 14px;
	border-radius: 18px 18px 18px 6px;
	background: #fff;
	color: #140B2E;
	font-size: .95rem;
	line-height: 1.4;
	animation: tc-pop .6s ease both;
}
.tc-bubble b { display: block; font-size: .78rem; color: #7C2DF5; }
.tc-bubble--me {
	margin-left: auto;
	border-radius: 18px 18px 6px 18px;
	background: var(--tc-neon);
	color: #fff;
}
.tc-bubble--me b { color: #FFE2F0; }
.tc-bubble:nth-child(2) { animation-delay: .2s; }
.tc-bubble:nth-child(3) { animation-delay: .9s; }
.tc-bubble:nth-child(4) { animation-delay: 1.6s; }
.tc-bubble:nth-child(5) { animation-delay: 2.3s; }
.tc-bubble:has(.tc-typing) { width: max-content; padding: 0; }
.tc-typing { display: inline-flex; gap: 5px; padding: 12px 14px; }
.tc-typing i {
	width: 7px;
	height: 7px;
	border-radius: 50%;
	background: #7C2DF5;
	animation: tc-dot 1.2s infinite;
}
.tc-typing i:nth-child(2) { animation-delay: .15s; }
.tc-typing i:nth-child(3) { animation-delay: .3s; }
@keyframes tc-pop { from { transform: translateY(10px) scale(.94); } to { transform: none; } }
@keyframes tc-dot { 0%, 60%, 100% { transform: none; opacity: .5; } 30% { transform: translateY(-4px); opacity: 1; } }

/* ---------- Cartes / sections ---------- */
.tc-card {
	height: 100%;
	box-sizing: border-box;
	padding: 1.5rem;
	border-radius: var(--tc-radius);
	background: #fff;
	border: 1px solid var(--wp--preset--color--accent-6);
	box-shadow: var(--tc-shadow);
	transition: transform .2s ease, box-shadow .2s ease;
}
.tc-card:hover { transform: translateY(-3px); box-shadow: 0 16px 40px rgba(60, 20, 140, .2); }
.tc-card h3 { margin-top: .4rem; }
.tc-icon {
	display: inline-grid;
	place-items: center;
	width: 48px;
	height: 48px;
	border-radius: 14px;
	background: var(--wp--preset--color--accent-2);
	font-size: 1.5rem;
	line-height: 1;
}
.tc-step-num {
	display: inline-grid;
	place-items: center;
	width: 42px;
	height: 42px;
	border-radius: 50%;
	background: var(--tc-neon);
	color: #fff;
	font-family: var(--wp--preset--font-family--display);
	font-weight: 800;
}
.tc-band { background: var(--wp--preset--color--accent-5); }
.tc-night {
	background: radial-gradient(120% 90% at 80% 0%, #4A1E9E 0%, #22144D 40%, #140B2E 100%);
	color: #E9E1FF;
}
.tc-night h2, .tc-night h3 { color: #fff; }
.tc-night a:not(.tc-cta) { color: #FF9CC8; }
.tc-box {
	padding: 1.5rem;
	border-radius: var(--tc-radius);
	background: var(--wp--preset--color--accent-5);
	border: 1px solid var(--wp--preset--color--accent-6);
}
.tc-box--neon { background: var(--tc-neon); color: #fff; border: 0; }
.tc-box--neon h2, .tc-box--neon h3 { color: #fff; }
.tc-box--neon .tc-cta { background: #fff; color: #7C2DF5 !important; box-shadow: 0 10px 24px rgba(20, 11, 46, .25); }

/* FAQ (blocs Détails) */
.wp-block-details {
	margin-block: .7rem;
	padding: 1rem 1.25rem;
	border-radius: 14px;
	background: #fff;
	border: 1px solid var(--wp--preset--color--accent-6);
}
.wp-block-details summary {
	cursor: pointer;
	font-family: var(--wp--preset--font-family--display);
	font-weight: 700;
}
.wp-block-details[open] summary { margin-bottom: .6rem; color: #7C2DF5; }

/* Contenu éditorial */
.entry-content h2, .wp-block-post-content h2 { margin-top: 2.2em; }
.wp-block-post-content table { border-collapse: collapse; width: 100%; font-size: .95rem; }
.wp-block-post-content th, .wp-block-post-content td { border: 1px solid var(--wp--preset--color--accent-6); padding: .55rem .7rem; text-align: left; }
.wp-block-post-content th { background: var(--wp--preset--color--accent-5); }
.wp-block-table { overflow-x: auto; }
.wp-block-post-featured-image img { border-radius: var(--tc-radius); }
.wp-block-post-template .wp-block-post-title { margin-top: .6rem; }
.tc-post-card {
	padding: 1.25rem;
	border-radius: var(--tc-radius);
	background: #fff;
	border: 1px solid var(--wp--preset--color--accent-6);
	box-shadow: var(--tc-shadow);
}

/* ---------- Pied de page ---------- */
.tc-footer { background: var(--tc-night); color: #CFC4F0; }
.tc-footer .wp-block-site-title a { color: #fff; }
.tc-footer a { color: #fff; text-decoration: none; }
.tc-footer a:hover { color: #FF7AB6; }
.tc-footer-links { display: flex; flex-direction: column; gap: .45rem; }
.tc-legal { display: flex; flex-wrap: wrap; gap: .4rem 1rem; }
.tc-legal a { white-space: nowrap; font-size: .9rem; }

/* ---------- Mobile ---------- */
.wp-block-navigation__responsive-container-open svg,
.wp-block-navigation__responsive-container-close svg { width: 30px; height: 30px; }
.wp-block-navigation__responsive-container-open { padding: 8px; }
.wp-block-navigation__responsive-container.is-menu-open .wp-block-navigation-item { font-size: 1.4rem; font-weight: 700; }
@media (max-width: 781px) {
	.tc-hero-mock { display: none; }
	.tc-hero .wp-block-columns { gap: 0; }
}
@media (max-width: 600px) {
	.tc-header-cta { padding: 8px 14px; font-size: .9rem; }
	.wp-block-site-title { font-size: 1.15rem !important; }
	.wp-block-site-title a::before { width: 32px; height: 32px; }
	.tc-cta { width: 100%; }
	.tc-header .tc-cta { width: auto; }
	.tc-hero-actions { flex-direction: column; align-items: stretch; }
}
@media (prefers-reduced-motion: reduce) {
	*, *::before, *::after { animation: none !important; transition: none !important; scroll-behavior: auto !important; }
}
