/* ==========================================================================
   Sport & Handicap 13 — AS CND
   Palette : bleu roi / doré / vert émeraude — sobre, moderne
   ========================================================================== */

:root {
	--sh13-navy: #1E48B8;      /* bleu roi vif — titres, liens, nav */
	--sh13-navy-dark: #0B1F4D; /* bleu nuit profond — pied de page, barre contact */
	--sh13-orange: #9C6F0B;    /* doré foncé — boutons CTA (contraste garanti) */
	--sh13-green: #1E7A45;     /* vert émeraude — accents, bordures, badges */
	--sh13-gold: #D4AF37;      /* doré clair — accents décoratifs (jamais en texte) */
	--sh13-grey: #C7CDD9;      /* gris bleuté doux — bordures */
	--sh13-grey-light: #F4F6FA; /* gris très clair — fonds de section */
	--sh13-text: #1F2937;
	--sh13-white: #FFFFFF;

	--sh13-font-body: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
	--sh13-font-size-base: 18px;
	--sh13-radius: 12px;
	--sh13-max-width: 1160px;
}

/* -------------------------------------------------------------------------
   Reset / base — la base de police est volontairement plus grande que la
   norme (18px) car une partie du public a une acuité visuelle réduite.
   ------------------------------------------------------------------------- */
*, *::before, *::after { box-sizing: border-box; }

html { font-size: var(--sh13-font-size-base); scroll-behavior: smooth; }

body {
	margin: 0;
	font-family: var(--sh13-font-body);
	color: var(--sh13-text);
	background: var(--sh13-white);
	line-height: 1.6;
}

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

a { color: var(--sh13-navy); text-decoration-thickness: 2px; }
a:hover { color: var(--sh13-orange); }

h1, h2, h3, h4 { line-height: 1.2; color: var(--sh13-navy); margin-top: 0; }
h1 { font-size: 2.4rem; }
h2 { font-size: 1.8rem; }
h3 { font-size: 1.3rem; }

.container {
	max-width: var(--sh13-max-width);
	margin: 0 auto;
	padding: 0 24px;
}

/* -------------------------------------------------------------------------
   Accessibilité : focus visible renforcé, lien d'évitement
   ------------------------------------------------------------------------- */
a:focus-visible,
button:focus-visible,
input:focus-visible,
textarea:focus-visible {
	outline: 3px solid var(--sh13-orange);
	outline-offset: 2px;
}

.skip-link {
	position: absolute;
	left: -9999px;
	top: 0;
	background: var(--sh13-navy);
	color: #fff;
	padding: 12px 20px;
	z-index: 1000;
	border-radius: 0 0 8px 0;
}
.skip-link:focus {
	left: 0;
}

.screen-reader-text {
	position: absolute;
	width: 1px; height: 1px;
	overflow: hidden;
	clip: rect(1px, 1px, 1px, 1px);
	white-space: nowrap;
}

