/*
 * DefiDuo — compléments CSS.
 * Couleurs, typographie, tailles et styles de blocs : voir theme.json.
 * Ce fichier ne gère que ce que theme.json ne sait pas exprimer
 * (positionnement, pseudo-éléments, composants interactifs, formulaires CF7).
 */

:root {
	--dd-radius-sm: var(--wp--custom--radius--sm, 10px);
	--dd-radius: var(--wp--custom--radius--md, 18px);
	--dd-shadow: var(--wp--preset--shadow--soft);
	--dd-on-dark: rgba(247, 241, 232, .82);
	--dd-on-dark-line: rgba(247, 241, 232, .45);
}

html { scroll-behavior: smooth; }
[id] { scroll-margin-top: 140px; }
body {
	background-image:
		radial-gradient(at 15% 0%, rgba(184, 84, 44, .06), transparent 45%),
		radial-gradient(at 85% 20%, rgba(92, 115, 97, .06), transparent 50%);
	background-repeat: no-repeat;
	background-size: 100% 1400px;
}
p, li { text-wrap: pretty; }
h1, h2, h3 { text-wrap: balance; }

/* Sections pleine largeur collées les unes aux autres */
.wp-site-blocks > *,
.dd-main > *,
.wp-block-post-content > .alignfull { margin-block-start: 0; }
.wp-block-post-content > .alignfull + .alignfull { margin-block-start: 0; }

/* ---------- En-tête ---------- */
.dd-site-header {
	position: sticky;
	top: var(--wp-admin--admin-bar--height, 0px);
	z-index: 100;
}
@media (max-width: 600px) { .admin-bar .dd-site-header { top: 0; } }
.dd-header { border-bottom: 1px solid var(--wp--preset--color--divider); }
.dd-header .wp-block-site-logo img { height: 58px; width: auto; }
.dd-announce { position: relative; }
.dd-announce > p { margin: 0; }
.dd-announce .wp-block-button__link { padding: 9px 18px; font-size: 14px; }
.dd-announce.is-hidden { display: none !important; }
.dd-announce-close {
	background: transparent; border: 0; color: inherit; opacity: .6; cursor: pointer;
	font-size: 20px; line-height: 1; padding: 4px 8px;
}
.dd-announce-close:hover { opacity: 1; }
@media (max-width: 560px) { .dd-announce > p { display: none; } }

/* ---------- Pied de page & cookies ---------- */
.dd-footer p { color: rgba(247, 241, 232, .6); margin: 0; }
.dd-footer .wp-block-navigation a { color: rgba(247, 241, 232, .75); font-weight: 400; }
.dd-footer .wp-block-navigation a:hover { color: var(--wp--preset--color--base); text-decoration: underline; }
.dd-cookie {
	position: fixed; left: 0; right: 0; bottom: 0; z-index: 200;
	display: none !important;
	box-shadow: 0 -8px 24px rgba(0, 0, 0, .18);
}
.dd-cookie.is-visible { display: flex !important; }
.dd-cookie p { max-width: 640px; margin: 0; color: var(--dd-on-dark); }
.dd-cookie a { color: var(--wp--preset--color--base); }
.dd-cookie .wp-block-button__link { padding: 9px 18px; font-size: 13px; }
.editor-styles-wrapper .dd-cookie { position: static; display: flex !important; }

/* ---------- Fonds sombres ---------- */
.has-contrast-background-color .is-style-outline > .wp-block-button__link,
.is-style-card-dark .is-style-outline > .wp-block-button__link {
	color: var(--wp--preset--color--base);
	border-color: var(--dd-on-dark-line);
}
.has-contrast-background-color .is-style-muted,
.is-style-card-dark .is-style-muted { color: var(--dd-on-dark); }
.is-style-card-dark a:not(.wp-element-button),
.has-contrast-background-color a:not(.wp-element-button) {
	color: var(--wp--preset--color--base);
	text-decoration-color: var(--dd-on-dark-line);
	text-underline-offset: 4px;
}
.is-style-card-dark .is-style-text-link > .wp-block-button__link { color: var(--wp--preset--color--base); text-decoration: underline; text-decoration-color: var(--dd-on-dark-line); text-underline-offset: 4px; }

