/*
Theme Name: Grelin & Associés
Theme URI: https://www.grelin-associes.fr/
Description: Thème enfant de Twenty Twenty-Five pour le cabinet Grelin & Associés Avocats. Reprend l'identité du site historique (bleu Grelin, orange, Lato, photos du cabinet) sans constructeur de pages. Icônes : Lucide (licence ISC).
Author: Yoann Briand
Template: twentytwentyfive
Version: 1.2.0
Requires at least: 6.7
Requires PHP: 7.2
License: GNU General Public License v2 or later
Text Domain: grelin
*/

/* ---------- Structure générale ---------- */
.wp-site-blocks > * { margin-block-start: 0 !important; }
body { -webkit-font-smoothing: antialiased; }
strong { color: var(--wp--preset--color--contrast); }

/* ---------- Bandeau supérieur ---------- */
.grelin-topbar a { color: inherit; }
.grelin-topbar a:hover { color: var(--wp--preset--color--accent-3); }
.grelin-topbar img { vertical-align: -3px; margin-right: 6px; }

/* ---------- En-tête ---------- */
.grelin-header { position: sticky; top: 0; z-index: 30; box-shadow: 0 2px 14px rgba(35,54,69,.08); }
.grelin-header .wp-block-navigation a { color: var(--wp--preset--color--contrast); padding: .35rem 0; border-bottom: 2px solid transparent; }
.grelin-header .wp-block-navigation a:hover,
.grelin-header .wp-block-navigation .current-menu-item > a,
.grelin-header .wp-block-navigation a[aria-current="page"] { color: var(--wp--preset--color--accent-1); border-bottom-color: var(--wp--preset--color--accent-3); }

