/*
Theme Name: Archers Aumalois
Theme URI: https://compagnie-archers-aumalois.fr/
Author: Compagnie des Archers Aumalois
Description: Thème « bloc » sobre et élégant pour la Compagnie des Archers Aumalois : papier ivoire, bleu nuit et laiton, titres en Marcellus. Modèles de page (avec ou sans colonne latérale, pleine largeur, page vierge), compositions de blocs prêtes à l'emploi et styles de blocs inspirés du tir à l'arc (séparateur flèche, cible fléchée, encadrés).
Requires at least: 6.6
Tested up to: 7.1
Requires PHP: 7.4
Version: 1.0.0
License: GNU General Public License v2 or later
License URI: https://www.gnu.org/licenses/gpl-2.0.html
Text Domain: archers-aumalois
Tags: block-patterns, full-site-editing, custom-colors, custom-logo, editor-style, wide-blocks, two-columns, right-sidebar, blog
*/

/* ---------- Base ---------- */

html { scroll-behavior: smooth; }
body { -webkit-font-smoothing: antialiased; text-rendering: optimizeLegibility; }
::selection { background: #E4DDCF; color: #1E2731; }

:where(a, button, input, select, textarea, summary):focus-visible {
	outline: 2px solid #233A52;
	outline-offset: 2px;
}

/* Lettrine */
.has-drop-cap:not(:focus)::first-letter {
	font-family: var(--wp--preset--font-family--titres);
	color: var(--wp--preset--color--bleu-nuit);
	font-size: 5.2em;
	line-height: 0.82;
	font-weight: 400;
	margin: 0.08em 0.12em 0 0;
}

/* ---------- Liseré aux couleurs de la cible ---------- */

.liseret-cible {
	height: 4px;
	background: linear-gradient(90deg,
		#2B2B2B 0 14.28%, #3E7FB0 14.28% 28.57%, #C0473F 28.57% 42.86%,
		#E3C04A 42.86% 57.14%, #C0473F 57.14% 71.43%, #3E7FB0 71.43% 85.71%,
		#2B2B2B 85.71% 100%);
}
.liseret-cible.is-degrade {
	background: linear-gradient(90deg, #2B2B2B, #3E7FB0, #C0473F, #E3C04A, #C0473F, #3E7FB0, #2B2B2B);
}

/* ---------- En-tête ---------- */

.site-header .wp-block-site-logo img { display: block; }

/* Le logo a un fond blanc : on le fond dans le papier ivoire. */
.wp-block-site-logo img { mix-blend-mode: multiply; }
.site-header .wp-block-navigation .wp-block-navigation__submenu-container {
	background: var(--wp--preset--color--papier);
	border: 1px solid var(--wp--preset--color--filet);
	padding: 0.5rem 0;
	min-width: 240px;
}
.site-header .wp-block-navigation .wp-block-navigation__submenu-container .wp-block-navigation-item__content {
	padding: 0.45rem 1.1rem;
}
.site-header .wp-block-navigation .wp-block-navigation-item__content:hover,
.site-header .wp-block-navigation .current-menu-item > .wp-block-navigation-item__content {
	color: var(--wp--preset--color--laiton-fonce);
}
.wp-block-navigation__responsive-container.is-menu-open {
	background: var(--wp--preset--color--papier) !important;
	padding: 2rem;
}
.wp-block-navigation__responsive-container.is-menu-open .wp-block-navigation__container { gap: 0.9rem; }

/* ---------- Styles de blocs ---------- */

/* Séparateur : flèche */
hr.wp-block-separator.is-style-fleche {
	border: 0 !important;
	height: 16px;
	width: 220px;
	max-width: 100%;
	background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='220' height='16' viewBox='0 0 220 16'%3E%3Cg fill='none' stroke='%239C7A3C' stroke-width='1.2' stroke-linecap='round'%3E%3Cline x1='6' y1='8' x2='208' y2='8'/%3E%3Cpath d='M200 3 L210 8 L200 13'/%3E%3Cpath d='M14 8 L6 2 M20 8 L12 2 M14 8 L6 14 M20 8 L12 14'/%3E%3C/g%3E%3C/svg%3E") center / contain no-repeat;
	opacity: 1;
}
hr.wp-block-separator.is-style-fleche:not(.alignleft):not(.alignright) { margin-left: auto; margin-right: auto; }
hr.wp-block-separator.is-style-fleche.fleche-gauche { margin-left: 0 !important; }

/* Séparateur : cible fléchée */
hr.wp-block-separator.is-style-cible {
	border: 0 !important;
	height: 72px;
	width: 72px;
	margin-left: auto !important;
	margin-right: auto !important;
	background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='72' height='72' viewBox='0 0 72 72'%3E%3Cg fill='none' stroke='%239C7A3C' stroke-linecap='round'%3E%3Ccircle cx='30' cy='42' r='21'/%3E%3Ccircle cx='30' cy='42' r='14'/%3E%3Ccircle cx='30' cy='42' r='7'/%3E%3Cline x1='30' y1='42' x2='65' y2='7' stroke-width='1.4'/%3E%3Cpath d='M56 16 L64.5 14.6 M56 16 L57.4 7.5 M51 21 L59.5 19.6 M51 21 L52.4 12.5' stroke-width='1.2'/%3E%3C/g%3E%3C/svg%3E") center / contain no-repeat;
	opacity: 1;
}

/* Séparateur : filet laiton */
hr.wp-block-separator.is-style-filet-laiton {
	border: 0 !important;
	border-top: 1px solid var(--wp--preset--color--laiton) !important;
	opacity: 1;
}

/* Paragraphe : surtitre */
p.is-style-surtitre {
	font-size: 0.8rem;
	text-transform: uppercase;
	letter-spacing: 0.2em;
	color: var(--wp--preset--color--laiton-fonce);
	line-height: 1.4;
}
.has-bleu-nuit-background-color p.is-style-surtitre { color: var(--wp--preset--color--laiton-clair); }

/* Paragraphe : chapeau */
p.is-style-chapeau {
	font-family: var(--wp--preset--font-family--titres);
	font-size: var(--wp--preset--font-size--moyen);
	line-height: 1.5;
	color: var(--wp--preset--color--bleu-nuit);
}

/* Groupe : encadré */
.wp-block-group.is-style-encadre {
	background: var(--wp--preset--color--papier-fonce);
	border-top: 1px solid var(--wp--preset--color--laiton);
	border-bottom: 1px solid var(--wp--preset--color--laiton);
	padding: clamp(1.5rem, 4vw, 2.25rem);
}

/* Groupe : aparté avec flèche */
.wp-block-group.is-style-aparte {
	position: relative;
	border-top: 1px solid var(--wp--preset--color--filet);
	border-bottom: 1px solid var(--wp--preset--color--filet);
	padding: 1.5rem 0 1.5rem 3rem;
}
.wp-block-group.is-style-aparte::before {
	content: "";
	position: absolute;
	left: 0;
	top: 1.75rem;
	width: 28px;
	height: 28px;
	background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='28' height='28' viewBox='0 0 28 28'%3E%3Cg fill='none' stroke='%239C7A3C' stroke-width='1.2' stroke-linecap='round'%3E%3Cline x1='3' y1='25' x2='25' y2='3'/%3E%3Cpath d='M25 3 L18 4 M25 3 L24 10'/%3E%3Cpath d='M6 22 L2 21 M6 22 L7 26 M9 19 L5 18 M9 19 L10 23'/%3E%3C/g%3E%3C/svg%3E") center / contain no-repeat;
}

/* Groupe : carte cliquable (actualités) */
.wp-block-group.is-style-filet-haut {
	border-top: 1px solid #C9BFA9;
	padding-top: 1.25rem;
}

/* Colonnes : séparées par des filets */
@media (min-width: 782px) {
	.wp-block-columns.is-style-filets > .wp-block-column + .wp-block-column {
		border-left: 1px solid #C9BFA9;
		padding-left: var(--wp--style--block-gap, 2rem);
	}
}
.wp-block-columns.is-style-filets { border-top: 1px solid #C9BFA9; padding-top: 2rem; }

/* Image : passe-partout */
.wp-block-image.is-style-cadre img {
	padding: 14px;
	border: 1px solid #C9BFA9;
	background: var(--wp--preset--color--papier);
	box-sizing: border-box;
}

/* Citation : grande, centrée */
.wp-block-quote.is-style-grande {
	border-left: 0 !important;
	border-top: 1px solid var(--wp--preset--color--laiton);
	border-bottom: 1px solid var(--wp--preset--color--laiton);
	padding: 2.25rem 0 !important;
	text-align: center;
	font-size: var(--wp--preset--font-size--grand);
	line-height: 1.3;
}

/* Tableau : sobre */
.wp-block-table table { border-collapse: collapse; width: 100%; }
.wp-block-table thead { border-bottom: 1px solid var(--wp--preset--color--laiton); }
.wp-block-table th { text-align: left; font-weight: 600; }
.wp-block-table td, .wp-block-table th { border: 0; border-bottom: 1px solid var(--wp--preset--color--filet); padding: 0.7rem 0.9rem; }
.wp-block-table.is-style-stripes tbody tr:nth-child(odd) { background: var(--wp--preset--color--papier-fonce); }
.wp-block-table.is-style-stripes { border-bottom: 0; }

/* Liste : petites flèches */
ul.is-style-fleches { list-style: none; padding-left: 0; }
ul.is-style-fleches li { position: relative; padding-left: 1.9rem; }
ul.is-style-fleches li::before {
	content: "";
	position: absolute;
	left: 0;
	top: 0.72em;
	width: 1.2rem;
	height: 8px;
	background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='22' height='8' viewBox='0 0 22 8'%3E%3Cg fill='none' stroke='%239C7A3C' stroke-width='1.1' stroke-linecap='round'%3E%3Cline x1='1' y1='4' x2='20' y2='4'/%3E%3Cpath d='M17 1 L21 4 L17 7'/%3E%3C/g%3E%3C/svg%3E") left center / contain no-repeat;
}

/* ---------- Bandeau d'accueil : anneaux en filigrane ---------- */

.bandeau-anneaux { position: relative; overflow: hidden; }
.bandeau-anneaux::before {
	content: "";
	position: absolute;
	right: -180px;
	top: -140px;
	width: 760px;
	height: 760px;
	opacity: 0.45;
	pointer-events: none;
	background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='760' height='760' viewBox='0 0 760 760'%3E%3Cg fill='none' stroke='%239C7A3C' stroke-width='1'%3E%3Ccircle cx='380' cy='380' r='370'/%3E%3Ccircle cx='380' cy='380' r='296'/%3E%3Ccircle cx='380' cy='380' r='222'/%3E%3Ccircle cx='380' cy='380' r='148'/%3E%3Ccircle cx='380' cy='380' r='74'/%3E%3C/g%3E%3C/svg%3E") center / contain no-repeat;
}
.bandeau-anneaux > * { position: relative; }

/* ---------- Listes d'articles ---------- */

.wp-block-post-template .wp-block-post-featured-image img { aspect-ratio: 3 / 2; object-fit: cover; }
.carte-article .wp-block-post-title a:hover { color: var(--wp--preset--color--bleu-nuit); }
.wp-block-query-pagination { border-top: 1px solid var(--wp--preset--color--filet); padding-top: 1.5rem; }
.wp-block-query-pagination a { text-decoration: none; }

/* Navigation entre articles */
.navigation-articles { border-top: 1px solid #C9BFA9; border-bottom: 1px solid #C9BFA9; }
.navigation-articles .wp-block-post-navigation-link { padding: 1.5rem 0; }
.navigation-articles .wp-block-post-navigation-link a {
	display: block;
	font-family: var(--wp--preset--font-family--titres);
	font-size: var(--wp--preset--font-size--moyen);
	line-height: 1.25;
	text-decoration: none;
	color: var(--wp--preset--color--encre);
	margin-top: 0.3rem;
}
.navigation-articles .post-navigation-link__label {
	display: block;
	font-family: var(--wp--preset--font-family--texte);
	font-size: 0.8rem;
	letter-spacing: 0.16em;
	text-transform: uppercase;
	color: var(--wp--preset--color--ardoise);
}

/* ---------- Colonne latérale ---------- */

.colonne-laterale h2, .colonne-laterale .wp-block-heading {
	font-family: var(--wp--preset--font-family--texte);
	font-size: 0.8rem !important;
	text-transform: uppercase;
	letter-spacing: 0.18em;
	font-weight: 600;
	color: var(--wp--preset--color--laiton-fonce);
	border-bottom: 1px solid var(--wp--preset--color--filet);
	padding-bottom: 0.6rem;
}
.colonne-laterale ul { list-style: none; padding-left: 0; }
.colonne-laterale li { padding: 0.35rem 0; border-bottom: 1px solid rgba(201, 191, 169, 0.45); line-height: 1.35; }
.colonne-laterale li a { text-decoration: none; }
.colonne-laterale select { width: 100%; padding: 0.55rem; border: 1px solid #C9BFA9; background: #fff; font: inherit; }

/* Recherche */
.wp-block-search__input { border: 1px solid #C9BFA9 !important; background: #fff; padding: 0.6rem 0.8rem; border-radius: 0; }
.wp-block-search__button { margin-left: 0.4rem; }

/* ---------- Formulaires (Contact Form 7…) ---------- */

.wpcf7 input[type="text"], .wpcf7 input[type="email"], .wpcf7 input[type="tel"], .wpcf7 textarea, .wpcf7 select {
	width: 100%;
	max-width: 100%;
	box-sizing: border-box;
	border: 1px solid #C9BFA9;
	background: #fff;
	padding: 0.7rem 0.85rem;
	font: inherit;
	color: inherit;
	border-radius: 0;
}
.wpcf7 input[type="submit"] {
	background: var(--wp--preset--color--bleu-nuit);
	color: var(--wp--preset--color--papier);
	border: 0;
	padding: 0.85rem 1.6rem;
	font: inherit;
	font-weight: 600;
	cursor: pointer;
}
.wpcf7 input[type="submit"]:hover { background: var(--wp--preset--color--encre); }

/* ---------- Pied de page ---------- */

.site-footer a { text-decoration: none; }
.site-footer a:hover { text-decoration: underline; }

/* ---------- Petits écrans ---------- */

@media (max-width: 781px) {
	.site-header .alignwide { flex-wrap: nowrap !important; gap: 0.75rem; }
	.site-header .wp-block-site-logo img { width: 52px !important; height: auto; }
	.site-header .wp-block-site-title { font-size: 1.1rem !important; }
	.site-header .wp-block-site-tagline { display: none; }
	.bandeau-anneaux .wp-block-site-logo img { width: 200px !important; height: auto; }
	.bandeau-anneaux::before { width: 420px; height: 420px; right: -160px; top: -80px; }
	.navigation-articles .wp-block-post-navigation-link { text-align: left !important; }
}
