/*
Theme Name: Archers Gallos – Parc National
Theme URI: https://archersgallos.fr/
Author: Compagnie des Archers Gallos de Plœuc-L'Hermitage
Description: Thème WordPress inspiré des affiches des parcs nationaux américains et de l'imagerie « grand air » des années 1950-1960. Pensé pour un club de tir à l'arc : one-page, compétitions, chiffres du club, galerie, documents, contact.
Version: 1.0.0
Requires at least: 6.0
Requires PHP: 7.4
License: GNU General Public License v2 or later
License URI: https://www.gnu.org/licenses/gpl-2.0.html
Text Domain: archers-gallos-parc
Tags: custom-colors, custom-logo, custom-menu, featured-images, one-column, two-columns, translation-ready, threaded-comments
*/

/* ==========================================================================
   1. Tokens
   ========================================================================== */
:root {
	--pine:        #2E4A38;
	--pine-dark:   #1F3326;
	--moss:        #5F7A4B;
	--mustard:     #D9A23B;
	--rust:        #B4532A;
	--teal:        #4F8A86;
	--cream:       #F4E8CB;
	--paper:       #EBDDB8;
	--bark:        #4A3326;
	--ink:         #2B211A;

	--font-display: "Alfa Slab One", "Rockwell", "Georgia", serif;
	--font-head:    "Oswald", "Arial Narrow", sans-serif;
	--font-body:    "Rokkitt", "Rockwell", "Georgia", serif;
	--font-type:    "Special Elite", "Courier New", monospace;

	--radius: 4px;
	--wrap: 1120px;
	--border: 3px solid var(--bark);
	--shadow: 5px 5px 0 var(--bark);
}

/* ==========================================================================
   2. Base
   ========================================================================== */
*, *::before, *::after { box-sizing: border-box; }

html { scroll-behavior: smooth; scroll-padding-top: 90px; }

body {
	margin: 0;
	background-color: var(--cream);
	/* grain papier vieilli */
	background-image:
		radial-gradient(rgba(74,51,38,.07) 1px, transparent 1px),
		radial-gradient(rgba(74,51,38,.05) 1px, transparent 1px);
	background-size: 4px 4px, 7px 7px;
	background-position: 0 0, 2px 3px;
	color: var(--ink);
	font-family: var(--font-body);
	font-size: 1.2rem;
	line-height: 1.6;
	-webkit-font-smoothing: antialiased;
}

img { max-width: 100%; height: auto; display: block; }
a { color: var(--rust); text-decoration-thickness: 2px; text-underline-offset: 3px; }
a:hover, a:focus { color: var(--pine); }

h1, h2, h3, h4 {
	font-family: var(--font-head);
	text-transform: uppercase;
	letter-spacing: .06em;
	line-height: 1.15;
	color: var(--pine-dark);
	margin: 0 0 .6em;
}
h1 { font-family: var(--font-display); font-weight: 400; font-size: clamp(2.2rem, 6vw, 4rem); letter-spacing: .02em; }
h2 { font-size: clamp(1.6rem, 3.5vw, 2.4rem); }
h3 { font-size: 1.4rem; }
h4 { font-size: 1.1rem; color: var(--rust); }

p { margin: 0 0 1.1em; }

.screen-reader-text {
	border: 0; clip: rect(1px,1px,1px,1px); clip-path: inset(50%);
	height: 1px; margin: -1px; overflow: hidden; padding: 0;
	position: absolute; width: 1px; word-wrap: normal !important;
}
.skip-link:focus {
	position: fixed; top: 8px; left: 8px; z-index: 1000;
	background: var(--mustard); color: var(--ink); padding: .6rem 1rem;
	clip: auto; clip-path: none; width: auto; height: auto; margin: 0;
}

.wrap { width: min(100% - 2.5rem, var(--wrap)); margin-inline: auto; }

/* ==========================================================================
   3. Boutons & ornements
   ========================================================================== */
.btn, .wp-block-button__link, button[type="submit"], input[type="submit"] {
	display: inline-block;
	background: var(--mustard);
	color: var(--ink);
	font-family: var(--font-head);
	font-size: 1.05rem;
	text-transform: uppercase;
	letter-spacing: .12em;
	text-decoration: none;
	padding: .75rem 1.6rem;
	border: var(--border);
	border-radius: var(--radius);
	box-shadow: 4px 4px 0 var(--bark);
	cursor: pointer;
	transition: transform .12s ease, box-shadow .12s ease, background .12s ease;
}
.btn:hover, .btn:focus, button[type="submit"]:hover, input[type="submit"]:hover {
	background: var(--cream); color: var(--ink);
	transform: translate(2px, 2px); box-shadow: 2px 2px 0 var(--bark);
}
.btn--pine { background: var(--pine); color: var(--cream); }
.btn--pine:hover { background: var(--pine-dark); color: var(--cream); }

