/*
Theme Name: Tom Beauseigneur — Créateur Sonore
Theme URI: https://tombeauseigneur.fr
Author: Portfolio Créateur Sonore
Description: Reproduction fidèle du portfolio Sound Designer : typographie légère, noir et blanc, projet en vedette, grille filtrable, carrousels et lecteur audio global.
Version: 1.2.0
Requires at least: 6.0
Requires PHP: 7.4
License: GNU General Public License v2 or later
Text Domain: tom-beauseigneur
Tags: portfolio, minimal, custom-post-type, audio
*/

/* ============================================================
   RESET
   ============================================================ */

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }

body {
	margin: 0;
	font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Helvetica, Arial, sans-serif;
	font-size: 15px;
	line-height: 1.6;
	color: #000;
	background: #fff;
	-webkit-font-smoothing: antialiased;
}

img { max-width: 100%; height: auto; display: block; }
a { color: inherit; text-decoration: none; }
button { font-family: inherit; cursor: pointer; border: none; background: none; padding: 0; }
input, textarea, select { font-family: inherit; font-size: inherit; }
h1, h2, h3, h4 { margin: 0; font-weight: 300; letter-spacing: -0.01em; }
p { margin: 0 0 1em; }
ul { margin: 0; padding: 0; list-style: none; }

.tb-container {
	max-width: 1152px;
	margin: 0 auto;
	padding: 0 24px;
}

/* ============================================================
   NAVIGATION
   ============================================================ */

.tb-nav {
	position: fixed;
	top: 0; left: 0; right: 0;
	z-index: 40;
	height: 56px;
	background: rgba(255,255,255,.92);
	backdrop-filter: blur(8px);
	border-bottom: 1px solid #f3f4f6;
}

.tb-nav__inner {
	height: 56px;
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 16px;
}

