/* Ody Services — compléments au theme.json */

html { scroll-behavior: smooth; }
:where(section[id], .wp-block-group[id]) { scroll-margin-top: 2rem; }

/* Marque : pastille ronde devant le titre du site */
.ody-brand a { display: inline-flex; align-items: center; gap: 0.75rem; }
.ody-brand a::before {
	content: "";
	width: 36px;
	height: 36px;
	flex-shrink: 0;
	border-radius: 50%;
	background:
		radial-gradient(circle at center, transparent 6px, var(--wp--preset--color--accent) 6.5px, var(--wp--preset--color--accent) 9.5px, transparent 10px),
		var(--wp--preset--color--contrast);
}

/* En-tête */
.ody-header { border-bottom: 1px solid var(--wp--preset--color--line); }

/* Pastilles sur carte sombre */
.is-style-card-dark .is-style-chip,
.is-style-section-dark .is-style-chip {
	background-color: rgba(255, 255, 255, 0.12);
	color: inherit;
}
.is-style-chip { margin: 0; }

/* Numéros de carte */
.ody-card-num { color: var(--wp--preset--color--muted); }
.is-style-card-dark .ody-card-num { color: rgba(255, 255, 255, 0.72); }

/* Aperçu conversation (hero) */
.ody-status { display: flex; align-items: center; gap: 0.625rem; }
.ody-status::before {
	content: "";
	width: 8px;
	height: 8px;
	border-radius: 50%;
	background: #4FBF7A;
	flex-shrink: 0;
}
.ody-bubble-reply { align-self: flex-end; max-width: 85%; }

/* FAQ */
.wp-block-details summary {
	cursor: pointer;
	list-style: none;
	display: flex;
	justify-content: space-between;
	gap: 1.5rem;
	font-weight: 700;
	font-size: var(--wp--preset--font-size--large);
}
.wp-block-details summary::-webkit-details-marker { display: none; }
.wp-block-details summary::after { content: "+"; font-weight: 400; flex-shrink: 0; }
.wp-block-details[open] summary::after { content: "–"; }
.wp-block-details > :not(summary) { color: var(--wp--preset--color--muted); }
.ody-faq-list > .wp-block-details:last-child { border-bottom: 1px solid var(--wp--preset--color--line-2); }

/* Liste d’expertise sur fond sombre */
.ody-expertise-item { border-top: 1px solid rgba(255, 255, 255, 0.16); }
.ody-expertise-item:last-child { border-bottom: 1px solid rgba(255, 255, 255, 0.16); }
.is-style-section-dark .ody-soft { color: rgba(255, 255, 255, 0.78); }

/* Cartes d’articles */
.ody-post-card .wp-block-post-featured-image img { border-radius: 20px; }
.ody-post-card .wp-block-post-featured-image { margin-bottom: 0.25rem; }
.ody-post-card .wp-block-post-terms a {
	text-decoration: none;
	color: var(--wp--preset--color--secondary);
}

/* Liens d’interface sans soulignement */
.ody-plain-links a { text-decoration: none; }
.ody-plain-links a:hover { text-decoration: underline; }

/* Accessibilité : focus visible */
:where(a, button, summary):focus-visible {
	outline: 2px solid var(--wp--preset--color--accent);
	outline-offset: 3px;
}

@media (max-width: 781px) {
	.ody-bubble-reply { max-width: 100%; }
}

/* Carte prune : texte secondaire */
.is-style-card-dark .ody-soft { color: rgba(255, 255, 255, 0.82); }

/* Pied de page */
.ody-footer-bottom { border-top: 1px solid rgba(255, 255, 255, 0.16); }
.ody-footer-bottom p { margin: 0; }
.is-style-section-dark .ody-brand a::before { background:
	radial-gradient(circle at center, transparent 6px, var(--wp--preset--color--accent) 6.5px, var(--wp--preset--color--accent) 9.5px, transparent 10px),
	rgba(255, 255, 255, 0.1); }

@media (max-width: 600px) {
	.ody-header .wp-block-buttons.ody-header-cta { display: none; }
}

/* Marque sur une ligne */
.ody-brand { white-space: nowrap; }

