/* ==========================================================================
   Petit Bonheur — système graphique (charte Atelier Lunarey, octobre 2026).
   Jetons, base typographique, mise en page, bandeaux, hero, blocs core.
   L'en-tête/pied de page sont dans header.css, le mouvement dans motion.css,
   les composants dans components.css, le pont vers l'extension dans plugin-bridge.css.
   Les couleurs viennent de theme.json (--wp--preset--*) avec repli en dur.
   ========================================================================== */

:root {
  --pb-blanc: var(--wp--preset--color--blanc, #ffffff);
  --pb-creme-clair: var(--wp--preset--color--creme-clair, #fef8ee);
  --pb-creme: var(--wp--preset--color--creme, #fdf0dc);
  --pb-brun: var(--wp--preset--color--brun, #303039);
  --pb-brun-doux: var(--wp--preset--color--brun-doux, #64646b);
  --pb-brun-fonce: #232329;
  --pb-corail: var(--wp--preset--color--corail, #f3c5b9);
  --pb-rose: var(--wp--preset--color--rose, #f3c5b9);
  --pb-rose-clair: var(--wp--preset--color--rose-clair, #f6d4cb);
  --pb-rose-pale: var(--wp--preset--color--rose-pale, #f9e2dc);
  --pb-jaune: var(--wp--preset--color--jaune, #fdd490);
  --pb-jaune-vif: var(--wp--preset--color--jaune-vif, #fdd490);
  --pb-jaune-pale: var(--wp--preset--color--jaune-pale, #feebc8);
  --pb-sauge: var(--wp--preset--color--sauge, #c4ceb6);
  --pb-sauge-fonce: var(--wp--preset--color--sauge-fonce, #a1a995);
  --pb-sauge-pale: var(--wp--preset--color--sauge-pale, #e2e7db);
  --pb-bleu: var(--wp--preset--color--bleu, #c1cfcc);
  --pb-bleu-pale: var(--wp--preset--color--bleu-pale, #e0e7e6);
  --pb-lavande: var(--wp--preset--color--lavande, #f6d4cb);
  --pb-gris-doux: var(--wp--preset--color--gris-doux, #d1dbd9);
  /* Jetons d'action (anciens noms conservés pour l'extension) : l'action est gris ancrage, l'accent rose doux. */
  --pb-vert: var(--wp--preset--color--vert-action, #303039);
  --pb-vert-fonce: var(--pb-brun-fonce);
  --pb-accent: var(--pb-corail);
  --pb-danger: #a6453a;
  --pb-danger-bg: var(--pb-rose-pale);
  --pb-font-titre: var(--wp--preset--font-family--fredoka, Fredoka, "Arial Rounded MT Bold", "Nunito", system-ui, sans-serif);
  --pb-font-texte: var(--wp--preset--font-family--nunito, Nunito, system-ui, sans-serif);
  --pb-radius-card: var(--wp--custom--radius--card, 24px);
  --pb-radius-card-lg: var(--wp--custom--radius--card-large, 28px);
  --pb-radius-pill: 999px;
  --pb-radius-input: var(--wp--custom--radius--input, 16px);
  --pb-shadow-soft: var(--wp--custom--shadow--soft, 0 10px 30px rgba(48, 48, 57, 0.08));
  --pb-shadow-card: var(--wp--custom--shadow--card, 0 18px 44px rgba(48, 48, 57, 0.12));
  --pb-ease: cubic-bezier(0.2, 0.8, 0.2, 1);
  --pb-ease-out: cubic-bezier(0.22, 1, 0.36, 1);
  --pb-transition: 320ms var(--pb-ease);
  --pb-header-h: var(--wp--custom--header-height, 80px);
  --pb-header-h-compact: var(--wp--custom--header-height-compact, 64px);
  --pb-gutter: 16px;
  --pb-border: rgba(48, 48, 57, 0.1);
  --pb-liseret: 2px solid var(--pb-creme);
  --pb-focus: 0 0 0 3px var(--pb-blanc), 0 0 0 6px var(--pb-brun);
}

/* ---------- Base ---------- */
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }

body {
  margin: 0;
  background: var(--pb-creme-clair);
  color: var(--pb-brun);
  font-family: var(--pb-font-texte);
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
  overflow-wrap: anywhere;
}

.wp-site-blocks { position: relative; }
.wp-site-blocks > main { min-height: 60vh; }
.wp-site-blocks > * + * { margin-block-start: 0; }

img, video, svg { max-width: 100%; height: auto; }
img { display: block; }
figure { margin: 0; }

h1, h2, h3, h4 { font-family: var(--pb-font-titre); letter-spacing: -0.01em; text-wrap: balance; margin-top: 0; }
p { text-wrap: pretty; }

/* Liens : brun souligné corail ; le soulignement s'épaissit au survol (voir motion.css pour l'étirement). */
a { color: var(--pb-brun); text-decoration-color: var(--pb-corail); text-decoration-thickness: 2px; text-underline-offset: 0.18em; transition: text-decoration-thickness var(--pb-transition), color var(--pb-transition); }
a:hover { color: var(--pb-brun-fonce); text-decoration-thickness: 3px; }

:focus-visible { outline: 3px solid var(--pb-brun); outline-offset: 3px; border-radius: 6px; }
.wp-element-button:focus-visible, .pb-btn:focus-visible, .pb-reserver__toggle:focus-visible, .pb-top:focus-visible { outline: none; box-shadow: var(--pb-focus); }

.screen-reader-text {
  position: absolute !important; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden;
  clip: rect(1px, 1px, 1px, 1px); clip-path: inset(50%); border: 0; word-wrap: normal !important;
}
.screen-reader-text:focus {
  clip: auto !important; clip-path: none; width: auto; height: auto; left: 8px; top: 8px; padding: 0.75rem 1rem;
  background: var(--pb-blanc); color: var(--pb-brun); box-shadow: var(--pb-shadow-card); z-index: 100000; text-decoration: none; font-weight: 700;
}

::selection { background: var(--pb-jaune); color: var(--pb-brun); }

/* ---------- Surfaces pastel : le texte secondaire repasse en brun (jamais de texte pâle sur pastel) ---------- */
.has-sauge-background-color, .has-rose-background-color, .has-rose-clair-background-color, .has-lavande-background-color,
.has-bleu-background-color, .has-jaune-background-color, .has-corail-background-color, .has-jaune-vif-background-color,
.pb-band--sauge, .pb-band--rose, .pb-band--bleu, .pb-band--jaune, .pb-band--lavande,
.pb-card--sauge, .pb-card--rose, .pb-card--bleu, .pb-card--jaune, .pb-card--lavande, .pb-card--corail {
  --pb-brun-doux: var(--pb-brun);
  --pb-border: rgba(48, 48, 57, 0.14);
}

/* ---------- Mise en page ---------- */
.pb-section { padding-block: clamp(3rem, 7vw, 5.5rem); }
.pb-section--tight { padding-block: clamp(2rem, 4vw, 3rem); }
.pb-section--flush { padding-block: 0; }
.pb-section__head { max-width: 720px; margin: 0 auto clamp(1.75rem, 4vw, 2.75rem); text-align: center; }
.pb-section__head--left { margin-inline: 0; text-align: left; }
.pb-section__title { margin: 0 0 0.6rem; font-size: var(--wp--preset--font-size--x-large, 2rem); }
.pb-section__intro { margin: 0; color: var(--pb-brun-doux); font-size: 1.08rem; }
/* Puce illustrée (tasse, cubes, badge) au-dessus du titre de section */
.pb-section__puce { display: block; width: 64px; height: 64px; margin: 0 auto 0.9rem; object-fit: contain; }
.pb-section__head--left .pb-section__puce { margin-inline: 0; }

/* Sur-titre : Nunito 700 capitales, point corail */
.pb-eyebrow {
  display: inline-flex; align-items: center; gap: 0.55rem; margin: 0 0 0.75rem; padding: 0;
  background: transparent; color: var(--pb-brun);
  font-family: var(--pb-font-texte); font-size: 0.75rem; font-weight: 700; letter-spacing: 0.08em; text-transform: uppercase; line-height: 1.4;
}
.pb-eyebrow::before { content: ""; flex: 0 0 auto; width: 0.5rem; height: 0.5rem; border-radius: 50%; background: var(--pb-corail); }
.pb-eyebrow--rose::before { background: var(--pb-rose); }
.pb-eyebrow--jaune::before { background: var(--pb-jaune-vif); }
.pb-eyebrow--bleu::before { background: var(--pb-bleu); }
.pb-eyebrow--sauge::before { background: var(--pb-sauge-fonce); }
.pb-eyebrow--lavande::before { background: var(--pb-corail); }
.pb-eyebrow--plain::before { display: none; }
.pb-eyebrow .pb-eyebrow__dot { color: var(--pb-corail); font-size: 1.2em; line-height: 1; }

.pb-grid { display: grid; gap: 1.25rem; grid-template-columns: repeat(auto-fit, minmax(min(100%, 260px), 1fr)); }
.pb-grid--2 { grid-template-columns: repeat(auto-fit, minmax(min(100%, 320px), 1fr)); }
.pb-grid--4 { grid-template-columns: repeat(auto-fit, minmax(min(100%, 220px), 1fr)); }
@media (min-width: 1024px) {
  .pb-grid--3 { grid-template-columns: repeat(3, 1fr); }
  .pb-grid--4 { grid-template-columns: repeat(4, 1fr); }
}

/* Bandeaux pleine largeur : crème, pastels pâles, formes organiques très légères */
.pb-band { position: relative; isolation: isolate; overflow: hidden; }
.pb-band--creme { background: var(--pb-creme); }
.pb-band--sauge { background: var(--pb-sauge-pale); }
.pb-band--rose { background: var(--pb-rose-pale); }
.pb-band--bleu { background: var(--pb-bleu-pale); }
.pb-band--jaune { background: var(--pb-jaune-pale); }
.pb-band--lavande { background: var(--pb-rose-clair); }
.pb-band--blobs::before, .pb-band--blobs::after {
  content: ""; position: absolute; z-index: -1; border-radius: 48% 52% 46% 54% / 55% 42% 58% 45%;
  background: rgba(255, 255, 255, 0.6); pointer-events: none;
}
.pb-band--blobs::before { width: 38vw; height: 38vw; max-width: 520px; max-height: 520px; top: -18%; right: -10%; }
.pb-band--blobs::after { width: 26vw; height: 26vw; max-width: 340px; max-height: 340px; bottom: -14%; left: -6%; border-radius: 55% 45% 52% 48% / 46% 56% 44% 54%; }
.pb-band--rounded { border-radius: var(--pb-radius-card-lg); }
/* Décor : cubes et tasses posés dans les coins d'un bandeau (ajoutés par les compositions) */
.pb-band__deco { position: absolute; z-index: -1; width: clamp(40px, 6vw, 72px); opacity: 0.9; pointer-events: none; }
.pb-band__deco--tl { top: 6%; left: 4%; }
.pb-band__deco--tr { top: 8%; right: 5%; }
.pb-band__deco--bl { bottom: 8%; left: 6%; }
.pb-band__deco--br { bottom: 6%; right: 4%; }
@media (max-width: 599px) { .pb-band__deco { width: 34px; opacity: 0.7; } }

/* ---------- Bandeau de démonstration (conservé pour compatibilité) ---------- */
.pb-demo-notice { display: flex; justify-content: center; align-items: center; gap: 0.5rem; padding: 0.45rem var(--pb-gutter); background: var(--pb-jaune-pale); color: var(--pb-brun); font-size: 0.85rem; font-weight: 600; text-align: center; }

/* ---------- Hero de l'accueil ---------- */
.pb-hero { padding-block: clamp(2rem, 6vw, 4.5rem) clamp(2.5rem, 6vw, 5rem); }
.pb-hero .wp-block-columns { align-items: center; gap: clamp(1.5rem, 4vw, 3.5rem); }
.pb-hero__eyebrow { margin-bottom: 1rem; }
.pb-hero__title { font-size: var(--wp--preset--font-size--xx-large, 3rem); margin: 0 0 1rem; line-height: 1.08; font-weight: 400; letter-spacing: 0; }
.pb-hero__title em { font-style: normal; }
/* Mots clés « façon logo » : texte brun (contraste AA) sur un trait pastel de surligneur qui s'étire au chargement. */
.pb-mark {
  --pb-mark: var(--pb-jaune);
  position: relative; z-index: 0; display: inline; padding: 0 0.1em; border-radius: 0.3em;
  background-image: linear-gradient(var(--pb-mark), var(--pb-mark)); background-repeat: no-repeat; background-size: 100% 42%; background-position: 0 92%;
  -webkit-box-decoration-break: clone; box-decoration-break: clone;
}
mark.pb-mark { background-color: transparent; color: inherit; }
.pb-mark--jaune { --pb-mark: var(--pb-jaune); }
.pb-mark--rose { --pb-mark: var(--pb-rose); }
.pb-mark--bleu { --pb-mark: var(--pb-bleu); }
.pb-mark--sauge { --pb-mark: var(--pb-sauge); }
.pb-mark--corail { --pb-mark: var(--pb-corail); }
.pb-hero__text { font-size: 1.15rem; color: var(--pb-brun-doux); max-width: 34rem; margin: 0 0 1.5rem; }
.pb-hero__actions { gap: 0.75rem; flex-wrap: wrap; }
.pb-hero .wp-block-column { min-width: 0; max-width: 100%; }
.pb-hero__title, .pb-hero__text { max-width: 100%; overflow-wrap: anywhere; }
.pb-hero__text { max-width: 34rem; }
.wp-site-blocks { overflow-x: clip; }
.pb-hero__media { position: relative; }
.pb-hero__photo { position: relative; z-index: 1; margin: clamp(1.5rem, 4vw, 3rem) clamp(1rem, 3vw, 2.5rem) clamp(1.5rem, 3vw, 2.5rem) clamp(1rem, 4vw, 3rem); }
.pb-hero__photo img { width: 100%; aspect-ratio: 5 / 4; object-fit: cover; border-radius: 44% 56% 52% 48% / 50% 44% 56% 50%; border: 6px solid var(--pb-blanc); box-shadow: var(--pb-shadow-card); }
.pb-hero__blob { position: absolute; z-index: 0; border-radius: 50%; pointer-events: none; }
.pb-hero__blob--rose { inset: -4% -2% auto auto; width: 42%; aspect-ratio: 1; background: var(--pb-rose-clair); }
.pb-hero__blob--jaune { inset: auto auto -6% -4%; width: 32%; aspect-ratio: 1; background: var(--pb-jaune-pale); border-radius: 54% 46% 48% 52% / 50% 58% 42% 50%; }
/* Illustration flottante (tasse + cubes) et petits objets dérivants */
.pb-hero__illu { position: absolute; z-index: 2; left: -2%; bottom: 2%; width: clamp(96px, 22%, 170px); pointer-events: none; }
.pb-hero__deco { position: absolute; z-index: 2; pointer-events: none; width: clamp(34px, 7%, 64px); }
.pb-hero__deco--1 { top: 2%; left: 8%; }
.pb-hero__deco--2 { top: 10%; right: -1%; width: clamp(40px, 9%, 76px); }
.pb-hero__deco--3 { bottom: 14%; right: 2%; }
.pb-hero__deco--4 { top: 44%; left: -4%; width: clamp(28px, 6%, 52px); }
.pb-hero__badges { display: flex; flex-wrap: wrap; gap: 0.5rem; margin: 1.5rem 0 0; padding: 0; list-style: none; }
.pb-hero__badges .pb-badge { gap: 0.45rem; padding: 0.4rem 0.85rem 0.4rem 0.6rem; }
.pb-hero__badges .pb-badge img { width: 1.4rem; height: 1.4rem; object-fit: contain; }
.pb-hero__badges .pb-badge .pb-icon { width: 1.3rem; height: 1.3rem; flex: 0 0 auto; stroke-width: 2; }
@media (max-width: 781px) {
  .pb-hero__media { margin-top: 1rem; }
  .pb-hero__illu { width: 96px; left: 0; }
  .pb-hero__deco--2 { right: 2%; }
  .pb-hero__deco--4 { left: 0; }
}

/* Bandeau de titre des pages intérieures */
.pb-page-hero { position: relative; padding-block: clamp(2rem, 5vw, 3.5rem) clamp(1.5rem, 4vw, 2.5rem); text-align: center; }
.pb-page-hero__title { margin: 0; font-size: var(--wp--preset--font-size--xx-large, 3rem); }
.pb-page-hero__title::after { content: ""; display: block; width: 64px; height: 6px; margin: 1rem auto 0; border-radius: 999px; background: var(--pb-corail); }
.pb-page-hero__meta { justify-content: center; gap: 0.35rem; margin-top: 0.75rem; font-size: 0.92rem; }
.pb-page-hero__meta p, .pb-page-hero__meta .wp-block-post-date { margin: 0; }
.pb-page-hero__lead { margin: 1rem auto 0; max-width: 40rem; color: var(--pb-brun-doux); font-size: 1.1rem; }

/* ---------- Blocs core : ajustements ---------- */
.wp-block-image img { border-radius: var(--pb-radius-card); }
.wp-block-image figcaption { text-align: center; }
.wp-block-buttons { gap: 0.75rem; }
.wp-element-button, .wp-block-button__link {
  display: inline-flex; align-items: center; justify-content: center; gap: 0.5rem; min-height: 44px; line-height: 1.2;
  transition: background var(--pb-transition), color var(--pb-transition), transform var(--pb-transition), box-shadow var(--pb-transition);
}
.wp-element-button:hover, .wp-element-button:focus-visible { transform: translateY(-2px); box-shadow: var(--pb-shadow-card); }
.wp-element-button:active { transform: translateY(0); }
.wp-block-button.is-style-outline .wp-block-button__link { background: var(--pb-corail); color: var(--pb-brun); border-color: var(--pb-corail); }
.wp-block-button.is-style-outline .wp-block-button__link:hover, .wp-block-button.is-style-outline .wp-block-button__link:focus-visible { background: var(--pb-rose); border-color: var(--pb-rose); color: var(--pb-brun); }
.wp-block-columns { gap: clamp(1.25rem, 3vw, 2.5rem); }
.wp-block-details { background: var(--pb-blanc); }
.wp-block-separator { margin-inline: auto; width: 72px; border-color: var(--pb-gris-doux); }
.wp-block-table table { border-collapse: collapse; } .wp-block-table td, .wp-block-table th { border-color: var(--pb-border); padding: 0.6rem 0.75rem; }
.has-blanc-background-color.has-border, .pb-surface { border: 1px solid var(--pb-border); }
.wp-block-post-title a { text-decoration: none; }
.pb-archive .wp-block-post { background: var(--pb-blanc); border: 1px solid var(--pb-border); border-radius: var(--pb-radius-card); padding: 1.25rem 1.5rem; box-shadow: var(--pb-shadow-soft); }
.wp-block-query-pagination a, .wp-block-query-pagination .page-numbers { text-decoration: none; font-weight: 700; padding: 0.4rem 0.8rem; min-width: 44px; min-height: 44px; display: inline-grid; place-items: center; border-radius: var(--pb-radius-pill); }
.wp-block-query-pagination .current { background: var(--pb-rose-clair); }
.wp-block-search__input { border: 1.5px solid var(--pb-border); border-radius: var(--pb-radius-pill); padding: 0.7rem 1.1rem; min-height: 44px; font: inherit; background: var(--pb-blanc); color: var(--pb-brun); }
.wp-block-search__input:focus { outline: none; border-color: var(--pb-corail); box-shadow: 0 0 0 4px rgba(243, 197, 185, 0.3); }
.wp-block-search__button { border-radius: var(--pb-radius-pill); background: var(--pb-brun); color: var(--pb-creme); border: 0; padding: 0.7rem 1.2rem; min-height: 44px; font-weight: 700; cursor: pointer; transition: background var(--pb-transition), color var(--pb-transition); }
.wp-block-search__button:hover { background: var(--pb-corail); color: var(--pb-brun); }

/* ---------- Page 404 ---------- */
.pb-404 { text-align: center; padding-block: clamp(3rem, 8vw, 6rem); }
.pb-404__code { font-family: var(--pb-font-titre); font-size: clamp(4rem, 14vw, 8rem); font-weight: 700; line-height: 1; color: var(--pb-brun); margin: 0; letter-spacing: -0.02em; }
.pb-404__code span { display: inline-block; padding: 0 0.08em; border-radius: 0.25em; background: var(--pb-jaune); }
.pb-404__code span:nth-child(2) { background: var(--pb-rose); }
.pb-404__code span:nth-child(3) { background: var(--pb-bleu); }
.pb-404 .wp-block-search { max-width: 420px; margin-inline: auto; }
.pb-404__title { margin: 0.75rem 0 0.75rem; }
.pb-404__text { color: var(--pb-brun-doux); max-width: 34rem; margin: 0 auto 1.5rem; }

/* ---------- Ancres, pages intérieures, articles, recherche ---------- */
[id] { scroll-margin-top: calc(var(--pb-header-h) + 1rem); }
.pb-section--visite { background: var(--pb-creme); padding-block: clamp(2.5rem, 6vw, 4.5rem) 0; }
.pb-section--visite .pb-section__head { margin-bottom: clamp(1.25rem, 3vw, 2rem); }
.pb-section--visite .wp-block-petitbonheur-visite { margin-top: 0; }
.pb-section--flush-top { padding-block-start: 0; }
.pb-section__cta { display: flex; justify-content: center; margin-top: clamp(1.5rem, 4vw, 2.5rem); }
.pb-text-muted { color: var(--pb-brun-doux); }
.pb-cta { text-align: center; }
.pb-cta .pb-section__title { margin-bottom: 0.75rem; }
.pb-cta .wp-block-buttons { justify-content: center; }
.pb-drinks-card { background: var(--pb-blanc); border: 1px solid var(--pb-border); border-radius: var(--pb-radius-card); padding: clamp(1.25rem, 3vw, 1.75rem); box-shadow: var(--pb-shadow-soft); }
.pb-drinks-card h3 { font-size: 1.1rem; margin: 0 0 0.75rem; }
.pb-drinks-card + .pb-drinks-card { margin-top: 1rem; }
.pb-article { max-width: var(--wp--style--global--content-size, 720px); margin-inline: auto; }
.pb-article__meta { color: var(--pb-brun-doux); font-size: 0.92rem; display: flex; flex-wrap: wrap; gap: 0.5rem 1rem; justify-content: center; margin: 0.5rem 0 1.5rem; }
.pb-article .wp-block-post-featured-image img { border-radius: var(--pb-radius-card-lg); }
.pb-archive { display: grid; gap: 1.25rem; }
.pb-archive .wp-block-post-title { font-size: 1.4rem; margin: 0 0 0.4rem; }
.pb-archive .wp-block-post-date { font-size: 0.88rem; color: var(--pb-brun-doux); }
.pb-archive .wp-block-post-excerpt__more-link { font-weight: 700; }
.pb-search-form { max-width: 560px; margin: 0 auto clamp(1.5rem, 4vw, 2.5rem); }
.pb-no-results { text-align: center; color: var(--pb-brun-doux); padding: 2rem 0; }
.wp-block-query-pagination { justify-content: center; margin-top: 2rem; }

/* Sections pleine largeur : aucun espace blanc entre deux sections colorées (l'écart de blocs est remplacé par le padding interne). */
.wp-block-post-content > .pb-section.alignfull { margin-block-start: 0; }
.wp-block-post-content > .pb-section.alignfull:last-child { margin-block-end: 0; }
.pb-main > .wp-block-post-content { margin-block-end: 0; }
/* Rangées de cartes : largeur « wide » même à l'intérieur d'une section au contenu étroit. */
.pb-section:not(.alignwide):not(.alignfull) > .alignwide {
  --pb-cards-width: min(var(--wp--style--global--wide-size, 1200px), calc(100vw - 2 * var(--wp--style--root--padding-left, 1rem)));
  position: relative; left: calc(50% - var(--pb-cards-width) / 2);
  width: var(--pb-cards-width); max-width: none;
}

/* ---------- Visite : sur mobile, le plan interactif laisse place aux cartes des espaces (voir blocs/visite) ---------- */
.pb-section--visite .pb-section__intro { display: none; }