/* ---------- Boutons ---------- */
.wp-block-button.is-style-outline > .wp-block-button__link:hover { border-color: var(--wp--preset--color--primary); background: transparent; color: var(--wp--preset--color--primary); }
.wp-block-button.is-style-light > .wp-block-button__link:hover { background: var(--wp--preset--color--offset); color: var(--wp--preset--color--contrast); }
.wp-block-button.is-style-text-link > .wp-block-button__link { border: 0; border-radius: 0; text-align: left; }
.wp-block-button.is-style-text-link > .wp-block-button__link:hover { background: transparent; color: var(--wp--preset--color--primary-dark); text-decoration: underline; text-underline-offset: 4px; }
.dd-stack-links { flex-direction: column; align-items: flex-start; }
@media (max-width: 560px) {
	.wp-block-buttons:not(.dd-stack-links) > .wp-block-button { width: 100%; }
	.wp-block-buttons:not(.dd-stack-links) > .wp-block-button > .wp-block-button__link { width: 100%; }
	.dd-announce .wp-block-button, .dd-cookie .wp-block-button { width: auto; }
}

/* ---------- Styles de paragraphe ---------- */
.is-style-eyebrow { margin-bottom: 0; }
.is-style-eyebrow + * { margin-block-start: 14px; }
.is-style-number-badge,
.is-style-avatar {
	width: 42px; height: 42px; border-radius: 50%;
	display: flex; align-items: center; justify-content: center;
	flex-shrink: 0; padding: 0;
}
.is-style-number-badge { margin-bottom: 8px; }
.is-style-avatar { margin: 0; font-size: 16px; }
.is-style-stars { margin: 0; }
.is-style-promise { max-width: 940px; margin-inline: auto; }
.is-style-note a { font-weight: 800; text-decoration: none; }
.is-style-note a:hover { text-decoration: underline; text-underline-offset: 4px; }

/* ---------- Cartes ---------- */
.is-style-card, .is-style-card-dark { overflow: hidden; }
.is-style-card > p:not(.has-text-color):not([class*="is-style-"]),
.is-style-card > .wp-block-list,
.is-style-card-gradient > p:not(.has-text-color):not([class*="is-style-"]) { color: var(--wp--preset--color--muted); }
.is-style-card > h3, .is-style-card-dark > h3, .is-style-card-gradient > h3 { font-size: var(--wp--preset--font-size--x-large); line-height: 1.18; }
.is-style-card > .wp-block-list, .is-style-card-dark > .wp-block-list { padding-left: 1.2em; margin-bottom: 0; }
.is-style-card > .wp-block-list li + li, .is-style-card-dark > .wp-block-list li + li { margin-top: 6px; }
.dd-person > .wp-block-image { margin: 0; }
.dd-person > .wp-block-image img { width: 100%; display: block; background: var(--wp--preset--color--offset); }
.dd-person h3 { font-size: var(--wp--preset--font-size--xx-large) !important; }

/* Cartes des défis (Boucle de requête) */
.dd-defis .is-style-card p { margin: 0; }
.dd-defis .wp-block-post-title { font-size: 19px; line-height: 1.15; }
.dd-defis .wp-block-post-excerpt { flex-grow: 1; line-height: 1.42; margin: 0; }
.wp-block-post-excerpt__more-text { margin-top: 12px; }
.wp-block-post-excerpt__more-link { color: var(--wp--preset--color--primary); font-weight: 800; text-decoration: none; }
.wp-block-post-excerpt__more-link:hover { color: var(--wp--preset--color--primary-dark); text-decoration: underline; text-underline-offset: 4px; }

/* Cartes d'articles */
.dd-post-card .wp-block-post-featured-image { margin: 0; }
.dd-post-card-body { padding: 18px 22px 0; }
.dd-post-card .wp-block-post-title { margin: 0; }

/* Étiquette prix */
.is-style-price-tag { display: inline-flex; width: fit-content; }
.is-style-price-tag p { margin: 0; }
.dd-price-amount { font-family: var(--wp--preset--font-family--serif); font-size: 22px; }
.dd-price-amount:empty { display: none; }
.dd-price:has(.dd-price-amount:empty) { display: none; }
.editor-styles-wrapper .dd-price { display: inline-flex; }

/* Fil d'Ariane */
.is-style-breadcrumb p { margin: 0; }
.is-style-breadcrumb a { color: var(--wp--preset--color--primary); font-weight: 700; text-decoration: none; }
.is-style-breadcrumb a:hover { text-decoration: underline; }
.dd-page-crumb + .wp-block-post-content > :first-child { padding-top: var(--wp--preset--spacing--20) !important; }

