/*
 * Flex Studio : composants repris de la maquette (boutons « pilule » à ombre pleine,
 * en-tête collant, hero avec vague, cartes, pastilles, fond nuit, formulaires).
 * Toutes les couleurs passent par la palette : changer de modèle ou de couleur suffit.
 */

:root {
	--fs-base: var(--wp--preset--color--base);
	--fs-surface: var(--wp--preset--color--surface);
	--fs-text: var(--wp--preset--color--contrast);
	--fs-dark: var(--wp--preset--color--dark);
	--fs-primary: var(--wp--preset--color--primary);
	--fs-primary-shade: var(--wp--preset--color--primary-shade);
	--fs-on-primary: var(--wp--preset--color--on-primary);
	--fs-secondary: var(--wp--preset--color--secondary);
	--fs-secondary-soft: var(--wp--preset--color--secondary-soft);
	--fs-header: var(--wp--preset--color--header);
	--fs-header-soft: var(--wp--preset--color--header-soft);
	--fs-highlight: var(--wp--preset--color--highlight);
	--fs-pink: var(--wp--preset--color--pink);
	--fs-radius: var(--wp--custom--radius);
	--fs-radius-small: var(--wp--custom--radius-small);
	--fs-shadow: 0 5px 0 color-mix(in srgb, var(--fs-dark) 8%, transparent);
}

html { scroll-behavior: smooth; }
p { text-wrap: pretty; }
:where(h1, h2, h3) { text-wrap: balance; }
:focus-visible { outline: 3px solid var(--fs-primary); outline-offset: 3px; border-radius: 6px; }
mark { background: var(--fs-highlight); color: var(--fs-dark); padding: 0 4px; border-radius: 4px; }

/* En-tête collant */
.fs-site-header { position: sticky; top: 0; z-index: 50; }
.admin-bar .fs-site-header { top: 32px; }
@media (max-width: 782px) { .admin-bar .fs-site-header { top: 46px; } }
@media (max-width: 600px) { .admin-bar .fs-site-header { top: 0; } }