/* Pas de marge résiduelle en fin de conteneur */
.wp-block-group > .wp-block-columns:last-child { margin-bottom: 0; }

/* ——— Boutons interactifs ——— */
.wp-block-button__link {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	gap: 0.55em;
	transition:
		background-color 0.25s ease,
		color 0.25s ease,
		border-color 0.25s ease,
		box-shadow 0.3s ease,
		transform 0.3s cubic-bezier(0.2, 0.8, 0.2, 1),
		filter 0.25s ease;
}
.wp-block-button__link::after {
	content: "→";
	display: inline-block;
	transition: transform 0.3s cubic-bezier(0.2, 0.8, 0.2, 1);
}
.wp-block-button__link:hover {
	transform: translateY(-2px);
	box-shadow: 0 12px 28px -12px rgba(36, 37, 130, 0.6);
}
.wp-block-button__link:hover::after { transform: translateX(4px); }
.wp-block-button__link:active {
	transform: translateY(0);
	box-shadow: 0 4px 10px -6px rgba(36, 37, 130, 0.5);
}

/* Boutons à couleur imposée : éclaircissement au survol */
.wp-block-button__link.has-background:hover { filter: brightness(1.18); }
.wp-block-button__link.has-base-background-color:hover {
	filter: none;
	background-color: var(--wp--preset--color--base-2) !important;
	box-shadow: 0 12px 28px -12px rgba(0, 0, 0, 0.45);
}

/* Bouton contour : se remplit au survol */
.wp-block-button.is-style-outline > .wp-block-button__link:hover {
	background-color: var(--wp--preset--color--contrast);
	border-color: var(--wp--preset--color--contrast);
	color: var(--wp--preset--color--base);
}

@media (prefers-reduced-motion: reduce) {
	.wp-block-button__link,
	.wp-block-button__link::after { transition: none; }
	.wp-block-button__link:hover,
	.wp-block-button__link:hover::after { transform: none; }
}

/* ——— Cartes de service : violet au survol ——— */
.ody-hover-card {
	position: relative;
	transition:
		background-color 0.35s ease,
		border-color 0.35s ease,
		color 0.35s ease,
		transform 0.35s cubic-bezier(0.2, 0.8, 0.2, 1),
		box-shadow 0.35s ease;
}
.ody-hover-card :is(.wp-block-heading, p, a, img) { transition: color 0.35s ease, filter 0.35s ease, background-color 0.35s ease; }
.is-style-card.ody-hover-card:is(:hover, :focus-within) {
	background-color: var(--wp--preset--color--secondary);
	border-color: var(--wp--preset--color--secondary);
	color: var(--wp--preset--color--base);
	transform: translateY(-4px);
	box-shadow: 0 24px 48px -24px rgba(85, 61, 103, 0.65);
}
.ody-hover-card:is(:hover, :focus-within) .wp-block-heading,
.ody-hover-card:is(:hover, :focus-within) a { color: var(--wp--preset--color--base); }
.ody-hover-card:is(:hover, :focus-within) .has-muted-color { color: rgba(255, 255, 255, 0.84) !important; }
.ody-hover-card:is(:hover, :focus-within) .is-style-chip { background-color: rgba(255, 255, 255, 0.14); color: var(--wp--preset--color--base); }
.ody-hover-card:is(:hover, :focus-within) .wp-block-image img { filter: brightness(0) invert(1); }

/* Lien « Découvrir » : toute la carte est cliquable */
.ody-card-link { margin-top: auto; padding-top: 0.5rem; font-weight: 600; }
.ody-card-link a { text-decoration: none; }
.ody-card-link a::before { content: ""; position: absolute; inset: 0; border-radius: inherit; }
.ody-card-link a::after { content: "→"; display: inline-block; margin-left: 0.4em; transition: transform 0.3s cubic-bezier(0.2, 0.8, 0.2, 1); }
.ody-hover-card:hover .ody-card-link a::after { transform: translateX(4px); }
.ody-hover-card:focus-within { outline: 2px solid var(--wp--preset--color--accent); outline-offset: 3px; }
.ody-card-link a:focus-visible { outline: none; }