/* Bandeau étoilé séparateur */
.divider {
	display: flex; align-items: center; justify-content: center; gap: 1rem;
	color: var(--rust); font-family: var(--font-head); letter-spacing: .4em;
	margin: 1.5rem 0;
}
.divider::before, .divider::after {
	content: ""; flex: 1; height: 0;
	border-top: 3px double var(--bark);
}

/* Badge circulaire type « Park Service » */
.badge {
	display: inline-grid; place-items: center; text-align: center;
	width: 120px; height: 120px; border-radius: 50%;
	background: var(--mustard); color: var(--ink);
	border: 4px solid var(--bark);
	box-shadow: inset 0 0 0 4px var(--mustard), inset 0 0 0 6px var(--bark), var(--shadow);
	font-family: var(--font-head); text-transform: uppercase; line-height: 1.1;
	font-size: .85rem; letter-spacing: .08em; padding: 1rem;
	transform: rotate(-8deg);
}
.badge strong { display: block; font-family: var(--font-display); font-size: 1.6rem; font-weight: 400; }

/* ==========================================================================
   4. En-tête
   ========================================================================== */
.site-header {
	position: sticky; top: 0; z-index: 100;
	background: var(--pine-dark);
	border-bottom: 5px solid var(--mustard);
	box-shadow: 0 3px 0 var(--bark);
}
.admin-bar .site-header { top: 32px; }
@media (max-width: 782px) { .admin-bar .site-header { top: 46px; } }

.site-header__inner {
	display: flex; align-items: center; justify-content: space-between;
	gap: 1.5rem; padding-block: .7rem;
}
.site-branding { display: flex; align-items: center; gap: .9rem; }
.site-branding .custom-logo { max-height: 56px; width: auto; }
.site-title {
	margin: 0; font-family: var(--font-display); font-weight: 400;
	font-size: clamp(1rem, 2.2vw, 1.4rem); letter-spacing: .03em;
	text-transform: none; line-height: 1.1;
}
.site-title a { color: var(--cream); text-decoration: none; }
.site-title small {
	display: block; font-family: var(--font-type); font-size: .7rem;
	letter-spacing: .15em; text-transform: uppercase; color: var(--mustard); margin-top: .2rem;
}

.main-nav ul { list-style: none; margin: 0; padding: 0; display: flex; gap: .2rem; align-items: center; }
.main-nav li { position: relative; }
.main-nav a {
	display: block; padding: .55rem .9rem;
	font-family: var(--font-head); text-transform: uppercase; letter-spacing: .1em;
	font-size: .95rem; color: var(--cream); text-decoration: none;
	border-bottom: 3px solid transparent;
}
.main-nav a:hover, .main-nav .current-menu-item > a, .main-nav a:focus {
	color: var(--mustard); border-bottom-color: var(--mustard);
}
.main-nav .sub-menu {
	display: none; position: absolute; left: 0; top: 100%; min-width: 220px;
	background: var(--pine-dark); border: 3px solid var(--mustard); flex-direction: column; gap: 0; z-index: 10;
}
.main-nav li:hover > .sub-menu, .main-nav li:focus-within > .sub-menu { display: flex; }
.main-nav .sub-menu a { border-bottom: 0; }

.nav-toggle {
	display: none; background: transparent; border: 2px solid var(--mustard);
	color: var(--mustard); font-family: var(--font-head); text-transform: uppercase;
	letter-spacing: .1em; padding: .5rem .9rem; box-shadow: none; border-radius: var(--radius);
}
.nav-toggle:hover { background: var(--mustard); color: var(--ink); transform: none; box-shadow: none; }

@media (max-width: 860px) {
	.nav-toggle { display: inline-block; }
	.main-nav { display: none; position: absolute; left: 0; right: 0; top: 100%; background: var(--pine-dark); border-bottom: 5px solid var(--mustard); }
	.main-nav.is-open { display: block; }
	.main-nav ul { flex-direction: column; align-items: stretch; padding: .5rem 1.25rem 1rem; }
	.main-nav .sub-menu { display: flex; position: static; border: 0; border-left: 3px solid var(--mustard); margin-left: 1rem; min-width: 0; }
}