.tb-nav__brand { display: flex; align-items: baseline; gap: 24px; }
.tb-nav__name { font-size: 14px; }
.tb-nav__role { font-size: 12px; color: #9ca3af; }

.tb-nav__menu { display: flex; align-items: center; gap: 28px; }

/* Liens du menu WordPress et liens manuels — pas de puces, comme le
   portfolio d'origine (libellés seuls, gris, majuscules) */
.tb-nav__menu a,
.tb-nav__link {
	display: inline-flex;
	align-items: center;
	gap: 8px;
	font-size: 11px;
	text-transform: uppercase;
	letter-spacing: .12em;
	color: #9ca3af;
	transition: color .2s;
	background: none;
}
.tb-nav__menu a:hover,
.tb-nav__link:hover { color: #000; }
/* WordPress ajoute des <li> : on les aligne */
.tb-nav__menu li { display: inline-flex; align-items: center; gap: 8px; }

.tb-nav__toggle { display: none; flex-direction: column; gap: 4px; padding: 8px; }
.tb-nav__toggle span { display: block; width: 18px; height: 1px; background: #111827; }

@media (max-width: 820px) {
	.tb-nav__toggle { display: flex; }
	.tb-nav__menu {
		display: none;
		position: absolute;
		top: 56px; left: 0; right: 0;
		flex-direction: column;
		align-items: flex-start;
		gap: 0;
		background: #fff;
		border-bottom: 1px solid #f3f4f6;
		padding: 12px 24px 20px;
	}
	.tb-nav__menu.is-open { display: flex; }
	.tb-nav__menu li { width: 100%; }
	.tb-nav__menu a, .tb-nav__link { padding: 10px 0; width: 100%; }
	.tb-nav__role { display: none; }
}

/* ============================================================
   HERO
   ============================================================ */

#tb-page { padding-top: 56px; }

.tb-hero { padding: 40px 0 64px; }
.tb-hero__title { font-size: 30px; font-weight: 300; letter-spacing: -0.02em; }
.tb-hero__subtitle { font-size: 14px; color: #9ca3af; margin-top: 8px; }

.tb-hero__link {
	display: inline-flex;
	align-items: center;
	gap: 6px;
	margin-top: 16px;
	font-size: 12px;
	color: #9ca3af;
	border-bottom: 1px solid #e5e7eb;
	padding-bottom: 2px;
	transition: color .2s, border-color .2s;
}
.tb-hero__link:hover { color: #000; border-color: #000; }
.tb-hero__link svg { width: 12px; height: 12px; }

/* ============================================================
   PROJET EN VEDETTE
   ============================================================ */

.tb-featured { background: #f9fafb; padding: 64px 0; }

.tb-featured__grid {
	display: grid;
	grid-template-columns: 1fr 1fr;
	gap: 48px;
	align-items: center;
}

.tb-featured__media {
	aspect-ratio: 3 / 2;
	background: #e5e7eb;
	overflow: hidden;
}
.tb-featured__media img {
	width: 100%; height: 100%;
	object-fit: cover;
	filter: grayscale(100%);
	transition: filter .7s ease;
}
.tb-featured__grid:hover .tb-featured__media img { filter: grayscale(0); }

.tb-featured__year { font-size: 12px; color: #9ca3af; margin: 0 0 12px; }
.tb-featured__title { font-size: 20px; font-weight: 300; margin-bottom: 24px; }
.tb-featured__meta { font-size: 12px; line-height: 2.2; margin-bottom: 24px; }
.tb-featured__meta .label { color: #9ca3af; }

@media (max-width: 820px) {
	.tb-featured__grid { grid-template-columns: 1fr; gap: 24px; }
}

/* ============================================================
   GRILLE DE PROJETS
   ============================================================ */

.tb-projects { padding: 64px 0; }

.tb-projects__head {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	justify-content: space-between;
	gap: 16px;
	margin-bottom: 32px;
}

.tb-projects__title {
	font-size: 14px;
	text-transform: uppercase;
	letter-spacing: .12em;
	font-weight: 400;
}

.tb-filters { display: flex; flex-wrap: wrap; align-items: center; gap: 16px; }

.tb-filter {
	font-size: 11px;
	text-transform: uppercase;
	letter-spacing: .12em;
	color: #9ca3af;
	padding-bottom: 4px;
	border-bottom: 1px solid transparent;
	transition: color .2s, border-color .2s;
}
.tb-filter:hover { color: #000; border-color: #d1d5db; }
.tb-filter.is-active { color: #000; border-color: #000; }
.tb-filters a.tb-filter { text-decoration: none; }

.tb-grid {
	display: grid;
	grid-template-columns: repeat(3, 1fr);
	column-gap: 32px;
	row-gap: 64px;
}

@media (max-width: 1024px) { .tb-grid { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 640px)  { .tb-grid { grid-template-columns: 1fr; row-gap: 48px; } }

.tb-card.is-hidden { display: none; }

.tb-card__media {
	aspect-ratio: 3 / 2;
	background: #f9fafb;
	overflow: hidden;
	margin-bottom: 16px;
}
.tb-card__media img {
	width: 100%; height: 100%;
	object-fit: cover;
	filter: grayscale(100%);
	transition: filter .7s ease;
}
.tb-card:hover .tb-card__media img { filter: grayscale(0); }

.tb-card__title {
	font-size: 15px;
	font-weight: 400;
	transition: color .2s;
}
.tb-card a:hover .tb-card__title { color: #4b5563; }

.tb-card__line { font-size: 12px; color: #9ca3af; margin-top: 4px; }
.tb-card__year { font-size: 12px; color: #d1d5db; margin-top: 2px; }
.tb-card__listen { margin-top: 16px; }

.tb-grid__empty {
	display: none;
	text-align: center;
	color: #9ca3af;
	font-size: 14px;
	padding: 48px 0;
}

/* ============================================================
   SECTIONS À PROPOS / CONTACT (grille 4/8)
   ============================================================ */

.tb-about, .tb-contact { padding: 64px 0; }

.tb-cols {
	display: grid;
	grid-template-columns: repeat(12, 1fr);
	gap: 48px;
}
.tb-cols__label { grid-column: span 4; }
.tb-cols__content { grid-column: span 8; }

@media (max-width: 820px) {
	.tb-cols { grid-template-columns: 1fr; gap: 24px; }
	.tb-cols__label, .tb-cols__content { grid-column: span 1; }
}

.tb-cols__label h2 {
	font-size: 14px;
	text-transform: uppercase;
	letter-spacing: .12em;
	font-weight: 400;
}

.tb-prose p {
	font-size: 14px;
	color: #4b5563;
	line-height: 1.8;
	margin: 0 0 24px;
}
.tb-prose p:last-child { margin-bottom: 0; }

.tb-contact__intro { font-size: 14px; color: #4b5563; margin-bottom: 32px; }
.tb-contact__meta { font-size: 12px; line-height: 2.2; margin-bottom: 32px; }
.tb-contact__meta .label { color: #9ca3af; }

.tb-form-ok    { font-size: 13px; color: #16a34a; margin-bottom: 16px; }
.tb-form-error { font-size: 13px; color: #dc2626; margin-bottom: 16px; }

/* ============================================================
   FORMULAIRE
   ============================================================ */

.tb-form { display: grid; gap: 24px; }
.tb-form__row { display: grid; grid-template-columns: 1fr 1fr; gap: 24px; }
@media (max-width: 640px) { .tb-form__row { grid-template-columns: 1fr; } }

.tb-input {
	width: 100%;
	padding: 8px 0;
	background: transparent;
	border: none;
	border-bottom: 1px solid #e5e7eb;
	font-size: 14px;
	outline: none;
	border-radius: 0;
	transition: border-color .2s;
	color: #000;
}
.tb-input:focus { border-color: #000; }
.tb-input::placeholder { color: #9ca3af; }
textarea.tb-input { resize: none; }

.tb-btn {
	display: inline-block;
	justify-self: start;
	margin-top: 8px;
	padding: 12px 32px;
	background: #000;
	color: #fff;
	font-size: 11px;
	text-transform: uppercase;
	letter-spacing: .12em;
	transition: background .2s;
}
.tb-btn:hover { background: #1f2937; }

/* ============================================================
   BOUTON LECTURE
   ============================================================ */

.tb-play {
	display: inline-flex;
	align-items: center;
	gap: 8px;
	font-size: 10px;
	text-transform: uppercase;
	letter-spacing: .12em;
	color: #9ca3af;
	transition: color .2s;
}
.tb-play:hover { color: #000; }

.tb-play__icon {
	width: 24px; height: 24px;
	border: 1px solid #d1d5db;
	display: flex; align-items: center; justify-content: center;
	transition: border-color .2s;
}
.tb-play:hover .tb-play__icon { border-color: #000; }
.tb-play__icon svg { width: 8px; height: 8px; fill: currentColor; }

/* ============================================================
   PAGE PROJET
   ============================================================ */

.tb-project-hero { padding: 32px 0; }

.tb-project__grid {
	display: grid;
	grid-template-columns: 4fr 8fr;
	gap: 48px;
	padding: 48px 0;
}
@media (max-width: 820px) {
	.tb-project__grid { grid-template-columns: 1fr; gap: 32px; }
}

.tb-project__year { font-size: 12px; color: #9ca3af; margin-bottom: 12px; }
.tb-project__title { font-size: 30px; font-weight: 300; margin-bottom: 16px; }
.tb-project__company { font-size: 14px; color: #6b7280; }
.tb-project__cat { font-size: 12px; color: #9ca3af; margin-top: 8px; text-transform: capitalize; }

.tb-project__desc { font-size: 14px; color: #4b5563; line-height: 1.8; margin-bottom: 40px; }
.tb-project__desc p { margin: 0 0 16px; }
.tb-project__desc strong { font-weight: 600; color: #111; }
.tb-project__desc em { font-style: italic; color: #6b7280; }
.tb-project__desc a { border-bottom: 1px solid #e5e7eb; }
.tb-project__desc a:hover { border-color: #000; }

.tb-block-title {
	font-size: 11px;
	text-transform: uppercase;
	letter-spacing: .12em;
	color: #9ca3af;
	font-weight: 400;
	margin-bottom: 16px;
}

.tb-credits li { font-size: 14px; color: #4b5563; margin-bottom: 8px; }

.tb-tracklist { border-bottom: 1px solid #f3f4f6; }
.tb-track {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 16px;
	padding: 14px 0;
	border-top: 1px solid #f3f4f6;
}
.tb-track__title { font-size: 14px; }
.tb-track__dur { font-size: 12px; color: #9ca3af; margin-top: 2px; }

.tb-back {
	display: inline-flex;
	align-items: center;
	gap: 8px;
	font-size: 11px;
	text-transform: uppercase;
	letter-spacing: .12em;
	color: #9ca3af;
	transition: color .2s;
}
.tb-back:hover { color: #000; }
.tb-back svg { width: 16px; height: 16px; }

.tb-project-footer {
	padding: 48px 0;
	border-top: 1px solid #f3f4f6;
}

/* ============================================================
   CARROUSEL
   ============================================================ */

.tb-carousel__stage {
	position: relative;
	overflow: hidden;
	background: #f3f4f6;
}

.tb-carousel__blur {
	position: absolute; inset: 0;
	background-size: cover;
	background-position: center;
	transform: scale(1.1);
	filter: blur(40px);
	opacity: .3;
}

.tb-carousel__frame {
	position: relative;
	aspect-ratio: 16 / 9;
	display: flex;
	align-items: center;
	justify-content: center;
}
.tb-carousel__img {
	max-width: 100%;
	max-height: 100%;
	width: auto; height: auto;
	object-fit: contain;
	transition: opacity .4s;
}

.tb-carousel__nav {
	position: absolute;
	top: 50%;
	transform: translateY(-50%);
	width: 40px; height: 40px;
	background: rgba(255,255,255,.9);
	display: flex; align-items: center; justify-content: center;
	opacity: 0;
	transition: opacity .2s;
	box-shadow: 0 1px 3px rgba(0,0,0,.08);
}
.tb-carousel:hover .tb-carousel__nav { opacity: 1; }
.tb-carousel__nav:hover { background: #fff; }
.tb-carousel__nav--prev { left: 16px; }
.tb-carousel__nav--next { right: 16px; }
.tb-carousel__nav svg { width: 20px; height: 20px; }

.tb-carousel__counter {
	position: absolute;
	top: 16px; right: 16px;
	padding: 4px 10px;
	background: rgba(0,0,0,.6);
	color: #fff;
	font-size: 11px;
	font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
}

.tb-carousel__thumbs {
	display: flex;
	gap: 8px;
	margin-top: 8px;
	overflow-x: auto;
	padding-bottom: 4px;
}
.tb-carousel__thumb {
	flex-shrink: 0;
	width: 96px; height: 64px;
	overflow: hidden;
	background: #f3f4f6;
	opacity: .5;
	transition: opacity .2s, box-shadow .2s;
}
.tb-carousel__thumb:hover { opacity: 1; }
.tb-carousel__thumb.is-active { opacity: 1; box-shadow: inset 0 0 0 1px #000; }
.tb-carousel__thumb img { width: 100%; height: 100%; object-fit: cover; }

/* ============================================================
   LECTEUR GLOBAL
   ============================================================ */

.tb-player {
	position: fixed;
	bottom: 0; left: 0; right: 0;
	z-index: 50;
	background: #fff;
	border-top: 1px solid #e5e7eb;
	transform: translateY(100%);
	transition: transform .3s ease;
}
.tb-player.is-visible { transform: translateY(0); }

.tb-player__inner {
	max-width: 1152px;
	margin: 0 auto;
	padding: 12px 24px;
	display: flex;
	align-items: center;
	gap: 16px;
}

.tb-player__btn {
	width: 32px; height: 32px;
	border: 1px solid #d1d5db;
	display: flex; align-items: center; justify-content: center;
	flex-shrink: 0;
	transition: border-color .2s;
}
.tb-player__btn:hover { border-color: #000; }
.tb-player__btn svg { width: 12px; height: 12px; fill: currentColor; }

.tb-player__meta { width: 200px; flex-shrink: 0; min-width: 0; }
.tb-player__title {
	font-size: 12px; font-weight: 500;
	white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.tb-player__sub {
	font-size: 10px; color: #9ca3af;
	white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}

.tb-player__bar {
	flex: 1;
	height: 2px;
	background: #e5e7eb;
	cursor: pointer;
	position: relative;
}
.tb-player__progress { height: 100%; background: #000; width: 0; transition: width .1s linear; }

.tb-player__time {
	font-size: 10px;
	color: #9ca3af;
	font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
	flex-shrink: 0;
	min-width: 84px;
	text-align: right;
}

.tb-player__close { font-size: 14px; color: #d1d5db; padding: 4px; flex-shrink: 0; transition: color .2s; }
.tb-player__close:hover { color: #000; }

@media (max-width: 640px) {
	.tb-player__meta { width: 110px; }
	.tb-player__time { min-width: 0; font-size: 9px; }
}

body.tb-has-player { padding-bottom: 64px; }

/* ============================================================
   ARCHIVE / PAGES STANDARDS
   ============================================================ */

.tb-page-head { padding: 88px 0 16px; }

.tb-page-content { max-width: 720px; }
.tb-page-content h2 { font-size: 22px; margin: 32px 0 12px; }
.tb-page-content h3 { font-size: 18px; margin: 24px 0 8px; }
.tb-page-content p, .tb-page-content li { font-size: 14px; color: #4b5563; line-height: 1.8; }
.tb-page-content a { border-bottom: 1px solid #e5e7eb; }
.tb-page-content a:hover { border-color: #000; }
.tb-page-content img { margin: 24px 0; }

.tb-404 {
	min-height: 60vh;
	display: flex;
	align-items: center;
	justify-content: center;
	text-align: center;
	padding: 96px 24px;
}

/* Pied de page : signature à gauche, accès WordPress et copyright à droite
   (même présentation que le portfolio d'origine) */
.tb-footer { border-top: 1px solid #f3f4f6; padding: 32px 0 100px; }
.tb-footer__inner {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	justify-content: space-between;
	gap: 16px;
}
.tb-footer__name { margin: 0; font-size: 12px; color: #9ca3af; }
.tb-footer__name a { border-bottom: 1px solid #e5e7eb; transition: color .2s, border-color .2s; }
.tb-footer__name a:hover { color: #000; border-color: #000; }
.tb-footer__links { display: flex; flex-wrap: wrap; align-items: center; gap: 24px; }
.tb-footer__links a { font-size: 12px; color: #d1d5db; transition: color .2s; }
.tb-footer__links a:hover { color: #000; }
.tb-footer__copy { margin: 0; font-size: 12px; color: #d1d5db; }
.tb-footer a:focus-visible { outline: 2px solid currentColor; outline-offset: 5px; }
.tb-home-content { padding-top: 32px; padding-bottom: 32px; }

/* Formulaire de contact */
.tb-contact__form { display: grid; gap: 16px; max-width: 560px; margin-top: 24px; }
.tb-field { display: grid; gap: 6px; margin: 0; }
.tb-field label { font-size: 12px; text-transform: uppercase; letter-spacing: .08em; color: #6b7280; }
.tb-field input, .tb-field textarea {
	border: 1px solid #e5e7eb; border-radius: 2px; padding: 10px 12px; background: #fff; color: inherit;
}
.tb-field input:focus, .tb-field textarea:focus { outline: 2px solid #111; outline-offset: 1px; border-color: #111; }
.tb-contact__hp { position: absolute; left: -9999px; }
.tb-btn {
	border: 1px solid #111; padding: 12px 22px; align-self: start;
	background: #111; color: #fff; letter-spacing: .04em; transition: background .2s ease, color .2s ease;
}
.tb-btn:hover, .tb-btn:focus-visible { background: #fff; color: #111; }
.tb-notice { border-left: 3px solid #111; padding: 10px 14px; margin: 0 0 20px; font-size: 14px; }
.tb-notice--ko { border-color: #b91c1c; color: #b91c1c; }