.fs-header { background: var(--fs-header); border-bottom: 4px solid var(--fs-highlight); padding-top: 8px; padding-bottom: 8px; }
.fs-brand { gap: 12px; }
.is-style-fs-round img { width: 58px; height: 58px; object-fit: cover; border-radius: 50%; border: 3px solid #fff; }

.fs-nav { gap: 6px; }
.fs-nav .wp-block-navigation-item__content { display: block; padding: 9px 16px; border-radius: 999px; color: var(--fs-dark); transition: background 0.2s; }
.fs-nav .wp-block-navigation-item__content:hover { background: rgba(255, 255, 255, 0.55); }
.fs-nav .current-menu-item > .wp-block-navigation-item__content { background: var(--fs-dark); color: #fff; }
.fs-nav .fs-nav-cta > .wp-block-navigation-item__content { background: var(--fs-primary); color: var(--fs-on-primary); }
.fs-nav .wp-block-navigation__responsive-container-open { background: var(--fs-dark); color: #fff; border-radius: 12px; padding: 10px 12px; }
.fs-nav .wp-block-navigation__responsive-container.is-menu-open { background: var(--fs-header); color: var(--fs-dark); }
.fs-nav .wp-block-navigation__responsive-container.is-menu-open .wp-block-navigation-item__content { padding: 9px 16px; }

/* Boutons */
.wp-element-button,
.wp-block-button__link { display: inline-flex; align-items: center; gap: 10px; box-shadow: 0 5px 0 var(--fs-primary-shade); transition: transform 0.15s, box-shadow 0.15s; }
.wp-element-button:hover,
.wp-block-button__link:hover { transform: translateY(-2px); }
.wp-element-button:active,
.wp-block-button__link:active { transform: translateY(3px); box-shadow: 0 2px 0 var(--fs-primary-shade); }
.is-style-fs-dark .wp-block-button__link { background: var(--fs-dark); color: #fff; box-shadow: 0 5px 0 color-mix(in srgb, var(--fs-dark) 60%, #000); }
.wp-block-button.is-style-outline .wp-block-button__link { background: transparent; color: var(--fs-dark); border: 3px solid var(--fs-dark); box-shadow: none; padding: 11px 23px; }
.fs-section--dark .wp-block-button.is-style-outline .wp-block-button__link { color: #fff; border-color: #fff; }

/* Sections */
.fs-main { margin-top: 0; }
.fs-main--wide > .alignfull:first-child { margin-top: 0; }
.fs-section { padding-top: 64px; padding-bottom: 64px; }
.fs-section--soft { background: var(--fs-header-soft); }
.fs-section--dark { background: var(--fs-dark); color: #fff; }
.fs-section--dark :where(h1, h2, h3, h4) { color: #fff; }
.fs-section--dark a:where(:not(.wp-element-button)) { color: var(--fs-highlight); }
:where(.wp-site-blocks) > * + .fs-footer,
.fs-main + * { margin-block-start: 0; }
.fs-main--wide > * + * { margin-block-start: 0; }

/* Hero avec vague */
.fs-hero { position: relative; overflow: hidden; background: linear-gradient(180deg, var(--fs-header) 0%, var(--fs-header-soft) 100%); padding-top: 56px; padding-bottom: 110px; }
.fs-hero::after {
	content: "";
	position: absolute;
	left: 0;
	right: 0;
	bottom: -1px;
	height: 80px;
	background: var(--fs-base);
	-webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 1200 80' preserveAspectRatio='none'%3E%3Cpath d='M0,40 C150,90 300,0 450,35 C600,70 750,5 900,35 C1050,65 1120,30 1200,45 L1200,80 L0,80 Z'/%3E%3C/svg%3E") center / 100% 100% no-repeat;
	mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 1200 80' preserveAspectRatio='none'%3E%3Cpath d='M0,40 C150,90 300,0 450,35 C600,70 750,5 900,35 C1050,65 1120,30 1200,45 L1200,80 L0,80 Z'/%3E%3C/svg%3E") center / 100% 100% no-repeat;
}
.fs-hero__grid { gap: 36px; }
.fs-lead { font-size: 1.2rem; margin-top: 18px; margin-bottom: 28px; max-width: 60ch; }
.fs-hero .wp-block-buttons { gap: 14px; }

.is-style-fs-medallion { display: flex; justify-content: center; }
.is-style-fs-medallion img { width: min(380px, 80vw); aspect-ratio: 1; object-fit: cover; border-radius: 50%; border: 8px solid #fff; box-shadow: 0 14px 0 var(--fs-highlight); animation: fs-float 5s ease-in-out infinite; }
@keyframes fs-float { 0%, 100% { transform: translateY(0); } 50% { transform: translateY(-10px); } }

/* Prochain atelier : carte qui chevauche la vague */
.fs-next { position: relative; z-index: 5; margin-top: -60px !important; background: var(--fs-surface); border: 4px solid var(--fs-highlight); border-radius: var(--fs-radius); padding: 26px 30px; box-shadow: 0 10px 0 color-mix(in srgb, var(--fs-dark) 12%, transparent); }
.fs-next > * { margin-block: 0; }
.fs-pill,
.fs-next .fs-pill { display: inline-block; background: var(--fs-secondary); color: #fff; border-radius: 999px; padding: 4px 14px; font-weight: 800; font-size: 0.9rem; margin-bottom: 6px; }
body .fs-next .flexres { margin: 0; }
body .fs-next .flexres-sessions__grid { display: block; }
body .fs-next .flexres-card { display: grid; grid-template-columns: 1fr auto; column-gap: 24px; align-items: center; padding: 0; border: 0; box-shadow: none; background: transparent; }
body .fs-next .flexres-card > * { grid-column: 1; }
body .fs-next .flexres-card__fields,
body .fs-next .flexres-card__type { display: none; }
body .fs-next .flexres-button { grid-column: 2; grid-row: 1 / span 5; background: var(--fs-dark); color: #fff; box-shadow: 0 5px 0 color-mix(in srgb, var(--fs-dark) 60%, #000); }
body .fs-next .flexres-empty { margin: 0; }

/* Cartes */
.fs-grid { gap: 24px; margin-top: 30px; }
.is-style-fs-card { background: var(--fs-surface); border: 3px solid var(--fs-secondary-soft); border-radius: var(--fs-radius); padding: 28px; height: 100%; }
.is-style-fs-card > * { margin-block: 0 0.6rem; }
.is-style-fs-card h3 { margin-bottom: 0.4rem; }
.fs-more a { font-weight: 800; }
.fs-card--featured { border-color: var(--fs-primary); background: color-mix(in srgb, var(--fs-primary) 12%, var(--fs-surface)); }

.is-style-fs-icon { margin: 0 0 14px; }
.is-style-fs-icon img { width: 58px; height: 58px; padding: 15px; border-radius: 18px; background: var(--fs-highlight); }
.fs-icon--b img { background: var(--fs-pink); }
.fs-icon--c img { background: var(--fs-header); }
.fs-icon--d img { background: var(--fs-secondary-soft); }

/* Panneau et pastilles */
.fs-panel { background: var(--fs-secondary-soft); border-radius: var(--fs-radius); padding: 34px; text-align: center; }
.fs-tags { display: flex; flex-wrap: wrap; justify-content: center; gap: 12px; }
.fs-tag { background: var(--fs-surface); border: 3px solid var(--fs-secondary-soft); border-radius: 999px; padding: 10px 20px; font-weight: 700; }

/* Listes à coches et coordonnées */
.is-style-fs-check { list-style: none; padding-left: 0; }
.is-style-fs-check li { position: relative; padding: 6px 0 6px 34px; }
.is-style-fs-check li::before {
	content: "";
	position: absolute;
	left: 0;
	top: 9px;
	width: 20px;
	height: 20px;
	background: var(--fs-primary);
	-webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='3.5' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M4 12.5l5 5L20 6.5'/%3E%3C/svg%3E") center / contain no-repeat;
	mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='3.5' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M4 12.5l5 5L20 6.5'/%3E%3C/svg%3E") center / contain no-repeat;
}
.fs-section--dark .is-style-fs-check li::before { background: var(--fs-highlight); }

.is-style-fs-contact { list-style: none; padding-left: 0; display: grid; gap: 16px; margin-top: 20px; }
.is-style-fs-contact li { position: relative; padding-left: 62px; min-height: 46px; }
.is-style-fs-contact li::before { content: ""; position: absolute; left: 0; top: 0; width: 46px; height: 46px; border-radius: 50%; background: var(--fs-highlight); }
.is-style-fs-contact li::after {
	content: "";
	position: absolute;
	left: 13px;
	top: 13px;
	width: 20px;
	height: 20px;
	background: var(--fs-dark);
	-webkit-mask: var(--fs-contact-icon) center / contain no-repeat;
	mask: var(--fs-contact-icon) center / contain no-repeat;
}
.is-style-fs-contact li:nth-child(1) { --fs-contact-icon: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2.2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M12 21s-7-6.2-7-11.5a7 7 0 0 1 14 0C19 14.8 12 21 12 21z'/%3E%3Ccircle cx='12' cy='9.5' r='2.5'/%3E%3C/svg%3E"); }
.is-style-fs-contact li:nth-child(2) { --fs-contact-icon: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2.2' stroke-linecap='round' stroke-linejoin='round'%3E%3Crect x='3' y='5' width='18' height='14' rx='2'/%3E%3Cpath d='M3 7l9 6 9-6'/%3E%3C/svg%3E"); }
.is-style-fs-contact li:nth-child(3) { --fs-contact-icon: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2.2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M5 3h4l2 5-2.5 1.5a11 11 0 0 0 6 6L16 13l5 2v4a2 2 0 0 1-2 2A17 17 0 0 1 3 5a2 2 0 0 1 2-2z'/%3E%3C/svg%3E"); }
.is-style-fs-contact li:nth-child(4) { --fs-contact-icon: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2.2' stroke-linecap='round' stroke-linejoin='round'%3E%3Ccircle cx='12' cy='12' r='9'/%3E%3Cpath d='M12 7v5l3 2'/%3E%3C/svg%3E"); }

/* Tarifs */
.fs-plan { display: flex; flex-direction: column; text-align: center; }
.fs-plan .is-style-fs-check { text-align: left; margin: 8px 0 16px; }
.fs-plan .wp-block-buttons { margin-top: auto; }
.fs-price { font-family: var(--wp--preset--font-family--heading); font-size: 2.8rem; color: var(--fs-dark); line-height: 1; margin: 6px 0; }
.fs-price small { font-size: 1rem; font-weight: 500; }
.fs-note { background: var(--fs-secondary-soft); border-radius: var(--fs-radius); padding: 20px 24px; margin-top: 30px; }
.fs-note p { margin: 0; }

/* Contact */
.fs-contact { align-items: flex-start; }
.fs-map { background: var(--fs-header); border-radius: var(--fs-radius); overflow: hidden; border: 4px solid var(--fs-highlight); line-height: 0; }
.fs-map iframe { width: 100%; height: 380px; border: 0; }
.fs-map__link { margin-top: 12px; }

/* Pied de page */
.fs-footer { background: var(--fs-dark); color: color-mix(in srgb, #fff 88%, var(--fs-dark)); padding-top: 44px; padding-bottom: 22px; font-size: 0.97rem; }
.fs-footer h4 { color: var(--fs-highlight); margin-bottom: 10px; font-size: 1.1rem; }
.fs-footer a { color: inherit; text-decoration: none; }
.fs-footer a:hover { text-decoration: underline; }
.fs-footer__links { line-height: 2; }
.fs-footer .wp-block-social-links { margin-top: 12px; }
.fs-footer .wp-block-social-link { color: #fff; }
.fs-footer__bottom { border-top: 1px solid rgba(255, 255, 255, 0.2); margin-top: 28px; padding-top: 16px; font-size: 0.88rem; }
.fs-footer__bottom p { margin: 0; }

/* Section masquée depuis le panneau « Sections » : grisée dans l'éditeur (jamais affichée sur le site). */
.editor-styles-wrapper .fs-hidden { opacity: 0.35; outline: 3px dashed var(--fs-secondary); outline-offset: -3px; }

/* Divers */
.fs-rounded img { border-radius: var(--fs-radius); }
.fs-meta { color: color-mix(in srgb, var(--fs-text) 70%, transparent); }
.wp-block-details summary { font-weight: 800; cursor: pointer; }
.wp-block-details + .wp-block-details { margin-top: 12px; }

/*
 * Flex Réservations : planning, formulaires et espace client aux couleurs du thème
 * (préfixe body pour passer devant la feuille du plugin, chargée après).
 */
body .flexres { --flexres-radius: var(--fs-radius-small); --flexres-border: var(--fs-secondary-soft); --flexres-muted: color-mix(in srgb, var(--fs-text) 70%, transparent); }
body .flexres-sessions__grid { grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); gap: 20px; }
body .flexres-card { display: flex; flex-direction: column; gap: 6px; background: var(--fs-surface); color: var(--fs-text); border: 0; border-left: 10px solid var(--flexres-color); border-radius: var(--fs-radius); padding: 22px; box-shadow: var(--fs-shadow); }
body .flexres-card > * { margin: 0; }
body .flexres-card__type { color: var(--flexres-color); filter: saturate(1.2) brightness(0.8); }
body .flexres-card__title,
body .flexres-card__when { font-family: var(--wp--preset--font-family--heading); color: var(--fs-dark); }
body .flexres-card__title { font-size: 1.25rem; }
body .flexres-card__when { font-size: 1.05rem; font-weight: 500; }
body .flexres-card__price { font-weight: 800; color: var(--fs-dark); }
body .flexres-card__member-price { margin-top: -4px; font-weight: 700; color: var(--fs-secondary); }
body .flexres-card__member-note { margin: 4px 0 0; }
body .flexres-card .flexres-button { margin-top: auto; align-self: flex-start; }

body .flexres-button { border-radius: 999px; padding: 12px 22px; background: var(--fs-primary); color: var(--fs-on-primary); font-weight: 700; box-shadow: 0 5px 0 var(--fs-primary-shade); transition: transform 0.15s; }
body .flexres-button:hover,
body .flexres-button:focus { background: var(--fs-primary); color: var(--fs-on-primary); transform: translateY(-2px); }
body .flexres-button--secondary { background: transparent; color: var(--fs-dark); border: 3px solid var(--fs-dark); box-shadow: none; }
body .flexres-button--secondary:hover,
body .flexres-button--secondary:focus { background: var(--fs-secondary-soft); color: var(--fs-dark); }
body .flexres-badge { background: var(--fs-secondary-soft); color: var(--fs-dark); font-weight: 700; }
body .flexres-badge--booked { background: #E5F6E8; color: #1E6B33; }
body .flexres-card__booked { margin-top: auto; }

body .flexres-form,
body .flexres-auth { background: var(--fs-surface); border: 3px solid var(--fs-secondary-soft); border-radius: var(--fs-radius); padding: 32px; max-width: 640px; }
body .flexres-form label { font-weight: 800; font-size: 0.95rem; }
body .flexres-form input[type="text"],
body .flexres-form input[type="email"],
body .flexres-form input[type="tel"],
body .flexres-form input[type="password"],
body .flexres-form input[type="date"],
body .flexres-form input[type="number"],
body .flexres-form select,
body .flexres-form textarea { padding: 12px 14px; border: 3px solid var(--fs-secondary-soft); border-radius: var(--fs-radius-small); background: var(--fs-base); color: var(--fs-text); }
body .flexres-form :is(input, select, textarea):focus { border-color: var(--fs-secondary); outline: none; }
body .flexres-notice { border-radius: var(--fs-radius); border-width: 3px; }
body .flexres-payment-choice legend { font-weight: 800; font-size: 0.95rem; }
body .flexres-payment-choice__option { border: 3px solid var(--fs-secondary-soft); border-radius: var(--fs-radius-small); background: var(--fs-base); padding: 12px 14px; font-weight: 700; }
body .flexres-payment-choice__option:has(input:checked) { border-color: var(--fs-primary); background: color-mix(in srgb, var(--fs-primary) 12%, var(--fs-surface)); }
body .flexres-payment-choice__option input { accent-color: var(--fs-primary); width: 18px; height: 18px; }
body .flexres-table th { color: var(--fs-dark); }
body .flexres-calendar-wrap { background: var(--fs-surface); border-radius: var(--fs-radius); padding: 20px; box-shadow: var(--fs-shadow); }
body .flexres-calendar .fc-button-primary { background: var(--fs-dark); border-color: var(--fs-dark); border-radius: 999px; }
body .flexres-calendar .fc-button-primary:not(:disabled).fc-button-active { background: var(--fs-secondary); border-color: var(--fs-secondary); }

@media (max-width: 781px) {
	.fs-hero__grid > .wp-block-column:last-child { order: -1; }
	.fs-next { margin-top: -40px !important; }
	body .fs-next .flexres-card { grid-template-columns: 1fr; }
	body .fs-next .flexres-button { grid-column: 1; grid-row: auto; justify-self: start; margin-top: 12px; }
}

@media (prefers-reduced-motion: reduce) {
	*, *::before, *::after { animation: none !important; transition: none !important; scroll-behavior: auto !important; }
}
