/*
Theme Name: Boyer Avocats
Theme URI: https://www.boyer-avocats.fr/
Author: Cabinet Boyer Avocats
Description: Thème sobre aux couleurs de la charte graphique 2026 du cabinet (Vert Pinède, Vert Sarcelle, Glacier, Citron en accent ; police Switzer). Thème de blocs, sans dépendance externe.
Version: 1.3.0
Requires at least: 6.6
Tested up to: 7.1
Requires PHP: 8.1
License: Propriété du cabinet Boyer Avocats
Text Domain: boyer-avocats
*/

/* Les styles passent par theme.json. Ce fichier ne contient que les compléments
   que theme.json ne sait pas exprimer. */

/* Zoom autorisé sur mobile : aucune balise ne bloque user-scalable (constat de l'audit sur l'ancien site). */

.wp-site-blocks {
	min-height: 100vh;
	display: flex;
	flex-direction: column;
}

.wp-site-blocks > main {
	flex: 1 0 auto;
}

/* Lien d'évitement pour la navigation au clavier. */
.boyer-evitement {
	position: absolute;
	left: -9999px;
	top: 0;
	z-index: 1000;
	background: var(--wp--preset--color--pinede);
	color: var(--wp--preset--color--blanc);
	padding: 0.75rem 1rem;
	border-radius: 4px;
}
.boyer-evitement:focus {
	left: 1rem;
	top: 1rem;
}

/* Focus visible et contrasté. */
a:focus-visible,
button:focus-visible,
input:focus-visible,
select:focus-visible,
textarea:focus-visible {
	outline: 3px solid var(--wp--preset--color--sarcelle);
	outline-offset: 2px;
}

/* Texte courant : Light (charte p. 13) ; Regular sur téléphone, règle d interface fixée par le cabinet le 16/10/2026, absente du PDF. */
@media (max-width: 781px) {
	body {
		font-weight: 400;
	}
}

/* Formulaire de contact (Contact Form 7) aux couleurs de la charte. */
.wpcf7 label {
	display: block;
	font-weight: 600;
	margin-bottom: 0.25rem;
}
.wpcf7 input[type="text"],
.wpcf7 input[type="email"],
.wpcf7 input[type="tel"],
.wpcf7 input[type="date"],
.wpcf7 select,
.wpcf7 textarea {
	width: 100%;
	box-sizing: border-box;
	font: inherit;
	font-weight: 400;
	padding: 0.65rem 0.75rem;
	border: 1px solid var(--wp--preset--color--pinede);
	border-radius: 4px;
	background: var(--wp--preset--color--blanc);
	color: var(--wp--preset--color--pinede);
	margin-bottom: 1rem;
}
.wpcf7 input[type="submit"] {
	font: inherit;
	font-weight: 600;
	background: var(--wp--preset--color--pinede);
	color: var(--wp--preset--color--blanc);
	border: 0;
	border-radius: 4px;
	padding: 0.8rem 1.5rem;
	cursor: pointer;
}
.wpcf7 input[type="submit"]:hover {
	background: var(--wp--preset--color--sarcelle);
}
.wpcf7-not-valid-tip {
	color: #8a1c1c;
	font-weight: 400;
}
.wpcf7 form .wpcf7-response-output {
	border-radius: 4px;
	margin: 1rem 0 0;
	padding: 0.75rem 1rem;
}

/* Tableaux sobres (honoraires, cookies). */
.wp-block-table table {
	border-collapse: collapse;
}
.wp-block-table th,
.wp-block-table td {
	border: 1px solid var(--wp--preset--color--glacier);
	padding: 0.5rem 0.75rem;
	text-align: left;
	vertical-align: top;
}
.wp-block-table thead th {
	background: var(--wp--preset--color--glacier);
}

