/* Ozimek Avocat — compléments au theme.json
   Les couleurs, polices et tailles viennent de theme.json (variables --wp--preset--*). */

:root {
	--oz-rayon: 6px;
	--oz-marine: var(--wp--preset--color--marine);
	--oz-laiton: var(--wp--preset--color--laiton);
	--oz-bordure: var(--wp--preset--color--bordure);
	--oz-doux: var(--wp--preset--color--texte-doux);
}

html { scroll-behavior: smooth; }
body { -webkit-font-smoothing: antialiased; }
img { height: auto; }
a { text-underline-offset: 3px; }
:where(a, button, input, select, textarea, summary, .wp-element-button):focus-visible {
	outline: 3px solid var(--oz-laiton);
	outline-offset: 3px;
	border-radius: 2px;
}
@media (prefers-reduced-motion: reduce) {
	html { scroll-behavior: auto; }
	*, *::before, *::after { transition: none !important; animation: none !important; }
}

/* Lien d'évitement ajouté par WordPress */
.skip-link.screen-reader-text:focus { background: var(--oz-marine); color: #fff; }

/* Surtitre (style de paragraphe) */
.is-style-surtitre {
	font-size: .8rem !important;
	font-weight: 700;
	letter-spacing: .14em;
	text-transform: uppercase;
	color: var(--oz-laiton);
	margin-bottom: .4em !important;
}

/* Boutons secondaires */
.wp-block-button.is-style-outline > .wp-block-button__link {
	background: transparent;
	color: var(--oz-marine);
	border-color: var(--oz-marine);
}
.wp-block-button.is-style-outline > .wp-block-button__link:hover { background: var(--wp--preset--color--marine-clair); color: var(--oz-marine); }
.wp-block-button.is-style-clair > .wp-block-button__link { background: #fff; color: var(--oz-marine); border-color: #fff; }
.wp-block-button.is-style-clair > .wp-block-button__link:hover { background: var(--wp--preset--color--marine-clair); }

/* En-tête */
.ozimek-entete {
	position: sticky; top: 0; z-index: 50;
	background: rgba(255,255,255,.97);
	border-bottom: 1px solid var(--oz-bordure);
}
.admin-bar .ozimek-entete { top: var(--wp-admin--admin-bar--height, 32px); }
.ozimek-entete .wp-block-site-logo img { width: 190px; }
.ozimek-entete .wp-block-navigation a { text-decoration: none; white-space: nowrap; }
.ozimek-entete .wp-block-navigation-item:not(.ozimek-nav-bouton) .wp-block-navigation-item__content:hover,
.ozimek-entete .wp-block-navigation-item.current-menu-item:not(.ozimek-nav-bouton) .wp-block-navigation-item__content {
	box-shadow: inset 0 -2px 0 var(--oz-laiton);
}
.ozimek-nav-bouton .wp-block-navigation-item__content {
	background: var(--oz-marine); color: #fff !important; padding: .65em 1.1em !important;
	border-radius: var(--oz-rayon); font-weight: 700;
}
.ozimek-nav-bouton .wp-block-navigation-item__content:hover { background: var(--wp--preset--color--marine-fonce); }
.wp-block-navigation__responsive-container-open {
	border: 2px solid var(--oz-marine); border-radius: var(--oz-rayon); padding: 6px 10px; color: var(--oz-marine);
}
.wp-block-navigation__responsive-container.is-menu-open .wp-block-navigation__responsive-container-content { padding-top: 24px; }
.wp-block-navigation__responsive-container.is-menu-open .wp-block-navigation-item { width: 100%; }
.wp-block-navigation__responsive-container.is-menu-open .wp-block-navigation-item:not(.ozimek-nav-bouton) { border-bottom: 1px solid var(--oz-bordure); padding: 10px 0; }
@media (max-width: 600px) { .ozimek-entete .wp-block-site-logo img { width: 160px; } }

/* Bandeau d'accueil */
.ozimek-hero .wp-block-columns { align-items: center; }
.ozimek-portrait { position: relative; z-index: 0; max-width: 400px; margin-inline: auto; }
.ozimek-portrait img { border-radius: var(--oz-rayon); aspect-ratio: 4 / 5; object-fit: cover; object-position: center 20%; width: 100%; }
.ozimek-portrait::before {
	content: ""; position: absolute; inset: 18px -18px -18px 18px; z-index: -1;
	border: 2px solid var(--oz-laiton); border-radius: var(--oz-rayon);
}
.ozimek-hero { overflow: hidden; }
.ozimek-confiance {
	list-style: none; padding: 18px 0 0; margin-top: 28px !important;
	display: grid; gap: 10px; font-size: .95rem; color: var(--oz-doux);
	border-top: 1px solid var(--oz-bordure); max-width: 520px;
}
.ozimek-confiance li { position: relative; padding-left: 20px; margin: 0 !important; line-height: 1.5; }
.ozimek-confiance li::before {
	content: ""; position: absolute; left: 0; top: .55em; width: 7px; height: 7px; border-radius: 50%;
	background: var(--oz-laiton);
}
@media (max-width: 781px) { .ozimek-portrait { max-width: 300px; margin-inline: 0; } }

/* Vidéo */
.ozimek-video video { border-radius: var(--oz-rayon); background: var(--wp--preset--color--marine-fonce); box-shadow: 0 18px 40px -20px rgba(26,33,72,.45); width: 100%; }
.ozimek-video figcaption { font-size: .88rem; color: var(--oz-doux); text-align: left; }

/* Cartes de domaine : toute la carte est cliquable grâce au lien du titre */
.ozimek-cartes { display: grid !important; grid-template-columns: repeat(auto-fill, minmax(250px, 1fr)); grid-auto-rows: 1fr; gap: 20px; align-items: stretch; }
/* WordPress ajoute une marge au-dessus de chaque bloc sauf le premier : on la retire pour que toutes les cartes aient la même taille. */
.ozimek-cartes > .ozimek-carte { margin: 0 !important; }
.ozimek-carte {
	position: relative; background: #fff; border: 1px solid var(--oz-bordure); border-radius: var(--oz-rayon);
	padding: 26px 24px 24px !important; transition: border-color .15s, box-shadow .15s, transform .15s;
	display: flex; flex-direction: column; gap: 10px;
}
.ozimek-carte:hover { border-color: var(--oz-marine); box-shadow: 0 12px 28px -18px rgba(26,33,72,.5); transform: translateY(-2px); }
.ozimek-carte .wp-block-image img { width: 52px; height: 52px; }
.ozimek-carte h3 { margin: 6px 0 0; }
.ozimek-carte h3 a { text-decoration: none; color: inherit; }
.ozimek-carte h3 a::after { content: ""; position: absolute; inset: 0; }
.ozimek-carte p { margin: 0; color: var(--oz-doux); font-size: .97rem; }
.ozimek-carte .ozimek-carte__lien { margin-top: auto; padding-top: 6px; font-weight: 700; color: var(--oz-marine); font-size: .95rem; }

/* Étapes numérotées */
.ozimek-etapes { counter-reset: etape; }
.ozimek-etapes > .wp-block-column { counter-increment: etape; border-top: 2px solid var(--oz-marine); padding-top: 22px; }
.ozimek-etapes > .wp-block-column::before {
	content: "0" counter(etape); display: block; margin-bottom: 8px;
	font-family: var(--wp--preset--font-family--titres); font-weight: 600; font-size: 2rem; color: var(--oz-laiton);
}
.ozimek-etapes p { color: var(--oz-doux); }

/* Bandeau d'appel */
.ozimek-appel p { color: #d8dbea; }
.ozimek-appel h2 { color: #fff; }

/* Pied de page */
.ozimek-pied { font-size: .95rem; color: #c9cde0; }
.ozimek-pied a { color: #fff; }
.ozimek-pied h2 {
	font-family: var(--wp--preset--font-family--texte); font-size: .8rem; letter-spacing: .14em;
	text-transform: uppercase; color: #fff; margin-bottom: 14px;
}
.ozimek-pied ul { list-style: none; padding: 0; margin: 0; }
.ozimek-pied li { margin-bottom: 8px; }
.ozimek-pied .wp-block-social-links .wp-social-link { background: transparent; border: 1px solid rgba(255,255,255,.3); }
.ozimek-pied__bas { border-top: 1px solid rgba(255,255,255,.12); font-size: .85rem; }

/* Pages intérieures */
.ozimek-entete-page .wp-block-image img { border-radius: var(--oz-rayon); aspect-ratio: 4 / 3; object-fit: cover; }
.ozimek-fil { font-size: .88rem; color: var(--oz-doux); margin-bottom: 18px; }
.ozimek-fil a { color: var(--oz-doux); }
.ozimek-fil .breadcrumb_last { color: var(--wp--preset--color--texte); }

.ozimek-contenu ul li::marker, .ozimek-contenu ol li::marker { color: var(--oz-laiton); font-weight: 700; }
.ozimek-contenu li { margin-bottom: .5em; }
.ozimek-contenu h2 { margin-top: 1.8em; }
.ozimek-encadre { border-left: 4px solid var(--oz-marine); border-radius: 0 var(--oz-rayon) var(--oz-rayon) 0; }

/* Questions fréquentes (bloc Détails) */
.wp-block-details { border-bottom: 1px solid var(--oz-bordure); padding: 0; }
.wp-block-details summary {
	cursor: pointer; list-style: none; position: relative; padding: 18px 36px 18px 0;
	font-family: var(--wp--preset--font-family--titres); font-weight: 600; color: var(--oz-marine); font-size: 1.05rem;
}
.wp-block-details summary::-webkit-details-marker { display: none; }
.wp-block-details summary::after { content: "+"; position: absolute; right: 4px; top: 14px; font-size: 1.5rem; color: var(--oz-laiton); font-family: var(--wp--preset--font-family--texte); }
.wp-block-details[open] summary::after { content: "–"; }
.wp-block-details > :not(summary) { color: var(--oz-doux); padding-bottom: 14px; margin-top: 0; }

/* Colonne latérale des pages de domaine */
@media (min-width: 782px) { .ozimek-lateral { position: sticky; top: 100px; } }
.ozimek-carte-rdv { border-radius: var(--oz-rayon); }
.ozimek-carte-rdv h2 { color: #fff; font-size: 1.25rem; }
.ozimek-carte-rdv p { color: #d8dbea; font-size: .97rem; }
.ozimek-carte-rdv .wp-block-button, .ozimek-carte-rdv .wp-block-button__link { width: 100%; text-align: center; }
.ozimek-carte-rdv a:not(.wp-block-button__link) { color: #fff; font-weight: 700; }
.ozimek-liste-domaines { border: 1px solid var(--oz-bordure); border-radius: var(--oz-rayon); }
.ozimek-liste-domaines h2 { font-size: 1rem; }
.ozimek-liste-domaines ul { list-style: none; padding: 0; margin: 0; }
.ozimek-liste-domaines li { border-top: 1px solid var(--oz-bordure); margin: 0; }
.ozimek-liste-domaines a { display: block; padding: 10px 0; text-decoration: none; font-size: .95rem; }
.ozimek-liste-domaines a[aria-current="page"] { font-weight: 700; }

/* Articles par domaine */
.ozimek-articles { list-style: none; padding: 0; display: grid; gap: 14px; }
.ozimek-articles li { border: 1px solid var(--oz-bordure); border-radius: var(--oz-rayon); padding: 16px 20px; }
.ozimek-articles a { font-family: var(--wp--preset--font-family--titres); font-weight: 600; font-size: 1.1rem; text-decoration: none; }
.ozimek-articles time { display: block; font-size: .85rem; color: var(--oz-doux); }

/* Coordonnées */
.ozimek-coordonnees dt { font-size: .8rem; letter-spacing: .12em; text-transform: uppercase; color: var(--oz-doux); font-weight: 700; }
.ozimek-coordonnees dd { margin: 2px 0 16px; font-size: 1.05rem; }

/* Formulaire de rendez-vous */
.ozimek-form { background: #fff; border: 1px solid var(--oz-bordure); border-radius: var(--oz-rayon); padding: clamp(22px, 4vw, 40px); }
.ozimek-form fieldset { border: 0; padding: 0; margin: 0 0 8px; }
.ozimek-form legend { font-family: var(--wp--preset--font-family--titres); font-weight: 600; color: var(--oz-marine); font-size: 1.1rem; margin-bottom: 14px; }
.ozimek-form__champs { display: grid; grid-template-columns: 1fr 1fr; gap: 18px 20px; margin-bottom: 22px; }
.ozimek-form__large { grid-column: 1 / -1; }
@media (max-width: 600px) { .ozimek-form__champs { grid-template-columns: 1fr; } }
.ozimek-form label, .ozimek-form .ozimek-form__etiquette { display: block; font-weight: 700; font-size: .95rem; margin-bottom: 6px; }
.ozimek-form .ozimek-form__aide { font-weight: 400; color: var(--oz-doux); font-size: .88rem; }
.ozimek-form input:not([type="radio"]):not([type="checkbox"]), .ozimek-form select, .ozimek-form textarea {
	width: 100%; font: inherit; font-size: 1rem; color: var(--wp--preset--color--texte);
	padding: 12px 14px; border: 1.5px solid #b9bfcf; border-radius: var(--oz-rayon); background: #fff; box-sizing: border-box;
}
.ozimek-form input:focus, .ozimek-form select:focus, .ozimek-form textarea:focus { border-color: var(--oz-marine); outline: 3px solid rgba(176,138,82,.45); outline-offset: 0; }
.ozimek-form__choix { display: flex; flex-wrap: wrap; gap: 10px 22px; }
.ozimek-form__choix label { display: inline-flex; align-items: center; gap: 8px; font-weight: 400; margin: 0; }
.ozimek-form__choix input { width: 18px; height: 18px; accent-color: var(--oz-marine); }
.ozimek-form .obligatoire { color: #9b2c2c; }
.ozimek-form__mention { font-size: .88rem; color: var(--oz-doux); border-top: 1px solid var(--oz-bordure); padding-top: 18px; margin-top: 18px; }
.ozimek-form__piege { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }
.ozimek-form__message { padding: 16px 20px; border-radius: var(--oz-rayon); margin-bottom: 20px; }
.ozimek-form__message--ok { background: #e7f4ec; color: #1d5b34; border: 1px solid #b6dcc3; }
.ozimek-form__message--erreur { background: #fbeaea; color: #8a1f1f; border: 1px solid #efc2c2; }
.ozimek-form button[type="submit"] { cursor: pointer; }

/* Textes justifiés, avec coupure des mots en fin de ligne pour éviter les grands espaces */
.wp-block-post-content p:not([class*="has-text-align"]),
.wp-block-post-content li {
	text-align: justify;
	-webkit-hyphens: auto;
	hyphens: auto;
}
/* Exceptions : textes courts ou d'interface, qui restent alignés à gauche */
.wp-block-post-content .ozimek-carte p:not(.x),
.wp-block-post-content .ozimek-confiance li,
.wp-block-post-content .is-style-surtitre,
.wp-block-post-content .ozimek-form p,
.wp-block-post-content .ozimek-coordonnees,
.wp-block-post-content figcaption {
	text-align: left;
	-webkit-hyphens: manual;
	hyphens: manual;
}
/* Les textes d'introduction restent justifiés, sans coupure de mots */
.wp-block-post-content p.has-chapeau-font-size,
.wp-block-post-excerpt__excerpt {
	text-align: justify;
	-webkit-hyphens: manual;
	hyphens: manual;
}
/* Sur téléphone, les lignes sont trop courtes pour justifier l'introduction sans créer de grands espaces */
@media (max-width: 600px) {
	.wp-block-post-content p.has-chapeau-font-size,
	.wp-block-post-excerpt__excerpt { text-align: left; }
}

/* Tableaux de contenu */
.wp-block-post-content .wp-block-table { overflow-x: auto; margin: 1.6em 0; }
.wp-block-post-content .wp-block-table table { width: 100%; border-collapse: collapse; font-size: .95rem; line-height: 1.5; }
.wp-block-post-content .wp-block-table th,
.wp-block-post-content .wp-block-table td {
	word-break: normal; overflow-wrap: normal; -webkit-hyphens: manual; hyphens: manual;
	text-align: left; vertical-align: top; padding: 12px 14px; border: 1px solid var(--oz-bordure);
}
.wp-block-post-content .wp-block-table th {
	background: var(--wp--preset--color--marine-clair); color: var(--oz-marine);
	font-weight: 700; font-size: .9rem;
}
@media (max-width: 700px) {
	.wp-block-post-content .wp-block-table table { min-width: 560px; }
}

/* Introduction des pages de domaine : largeur de lecture confortable */
.ozimek-entete-page .wp-block-post-excerpt__excerpt { max-width: 46rem; }

/* Menu : sur tablette et petite fenêtre (jusqu'à 1100 px), le bouton « menu » remplace la barre pour éviter qu'elle passe sur deux lignes */
@media (min-width: 600px) and (max-width: 1100px) {
	.ozimek-entete .wp-block-navigation__responsive-container-open:not(.always-shown) { display: flex; }
	.ozimek-entete .wp-block-navigation__responsive-container:not(.hidden-by-default):not(.is-menu-open) { display: none; }
}