/* ---------- Visuel du bandeau d'accueil ---------- */
.dd-hero-visual { position: relative; min-height: 360px; }
.dd-hero-visual > .is-style-floating { position: absolute; width: min(290px, 82%); margin: 0; }
.dd-hero-visual > .is-style-floating:first-child { top: 20px; left: 0; transform: rotate(-3deg); }
.dd-hero-visual > .is-style-floating:last-child { right: 0; bottom: 35px; transform: rotate(2deg); }
.is-style-floating p { margin: 0; }
.is-style-floating::before {
	content: ""; display: block; width: 10px; height: 10px; border-radius: 50%;
	background: var(--wp--preset--color--primary); margin-bottom: 16px;
}
.is-style-floating.has-primary-background-color::before { background: var(--wp--preset--color--cream); }
@media (max-width: 781px) { .dd-hero-visual { min-height: 300px; } }
@media (max-width: 560px) { .dd-hero-visual { display: none; } }

/* ---------- Défilement horizontal (avis) ---------- */
.is-style-scroller {
	overflow-x: auto;
	padding: 6px 6px 20px;
	scroll-snap-type: x proximity;
	-webkit-overflow-scrolling: touch;
}
.is-style-scroller > * { flex: 0 0 300px; scroll-snap-align: start; margin: 0 !important; }
.is-style-scroller::-webkit-scrollbar { height: 9px; }
.is-style-scroller::-webkit-scrollbar-track { background: var(--wp--preset--color--offset); border-radius: 999px; }
.is-style-scroller::-webkit-scrollbar-thumb { background: var(--wp--preset--color--primary); border-radius: 999px; }
.dd-review > * { margin: 0; }
.dd-review-text { flex-grow: 1; line-height: 1.5; }
@media (max-width: 560px) { .is-style-scroller > * { flex-basis: 260px; } }

/* ---------- Liste à séparateurs ---------- */
.wp-block-list.is-style-divided { list-style: none; padding: 0; margin-block: 30px; }
.is-style-divided li { border-bottom: 1px solid var(--wp--preset--color--divider); padding: 14px 0; color: var(--wp--preset--color--muted); }
.is-style-divided li strong {
	display: inline-block; min-width: 140px; color: var(--wp--preset--color--contrast);
	text-transform: uppercase; font-size: 13px; letter-spacing: .08em;
}
@media (max-width: 560px) { .is-style-divided li strong { display: block; margin-bottom: 4px; } }

/* ---------- Tableau calendrier ---------- */
.wp-block-table.is-style-calendar {
	overflow-x: auto;
	border: 1px solid var(--wp--preset--color--divider);
	border-radius: var(--dd-radius);
	background: var(--wp--preset--color--surface-light);
	box-shadow: var(--dd-shadow);
}
.wp-block-table.is-style-calendar table { min-width: 720px; width: 100%; table-layout: auto; border-collapse: collapse; }
.wp-block-table.is-style-calendar thead { border: 0; }
.wp-block-table.is-style-calendar th,
.wp-block-table.is-style-calendar td {
	padding: 15px 18px; text-align: left; vertical-align: top; border: 0;
	border-bottom: 1px solid var(--wp--preset--color--divider);
}
.wp-block-table.is-style-calendar th {
	background: var(--wp--preset--color--contrast); color: var(--wp--preset--color--base);
	font-size: 13px; letter-spacing: .08em; text-transform: uppercase;
}
.wp-block-table.is-style-calendar tr:last-child td { border-bottom: 0; }
.wp-block-table.is-style-calendar td:first-child,
.wp-block-table.is-style-calendar td:nth-child(2),
.wp-block-table.is-style-calendar td:last-child { font-weight: 800; color: var(--wp--preset--color--primary); white-space: nowrap; }
.wp-block-table.is-style-calendar a { color: var(--wp--preset--color--contrast); font-weight: 800; text-decoration: none; }
.wp-block-table.is-style-calendar a:hover { color: var(--wp--preset--color--primary); text-decoration: underline; text-underline-offset: 4px; }

/* ---------- FAQ (bloc Détails) ---------- */
.wp-block-details { padding: 0; }
.wp-block-details summary { cursor: pointer; padding: 22px 24px; font-weight: 800; }
.wp-block-details > :not(summary) { padding-inline: 24px; color: var(--wp--preset--color--muted); margin-top: 0; }
.wp-block-details > :last-child:not(summary) { padding-bottom: 24px; }