/* Variante « Accent Citron » : un seul par écran (règle d'interface du cabinet). NON UTILISÉE sur les pages du cabinet : la charte (p. 11) associe le Citron à Jean-Christophe Boyer, pas à BOYER Avocats. */
.wp-block-button.is-style-accent .wp-block-button__link {
	background: var(--wp--preset--color--citron);
	color: var(--wp--preset--color--pinede);
}
.wp-block-button.is-style-accent .wp-block-button__link:hover {
	background: var(--wp--preset--color--glacier);
	color: var(--wp--preset--color--pinede);
}

/* En-tête et pied de page. */
.boyer-entete .wp-block-navigation a {
	text-decoration: none;
}
.boyer-entete .wp-block-navigation a:hover,
.boyer-entete .wp-block-navigation .current-menu-item > a {
	text-decoration: underline;
}
.boyer-pied a {
	color: var(--wp--preset--color--blanc);
}
.boyer-pied a:hover {
	color: var(--wp--preset--color--glacier);
}

.boyer-aide {
	font-size: var(--wp--preset--font-size--petit);
	margin-top: -0.5rem;
}

/* ---------------------------------------------------------------------------
   Lecture (décision du 15/11/2026)
   --------------------------------------------------------------------------- */

/* Texte justifié sur ordinateur, avec césure française pour éviter les
   « rivières » d'espaces. Aligné à gauche sur téléphone : en colonne étroite,
   la justification crée de grands blancs entre les mots. */
/* Les puces ne sont pas justifiées : leurs lignes courtes, coupées par un lien,
   s'étireraient en grands blancs (constat du 15/11 sur « Nos interventions »). */
@media (min-width: 782px) {
	main p {
		text-align: justify;
		hyphens: auto;
		-webkit-hyphens: auto;
		hyphenate-limit-chars: 6 3 3;
	}
}
main p,
main li {
	overflow-wrap: break-word;
}
/* Titres, boutons et légendes ne sont jamais justifiés ni coupés. */
main h1, main h2, main h3, main h4,
main .wp-block-button,
main .wp-block-buttons {
	hyphens: manual;
	text-align: left;
}
main li + li {
	margin-top: 0.35rem;
}

/* ---------------------------------------------------------------------------
   Navigation : onglet de la rubrique en cours signalé par un trait Citron
   (décision du 15/11/2026). Le texte reste en Vert Pinède et passe en
   Semibold : l'information ne repose pas sur la seule couleur.
   --------------------------------------------------------------------------- */
.boyer-entete .wp-block-navigation-item__content {
	padding-bottom: 0.3rem;
	border-bottom: 3px solid transparent;
	text-decoration: none;
}
.boyer-entete .wp-block-navigation-item__content:hover {
	border-bottom-color: var(--wp--preset--color--glacier);
}
.boyer-entete .boyer-actif > .wp-block-navigation-item__content {
	border-bottom-color: var(--wp--preset--color--citron);
	font-weight: 600;
}

/* Respiration des sections : l'écart standard entre blocs (1,25 rem) s'efface
   devant un écart plus grand avant chaque intertitre, pour que l'œil repère
   les sections. Sélecteurs volontairement plus précis que ceux de la mise en page. */
main .is-layout-constrained > h1 + * {
	margin-block-start: 1.5rem;
}
main .is-layout-constrained > h2.wp-block-heading {
	margin-block-start: 2.75rem;
}
main .is-layout-constrained > h3.wp-block-heading {
	margin-block-start: 2rem;
}
main .is-layout-constrained > h2.wp-block-heading + *,
main .is-layout-constrained > h3.wp-block-heading + * {
	margin-block-start: 0.75rem;
}

/* Articles repris de l'ancien site : images et tableaux contenus dans la colonne
   (les fichiers d'origine portent des largeurs fixes). */
main img {
	max-width: 100%;
	height: auto;
}
main table {
	display: block;
	max-width: 100%;
	overflow-x: auto;
}
/* Titre d'article : capitales (charte), taille réduite pour les titres longs. */
.single main h1.wp-block-post-title {
	font-size: clamp(1.375rem, 1.1rem + 1vw, 1.75rem);
}

