/*
Theme Name: Marathon de Chambéry
Author: RunMotion
Description: Thème léger du site marathon-chambery.com (remplace Divi).
Version: 1.0.0
Requires at least: 6.0
Requires PHP: 8.0
Text Domain: marathon-chambery
*/

:root {
	--accent: #33b9ea;
	--accent-dark: #1683ad;
	--ink: #14181c;
	--text: #3d454c;
	--muted: #6c757d;
	--line: #e4e8eb;
	--bg-alt: #f5f7f8;
	--radius: 14px;
	--wrap: 1120px;
	--header-h: 76px;
}

*, *::before, *::after { box-sizing: border-box; }

html { -webkit-text-size-adjust: 100%; }

body {
	margin: 0;
	background: #fff;
	color: var(--text);
	font: 400 17px/1.7 system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
	-webkit-font-smoothing: antialiased;
}

img { max-width: 100%; height: auto; }

a { color: var(--accent-dark); text-underline-offset: 3px; }
a:hover { color: var(--ink); }

h1, h2, h3 { color: var(--ink); line-height: 1.2; margin: 0 0 .6em; font-weight: 700; letter-spacing: -.01em; }
p { margin: 0 0 1em; }

.wrap { width: 100%; max-width: var(--wrap); margin: 0 auto; padding: 0 24px; }

.skip-link { position: absolute; left: -9999px; }
.skip-link:focus { left: 16px; top: 16px; z-index: 100; background: #fff; padding: 8px 14px; border-radius: 8px; }

/* En-tête */
.site-header { position: sticky; top: 0; z-index: 50; background: rgba(255, 255, 255, .94); backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px); border-bottom: 1px solid var(--line); }
.site-header .wrap { display: flex; align-items: center; justify-content: space-between; gap: 24px; min-height: var(--header-h); }
.brand img { display: block; height: 44px; width: auto; }
.site-nav { display: flex; gap: 26px; }
.site-nav a { color: var(--text); font-size: 15px; font-weight: 500; text-decoration: none; white-space: nowrap; padding: 6px 0; border-bottom: 2px solid transparent; }
.site-nav a:hover, .site-nav a[aria-current="page"] { color: var(--ink); border-bottom-color: var(--accent); }

/* Accueil */
.hero { position: relative; min-height: min(72vh, 640px); display: flex; align-items: center; justify-content: center; text-align: center; color: #fff; overflow: hidden; background: #000; }
.hero__img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.hero::after { content: ""; position: absolute; inset: 0; background: rgba(0, 0, 0, .45); }
.hero .wrap { position: relative; z-index: 1; padding-top: 80px; padding-bottom: 80px; }
.hero h1 { color: #fff; font-size: clamp(36px, 6vw, 68px); font-weight: 800; margin-bottom: 14px; }
.hero p { font-size: clamp(18px, 2.2vw, 22px); margin: 0; color: rgba(255, 255, 255, .92); }


.section { padding: 88px 0; text-align: center; }
.section--alt { background: var(--bg-alt); }
.section h2 { font-size: clamp(26px, 3.4vw, 34px); letter-spacing: .02em; }
.section .lead { max-width: 640px; margin: 0 auto; }
.lead strong { color: var(--ink); }

.button { display: inline-block; margin-top: 24px; padding: 14px 26px; border-radius: 999px; background: var(--accent); color: #fff; font-weight: 600; font-size: 15px; letter-spacing: .02em; text-decoration: none; }
.button:hover { background: var(--accent-dark); color: #fff; }


/* Pages */
.page-header { background: var(--bg-alt); border-bottom: 1px solid var(--line); padding: 56px 0 40px; }
.page-header h1 { font-size: clamp(32px, 5vw, 46px); margin: 0; }
.entry { max-width: 800px; margin: 0 auto; padding: 48px 24px 96px; }
.entry h2 { font-size: 26px; margin-top: 1.8em; }
.entry h3 { font-size: 20px; margin-top: 1.5em; }
.entry > :first-child { margin-top: 0; }
.entry figure { margin: 1.5em 0; }
.entry img { border-radius: 10px; }
.entry iframe { max-width: 100%; }
.entry .wp-block-table { overflow-x: auto; }
.entry table { width: 100%; border-collapse: collapse; font-size: 15px; }
.entry td, .entry th { border: 1px solid var(--line); padding: 10px 12px; text-align: left; }
.entry tr:first-child td { background: var(--bg-alt); font-weight: 600; color: var(--ink); }
.entry hr { border: 0; border-top: 1px solid var(--line); margin: 3em 0; }
.entry ul { padding-left: 22px; }

/* Pied de page */
.site-footer { background: #1b2126; color: rgba(255, 255, 255, .72); font-size: 15px; }
.site-footer a { color: #fff; }
.footer-main { padding: 56px 0 40px; }
.footer-title { color: var(--accent); font-weight: 600; margin-bottom: 8px; }
.footer-main img { display: block; margin-top: 16px; width: 200px; height: auto; }
.footer-bottom { border-top: 1px solid rgba(255, 255, 255, .1); }
.footer-bottom .wrap { display: flex; align-items: center; justify-content: space-between; gap: 16px; min-height: 64px; }
.footer-bottom a { font-size: 14px; }
.social { display: flex; gap: 14px; }
.social a { display: grid; place-items: center; width: 36px; height: 36px; border-radius: 50%; background: rgba(255, 255, 255, .1); }
.social a:hover { background: var(--accent); }
.social svg { width: 18px; height: 18px; fill: #fff; }

:focus-visible { outline: 3px solid var(--accent); outline-offset: 2px; }

@media (max-width: 720px) {
	:root { --header-h: auto; }
	body { font-size: 16px; }
	.wrap { padding: 0 16px; }
	.site-header .wrap { flex-direction: column; align-items: flex-start; gap: 6px; padding-top: 12px; padding-bottom: 8px; }
	.brand img { height: 38px; }
	.site-nav { gap: 2px 18px; width: 100%; flex-wrap: wrap; }
	.site-nav a { font-size: 14px; }
	.hero { min-height: 460px; }
	.section { padding: 64px 0; }
	.page-header { padding: 40px 0 28px; }
	.entry { padding: 36px 16px 64px; }
}