/* ==========================================================================
   5. Hero – affiche parc national
   ========================================================================== */
.hero {
	position: relative; overflow: hidden; isolation: isolate;
	background: linear-gradient(180deg, #E9B456 0%, #E58E3F 38%, #C55A2B 62%, #8C3F25 100%);
	color: var(--cream); text-align: center;
	padding: clamp(3rem, 9vw, 7rem) 0 clamp(11rem, 22vw, 16rem);
	border-bottom: 6px solid var(--bark);
}
.hero::before { /* soleil */
	content: ""; position: absolute; z-index: -1; left: 50%; bottom: 22%;
	width: clamp(220px, 38vw, 420px); aspect-ratio: 1; border-radius: 50%;
	transform: translateX(-50%);
	background: repeating-radial-gradient(circle, #F6D27A 0 14px, #F0BE5A 14px 28px);
	box-shadow: 0 0 0 10px rgba(246,210,122,.25);
}
.hero__ridge { position: absolute; left: 0; right: 0; bottom: -2px; width: 100%; z-index: -1; display: block; }
.hero__kicker {
	font-family: var(--font-type); letter-spacing: .3em; text-transform: uppercase;
	color: var(--cream); font-size: .95rem; margin-bottom: 1rem;
}
.hero h1 {
	color: var(--cream); text-shadow: 4px 4px 0 var(--bark);
	margin-bottom: .3em;
}
.hero__lead {
	font-size: 1.4rem; max-width: 40ch; margin: 0 auto 2rem;
	text-shadow: 2px 2px 0 rgba(43,33,26,.5);
}
.hero__actions { display: flex; gap: 1rem; justify-content: center; flex-wrap: wrap; }
.hero .btn--ghost { background: transparent; color: var(--cream); box-shadow: 4px 4px 0 var(--bark); }
.hero .btn--ghost:hover { background: var(--cream); color: var(--ink); }

/* ==========================================================================
   6. Sections
   ========================================================================== */
.section { padding-block: clamp(3rem, 7vw, 5.5rem); }
.section--paper { background: var(--paper); border-block: 4px double var(--bark); }
.section--pine { background: var(--pine); color: var(--cream); border-block: 5px solid var(--bark); }
.section--pine h2, .section--pine h3 { color: var(--mustard); }

.section__head { text-align: center; margin-bottom: 2.5rem; }
.section__eyebrow {
	font-family: var(--font-type); color: var(--rust); letter-spacing: .25em;
	text-transform: uppercase; font-size: .9rem; margin-bottom: .4rem;
}
.section--pine .section__eyebrow { color: var(--cream); opacity: .85; }

.grid { display: grid; gap: 1.75rem; }
.grid--3 { grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); }
.grid--2 { grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); }

/* Cartes « plaque émaillée » */
.card {
	background: var(--cream); color: var(--ink);
	border: var(--border); border-radius: var(--radius);
	box-shadow: var(--shadow); padding: 1.6rem;
	position: relative;
}
.card::after { /* rivets */
	content: ""; position: absolute; inset: 8px; border: 1px dashed rgba(74,51,38,.45);
	border-radius: 2px; pointer-events: none;
}
.card h3 { margin-top: 0; }
.card--rust { background: var(--rust); color: var(--cream); }
.card--rust h3 { color: var(--mustard); }
.card--teal { background: var(--teal); color: var(--cream); }
.card--teal h3 { color: var(--cream); }

/* Compétitions */
.events { list-style: none; margin: 0; padding: 0; }
.events li {
	display: flex; gap: 1rem; align-items: center;
	padding: .8rem 0; border-bottom: 2px dotted var(--bark);
}
.events li:last-child { border-bottom: 0; }
.event-date {
	flex: 0 0 auto; min-width: 74px; text-align: center;
	background: var(--pine); color: var(--cream);
	border: 3px solid var(--bark); border-radius: var(--radius);
	font-family: var(--font-head); text-transform: uppercase; line-height: 1.05;
	padding: .35rem .4rem;
}
.event-date strong { display: block; font-family: var(--font-display); font-weight: 400; font-size: 1.7rem; color: var(--mustard); }
.event-date span { font-size: .75rem; letter-spacing: .1em; }
.event-title { font-family: var(--font-head); text-transform: uppercase; letter-spacing: .05em; font-size: 1.1rem; margin: 0; }
.event-meta { font-size: .95rem; opacity: .8; }

.link-list { list-style: none; padding: 0; margin: 1rem 0 0; display: flex; flex-wrap: wrap; gap: .6rem; }