/* Bibliothèque : vignette d'illustration à gauche, texte à droite ; empilés sur téléphone. */
.boyer-fiche-article .boyer-vignette {
	flex: 0 0 200px;
	margin: 0.25rem 0 0;
}
.boyer-fiche-article .boyer-vignette img {
	object-fit: cover;
	border-radius: 4px;
}
.boyer-fiche-article .boyer-fiche-texte {
	flex: 1 1 auto;
	min-width: 0;
}
.boyer-fiche-article .boyer-fiche-texte > * {
	margin-block-start: 0.5rem;
}
.boyer-fiche-article .boyer-fiche-texte > :first-child {
	margin-block-start: 0;
}
@media (max-width: 600px) {
	.boyer-fiche-article {
		flex-wrap: wrap !important;
	}
	.boyer-fiche-article .boyer-vignette {
		flex-basis: 100%;
		max-width: 100%;
	}
}

/* Article : illustrations limitées en hauteur, centrées. */
.single main .wp-block-post-content img {
	max-height: 360px;
	width: auto;
	display: block;
	margin-inline: auto;
}

/* Article : plan lisible. Parties (H2) en Semibold Vert Pinède avec filet,
   sous-parties (H3) en Semibold Vert Sarcelle, niveau suivant (H4) en Semibold. */
.single main .wp-block-post-content h2 {
	font-size: 1.375rem;
	font-weight: 600;
	color: var(--wp--preset--color--pinede);
	text-transform: none;
	padding-top: 1rem;
	border-top: 1px solid var(--wp--preset--color--glacier);
	margin-block-start: 2.5rem;
}
.single main .wp-block-post-content h3 {
	font-size: 1.15rem;
	font-weight: 600;
	color: var(--wp--preset--color--sarcelle);
	margin-block-start: 1.75rem;
}
.single main .wp-block-post-content h4 {
	font-size: 1.0625rem;
	font-weight: 600;
	color: var(--wp--preset--color--pinede);
	margin-block-start: 1.25rem;
}
.single main .wp-block-post-content h2 + *,
.single main .wp-block-post-content h3 + *,
.single main .wp-block-post-content h4 + * {
	margin-block-start: 0.6rem;
}

/* ------------------------------------------------------------------------
 * Bandeau d'en-tête, repris de la bannière des réseaux sociaux (v1.3.0) :
 * fond Pinède, logo blanc, filet vertical, devise sur trois lignes
 * (« Défendre » en Citron), filet Citron en pied.
 * --------------------------------------------------------------------- */
.boyer-bandeau {
	background: var(--wp--preset--color--pinede, #244245);
	border-bottom: 6px solid var(--wp--preset--color--citron, #c2eb61);
	padding: 1.5rem 1.25rem;
}
.boyer-bandeau-lien {
	display: flex;
	align-items: center;
	justify-content: center;
	gap: 1.75rem;
	text-decoration: none;
	color: var(--wp--preset--color--glacier, #deebe8);
}
.boyer-bandeau-logo {
	display: block;
	height: 64px;
	width: auto;
	opacity: 0.94;
}
.boyer-bandeau-trait {
	display: block;
	width: 1px;
	align-self: stretch;
	min-height: 64px;
	background: var(--wp--preset--color--sarcelle, #1c7363);
}
.boyer-bandeau-devise {
	display: flex;
	flex-direction: column;
	font-weight: 600;
	font-size: 1.125rem;
	line-height: 1.15;
	letter-spacing: -0.01em;
}
.boyer-bandeau-fort {
	color: var(--wp--preset--color--citron, #c2eb61);
}
.boyer-bandeau-lien:focus-visible {
	outline: 2px solid var(--wp--preset--color--citron, #c2eb61);
	outline-offset: 4px;
}
@media (max-width: 600px) {
	.boyer-bandeau { padding: 1rem 0.75rem; border-bottom-width: 4px; }
	.boyer-bandeau-lien { gap: 1rem; }
	.boyer-bandeau-logo { height: 42px; }
	.boyer-bandeau-trait { min-height: 42px; }
	.boyer-bandeau-devise { font-size: 0.875rem; }
}
