/*
 * Contenus éditoriaux : texte courant (pages légales, articles), formulaires (contact, avis), pagination des actualités.
 * Puis les sections « Page Contact », « Actualités » et « Avis ».
 * Jetons de theme.json seulement : aucune couleur ni taille de police en dur.
 */

/*
 * En-tête de la page Avis et d'un article : même colonne que le contenu dessous (760 px). Sans cette règle, celle de
 * composants.css (entrée centrée de « Notre histoire », 900 px) décale le bord gauche du titre. Même spécificité,
 * feuille chargée après composants.css.
 */
.tb-section--entree .tb-conteneur--texte {
	max-width: 760px;
}

/* Texte courant : enfants directs du contenu seulement, pour ne jamais toucher aux blocs imbriqués. */
.tb-texte {
	font-size: var(--wp--preset--font-size--base);
	line-height: 1.75;
}

.tb-texte > :is(p, ul, ol, h2, h3, h4, blockquote, figure) {
	max-width: 760px;
	margin-block: 0 1.1em;
}

.tb-texte > h2 {
	margin-top: 1.8em;
	font-size: var(--wp--preset--font-size--titre-section);
	font-weight: 600;
}

.tb-texte > h3 {
	margin-top: 1.4em;
	font-size: var(--wp--preset--font-size--sous-titre);
	font-weight: 600;
}

.tb-texte > :is(ul, ol) {
	padding-left: 1.3em;
}

.tb-texte > :is(ul, ol) > li + li {
	margin-top: 0.4em;
}

.tb-texte > :is(p, ul, ol, blockquote) a {
	color: var(--wp--preset--color--terracotta-texte);
	text-decoration: underline;
	text-underline-offset: 3px;
}

.tb-texte > blockquote {
	padding-left: 1.2em;
	border-left: 2px solid var(--wp--preset--color--sauge);
	font-family: var(--wp--preset--font-family--cormorant);
	font-size: var(--wp--preset--font-size--citation-bloc);
}

.tb-texte > figure img {
	width: 100%;
}

/* Formulaires (contact et avis) : champs du parcours d'achat, fond ivoire, bord sauge (3:1), focus terracotta. */
.tb-formulaire :is(input[type="text"], input[type="email"], input[type="tel"], textarea) {
	width: 100%;
	padding: 12px 14px;
	border: 1px solid var(--wp--preset--color--sauge-texte);
	border-radius: 0;
	background: var(--wp--preset--color--ivoire);
	font-family: inherit;
	font-size: var(--wp--preset--font-size--corps-m);
	font-weight: 300;
	color: var(--wp--preset--color--texte);
}

.tb-formulaire textarea {
	min-height: 160px;
	resize: vertical;
}

.tb-formulaire :is(input, textarea):focus {
	outline: 2px solid var(--wp--preset--color--terracotta-texte);
	outline-offset: 2px;
}

.tb-formulaire label {
	display: block;
	margin-bottom: 4px;
	font-size: var(--wp--preset--font-size--corps-s);
	color: var(--wp--preset--color--sauge-texte);
}

.tb-formulaire p {
	margin-bottom: 18px;
}

.tb-formulaire :is(input[type="submit"], .wpcf7-submit) {
	display: inline-block;
	width: auto;
	padding: 15px 34px;
	border: 1px solid transparent;
	border-radius: 0;
	background: var(--wp--preset--color--terracotta-aplat);
	font-family: inherit;
	font-size: var(--wp--preset--font-size--bouton);
	font-weight: 300;
	letter-spacing: 0.18em;
	text-transform: uppercase;
	color: var(--wp--preset--color--creme);
	cursor: pointer;
}

.tb-formulaire :is(input[type="submit"], .wpcf7-submit):hover {
	background: var(--wp--preset--color--texte);
}

.tb-formulaire__note,
.tb-formulaire .comment-notes {
	font-size: var(--wp--preset--font-size--corps-s);
	color: var(--wp--preset--color--sauge-texte);
}

.tb-formulaire__note a {
	color: var(--wp--preset--color--terracotta-texte);
	text-decoration: underline;
}

/* Messages de Contact Form 7 : le texte dit l'erreur, la couleur ne fait que le souligner. */
.tb-formulaire .wpcf7-not-valid-tip {
	margin-top: 4px;
	font-size: var(--wp--preset--font-size--corps-s);
	color: var(--wp--preset--color--terracotta-texte);
}

.tb-formulaire .wpcf7 form .wpcf7-response-output {
	margin: 18px 0 0;
	padding: 12px 16px;
	border: 1px solid var(--wp--preset--color--sauge-texte);
	font-size: var(--wp--preset--font-size--corps-s);
}

.tb-formulaire .wpcf7 form:is(.invalid, .unaccepted, .failed, .aborted, .spam) .wpcf7-response-output {
	border-color: var(--wp--preset--color--terracotta-texte);
}

/* Champ piège de l'anti-spam (plugin terra-bellis-site) : hors de l'écran, jamais lu ni atteint au clavier. */
.tb-piege {
	position: absolute;
	left: -10000px;
	width: 1px;
	height: 1px;
	overflow: hidden;
}

/* Pagination (actualités ; les avis ne sont pas paginés). */
.tb-pagination .nav-links {
	display: flex;
	flex-wrap: wrap;
	gap: 10px 18px;
	margin-top: 40px;
	font-size: var(--wp--preset--font-size--bouton);
	letter-spacing: 0.16em;
	text-transform: uppercase;
}

.tb-pagination .nav-links a {
	color: var(--wp--preset--color--terracotta-texte);
}

.tb-pagination .current {
	color: var(--wp--preset--color--sauge-texte);
}