/* Chiffres */
.stats { display: grid; gap: 1.5rem; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); }
.stat {
	text-align: center; padding: 1.5rem 1rem;
	border: 3px solid var(--mustard); border-radius: var(--radius);
	outline: 2px solid var(--cream); outline-offset: -10px;
}
.stat__num { font-family: var(--font-display); font-size: clamp(2.8rem, 6vw, 4.2rem); color: var(--mustard); line-height: 1; }
.stat__label { font-family: var(--font-head); text-transform: uppercase; letter-spacing: .12em; margin-top: .4rem; }
.stat__detail { font-size: 1rem; opacity: .9; margin-top: .3rem; }

.facts { list-style: none; padding: 0; margin: 0; }
.facts li { padding: .45rem 0 .45rem 1.8rem; position: relative; }
.facts li::before { content: "★"; position: absolute; left: 0; color: var(--rust); }
.section--pine .facts li::before { color: var(--mustard); }

/* Mot du président */
.president { display: grid; gap: 2rem; grid-template-columns: 1fr; align-items: start; }
@media (min-width: 800px) { .president { grid-template-columns: 220px 1fr; } }
.president__quote {
	font-size: 1.3rem; position: relative; padding-left: 1.2rem;
	border-left: 6px solid var(--mustard);
}

/* Galerie */
.gallery-grid { display: grid; gap: 1rem; grid-template-columns: repeat(auto-fill, minmax(230px, 1fr)); }
.gallery-grid figure {
	margin: 0; background: #fff; padding: .6rem .6rem 1.6rem;
	border: 2px solid var(--bark); box-shadow: var(--shadow);
	transform: rotate(-1.2deg); transition: transform .2s ease;
}
.gallery-grid figure:nth-child(even) { transform: rotate(1.4deg); }
.gallery-grid figure:hover { transform: rotate(0) scale(1.03); }
.gallery-grid img { width: 100%; aspect-ratio: 4/3; object-fit: cover; filter: sepia(.25) saturate(.9) contrast(1.05); }
.gallery-grid figcaption { font-family: var(--font-type); font-size: .85rem; text-align: center; margin-top: .6rem; }
.gallery-placeholder {
	aspect-ratio: 4/3; display: grid; place-items: center; text-align: center;
	background: repeating-linear-gradient(45deg, var(--paper) 0 12px, var(--cream) 12px 24px);
	color: var(--bark); font-family: var(--font-type); font-size: .9rem; padding: 1rem;
}

/* ==========================================================================
   7. Actualités / articles
   ========================================================================== */
.post-card { display: flex; flex-direction: column; padding: 0; overflow: hidden; }
.post-card__thumb { border-bottom: var(--border); background: var(--paper); aspect-ratio: 16/10; overflow: hidden; }
.post-card__thumb img { width: 100%; height: 100%; object-fit: cover; filter: sepia(.2); }
.post-card__body { padding: 1.3rem 1.5rem 1.6rem; position: relative; z-index: 1; }
.post-card h3 { font-size: 1.25rem; margin-bottom: .4rem; }
.post-card h3 a { color: var(--pine-dark); text-decoration: none; }
.post-card h3 a:hover { color: var(--rust); }
.post-meta { font-family: var(--font-type); font-size: .85rem; color: var(--rust); text-transform: uppercase; letter-spacing: .1em; margin-bottom: .6rem; }

.page-hero {
	background: var(--pine); color: var(--cream); text-align: center;
	padding: 3.5rem 0 3rem; border-bottom: 6px solid var(--mustard);
	background-image: repeating-linear-gradient(90deg, rgba(0,0,0,.08) 0 2px, transparent 2px 22px);
}
.page-hero h1 { color: var(--cream); text-shadow: 3px 3px 0 var(--bark); margin: 0; }
.page-hero .post-meta { color: var(--mustard); }

.entry { padding-block: 3rem 4rem; }
.entry__content { max-width: 760px; margin-inline: auto; }
.entry__content > * + * { margin-top: 1.1em; }
.entry__content h2, .entry__content h3 { margin-top: 1.6em; }
.entry__content blockquote {
	margin-inline: 0; padding: 1rem 1.5rem; background: var(--paper);
	border-left: 6px solid var(--rust); font-style: italic;
}
.entry__content ul, .entry__content ol { padding-left: 1.4em; }
.entry__content table { width: 100%; border-collapse: collapse; border: var(--border); background: var(--cream); }
.entry__content th { background: var(--pine); color: var(--cream); font-family: var(--font-head); text-transform: uppercase; letter-spacing: .08em; }
.entry__content th, .entry__content td { padding: .6rem .8rem; border: 2px solid var(--bark); text-align: left; }
.entry__content img { border: 3px solid var(--bark); box-shadow: var(--shadow); }
.entry__content .wp-block-gallery { gap: 1rem; }
.entry__content a[href$=".pdf"]::before { content: "▤ "; }
.wp-caption-text, figcaption { font-family: var(--font-type); font-size: .85rem; }
.alignwide { width: min(100vw - 2.5rem, 1000px); margin-inline: calc(50% - min(50vw - 1.25rem, 500px)); max-width: none; }
.alignfull { width: 100vw; margin-inline: calc(50% - 50vw); max-width: none; }

