/* ==========================================================================
   Design system du site (DESIGN-SYSTEM-SITE-CCN.md) : typographie, sections,
   boutons, formulaires, cartes, étiquettes, accordéon, fil d'Ariane.
   Toutes les valeurs passent par les variables de style.css.
   ========================================================================== */

/* ---------- Page ---------- */

html body,
body.ast-separate-container,
body .site-content { background-color: var(--page); }
body { color: var(--text); font-size: 1rem; line-height: 1.5; -webkit-font-smoothing: antialiased; }
body :is(p, li) { text-wrap: pretty; }

/* ---------- Titres (casse normale, espacement négatif) ---------- */

body :is(h1, .ccn-h1), body .entry-content :is(h1, .ccn-h1) {
	font-size: clamp(2.25rem, 1.4rem + 3.6vw, 4rem);
	font-weight: 300;
	line-height: 1.25;
	letter-spacing: var(--title-tracking-h1);
	text-transform: var(--title-transform);
	color: var(--ink);
	text-wrap: balance;
	margin: 0 0 var(--s-5);
}
body :is(h2, .ccn-h2), body .entry-content :is(h2, .ccn-h2) {
	font-size: clamp(2rem, 1.3rem + 2.9vw, 3.375rem);
	font-weight: 300;
	line-height: 1.25;
	letter-spacing: var(--title-tracking-h2);
	text-transform: var(--title-transform);
	color: var(--ink);
	text-wrap: balance;
	margin: 0 0 var(--s-5);
}
body :is(h3, .ccn-h3), body .entry-content :is(h3, .ccn-h3) {
	font-size: clamp(1.75rem, 1.2rem + 2.3vw, 3rem);
	font-weight: 300;
	line-height: 1.25;
	letter-spacing: var(--title-tracking-h2);
	text-transform: var(--title-transform);
	color: var(--ink);
	text-wrap: balance;
	margin: 0 0 var(--s-4);
}
body :is(h4, .ccn-h4), body .entry-content :is(h4, .ccn-h4) {
	font-size: 1.375rem;
	font-weight: 500;
	line-height: 1.3;
	letter-spacing: 0;
	color: var(--ink);
	margin: 0 0 var(--s-3);
}
.ccn-eyebrow-ds { display: block; margin: 0 0 var(--s-3); font-size: 1rem; font-weight: 500; line-height: 1.5; color: var(--text-soft); }
.ccn-lead, body .entry-content .ccn-lead { font-size: 1.25rem; font-weight: 300; line-height: 1.5; color: var(--text); max-width: 640px; }
.ccn-small { font-size: .875rem; }
.ccn-label { display: inline-block; font-size: .8125rem; font-weight: 600; letter-spacing: .04em; text-transform: uppercase; line-height: 1; }
.titre-fort { font-weight: 700; }
.titre-fort em, .titre-fort .ccn-acc { font-style: normal; color: var(--accent); }
body .entry-content :is(p, ul:not(.products), ol) { max-width: 65ch; }
body .entry-content a:not(.ccn-b):not(.wp-block-button__link):not(.button):not(.ccn-card *):not(.ccn-lcard *):not(.ccn-contact-card):not(.ccn-contact-card *):not(.ccn-ex-t *) { color: var(--ink); text-decoration: underline; text-decoration-color: var(--accent); text-underline-offset: 3px; text-decoration-thickness: 1px; }
body .entry-content a:not(.ccn-b):not(.wp-block-button__link):not(.button):not(.ccn-card *):not(.ccn-lcard *):not(.ccn-contact-card):not(.ccn-contact-card *):not(.ccn-ex-t *):hover { text-decoration-thickness: 2px; }

/* ---------- Conteneurs et sections ---------- */