/* Page Contact : coordonnées, rendez-vous, plan d'accès */
.tb-coordonnees {
	font-style: normal;
	line-height: 1.8;
}

.tb-coordonnees a {
	color: var(--wp--preset--color--terracotta-texte);
}

.tb-rendez-vous {
	display: flex;
	flex-direction: column;
	gap: 14px;
	margin-top: 18px;
}

.tb-rendez-vous__groupe {
	font-family: var(--wp--preset--font-family--jost);
	font-size: var(--wp--preset--font-size--etiquette);
	font-weight: 300;
	letter-spacing: 0.2em;
	text-transform: uppercase;
	color: var(--wp--preset--color--sauge-texte);
}

.tb-rendez-vous__liste {
	display: flex;
	flex-direction: column;
	gap: 14px;
	margin: 0;
	padding: 0;
	list-style: none;
}

.tb-rendez-vous__element {
	padding: 14px 18px;
	border-left: 2px solid var(--wp--preset--color--sauge);
	background: var(--wp--preset--color--ivoire);
}

.tb-rendez-vous__quand {
	font-size: var(--wp--preset--font-size--corps-s);
	color: var(--wp--preset--color--terracotta-texte);
}

.tb-rendez-vous__titre {
	font-family: var(--wp--preset--font-family--cormorant);
	font-size: var(--wp--preset--font-size--sous-titre);
	font-weight: 600;
}

.tb-rendez-vous__lieu,
.tb-rendez-vous__precision {
	font-size: var(--wp--preset--font-size--corps-s);
}

.tb-plan__figure {
	margin: 0;
}

.tb-plan__cadre {
	position: relative;
	aspect-ratio: 16 / 9;
	overflow: hidden;
	background: var(--wp--preset--color--ivoire);
}

.tb-plan__image,
.tb-plan__interactive {
	width: 100%;
	height: 100%;
}

.tb-plan__image {
	object-fit: cover;
}

/* L'attribut hidden perd contre img { display: block } et .tb-bouton { display: inline-block } : on le rétablit. */
.tb-plan__image[hidden],
.tb-plan__interactive[hidden],
.tb-plan__bouton[hidden] {
	display: none;
}

.tb-plan__legende,
.tb-plan__etat {
	margin-top: 8px;
	font-size: var(--wp--preset--font-size--etiquette);
	color: var(--wp--preset--color--sauge-texte);
}

.tb-plan__legende a {
	color: inherit;
	text-decoration: underline;
}

/* Zone d'état (role="status") : toujours dans l'arbre d'accessibilité pour que l'annonce soit fiable. Vide, elle sort du
   flux : élément de .tb-pile, elle ajouterait sinon l'écart de la pile sous les boutons. */
.tb-plan__etat:empty {
	position: absolute;
	margin-top: 0;
}

/* Actualités : grille de cartes (1, 2 puis 3 colonnes), article */
.tb-actus {
	display: grid;
	grid-template-columns: minmax(0, 1fr);
	gap: 44px 28px;
	margin: 0;
	padding: 0;
	list-style: none;
}

@media (min-width: 768px) {
	.tb-actus {
		grid-template-columns: repeat(2, minmax(0, 1fr));
	}
}

@media (min-width: 1024px) {
	.tb-actus {
		grid-template-columns: repeat(3, minmax(0, 1fr));
	}
}

.tb-actu__lien {
	display: flex;
	flex-direction: column;
	gap: 8px;
	color: var(--wp--preset--color--texte);
}

.tb-actu__image {
	display: block;
	aspect-ratio: 4 / 3;
	margin-bottom: 8px;
	overflow: hidden;
	background: var(--wp--preset--color--ivoire);
}

.tb-actu__image img {
	width: 100%;
	height: 100%;
	object-fit: cover;
}

.tb-actu__date,
.tb-article__date {
	font-size: var(--wp--preset--font-size--micro);
	letter-spacing: 0.2em;
	text-transform: uppercase;
	color: var(--wp--preset--color--sauge-texte);
}

.tb-actu__titre {
	font-size: var(--wp--preset--font-size--sous-titre);
	font-weight: 600;
}

.tb-actu__lien:hover .tb-actu__titre {
	color: var(--wp--preset--color--terracotta-texte);
}

.tb-actu__extrait {
	font-size: var(--wp--preset--font-size--corps-s);
}

.tb-article__image {
	margin: 0 0 32px;
}

.tb-article__image img {
	width: 100%;
}

.tb-article__retour {
	margin-block: 40px var(--wp--custom--espace-section);
}

/* Avis */
.tb-avis {
	display: flex;
	flex-direction: column;
	gap: 28px;
}

.tb-avis__liste {
	display: flex;
	flex-direction: column;
	gap: 22px;
	margin: 0;
	padding: 0;
	list-style: none;
}

.tb-avis__carte {
	padding: 22px 26px;
	border: 1px solid var(--wp--preset--color--trait);
	background: var(--wp--preset--color--ivoire);
}

.tb-avis__texte {
	margin: 0 0 12px;
	font-family: var(--wp--preset--font-family--cormorant);
	font-size: var(--wp--preset--font-size--sous-titre);
	line-height: 1.5;
	overflow-wrap: anywhere;
}

.tb-avis__texte p + p {
	margin-top: 0.6em;
}

.tb-avis__auteur {
	font-size: var(--wp--preset--font-size--corps-s);
	color: var(--wp--preset--color--sauge-texte);
	overflow-wrap: anywhere;
}

.tb-avis__attente {
	margin-top: 8px;
	font-size: var(--wp--preset--font-size--corps-s);
	color: var(--wp--preset--color--terracotta-texte);
}