/* ——— Carrousel de réalisations ——— */
.ody-carousel {
	display: flex !important;
	flex-wrap: nowrap !important;
	gap: 1.5rem;
	overflow-x: auto;
	scroll-snap-type: x mandatory;
	scroll-behavior: smooth;
	scrollbar-width: none;
	padding-bottom: 0.5rem;
	margin-top: 0 !important;
}
.ody-carousel::-webkit-scrollbar { display: none; }
.ody-carousel > .ody-slide {
	flex: 0 0 min(85%, 400px);
	scroll-snap-align: start;
	margin: 0 !important;
}
.ody-slide { position: relative; }
.ody-slide .wp-block-image { margin: 0; overflow: hidden; border-radius: 16px; }
.ody-slide .wp-block-image img { width: 100%; height: auto; aspect-ratio: 16 / 10; object-fit: cover; transition: transform 0.5s cubic-bezier(0.2, 0.8, 0.2, 1); }
.ody-slide:hover .wp-block-image img { transform: scale(1.04); }
.ody-carousel-nav { display: flex; gap: 0.75rem; justify-content: flex-end; margin-top: 1.5rem !important; }
.ody-carousel-nav button {
	width: 48px;
	height: 48px;
	border-radius: 50%;
	border: 1.5px solid var(--wp--preset--color--contrast);
	background: transparent;
	color: var(--wp--preset--color--contrast);
	font-size: 1.125rem;
	cursor: pointer;
	transition: background-color 0.25s ease, color 0.25s ease, transform 0.3s cubic-bezier(0.2, 0.8, 0.2, 1), opacity 0.25s ease;
}
.ody-carousel-nav button:hover:not(:disabled) { background: var(--wp--preset--color--contrast); color: var(--wp--preset--color--base); transform: translateY(-2px); }
.ody-carousel-nav button:disabled { opacity: 0.3; cursor: default; }

/* ——— Conversations d’exemple ——— */
.ody-bubble {
	max-width: 88%;
	padding: 0.7rem 1rem;
	border-radius: 16px;
	margin: 0;
	line-height: 1.5;
}
.ody-bubble-client { align-self: flex-start; background: var(--wp--preset--color--base); border: 1px solid var(--wp--preset--color--line); border-bottom-left-radius: 4px; }
.ody-bubble-agent { align-self: flex-end; background: var(--wp--preset--color--contrast); color: var(--wp--preset--color--base); border-bottom-right-radius: 4px; }

/* ——— Listes à coches ——— */
.ody-check-list { list-style: none; padding-left: 0; display: grid; gap: 0.75rem; }
.ody-check-list li { position: relative; padding-left: 1.75rem; }
.ody-check-list li::before {
	content: "";
	position: absolute;
	left: 0;
	top: 0.45em;
	width: 0.95rem;
	height: 0.55rem;
	border-left: 2px solid var(--wp--preset--color--accent);
	border-bottom: 2px solid var(--wp--preset--color--accent);
	transform: rotate(-45deg);
}

@media (prefers-reduced-motion: reduce) {
	.ody-hover-card, .ody-slide .wp-block-image img, .ody-carousel { transition: none; scroll-behavior: auto; }
	.is-style-card.ody-hover-card:hover { transform: none; }
}

/* ——— Logo (choisi dans le site : Apparence › Éditeur › En-tête) ——— */
.ody-logo { margin: 0; flex-shrink: 0; line-height: 0; }
.ody-logo a { display: inline-block; transition: opacity 0.25s ease; }
.ody-logo a:hover { opacity: 0.85; }
/* Pied de page bleu nuit : le logo en couleurs, posé sur un fond blanc arrondi. */
.ody-logo-light a { background: var(--wp--preset--color--base); padding: 0.75rem 1rem; border-radius: 14px; }
.ody-logo-light img { width: 160px !important; height: auto !important; }
@media (max-width: 600px) {
	.ody-header .ody-logo img { width: 150px !important; height: auto !important; }
}
.ody-site-name { margin: 0; font-family: var(--wp--preset--font-family--heading); font-size: 1.375rem; font-weight: 700; letter-spacing: -0.02em; }
.ody-site-name a { text-decoration: none; }
.is-style-section-dark .ody-site-name a { color: var(--wp--preset--color--base); }