.ccn-wrap { width: 100%; max-width: calc(var(--content-max) + 2 * var(--gutter)); margin-inline: auto; padding-inline: var(--gutter); box-sizing: border-box; }
.ccn-wrap--wide { max-width: calc(var(--wide-max) + 2 * var(--gutter)); }
.ccn-band { padding-block: var(--sec-pad); padding-inline: max(var(--gutter), calc((100% - var(--content-max)) / 2)); background: var(--page); box-sizing: border-box; }
.ccn-band--alt { background: var(--surface); }
.ccn-band--dark { background: var(--ink); color: rgba(255, 255, 255, .8); }
.ccn-band--dark :is(h1, h2, h3, h4) { color: #fff; }
.ccn-stack > * + * { margin-top: var(--block-gap); }
.ccn-grid-3 { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: var(--grid-gap); }
@media (max-width: 1023px) { .ccn-grid-3 { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 639px) { .ccn-grid-3 { grid-template-columns: 1fr; } }

/* ---------- Boutons (48 px, rayon 6 px, 16 px / 500) ---------- */

.ccn-b,
html body :is(.wp-block-button__link, input[type="submit"], input[type="button"], .ast-button, .woocommerce a.button, .woocommerce button.button, .woocommerce input.button, .wc-block-components-button, .woocommerce-page a.button, .woocommerce-page button.button) {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	gap: 8px;
	min-height: 48px;
	min-width: 128px;
	padding: 12px 16px;
	border: 0;
	border-radius: var(--radius-btn);
	background: var(--ink);
	color: #fff;
	font-family: var(--font);
	font-size: 1rem;
	font-weight: 500;
	line-height: 1;
	letter-spacing: 0;
	text-transform: none;
	text-decoration: none;
	box-shadow: none;
	cursor: pointer;
	transition: background-color .15s var(--ease), color .15s var(--ease), border-color .15s var(--ease);
	box-sizing: border-box;
}
.ccn-b:hover,
html body :is(.wp-block-button__link, input[type="submit"], input[type="button"], .ast-button, .woocommerce a.button, .woocommerce button.button, .woocommerce input.button, .wc-block-components-button, .woocommerce-page a.button, .woocommerce-page button.button):hover { background: #2a2a2a; color: #fff; }
/* Principal en couleur d'accent (Réserver, Ajouter au panier) */
.ccn-b--acc,
html body :is(.woocommerce a.button.alt, .woocommerce button.button.alt, .single_add_to_cart_button, .checkout-button, .wc-block-components-checkout-place-order-button) { background: var(--accent); color: #fff; }
.ccn-b--acc:hover,
html body :is(.woocommerce a.button.alt, .woocommerce button.button.alt, .single_add_to_cart_button, .checkout-button, .wc-block-components-checkout-place-order-button):hover { background: var(--accent-hover); color: #fff; }
/* Secondaire : contour 1 px */
.ccn-b--sec,
html body .is-style-outline > .wp-block-button__link { background: transparent; color: var(--ink); box-shadow: inset 0 0 0 1px var(--line); }
.ccn-b--sec:hover,
html body .is-style-outline > .wp-block-button__link:hover { background: var(--surface); color: var(--ink); }
/* Clair (sur fond sombre ou photo) */
.ccn-b--light { background: #fff; color: var(--ink); }
.ccn-b--light:hover { background: var(--cream); color: var(--ink); }
.ccn-b--ghost { background: transparent; color: #fff; box-shadow: inset 0 0 0 1px rgba(255, 255, 255, .7); }
.ccn-b--ghost:hover { background: #fff; color: var(--ink); }
/* Discret (lien) */
.ccn-b--link { min-height: 0; min-width: 0; padding: 0; background: none; color: var(--ink); }
.ccn-b--link:hover { background: none; color: var(--ink); text-decoration: underline; text-underline-offset: 4px; }
.ccn-b--sm { min-height: 44px; }
.ccn-b svg { width: 16px; height: 16px; flex: none; stroke: currentColor; fill: none; stroke-width: 1.6; }
.ccn-btns, body .entry-content .wp-block-buttons { display: flex; flex-wrap: wrap; gap: var(--s-3); align-items: center; margin-top: var(--s-5); }
body .entry-content .wp-block-buttons > .wp-block-button { margin: 0; }

/* ---------- Formulaires ---------- */

html body :is(input[type="text"], input[type="email"], input[type="tel"], input[type="url"], input[type="number"], input[type="search"], input[type="password"], select, textarea):not(.ccn-raw) {
	min-height: 48px;
	padding: 12px 14px;
	border: 1px solid var(--line);
	border-radius: var(--radius-field);
	background: #fff;
	color: var(--text);
	font-family: var(--font);
	font-size: 1rem;
	box-shadow: none;
	box-sizing: border-box;
}
html body :is(input, select, textarea):not(.ccn-raw):focus { outline: 2px solid var(--accent); outline-offset: 0; border-color: var(--accent); box-shadow: none; }
html body label { font-size: .875rem; font-weight: 500; color: var(--ink); }

/* ---------- Cartes ---------- */

.ccn-cardc { display: flex; flex-direction: column; gap: var(--s-3); padding: var(--s-5); border-radius: var(--radius-card); background: var(--surface); color: var(--text); text-decoration: none; transition: transform .2s var(--ease); }
.ccn-band--alt .ccn-cardc { background: #fff; }
a.ccn-cardc:hover { transform: translateY(-2px); color: var(--text); }
@media (min-width: 1024px) { .ccn-cardc { padding: var(--s-7); } }

/* ---------- Étiquettes (badges) ---------- */

.ccn-badge-ds { display: inline-flex; align-items: center; height: 24px; padding: 0 8px; border-radius: var(--radius-btn); background: var(--surface); color: var(--ink); font-size: 12px; font-weight: 600; letter-spacing: .04em; text-transform: uppercase; }
.ccn-badge-ds--tennis { background: var(--terre-100); color: var(--terre-700); }
.ccn-badge-ds--pickleball { background: var(--petrole-100); color: var(--petrole-700); }

/* ---------- Accordéon (FAQ Rank Math) ---------- */

.wp-block-rank-math-faq-block, .rank-math-block { border-top: 1px solid var(--line); max-width: 860px; }
.rank-math-faq-item, .rank-math-list-item { border-bottom: 1px solid var(--line); }
body .entry-content .rank-math-question, body .rank-math-question {
	position: relative;
	margin: 0;
	padding: 20px 44px 20px 0;
	font-size: 1.125rem;
	font-weight: 500;
	line-height: 1.4;
	letter-spacing: 0;
	color: var(--ink);
	cursor: pointer;
}
.rank-math-question::after { content: ""; position: absolute; right: 8px; top: 50%; width: 14px; height: 14px; margin-top: -7px; background: linear-gradient(currentColor, currentColor) center / 14px 1.5px no-repeat, linear-gradient(currentColor, currentColor) center / 1.5px 14px no-repeat; transition: transform .2s var(--ease); }
:is(.rank-math-faq-item, .rank-math-list-item).is-open .rank-math-question::after { transform: rotate(45deg); }
.rank-math-answer { padding: 0 0 20px; color: var(--text); }
.rank-math-answer p { margin: 0; }
.ccn-js :is(.rank-math-faq-item, .rank-math-list-item):not(.is-open) .rank-math-answer { display: none; }

/* ---------- Fil d'Ariane ---------- */

.rank-math-breadcrumb, .ccn-crumbs { font-size: .875rem; color: var(--text-soft); margin: 0 0 var(--s-5); }
.rank-math-breadcrumb p { margin: 0; }
.rank-math-breadcrumb a, .ccn-crumbs a { color: var(--text-soft); text-decoration: none; }
.rank-math-breadcrumb a:hover { color: var(--ink); text-decoration: underline; }
.rank-math-breadcrumb .separator { margin: 0 6px; }

/* ---------- Tableaux ---------- */

body .entry-content .wp-block-table table, body .entry-content table { border-collapse: collapse; width: 100%; font-size: 1rem; }
body .entry-content :is(th, td) { padding: 14px 12px; border: 0; border-bottom: 1px solid var(--line); text-align: left; vertical-align: top; }
body .entry-content thead th { font-size: .875rem; font-weight: 500; color: var(--text-soft); }
body .entry-content .wp-block-table { overflow-x: auto; }

/* ---------- Filets ---------- */

hr, .wp-block-separator { border: 0; border-top: 1px solid var(--line); }

/* ---------- Trous de contenu [À COMPLÉTER] : visibles seulement pour les éditeurs connectés ---------- */

.ccn-todo { display: inline; padding: 2px 6px; border-radius: 4px; background: #FFF3C4; color: #6B4E00; font-size: .875em; font-weight: 500; outline: 1px dashed #D9A400; }
div.ccn-todo, .ccn-todo-block { display: block; margin: var(--s-4) 0; padding: var(--s-4); border-radius: var(--radius-btn); background: #FFF8DB; color: #6B4E00; outline: 1px dashed #D9A400; }
.ccn-todo-block::before { content: "Brouillon, masqué aux visiteurs"; display: block; margin-bottom: 6px; font-size: 12px; font-weight: 600; letter-spacing: .04em; text-transform: uppercase; }

/* ---------- Barre latérale fixe : téléphone et e-mail (ordinateur) ---------- */

.ccn-rail { display: none; }
@media (min-width: 1024px) and (hover: hover) {
	.ccn-rail { position: fixed; right: 16px; top: 50%; z-index: 90; display: grid; gap: 10px; transform: translateY(-50%); }
	.ccn-rail a { position: relative; display: grid; place-items: center; width: 48px; height: 48px; border-radius: 50%; background: var(--ink); color: #fff; box-shadow: 0 8px 24px rgba(17, 17, 17, .18); transition: background-color .15s var(--ease); }
	.ccn-rail a:hover { background: var(--accent); color: #fff; }
	.ccn-rail svg { width: 20px; height: 20px; stroke: currentColor; fill: none; stroke-width: 1.5; stroke-linecap: round; stroke-linejoin: round; }
	.ccn-rail span { position: absolute; right: 58px; top: 50%; padding: 8px 12px; border-radius: var(--radius-btn); background: var(--ink); color: #fff; font-size: 14px; font-weight: 500; white-space: nowrap; opacity: 0; transform: translate(6px, -50%); pointer-events: none; transition: opacity .15s var(--ease), transform .15s var(--ease); }
	.ccn-rail a:hover span, .ccn-rail a:focus-visible span { opacity: 1; transform: translate(0, -50%); }
	.ccn-menu-open .ccn-rail { display: none; }
}

/* ---------- Focus ---------- */

body :is(a, button, input, select, textarea, summary):focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }

/* ---------- Apparition à l'entrée dans l'écran (visible sans JavaScript) ---------- */

.ccn-js .ccn-reveal-up { opacity: 0; transform: translateY(16px); transition: opacity .4s var(--ease), transform .4s var(--ease); }
.ccn-js .ccn-reveal-up.is-in { opacity: 1; transform: none; }

@media (prefers-reduced-motion: reduce) {
	.ccn-js .ccn-reveal-up { opacity: 1; transform: none; transition: none; }
	a.ccn-cardc:hover { transform: none; }
}

/* Bouton « haut de page » d'Astra aux couleurs du site. */
html body #ast-scroll-top { width: 44px; height: 44px; line-height: 44px; border-radius: var(--radius-btn); background-color: var(--ink); color: #fff; }
html body #ast-scroll-top:hover { background-color: var(--accent); }

/* ---------- Pages de contenu (blocs Gutenberg du lot 1) ---------- */

body.ccn-lot .entry-content, body.ccn-lot .site-main, body.ccn-lot #primary { margin: 0; padding: 0; }
body.ccn-lot #content > .ast-container { display: block; max-width: none; padding: 0; margin: 0; }
body.ccn-lot .entry-header { display: none; }
body.ccn-lot article { margin: 0; padding: 0; }
.entry-content > .ccn-band { margin: 0; max-width: none; }
.ccn-band > * + * { margin-top: var(--s-5); }
.ccn-band > .wp-block-heading + * { margin-top: 0; }
.ccn-band > h2.wp-block-heading { margin-bottom: var(--s-5); }
.ccn-band > h3.wp-block-heading { margin-top: var(--s-7); }
.ccn-page-head { padding-top: var(--s-7); }
.ccn-page-head .wp-block-heading { max-width: 900px; }
body .entry-content .wp-block-list { padding-left: 1.2em; }
body .entry-content .wp-block-list li { margin: 0 0 var(--s-2); }
body .entry-content .wp-block-list li::marker { color: var(--accent); }
.ccn-band > .wp-block-table, .ccn-band > .wp-block-rank-math-faq-block, .ccn-band > .rank-math-block { max-width: 860px; }
.ccn-media { margin: var(--s-6) 0 0; max-width: 860px; }
.ccn-media img { width: 100%; height: auto; aspect-ratio: 4 / 3; object-fit: cover; border-radius: var(--radius-card); display: block; }
.ccn-links { display: flex; flex-wrap: wrap; gap: var(--s-3) var(--s-6); }
.ccn-links a { font-weight: 500; }
html body .wp-block-button.ccn-acc > .wp-block-button__link { background: var(--accent); color: #fff; }
html body .wp-block-button.ccn-acc > .wp-block-button__link:hover { background: var(--accent-hover); color: #fff; }
.ccn-band .woocommerce { margin-top: var(--s-6); }

body .entry-content table, body .entry-content .wp-block-table table { border: 0; }
body .entry-content .wp-block-table { border: 0; margin: 0; }

/* Bouton secondaire des blocs (style « contour ») : contour 1 px #E3E3E4, texte Encre (Astra le colore sinon en bleu). */
html body .wp-block-button.is-style-outline > .wp-block-button__link.wp-block-button__link:not(.has-text-color) { background: transparent; color: var(--ink); border: 0; box-shadow: inset 0 0 0 1px var(--line); padding: 12px 16px; }
html body .wp-block-button.is-style-outline > .wp-block-button__link.wp-block-button__link:not(.has-text-color):hover { background: var(--surface); color: var(--ink); }

/* Barre latérale : Contact (fenêtre) + WhatsApp */
@media (min-width: 1024px) and (hover: hover) {
	.ccn-rail a { background: var(--ink); }
	.ccn-rail a.ccn-rail-wa { background: #25D366; }
	.ccn-rail a.ccn-rail-wa:hover { background: #1EBE5A; }
}

/* ---------- Articles du blog (lecture, style anry) ---------- */
body.single-post .site-content > .ast-container { max-width: calc(760px + 2 * var(--gutter)); padding-inline: var(--gutter); }
body.single-post #primary { margin: var(--s-7) 0 var(--s-9); padding: 0; }
body.single-post article.post { padding: 0; background: none; }
body.single-post .entry-header { margin-bottom: var(--s-6); text-align: left; }
body.single-post .entry-title { font-size: clamp(2.1rem, 1.4rem + 2.6vw, 3.5rem); font-weight: 300; line-height: 1.15; letter-spacing: var(--title-tracking-h1); color: var(--ink); }
body.single-post .entry-meta, body.single-post .entry-meta a { font-size: .875rem; color: var(--text-soft); }
body.single-post .post-thumb-img-content, body.single-post .ast-single-post-featured-section { margin: 0 0 var(--s-7); }
body.single-post .post-thumb-img-content img, body.single-post .ast-single-post-featured-section img { width: 100%; aspect-ratio: 16 / 9; object-fit: cover; border-radius: var(--radius-card); }
body.single-post .entry-content { font-size: 1.0625rem; line-height: 1.7; }
body.single-post .entry-content > * { max-width: none; }
body.single-post .entry-content h2 { margin: var(--s-8) 0 var(--s-4); font-size: clamp(1.75rem, 1.3rem + 1.4vw, 2.5rem); }
body.single-post .entry-content h3 { margin: var(--s-6) 0 var(--s-2); font-size: 1.375rem; font-weight: 500; letter-spacing: 0; }
body.single-post .entry-content p.ccn-lead { font-size: 1.3125rem; line-height: 1.55; color: var(--ink); }
body.single-post .entry-content ul.ccn-dots { list-style: none; padding: 0; }
body.single-post .entry-content ul.ccn-dots li { position: relative; padding-left: 22px; margin: 0 0 10px; }
body.single-post .entry-content ul.ccn-dots li::before { content: ""; position: absolute; left: 2px; top: .7em; width: 6px; height: 6px; border-radius: 50%; background: var(--accent); }
body.single-post .entry-content p.ccn-links { display: flex; flex-wrap: wrap; gap: 10px; }
body.single-post .entry-content p.ccn-links a { display: inline-flex; min-height: 44px; align-items: center; padding: 10px 16px; border: 1px solid var(--line); border-radius: var(--radius-btn); background: #fff; color: var(--ink); text-decoration: none; font-weight: 500; }
body.single-post .entry-content p.ccn-links a::after { content: "→"; margin-left: 8px; color: var(--text-soft); }
.ccn-art-cta { margin: var(--s-6) 0; padding: var(--s-6); border-radius: var(--radius-card); background: var(--surface); }
.ccn-art-cta .wp-block-buttons { margin: 0; }
body.single-post .entry-content .rank-math-question { font-size: 1.125rem; }
body.single-post .ast-single-related-posts-container, body.single-post .post-navigation { max-width: 760px; margin-inline: auto; }
body.single-post .entry-content > :is(p, ul, ol, h2, h3, div, figure) { max-width: none; margin-left: 0; margin-right: 0; }
body.single-post .ast-article-single, body.single-post .ast-separate-container .ast-article-single { background: none; padding: 0; }
body.single-post .entry-meta .posted-by, body.single-post .entry-meta .posted-by + .ast-separator, body.single-post .entry-meta > span:first-child:empty { display: none; }
body.single-post .entry-meta a { color: var(--text-soft); text-decoration: none; }
body.single-post #primary article, body.single-post .ast-separate-container #primary article { background-color: transparent !important; }
body.single-post .entry-meta, body.single-post .entry-meta * { color: var(--text-soft) !important; }

/* Avis Google (widget Trustindex) + bouton « Laisser un avis sur Google » */
.ccn-avis-cta { display: flex; justify-content: center; margin: var(--s-6) 0 0; }
html body a.ccn-b.ccn-b--google { gap: 10px; background: #fff; color: var(--ink); box-shadow: inset 0 0 0 1px var(--line); }
html body a.ccn-b.ccn-b--google:hover { background: var(--surface); color: var(--ink); box-shadow: inset 0 0 0 1px var(--text-soft); }
.ccn-b--google svg { width: 18px; height: 18px; stroke: none; }
.ccn-avis-google { margin-top: var(--s-6); }
html body .ccn-avis, html body .entry-content .ccn-avis { display: block; width: 100%; max-width: none; }
html body .ccn-avis .ccn-avis-cta, html body .entry-content .ccn-avis .ccn-avis-cta { width: 100%; max-width: none; margin-inline: 0; justify-content: center; }
html body .ccn-avis a.ccn-b--google, html body .entry-content .ccn-avis a.ccn-b--google { text-decoration: none; }

/* Vidéos [ccn_video] */
.ccn-video { position: relative; overflow: hidden; border-radius: 12px; background: var(--ink); }
.ccn-video video { display: block; width: 100%; height: 100%; object-fit: cover; }
.ccn-video--bg { aspect-ratio: 21 / 9; box-shadow: 0 30px 60px -20px rgba(17, 17, 17, .35); }
.ccn-video--player { aspect-ratio: 16 / 9; }
.ccn-video-play { position: absolute; inset: 0; margin: auto; width: 96px; height: 96px; display: grid; place-items: center; border: 0; border-radius: 50%; background: rgba(255, 255, 255, .92); color: var(--ink); cursor: pointer; box-shadow: 0 20px 50px -10px rgba(0, 0, 0, .5); transition: transform .25s var(--ease), background .25s var(--ease); }
.ccn-video-play svg { width: 34px; height: 34px; fill: currentColor; margin-left: 5px; }
.ccn-video-play:hover { transform: scale(1.06); background: #fff; }
.ccn-video-play::after { content: ""; position: absolute; inset: -12px; border-radius: 50%; border: 2px solid rgba(255, 255, 255, .5); animation: ccn-video-pulse 2.2s ease-out infinite; }
@keyframes ccn-video-pulse { from { transform: scale(.9); opacity: 1; } to { transform: scale(1.35); opacity: 0; } }
.ccn-video--player.is-playing .ccn-video-play { display: none; }
@media (max-width: 639px) { .ccn-video--bg { aspect-ratio: 4 / 3; } .ccn-video-play { width: 72px; height: 72px; } }
@media (prefers-reduced-motion: reduce) { .ccn-video-play::after { animation: none; } }