/* Mode contraste élevé (activé en JS via classe sur <html>) */
html.sh13-high-contrast {
	background: #000;
}
html.sh13-high-contrast body {
	background: #000;
	color: #FFF;
}
html.sh13-high-contrast a { color: #FFD166; }
html.sh13-high-contrast .site-header,
html.sh13-high-contrast .site-footer,
html.sh13-high-contrast .hero,
html.sh13-high-contrast .post-card,
html.sh13-high-contrast .content-block {
	background: #000 !important;
	border: 2px solid #FFF !important;
}
html.sh13-high-contrast h1,
html.sh13-high-contrast h2,
html.sh13-high-contrast h3 { color: #FFD166 !important; }

/* -------------------------------------------------------------------------
   Barre de contact (+ logo)
   ------------------------------------------------------------------------- */
.top-contact-bar {
	background: var(--sh13-navy-dark);
	color: #fff;
	font-size: 0.9rem;
}
.top-contact-inner {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 24px;
	padding: 8px 24px;
	flex-wrap: wrap;
}
.top-branding { flex-shrink: 0; }
.top-branding img { max-height: 76px; width: auto; display: block; }
.top-contact-links {
	display: flex;
	align-items: center;
	gap: 24px;
	flex-wrap: wrap;
}
.top-contact-inner a { color: #E8F1F5; text-decoration: none; }
.top-contact-inner a:hover { color: var(--sh13-gold); }
.top-contact-cta {
	background: var(--sh13-gold);
	color: var(--sh13-navy-dark) !important;
	font-weight: 700;
	padding: 4px 14px;
	border-radius: 999px;
}
.top-contact-cta:hover { background: #fff; }
.site-title-link {
	font-weight: 700;
	font-size: 1.3rem;
	color: #fff;
	text-decoration: none;
}
.site-title-link:hover { color: var(--sh13-gold); }

/* -------------------------------------------------------------------------
   En-tête
   ------------------------------------------------------------------------- */
.site-header {
	background: var(--sh13-white);
	border-bottom: 4px solid var(--sh13-navy);
	position: sticky;
	top: 0;
	z-index: 100;
}
.header-inner {
	display: flex;
	align-items: center;
	justify-content: center;
	flex-wrap: nowrap;
	gap: 16px;
	padding-top: 10px;
	padding-bottom: 10px;
}

.primary-navigation {
	flex: 1 1 auto;
	min-width: 0;
}
.primary-navigation > ul {
	list-style: none;
	display: flex;
	gap: 28px;
	margin: 0;
	padding: 0 4px;
	flex-wrap: wrap;
	row-gap: 4px;
}
.primary-navigation li {
	position: relative;
}
.primary-navigation a {
	text-decoration: none;
	font-weight: 600;
	color: var(--sh13-text);
	padding: 8px 4px;
	display: inline-block;
}
.primary-navigation a:hover { color: var(--sh13-orange); }

/* Indicateur visuel pour les items qui ont un sous-menu */
.primary-navigation .menu-item-has-children > a::after {
	content: "▾";
	display: inline-block;
	margin-left: 5px;
	font-size: 0.7em;
	vertical-align: middle;
}

/* Sous-menus en menu déroulant, cachés par défaut */
.primary-navigation .sub-menu {
	list-style: none;
	margin: 0;
	padding: 8px 0;
	position: absolute;
	top: 100%;
	left: 0;
	background: var(--sh13-white);
	border: 1px solid #E7E9EE;
	border-radius: 10px;
	box-shadow: 0 12px 28px rgba(11,31,77,0.14);
	min-width: 210px;
	z-index: 300;
	display: none;
	flex-direction: column;
	gap: 0;
}
.primary-navigation .menu-item-has-children:hover > .sub-menu,
.primary-navigation .menu-item-has-children:focus-within > .sub-menu {
	display: flex;
}
.primary-navigation .sub-menu a {
	display: block;
	padding: 10px 18px;
	white-space: nowrap;
	color: var(--sh13-text);
}
.primary-navigation .sub-menu a:hover {
	background: var(--sh13-grey-light);
	color: var(--sh13-orange);
}

.menu-toggle {
	display: none;
	background: none;
	border: 2px solid var(--sh13-navy);
	border-radius: 8px;
	padding: 8px 12px;
	cursor: pointer;
	flex-shrink: 0;
}

.accessibility-bar {
	border-top: 1px solid #EEF0F4;
	padding: 8px 0;
}
.accessibility-tools {
	display: flex;
	gap: 6px;
	align-items: center;
	justify-content: flex-start;
}
.accessibility-tools button {
	background: var(--sh13-grey-light);
	border: 2px solid var(--sh13-grey);
	border-radius: 8px;
	padding: 5px 9px;
	font-size: 0.85rem;
	font-weight: 700;
	cursor: pointer;
	color: var(--sh13-navy);
}
.accessibility-tools button:hover { border-color: var(--sh13-orange); }
.accessibility-tools button[aria-pressed="true"] {
	background: var(--sh13-navy);
	color: #fff;
	border-color: var(--sh13-navy);
}

/* -------------------------------------------------------------------------
   Hero
   ------------------------------------------------------------------------- */
.hero {
	background: linear-gradient(rgba(10,58,82,0.72), rgba(10,58,82,0.55)), url('../images/vieux-port-hero.jpg');
	background-size: cover;
	background-position: center 65%;
	padding: 64px 0 96px;
	position: relative;
	overflow: hidden;
}
.hero .hero-eyebrow,
.hero h1,
.hero .hero-lead {
	color: #fff;
}
.hero .hero-eyebrow { color: var(--sh13-gold); }
.hero::after {
	content: "";
	position: absolute;
	left: 0; right: 0; bottom: -1px;
	height: 48px;
	background: var(--sh13-white);
	clip-path: polygon(0 100%, 0 40%, 8% 55%, 16% 35%, 24% 58%, 32% 30%, 40% 55%, 48% 25%, 56% 52%, 64% 32%, 72% 58%, 80% 28%, 88% 54%, 96% 34%, 100% 50%, 100% 100%);
}
.hero-inner {
	max-width: 700px;
}
.hero-eyebrow {
	text-transform: uppercase;
	letter-spacing: 1.5px;
	font-weight: 700;
	color: var(--sh13-orange);
	margin-bottom: 8px;
}
.hero-lead { font-size: 1.15rem; }
.hero-actions { display: flex; gap: 16px; flex-wrap: wrap; margin-top: 24px; }
.hero-visual svg { width: 100%; height: auto; }

/* -------------------------------------------------------------------------
   Boutons
   ------------------------------------------------------------------------- */
.btn {
	display: inline-block;
	padding: 14px 28px;
	border-radius: 999px;
	font-weight: 700;
	text-decoration: none;
	border: 2px solid transparent;
	cursor: pointer;
	font-size: 1rem;
}
.btn-primary { background: var(--sh13-orange); color: #fff; }
.btn-primary:hover { background: #A83D0B; color: #fff; }
.btn-secondary { background: transparent; color: var(--sh13-navy); border-color: var(--sh13-navy); }
.btn-secondary:hover { background: var(--sh13-navy); color: #fff; }
.btn-light { background: rgba(255,255,255,0.15); color: #fff; border-color: #fff; backdrop-filter: blur(2px); }
.btn-light:hover { background: #fff; color: var(--sh13-navy); }

/* -------------------------------------------------------------------------
   Sections génériques
   ------------------------------------------------------------------------- */
.section { padding: 56px 0; }
.section-heading {
	display: flex;
	justify-content: space-between;
	align-items: baseline;
	flex-wrap: wrap;
	gap: 12px;
	margin-bottom: 32px;
}

.intro-grid, .content-grid {
	display: grid;
	grid-template-columns: repeat(3, 1fr);
	gap: 28px;
}
.content-grid { grid-template-columns: repeat(2, 1fr); margin-top: 40px; }

.intro-card, .content-block {
	background: var(--sh13-grey-light);
	border-radius: var(--sh13-radius);
	padding: 28px;
	border-top: 4px solid var(--sh13-green);
}
.intro-card:nth-child(2) { border-top-color: var(--sh13-orange); }
.intro-card:nth-child(3) { border-top-color: var(--sh13-navy); }

.content-note { color: #666; }

.content-figure {
	margin: 40px 0;
	text-align: center;
}
.content-figure img {
	max-width: 420px;
	border: 1px solid #E4E4EA;
	border-radius: var(--sh13-radius);
	padding: 12px;
	background: #fff;
}
.content-figure figcaption {
	margin-top: 10px;
	color: #666;
	font-size: 0.9rem;
}

/* -------------------------------------------------------------------------
   Cartes d'articles
   ------------------------------------------------------------------------- */
.post-list-grid {
	display: grid;
	grid-template-columns: repeat(3, 1fr);
	gap: 24px;
}
.post-card {
	background: var(--sh13-white);
	border: 1px solid #E4E4EA;
	border-radius: var(--sh13-radius);
	overflow: hidden;
}
.post-card-thumb img { aspect-ratio: 16/10; object-fit: cover; }
.post-card-body { padding: 18px; }
.post-card-title { font-size: 1.15rem; margin: 0 0 6px; }
.post-card-title a { text-decoration: none; }
.post-card-meta { color: #777; font-size: 0.9rem; margin: 0 0 8px; }

/* -------------------------------------------------------------------------
   Chiffres clés
   ------------------------------------------------------------------------- */
.section-stats { padding-top: 40px; padding-bottom: 8px; }
.stats-grid {
	display: grid;
	grid-template-columns: repeat(3, 1fr);
	gap: 24px;
	text-align: center;
}
.stat-item {
	display: flex;
	flex-direction: column;
	gap: 6px;
	padding: 20px;
	border-radius: var(--sh13-radius);
	background: var(--sh13-grey-light);
}
.stat-number {
	font-size: 2.4rem;
	font-weight: 800;
	color: var(--sh13-orange);
}
.stat-label { color: var(--sh13-navy); font-weight: 600; }

/* -------------------------------------------------------------------------
   CTA
   ------------------------------------------------------------------------- */
.section-cta { background: var(--sh13-navy); color: #fff; text-align: center; }
.section-cta h2, .section-cta p { color: #fff; }
.cta-inner { max-width: 640px; margin: 0 auto; }

/* -------------------------------------------------------------------------
   Pages génériques / fil d'ariane
   ------------------------------------------------------------------------- */
.breadcrumb { margin: 24px 0; color: #666; font-size: 0.95rem; }
.page-header { margin: 32px 0 24px; }
.page-body { max-width: 760px; }
.page-body-wide { max-width: 900px; }

/* -------------------------------------------------------------------------
   Tableaux d'horaires (page-body)
   ------------------------------------------------------------------------- */
.sh13-table {
	width: 100%;
	border-collapse: collapse;
	margin: 20px 0 32px;
	font-size: 0.95rem;
}
.sh13-table th, .sh13-table td {
	text-align: left;
	padding: 12px 14px;
	border-bottom: 1px solid var(--sh13-grey);
	vertical-align: top;
}
.sh13-table thead th {
	background: var(--sh13-navy);
	color: #fff;
	font-weight: 700;
}
.sh13-table tbody tr:nth-child(even) { background: var(--sh13-grey-light); }

/* -------------------------------------------------------------------------
   Encart tarif
   ------------------------------------------------------------------------- */
.price-box {
	display: flex;
	flex-wrap: wrap;
	align-items: baseline;
	gap: 12px 20px;
	background: var(--sh13-grey-light);
	border-left: 6px solid var(--sh13-green);
	border-radius: var(--sh13-radius);
	padding: 20px 24px;
	margin: 24px 0;
}
.price-box .price-amount {
	font-size: 2rem;
	font-weight: 800;
	color: var(--sh13-green);
}
.price-box .price-label {
	font-weight: 600;
	color: var(--sh13-navy);
}
.price-box .price-note {
	flex-basis: 100%;
	margin: 0;
	color: #555;
	font-size: 0.9rem;
}

.content-divider {
	border: none;
	border-top: 2px solid var(--sh13-grey);
	margin: 48px 0;
}
.content-download { margin: 20px 0 36px; }

/* -------------------------------------------------------------------------
   Formulaire de contact
   ------------------------------------------------------------------------- */
.contact-form { display: flex; flex-direction: column; gap: 18px; max-width: 480px; }
.form-field { display: flex; flex-direction: column; gap: 6px; }
.form-field label { font-weight: 700; }
.form-field input, .form-field textarea {
	padding: 12px 14px;
	border: 2px solid var(--sh13-grey);
	border-radius: 8px;
	font-size: 1rem;
	font-family: inherit;
}
.form-field input:focus, .form-field textarea:focus { border-color: var(--sh13-navy); }
.form-field-honeypot { position: absolute; left: -9999px; }
.form-success { background: #E9F7E1; border: 2px solid #3A8B4C; padding: 14px; border-radius: 8px; }
.form-error { background: #FDECE4; border: 2px solid var(--sh13-orange); padding: 14px; border-radius: 8px; }

/* -------------------------------------------------------------------------
   Pied de page
   ------------------------------------------------------------------------- */
.site-footer { background: var(--sh13-navy); color: #fff; margin-top: 64px; }
.footer-inner {
	display: flex;
	flex-wrap: wrap;
	gap: 32px;
	padding: 48px 0 32px;
}
.footer-inner .footer-col { flex: 1 1 200px; }
.footer-inner .footer-about { flex: 1.6 1 280px; }
.footer-inner-4 .footer-col:last-child { flex: 1.2 1 220px; }
.footer-club-name { font-weight: 700; font-size: 1.2rem; margin-bottom: 8px; }
.footer-tagline { color: #D6D6E6; }
.footer-nav ul { list-style: none; padding: 0; margin: 0; display: flex; flex-direction: column; gap: 10px; }
.footer-nav a { color: #fff; text-decoration: none; }
.footer-nav a:hover { color: var(--sh13-orange); }
.footer-widget-title { color: #fff; font-size: 1.05rem; margin: 0 0 14px; }
.footer-links { list-style: none; padding: 0; margin: 0; display: flex; flex-direction: column; gap: 10px; }
.footer-links a { color: #fff; text-decoration: none; }
.footer-links a:hover { color: var(--sh13-gold); }
.footer-contact-info { color: #D6D6E6; line-height: 1.7; margin: 0 0 16px; }
.footer-contact-info a { color: #fff; text-decoration: none; }
.footer-contact-info a:hover { color: var(--sh13-gold); }
.footer-cta { font-size: 0.9rem; padding: 10px 20px; }
.footer-extra {
	border-top: 1px solid rgba(255,255,255,0.15);
	padding: 24px 0;
}

/* Widgets déposés dans la zone secondaire du footer (ex : recherche) */
.footer-extra .widget-title,
.footer-extra .wp-block-search__label,
.footer-extra .search-form label {
	display: block;
	color: #fff;
	font-weight: 700;
	font-size: 1rem;
	margin: 0 0 10px;
}
.footer-extra .wp-block-search,
.footer-extra .search-form {
	max-width: 420px;
}
.footer-extra .wp-block-search__inside-wrapper,
.footer-extra .search-form {
	display: flex;
	border-radius: 8px;
	overflow: hidden;
}
.footer-extra input[type="search"],
.footer-extra .wp-block-search__input,
.footer-extra .search-field {
	flex: 1 1 auto;
	min-width: 0;
	padding: 12px 14px;
	border: none;
	border-radius: 8px 0 0 8px;
	font-size: 1rem;
	font-family: inherit;
	color: var(--sh13-text) !important;
	background: #fff;
}
.footer-extra input[type="search"]::placeholder,
.footer-extra .wp-block-search__input::placeholder,
.footer-extra .search-field::placeholder {
	color: #6B7280;
}
.footer-extra button[type="submit"],
.footer-extra input[type="submit"],
.footer-extra .wp-block-search__button,
.footer-extra .search-submit {
	flex: 0 0 auto;
	padding: 12px 20px;
	border: none;
	border-radius: 0 8px 8px 0;
	background: var(--sh13-gold);
	color: var(--sh13-navy-dark);
	font-weight: 700;
	font-size: 0.95rem;
	cursor: pointer;
}
.footer-extra button[type="submit"]:hover,
.footer-extra input[type="submit"]:hover,
.footer-extra .wp-block-search__button:hover,
.footer-extra .search-submit:hover {
	background: #fff;
}
.footer-bottom {
	border-top: 1px solid rgba(255,255,255,0.15);
	padding: 16px 0;
	font-size: 0.85rem;
	color: #B9B9D3;
}
.footer-bottom-inner {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	justify-content: space-between;
	gap: 8px 24px;
}
.footer-bottom-inner p {
	margin: 0;
}
.footer-legal-links {
	display: flex;
	flex-wrap: wrap;
	gap: 4px 20px;
}
.footer-legal-links a {
	color: #B9B9D3;
	text-decoration: underline;
}
.footer-legal-links a:hover,
.footer-legal-links a:focus {
	color: #fff;
}

/* -------------------------------------------------------------------------
   Responsive
   ------------------------------------------------------------------------- */
@media (max-width: 900px) {
	.hero-inner { grid-template-columns: 1fr; }
	.intro-grid, .content-grid, .post-list-grid, .stats-grid { grid-template-columns: 1fr; }
	.footer-inner .footer-col { flex-basis: 100%; }
}

@media (max-width: 780px) {
	.menu-toggle { display: inline-flex; align-items: center; gap: 8px; }
	.primary-navigation > ul {
		display: none;
		flex-direction: column;
		gap: 4px;
		width: 100%;
		padding: 16px 0;
	}
	.primary-navigation.is-open > ul { display: flex; }
	.header-inner { flex-direction: column; align-items: stretch; }

	/* Sous-menus : liste statique indentée, pas de dropdown flottant (pas de survol au tactile) */
	.primary-navigation .sub-menu {
		display: flex;
		position: static;
		box-shadow: none;
		border: none;
		border-left: 3px solid var(--sh13-grey);
		border-radius: 0;
		margin: 4px 0 4px 16px;
		padding: 4px 0;
		min-width: 0;
	}
	.primary-navigation .menu-item-has-children > a::after {
		content: "";
	}
	.top-branding img { max-height: 56px; }
}

/* --- Carte (page Contact) --- */
.map-embed {
	border: 2px dashed var(--sh13-grey, #ccc);
	border-radius: 8px;
	padding: 32px 24px;
	text-align: center;
}
.map-embed iframe {
	display: block;
	border-radius: 8px;
}
.map-embed-note {
	margin: 12px 0 0;
	font-size: 0.9rem;
	color: #555;
}