/* ---------- Outil d'orientation ---------- */
.wp-block-list.dd-finder { list-style: none; padding: 0; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
.dd-finder li { margin: 0; }
.dd-finder-option {
	display: flex; gap: 12px; align-items: flex-start;
	background: rgba(255, 255, 255, .48);
	border: 1px solid var(--wp--preset--color--divider);
	border-radius: var(--dd-radius-sm);
	padding: 15px 16px; cursor: pointer;
	font-weight: 700; line-height: 1.35;
}
.dd-finder-option:hover, .dd-finder-option:has(input:checked) { border-color: var(--wp--preset--color--primary); }
.dd-finder-option input { margin-top: 4px; accent-color: var(--wp--preset--color--primary); flex-shrink: 0; }
.dd-finder-result:empty { display: none; }
.dd-finder-result > * + * { margin-top: 16px; }
.dd-result-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(14rem, 1fr)); gap: 16px; margin-top: 18px; }
.dd-result-card {
	background: var(--wp--preset--color--base);
	border: 1px solid var(--wp--preset--color--border);
	border-radius: var(--dd-radius-sm); padding: 18px;
}
.dd-result-card strong { display: block; color: var(--wp--preset--color--primary); font-family: var(--wp--preset--font-family--serif); font-size: 20px; line-height: 1.2; }
.dd-result-card p { color: var(--wp--preset--color--muted); font-size: 14px; line-height: 1.45; margin: 10px 0 0; }
.dd-result-card a { display: inline-flex; margin-top: 14px; font-weight: 800; text-decoration: none; }
.dd-result-card a:hover { text-decoration: underline; text-underline-offset: 4px; }
@media (max-width: 920px) { .wp-block-list.dd-finder { grid-template-columns: 1fr; } }

/* ---------- Test du couple ---------- */
.wp-block-list.dd-quiz { list-style: none; padding: 0; margin: 0; }
.dd-quiz > li { border-bottom: 1px solid var(--wp--preset--color--divider); padding: 18px 0; }
.dd-quiz .dd-q-text { font-weight: 700; margin: 0 0 12px; }
.dd-quiz-scale { display: flex; gap: 8px; flex-wrap: wrap; }
.dd-quiz-scale label {
	display: flex; align-items: center; gap: 6px; cursor: pointer;
	background: var(--wp--preset--color--base);
	border: 1px solid var(--wp--preset--color--divider);
	border-radius: 999px; padding: 8px 14px; font-size: 14px;
	color: var(--wp--preset--color--muted);
}
.dd-quiz-scale label:has(input:checked) { border-color: var(--wp--preset--color--primary); color: var(--wp--preset--color--contrast); }
.dd-quiz-scale input { accent-color: var(--wp--preset--color--primary); }
.dd-quiz-gate { display: none; }
.dd-quiz-gate.is-visible { display: block; }
.editor-styles-wrapper .dd-quiz-gate { display: block; border: 1px dashed var(--wp--preset--color--border); padding: 16px; }
.dd-quiz-output:empty { display: none; }
.dd-quiz-level { font-family: var(--wp--preset--font-family--serif); color: var(--wp--preset--color--primary); }
.dd-quiz-output ul { color: var(--wp--preset--color--muted); padding-left: 20px; }
.dd-quiz-output li { margin-bottom: 8px; }

/* ---------- Compte à rebours ---------- */
.dd-countdown { display: flex; justify-content: center; gap: 14px; flex-wrap: wrap; margin-block: 26px; }
.dd-countdown-unit {
	background: var(--wp--preset--color--base);
	border: 1px solid var(--wp--preset--color--border);
	border-radius: var(--dd-radius-sm); padding: 14px 18px; min-width: 84px; text-align: center;
}
.dd-countdown-unit strong { display: block; font-family: var(--wp--preset--font-family--serif); color: var(--wp--preset--color--primary); font-size: 32px; line-height: 1; }
.dd-countdown-unit span { display: block; color: var(--wp--preset--color--muted); font-size: 12px; letter-spacing: .06em; text-transform: uppercase; margin-top: 6px; }