/* ---------- Bannières ---------- */
.grelin-banner { background-size: cover; background-position: center 40%; }
.grelin-banner.wp-block-cover { background-image: url(/wp-content/uploads/2015/04/IMGP4654-edit-e1433169826633.jpg); }
.grelin-banner h1, .grelin-banner .wp-block-post-title { color: #fff; text-shadow: 0 2px 12px rgba(0,0,0,.35); }

/* Filet orange sous les titres */
.grelin-rule { width: 90px; border: 0; height: 3px !important; background: var(--wp--preset--color--accent-3) !important; margin-left: auto !important; margin-right: auto !important; opacity: 1; }
.grelin-rule.is-left { margin-left: 0 !important; }

/* Sur-titre */
.grelin-kicker { letter-spacing: .14em; text-transform: uppercase; font-weight: 700; }

/* ---------- Cartes ---------- */
.grelin-card { height: 100%; box-sizing: border-box; box-shadow: 0 6px 24px rgba(35,54,69,.07); }
.grelin-card .wp-block-image { margin-bottom: 0; }
.grelin-icon img { width: 52px; height: 52px; }
.grelin-name { color: var(--wp--preset--color--accent-3) !important; }

/* Listes à puces chevron orange */
.grelin-list { list-style: none; padding-left: 0; }
.grelin-list li { position: relative; padding-left: 1.4em; margin-bottom: .45em; }
.grelin-list li::before {
	content: ""; position: absolute; left: 0; top: .45em; width: .8em; height: .8em;
	background: url(assets/icons/chevron-right-orange.svg) no-repeat center / contain;
}
.grelin-footer .grelin-list li::before { background-image: url(assets/icons/chevron-right-white.svg); opacity: .7; }

/* Boutons contour */
.wp-block-button.is-style-outline > .wp-block-button__link { color: var(--wp--preset--color--accent-1); border: 2px solid currentColor; background: transparent; }
.wp-block-button.is-style-outline > .wp-block-button__link.has-base-color { color: #fff; }
.wp-block-button.is-style-outline > .wp-block-button__link:hover { background: var(--wp--preset--color--accent-3); border-color: var(--wp--preset--color--accent-3); color: #fff; }
.grelin-mini { text-align: left; }
.grelin-mini .wp-block-post-featured-image { flex: none; }

/* ---------- Bloc « blog juridique » ---------- */
.grelin-blog { position: relative; overflow: hidden; }
.grelin-blog::before, .grelin-blog::after {
	content: ""; position: absolute; border-radius: 50%; pointer-events: none;
	border: 50px solid rgba(255,255,255,.04);
}
.grelin-blog::before { width: 340px; height: 340px; left: -90px; top: -120px; }
.grelin-blog::after { width: 460px; height: 460px; right: -140px; bottom: -260px; border-color: rgba(255,145,0,.10); }
.grelin-blog > * { position: relative; z-index: 1; }

/* ---------- Cartes d'actualités ---------- */
.grelin-post-card { height: 100%; box-sizing: border-box; background: #fff; box-shadow: 0 6px 24px rgba(35,54,69,.08); transition: transform .2s ease, box-shadow .2s ease; }
.grelin-post-card:hover { transform: translateY(-3px); box-shadow: 0 12px 32px rgba(35,54,69,.14); }
.grelin-post-card .wp-block-post-featured-image { margin: 0; }
.grelin-post-card .wp-block-post-featured-image img { aspect-ratio: 3 / 2; object-fit: cover; width: 100%; }
.grelin-post-card .wp-block-post-title a { color: var(--wp--preset--color--accent-1); }
.grelin-post-card .wp-block-post-title a:hover { color: var(--wp--preset--color--accent-3); }
.wp-block-post-template.is-layout-grid > li { display: flex; }
.wp-block-post-template.is-layout-grid > li > * { flex: 1; }
.grelin-date::before { content: ""; display: inline-block; width: 14px; height: 14px; margin-right: 6px; vertical-align: -2px; background: url(assets/icons/calendar-orange.svg) no-repeat center / contain; }
a.grelin-more, .grelin-more a { font-weight: 700; color: var(--wp--preset--color--accent-1); }
a.grelin-more::after, .grelin-more a::after { content: " →"; color: var(--wp--preset--color--accent-3); }

/* Image d'article en vignette (pied de page) */
.grelin-mini .wp-block-post-featured-image img { width: 64px; height: 64px; object-fit: cover; }
.grelin-mini .wp-block-post-title { line-height: 1.35; }
.grelin-mini .wp-block-post-title a { color: #fff; }
.grelin-mini .wp-block-post-title a:hover { color: var(--wp--preset--color--accent-3); }

/* ---------- Barre latérale ---------- */
.grelin-sidebar h3 { border-left: 3px solid var(--wp--preset--color--accent-3); padding-left: .7rem; font-size: .95rem; }
.grelin-sidebar .wp-block-latest-posts li, .grelin-sidebar .wp-block-categories li, .grelin-sidebar .wp-block-archives li { padding: .45rem 0; border-bottom: 1px solid var(--wp--preset--color--accent-4); list-style: none; }
.grelin-sidebar ul { padding-left: 0; }
.grelin-sidebar .wp-block-search__input { border: 1px solid var(--wp--preset--color--accent-4); border-radius: 999px; padding: .6rem 1rem; }
.grelin-sidebar .wp-block-search__button { border-radius: 999px; }

/* ---------- Pied de page ---------- */
.grelin-footer h3 { color: #fff; font-size: .95rem; letter-spacing: .08em; padding-bottom: .9rem; border-bottom: 1px solid rgba(255,255,255,.18); }
.grelin-footer a { color: #fff; }
.grelin-footer a:hover { color: var(--wp--preset--color--accent-3); }

/* ---------- Contact ---------- */
.grelin-infos p { display: flex; gap: .6rem; align-items: flex-start; margin: 0 0 .7rem; }
.grelin-infos img { width: 20px; height: 20px; margin-top: .25rem; flex: none; }
.grelin-map iframe { width: 100%; min-height: 320px; border: 0; display: block; }

/* Formulaire Contact Form 7 */
.wpcf7 label { display: block; font-weight: 700; font-size: .9rem; color: var(--wp--preset--color--contrast); margin-bottom: 1rem; }
.wpcf7 input[type="text"], .wpcf7 input[type="email"], .wpcf7 input[type="tel"], .wpcf7 textarea {
	width: 100%; box-sizing: border-box; margin-top: .35rem; padding: .75rem .9rem;
	border: 1px solid var(--wp--preset--color--accent-4); border-radius: 6px;
	background: #fff; font: inherit; font-weight: 400; color: var(--wp--preset--color--contrast);
}
.wpcf7 input:focus, .wpcf7 textarea:focus { outline: 2px solid var(--wp--preset--color--accent-1); outline-offset: 1px; border-color: transparent; }
.wpcf7 textarea { min-height: 160px; }
.wpcf7 input[type="submit"] {
	background: var(--wp--preset--color--accent-1); color: #fff; border: 0; border-radius: 999px;
	padding: .85rem 2rem; font: inherit; font-weight: 700; text-transform: uppercase; letter-spacing: .04em; cursor: pointer;
}
.wpcf7 input[type="submit"]:hover { background: var(--wp--preset--color--accent-3); }

/* ---------- Mobile ---------- */
@media (max-width: 781px) {
	.grelin-topbar .grelin-topbar-address { display: none; }
	.grelin-section { padding-top: var(--wp--preset--spacing--50) !important; padding-bottom: var(--wp--preset--spacing--50) !important; }
	.grelin-banner { min-height: 200px !important; }
	.grelin-hero img { min-height: 220px; object-fit: cover; }
}

/* Mobile : photo avant le texte dans les sections associées de l'accueil */
@media (max-width: 781px) {
	.wp-block-columns:has(.grelin-portrait-home) { flex-direction: column-reverse; }
}