.pagination { display: flex; gap: .5rem; justify-content: center; margin-top: 3rem; flex-wrap: wrap; }
.pagination .page-numbers {
	font-family: var(--font-head); padding: .4rem .9rem; border: 3px solid var(--bark);
	background: var(--cream); color: var(--ink); text-decoration: none; border-radius: var(--radius);
}
.pagination .current, .pagination a.page-numbers:hover { background: var(--mustard); }

/* ==========================================================================
   8. Formulaires
   ========================================================================== */
label { display: block; font-family: var(--font-head); text-transform: uppercase; letter-spacing: .1em; font-size: .9rem; margin-bottom: .3rem; }
input[type="text"], input[type="email"], input[type="tel"], input[type="url"], input[type="search"], textarea, select {
	width: 100%; font: inherit; color: var(--ink);
	background: #FBF4DF; border: 3px solid var(--bark); border-radius: var(--radius);
	padding: .7rem .9rem; margin-bottom: 1.1rem;
}
input:focus, textarea:focus, select:focus { outline: 3px solid var(--mustard); outline-offset: 2px; }
textarea { min-height: 150px; resize: vertical; }

.contact-box { display: grid; gap: 2.5rem; grid-template-columns: 1fr; }
@media (min-width: 860px) { .contact-box { grid-template-columns: 1fr 1.3fr; } }
.contact-note { font-family: var(--font-type); font-size: .9rem; }
.notice { padding: .9rem 1.2rem; border: 3px solid var(--bark); border-radius: var(--radius); margin-bottom: 1.2rem; font-family: var(--font-head); letter-spacing: .04em; }
.notice--ok { background: #CFE0B8; }
.notice--err { background: #F0C0A8; }
.hp-field { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }

/* Commentaires */
.comments-area { max-width: 760px; margin: 3rem auto 0; }
.comment-list { list-style: none; padding: 0; }
.comment-body { background: var(--paper); border: 3px solid var(--bark); padding: 1rem 1.3rem; margin-bottom: 1rem; border-radius: var(--radius); }
.comment-list .children { list-style: none; padding-left: 1.5rem; }

/* Widgets / recherche */
.search-form { display: flex; gap: .6rem; }
.search-form input[type="search"] { margin: 0; }

/* ==========================================================================
   9. Pied de page
   ========================================================================== */
.site-footer {
	background: var(--bark); color: var(--cream);
	border-top: 6px solid var(--mustard); padding-top: 3rem; position: relative;
}
.site-footer::before { /* frise de sapins */
	content: ""; position: absolute; left: 0; right: 0; top: -38px; height: 32px;
	background:
		linear-gradient(135deg, transparent 50%, var(--bark) 50%) 0 0 / 28px 32px repeat-x,
		linear-gradient(225deg, transparent 50%, var(--bark) 50%) 14px 0 / 28px 32px repeat-x;
	-webkit-mask: none; mask: none; pointer-events: none;
}
.site-footer h3 { color: var(--mustard); font-size: 1.1rem; }
.site-footer a { color: var(--cream); }
.site-footer a:hover { color: var(--mustard); }
.footer-grid { display: grid; gap: 2rem; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); padding-bottom: 2.5rem; }
.footer-menu { list-style: none; margin: 0; padding: 0; }
.footer-menu li { padding: .15rem 0; }
.site-info {
	border-top: 2px dashed rgba(244,232,203,.4); padding-block: 1.2rem;
	font-family: var(--font-type); font-size: .85rem; text-align: center;
}

/* ==========================================================================
   10. Accessibilité & impression
   ========================================================================== */
@media (prefers-reduced-motion: reduce) {
	html { scroll-behavior: auto; }
	* { transition: none !important; }
}
@media print {
	.site-header, .site-footer, .hero__ridge, .nav-toggle { display: none; }
	body { background: #fff; }
}
