/* TerraNova Autonomie — styles complémentaires (front et éditeur). */

/* Logo texte de l'en-tête */
.tn-logo { margin: 0; font-family: var(--wp--preset--font-family--fraunces); font-size: 1.5rem; line-height: 1.2; }
.tn-logo a { color: var(--wp--preset--color--ink); text-decoration: none; }
.tn-logo strong { color: var(--wp--preset--color--brand); font-weight: 600; }

/* Étiquette en capitales */
.is-style-etiquette {
	font-size: 0.75rem !important;
	line-height: 1.35;
	font-weight: 600;
	letter-spacing: 0.08em;
	text-transform: uppercase;
}

/* Pastilles de repère : « Ça vaut le coup », « À nuancer », « Pas la peine » */
.is-style-pastille-oui,
.is-style-pastille-nuance,
.is-style-pastille-non {
	display: inline-block;
	width: fit-content;
	margin: 0;
	padding: 0.25rem 0.5rem;
	border-radius: 4px;
	color: #ffffff;
	font-size: 0.75rem !important;
	line-height: 1.35;
	font-weight: 600;
	letter-spacing: 0.08em;
	text-transform: uppercase;
}
.is-style-pastille-oui { background: var(--wp--preset--color--repere-oui); }
.is-style-pastille-nuance { background: var(--wp--preset--color--repere-nuance); }
.is-style-pastille-non { background: var(--wp--preset--color--repere-non); }

/* Chiffre clé */
.is-style-chiffre-cle {
	font-family: var(--wp--preset--font-family--plex-mono);
	font-size: 2rem !important;
	line-height: 1.15;
	font-weight: 500;
	margin: 0;
}

/* Liste d'hypothèses */
.is-style-hypotheses { font-family: var(--wp--preset--font-family--plex-mono); font-size: 0.9375rem; line-height: 1.6; }

/* Encadré « On a fait le calcul » */
.wp-block-group.is-style-encadre-calcul {
	background: var(--wp--preset--color--brand-tint);
	border-radius: 8px;
	padding: var(--wp--preset--spacing--40);
}
.wp-block-group.is-style-encadre-calcul .wp-block-details { margin-top: 0.75rem; }

/* Carte */
.wp-block-group.is-style-carte {
	background: var(--wp--preset--color--surface);
	border: 1px solid var(--wp--preset--color--line);
	border-radius: 8px;
	padding: var(--wp--preset--spacing--40);
}

/* Zone réservée (formulaire à insérer, contenu à compléter) */
.wp-block-group.is-style-zone-a-completer {
	border: 2px dashed var(--wp--preset--color--line);
	border-radius: 8px;
	padding: var(--wp--preset--spacing--40);
	color: var(--wp--preset--color--muted);
	background: transparent;
}

/* Image sans arrondi (illustrations plein cadre) */
.wp-block-image.is-style-sans-arrondi img { border-radius: 0 !important; }

/* Cartes des piliers : liseré à la couleur du pilier sous l'image */
.tn-pilier .wp-block-image img { border-bottom: 6px solid currentColor; }
.tn-pilier--alimentation { color: var(--wp--preset--color--alimentation); }
.tn-pilier--reemploi { color: var(--wp--preset--color--reemploi); }
.tn-pilier--energie { color: var(--wp--preset--color--energie); }
.tn-pilier--nature { color: var(--wp--preset--color--nature); }
.tn-pilier h3, .tn-pilier p:not(.is-style-etiquette) { color: var(--wp--preset--color--ink); }
.tn-pilier p.tn-pilier__texte { color: var(--wp--preset--color--muted); }
.tn-pilier h3 a { color: inherit; text-decoration: none; }
.tn-pilier h3 a:hover { text-decoration: underline; }

/* Cartes d'articles (boucles de requête) */
.tn-cartes .wp-block-post-title a { color: var(--wp--preset--color--ink); text-decoration: none; }
.tn-cartes .wp-block-post-title a:hover { text-decoration: underline; }
.tn-cartes .wp-block-post-terms a { color: var(--wp--preset--color--reemploi); text-decoration: none; text-transform: uppercase; letter-spacing: 0.06em; font-size: 0.75rem; }
.tn-cartes .wp-block-post-excerpt { color: var(--wp--preset--color--muted); font-size: 0.9375rem; }

/* En-tête : navigation */
.tn-header .wp-block-navigation a { text-decoration: none; }
.tn-header .wp-block-navigation a:hover { text-decoration: underline; }

/* Pied de page */
.tn-footer a { color: inherit; }
.tn-footer .wp-block-navigation a { text-decoration: none; }
.tn-footer .wp-block-navigation a:hover { text-decoration: underline; }

/* Tableaux */
.wp-block-table table { background: var(--wp--preset--color--surface); border-radius: 8px; overflow: hidden; }
.wp-block-table td, .wp-block-table th { border-color: var(--wp--preset--color--line); padding: 0.6rem 0.8rem; }
.wp-block-table thead { border-bottom: 2px solid var(--wp--preset--color--line); }

/* Détails (FAQ, hypothèses) */
.wp-block-details summary { cursor: pointer; font-weight: 600; }
.wp-block-details[open] summary { margin-bottom: 0.5rem; }

/* Boutons secondaires (contour) */
.wp-block-button.is-style-outline .wp-block-button__link {
	border: 1px solid currentColor;
	background: transparent;
	color: var(--wp--preset--color--brand);
	padding: calc(0.75rem - 1px) calc(1.25rem - 1px);
}
.wp-block-button.is-style-outline .wp-block-button__link:hover { background: var(--wp--preset--color--brand-tint); }

/* Bandeaux sombres : liens et boutons clairs */
.has-brand-background-color a:not(.wp-block-button__link) { color: var(--wp--preset--color--brand-tint); }
.has-brand-background-color .wp-block-button__link { background: var(--wp--preset--color--brand-tint); color: var(--wp--preset--color--brand); }
.has-brand-background-color .wp-block-button__link:hover { background: #ffffff; color: var(--wp--preset--color--brand); }

/* Focus visible */
a:focus-visible, .wp-block-button__link:focus-visible, summary:focus-visible, input:focus-visible, button:focus-visible {
	outline: 2px solid var(--wp--preset--color--brand);
	outline-offset: 2px;
}

/* Page de liens */
.tn-liens .wp-block-button { width: 100%; }
.tn-liens .wp-block-button__link { width: 100%; }

/* Calculateur intégré */
.tn-calc { margin-inline: auto; }

/* Titres sur fonds colorés : ils prennent la couleur du texte du bloc */
.has-text-color :where(h1, h2, h3, h4, h5, h6) { color: inherit; }