/* ---------- Contact Form 7 ---------- */
.wpcf7 form > p, .wpcf7 form > div { margin: 0 0 18px; }
.wpcf7 label { display: block; font-weight: 700; font-size: 14px; }
.wpcf7 input[type="text"], .wpcf7 input[type="email"], .wpcf7 input[type="tel"],
.wpcf7 input[type="url"], .wpcf7 input[type="number"], .wpcf7 textarea, .wpcf7 select {
	width: 100%; margin-top: 6px;
	border: 1px solid var(--wp--preset--color--border);
	border-radius: var(--dd-radius-sm);
	padding: 12px 14px; font: inherit; font-size: 15px; font-weight: 400;
	background: var(--wp--preset--color--base); color: var(--wp--preset--color--contrast);
}
.wpcf7 textarea { min-height: 130px; resize: vertical; }
.wpcf7 input:focus, .wpcf7 textarea:focus { outline: 2px solid var(--wp--preset--color--primary); outline-offset: 1px; }
.wpcf7 input[type="submit"] {
	width: 100%; border: 0; cursor: pointer;
	background: var(--wp--preset--color--primary); color: var(--wp--preset--color--cream);
	border-radius: 999px; padding: 14px 24px; font: inherit; font-weight: 700; line-height: 1.2;
	box-shadow: var(--wp--preset--shadow--button);
}
.wpcf7 input[type="submit"]:hover { background: var(--wp--preset--color--primary-dark); }
.dd-consent label, .dd-consent .wpcf7-list-item-label { font-weight: 400; font-size: 13px; color: var(--wp--preset--color--muted); }
.dd-consent .wpcf7-list-item { margin: 0; }
.dd-consent label { display: flex; gap: 10px; align-items: flex-start; }
.dd-consent input { margin-top: 4px; accent-color: var(--wp--preset--color--primary); flex-shrink: 0; }
.dd-inline-form { display: flex; gap: 10px; flex-wrap: wrap; align-items: flex-start; }
.dd-inline-form .wpcf7-form-control-wrap { flex: 1; min-width: 220px; }
.dd-inline-form input[type="email"] { margin-top: 0; }
.dd-inline-form input[type="submit"] { width: auto; }
.wpcf7 form .wpcf7-response-output { margin: 16px 0 0; padding: 12px 16px; border-radius: var(--dd-radius-sm); font-weight: 700; font-size: 14px; }
.wpcf7 form.sent .wpcf7-response-output { background: var(--wp--preset--color--contrast); color: var(--wp--preset--color--base); border-color: var(--wp--preset--color--contrast); }
.wpcf7-not-valid-tip { font-size: 13px; }
.dd-quiz-gate .wpcf7 form.sent { display: none; }

/* ---------- Inscription : liste des défis + panier ---------- */
.dd-date-list {
	max-height: 460px;
	overflow-y: auto;
	border: 1px solid var(--wp--preset--color--border);
	border-radius: var(--dd-radius);
	background: var(--wp--preset--color--surface-light);
	box-shadow: var(--wp--preset--shadow--soft);
	margin-top: var(--wp--preset--spacing--50);
}
.dd-date-row { display: flex; align-items: center; gap: 16px; padding: 16px 22px; border-bottom: 1px solid var(--wp--preset--color--divider); cursor: pointer; }
.dd-date-row:last-child { border-bottom: 0; }
.dd-date-row:hover { background: var(--wp--preset--color--base); }
.dd-date-row.is-selected { background: var(--wp--preset--color--offset); }
.dd-date-check { width: 18px; height: 18px; accent-color: var(--wp--preset--color--primary); flex-shrink: 0; cursor: pointer; }
.dd-date-num {
	width: 34px; height: 34px; border-radius: 50%;
	background: var(--wp--preset--color--primary); color: var(--wp--preset--color--cream);
	display: flex; align-items: center; justify-content: center; font-weight: 800; font-size: 13px; flex-shrink: 0;
}
.dd-date-info { flex-grow: 1; min-width: 0; }
.dd-date-info strong { display: block; font-size: 15px; }
.dd-date-info span { display: block; color: var(--wp--preset--color--muted); font-size: 13px; margin-top: 2px; }
.dd-date-price { font-weight: 800; color: var(--wp--preset--color--primary); font-size: 14px; white-space: nowrap; }
.dd-cart-summary {
	position: sticky;
	bottom: 16px;
	margin-top: 20px;
	background: var(--wp--preset--color--contrast);
	color: var(--wp--preset--color--base);
	border-radius: var(--dd-radius);
	padding: 20px 24px;
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 16px;
	flex-wrap: wrap;
	box-shadow: var(--wp--preset--shadow--button);
}
.dd-cart-summary-text strong { display: block; font-size: 17px; }
.dd-cart-summary-text span { display: block; color: var(--wp--preset--color--base); opacity: .75; font-size: 13px; margin-top: 4px; }
.dd-section-buy-row { align-items: center; margin: 12px 0; padding-bottom: 12px; border-bottom: 1px solid var(--wp--preset--color--divider); }
.dd-section-buy-row:last-of-type { border-bottom: none; }
@media (max-width: 560px) {
	.dd-date-row { flex-wrap: wrap; padding: 14px 16px; gap: 10px; }
	.dd-date-info { flex-basis: calc(100% - 60px); order: 1; }
	.dd-date-price { order: 2; margin-left: 60px; }
	.dd-cart-summary { flex-direction: column; align-items: stretch; text-align: center; }
}
