/* =========================================================
   blocs-fabularium.css — Migration hybride, étape 1 (25/11/2026)
   Styles des blocs « Fabularium » (site + éditeur WordPress).
   Ne touche à rien d'existant : tout est rangé sous
   .fab-editable (modèle « Page éditable ») ou .is-style-fab-*
   (styles choisis dans l'éditeur).
   Assets lus dans le thème actif (../assets/).
========================================================= */

/* v1.1 (25/11/2026) : compositions sur les classes du thème + bloc Polaroid. */

/* Variables reprises du thème, pour l'éditeur seulement
   (sur le site, ce sont celles de style.css qui s'appliquent). */
.editor-styles-wrapper {
  --paper: #f4ead5;
  --paper-light: #fbf5e8;
  --paper-warm: #ead8b9;
  --ink: #241b15;
  --ink-soft: #4a3a2d;
  --graphite: #55514b;
  --rust: #a9482b;
  --rust-dark: #7e2f1f;
  --ochre: #c58a32;
  --surface-paper: rgba(255, 250, 238, 0.78);
  --surface-note: #fff4d8;
  --surface-photo: #d8cdb8;
  --shadow-paper: 0 10px 24px rgba(44, 31, 18, 0.18);
  --shadow-small: 0 6px 16px rgba(44, 31, 18, 0.12);
  --radius-card: 14px 17px 13px 16px;
  --radius-btn: 14px 17px 13px 16px;
  --container: 1340px;
  --gutter: clamp(14px, 2.8vw, 48px);
  --section-padding: clamp(80px, 12vw, 160px);
  --section-padding-small: clamp(56px, 8vw, 100px);
  --font-title: "IM Fell English", Georgia, "Times New Roman", serif;
  --font-body: "DM Sans", system-ui, -apple-system, sans-serif;
  --font-ui: "Plus Jakarta Sans", "DM Sans", system-ui, sans-serif;
  --tape-filter: sepia(0.35) hue-rotate(-12deg) saturate(1.15) drop-shadow(0 1px 1.5px rgba(60, 40, 18, 0.22));
  --tape-opacity: 0.86;
}

/* ---------- Éditeur : fond papier et typo du site ---------- */
.editor-styles-wrapper {
  background: var(--paper);
  color: var(--ink);
  font-family: var(--font-body);
}
.editor-styles-wrapper h1,
.editor-styles-wrapper h2,
.editor-styles-wrapper h3,
.editor-styles-wrapper h4 {
  font-family: var(--font-title);
  font-weight: 400;
  color: var(--ink);
}

/* =========================================================
   TEXTES
========================================================= */



.is-style-fab-note {
  display: inline-block;
  padding: 0.6rem 0.9rem;
  font-family: var(--font-title);
  font-style: italic;
  color: var(--graphite);
  background: var(--surface-note);
  border-radius: 4px 7px 5px 6px;
  transform: rotate(-1deg);
  box-shadow: var(--shadow-small);
}

.is-style-fab-citation {
  border: 0;
  padding: 0;
  font-family: var(--font-title);
  font-style: italic;
  font-size: clamp(1.3rem, 2vw, 1.7rem);
  line-height: 1.35;
  color: var(--ink);
}
.is-style-fab-citation cite {
  display: block;
  margin-top: 0.8rem;
  font-family: var(--font-ui);
  font-style: normal;
  font-size: 0.8rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--rust);
}

/* =========================================================
   BOUTONS
========================================================= */
.wp-block-button.is-style-fab-principal .wp-block-button__link,
.wp-block-button.is-style-fab-secondaire .wp-block-button__link {
  display: inline-flex;
  align-items: center;
  gap: 14px;
  min-height: 48px;
  padding: 0.85rem 1.4rem;
  border-radius: var(--radius-btn);
  font-family: var(--font-ui);
  font-size: 0.82rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  text-decoration: none;
  transition: transform 180ms ease, box-shadow 180ms ease, background 180ms ease;
}
.wp-block-button.is-style-fab-principal .wp-block-button__link {
  color: var(--paper-light);
  border: 0;
  background: linear-gradient(180deg, #b95736 0%, var(--rust) 100%);
  box-shadow: 0 12px 22px rgba(126, 47, 31, 0.25);
}
.wp-block-button.is-style-fab-secondaire .wp-block-button__link {
  color: var(--ink);
  border: 1px solid rgba(36, 27, 21, 0.30);
  background: rgba(255, 250, 238, 0.55);
}
.wp-block-button.is-style-fab-principal .wp-block-button__link:hover,
.wp-block-button.is-style-fab-secondaire .wp-block-button__link:hover {
  transform: translateY(-2px) rotate(-0.4deg);
}

/* =========================================================
   FAQ (bloc Détails)
========================================================= */
.wp-block-details.is-style-fab-faq-categorie {
  margin-block: 2rem;
}
.wp-block-details.is-style-fab-faq-categorie > summary {
  font-family: var(--font-title);
  font-size: clamp(1.6rem, 2.6vw, 2.2rem);
  color: var(--ink);
  cursor: pointer;
  margin-bottom: 1rem;
}
.wp-block-details.is-style-fab-faq-question {
  margin: 0 0 0.8rem;
  padding: 1rem 1.2rem;
  background: var(--surface-paper);
  border-radius: var(--radius-card);
  box-shadow: var(--shadow-small);
}
.wp-block-details.is-style-fab-faq-question > summary {
  font-family: var(--font-ui);
  font-weight: 600;
  color: var(--ink);
  cursor: pointer;
}
.wp-block-details.is-style-fab-faq-question[open] > summary {
  color: var(--rust);
  margin-bottom: 0.6rem;
}

/* =========================================================
   MUR DE PHOTOS (bloc Galerie)
========================================================= */
.wp-block-gallery.is-style-fab-mur-photos {
  gap: clamp(14px, 2vw, 28px) !important;
}
.wp-block-gallery.is-style-fab-mur-photos .wp-block-image {
  padding: 10px 10px 34px;
  background: var(--paper-light);
  box-shadow: var(--shadow-paper);
  transform: rotate(-1.2deg);
}
.wp-block-gallery.is-style-fab-mur-photos .wp-block-image:nth-child(even) {
  transform: rotate(1.4deg);
}
.wp-block-gallery.is-style-fab-mur-photos .wp-block-image:nth-child(3n) {
  transform: rotate(-0.4deg);
}

/* =========================================================
   TEXTE + IMAGE
========================================================= */
.wp-block-media-text.is-style-fab-texte-image {
  padding: clamp(20px, 2.4vw, 34px);
  background: var(--surface-paper);
  border-radius: var(--radius-card);
  box-shadow: var(--shadow-small);
}
.wp-block-media-text.is-style-fab-texte-image .wp-block-media-text__media img {
  border-radius: 6px 9px 7px 8px;
}

/* =========================================================
   COMPOSITIONS : frise, étape, appel
========================================================= */
.fab-frise {
  display: grid;
  gap: clamp(20px, 3vw, 40px);
  border-left: 2px dashed rgba(169, 72, 43, 0.45);
  padding-left: clamp(18px, 2.4vw, 32px);
}
.fab-frise-annee {
  margin: 0 0 0.3rem;
  font-family: var(--font-ui);
  font-weight: 700;
  font-size: 0.85rem;
  letter-spacing: 0.12em;
  color: var(--rust);
}
.fab-etape {
  padding-block: var(--section-padding-small);
}
.fab-etape-numero {
  margin: 0;
  font-family: var(--font-title);
  font-size: clamp(3rem, 6vw, 5rem);
  line-height: 1;
  color: var(--ochre);
}
.fab-appel {
  text-align: center;
}

/* =========================================================
   MODÈLE « PAGE ÉDITABLE » (site)
   Les sections pleine largeur portent .container à l'intérieur,
   comme dans les pages codées.
========================================================= */
.fab-editable {
  width: 100%;
}
/* WordPress ajoute 24px au-dessus de chaque bloc (thème sans theme.json) :
   on revient aux marges du thème. */
/* (0,0,1) : bat la règle de WordPress (0,0,0) mais laisse gagner
   les marges des classes du thème (.hero-lead, .about-values-grid…). */
:where(.fab-editable .is-layout-flow, .fab-editable .wp-block-column) > div,
:where(.fab-editable .is-layout-flow, .fab-editable .wp-block-column) > section,
:where(.fab-editable .is-layout-flow, .fab-editable .wp-block-column) > article,
:where(.fab-editable .is-layout-flow, .fab-editable .wp-block-column) > figure {
  margin-block-start: 0;
}
.fab-editable .wp-block-columns {
  gap: clamp(28px, 4vw, 72px);
  margin-bottom: 0;
}
.fab-editable .wp-block-buttons {
  gap: 14px;
  margin-top: 1.6rem;
}
.fab-appel .wp-block-buttons {
  justify-content: center;
}
.fab-editable .transition-block {
  margin-block-start: clamp(-30px, -3vw, -50px);
}

/* Bloc Polaroid : largeur raisonnable dans une colonne */
/* Bloc Polaroid : la largeur vient du conteneur du thème (comme les pages codées) */
.wp-block-fabularium-polaroid {
  width: 100%;
}

/* Fidélité page À propos (pilote, 25/11/2026) */
.fab-editable .about-values .container > .wp-block-heading,
.fab-editable .about-values .container > .eyebrow {
  max-width: 640px;
  margin-inline: auto;
}
.fab-editable .about-timeline .container > .wp-block-heading {
  margin-bottom: 2rem;
}
.wp-block-fabularium-polaroid figcaption a { color: inherit; }

/* =========================================================
   ÉDITEUR — reprise des styles du thème
   (style.css n'est pas chargé dans l'éditeur ; ces règles
   ne s'appliquent qu'à l'intérieur de .editor-styles-wrapper)
========================================================= */
.editor-styles-wrapper .container {
  max-width: var(--container);
  margin-inline: auto;
  padding-inline: var(--gutter);
}
.editor-styles-wrapper .section-paper {
  padding-block: var(--section-padding-small);
}
.editor-styles-wrapper .section-warm {
  background-color: var(--paper-warm);
  background-image: url("../assets/texture-paper-warm-lower.png");
  background-size: 760px 760px;
  background-blend-mode: multiply;
}
.editor-styles-wrapper .transition-block {
  min-height: 0 !important;
  height: clamp(60px, 7vw, 110px);
  background: url("../assets/transition-paper-bottom-full.png") bottom center / 100% 100% no-repeat;
}
.editor-styles-wrapper .eyebrow {
  margin: 0 0 1.2rem;
  color: var(--rust);
  font-family: var(--font-ui);
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.18em;
  text-transform: uppercase;
}
.editor-styles-wrapper .hero-lead {
  max-width: 60ch;
  font-size: clamp(1.08rem, 1.4vw, 1.3rem);
  line-height: 1.6;
  color: var(--ink-soft);
}
.editor-styles-wrapper h1 {
  font-size: clamp(2.4rem, 5vw, 4.6rem);
  line-height: 0.98;
}
.editor-styles-wrapper h2 {
  font-size: clamp(2rem, 4vw, 3.6rem);
  line-height: 1;
}
.editor-styles-wrapper h3 {
  font-family: var(--font-ui);
  font-size: 1.05rem;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}
.editor-styles-wrapper .text-long { max-width: 64ch; }

/* Polaroid dans l'éditeur (même dessin que le thème) */
.editor-styles-wrapper .polaroid {
  position: relative;
  aspect-ratio: 897 / 962;
  max-width: 440px;
  margin-inline: auto;
}
.editor-styles-wrapper .polaroid::after {
  content: "";
  position: absolute;
  inset: 0;
  background: url("../assets/frame-polaroid-paper-v05_fabularium.png") center / 100% 100% no-repeat;
  pointer-events: none;
  z-index: 3;
}
.editor-styles-wrapper .polaroid .photo {
  position: absolute;
  inset: 7% 7.5% 22% 7.5%;
  background: var(--surface-photo);
  overflow: hidden;
  z-index: 1;
  display: flex;
  align-items: center;
  justify-content: center;
}
.editor-styles-wrapper .polaroid .photo img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.editor-styles-wrapper .polaroid .fab-polaroid-vide {
  position: relative;
  z-index: 5;
}
.editor-styles-wrapper .polaroid figcaption {
  position: absolute;
  left: 8%;
  right: 8%;
  bottom: 5.5%;
  margin: 0;
  z-index: 4;
  font-family: var(--font-title);
  font-style: italic;
  font-size: 0.95rem;
  color: var(--graphite);
  text-align: center;
}
.editor-styles-wrapper .polaroid.taped::before,
.editor-styles-wrapper .polaroid.taped-left::before {
  content: "";
  position: absolute;
  top: -16px;
  left: 50%;
  width: 96px;
  height: 40px;
  transform: translateX(-50%) rotate(1.5deg);
  background: url("../assets/tape-masking-paper.png") center / 100% 100% no-repeat;
  filter: var(--tape-filter);
  opacity: var(--tape-opacity);
  z-index: 5;
  pointer-events: none;
}
.editor-styles-wrapper .polaroid.taped-left::before { left: 22%; }

/* Dans l'éditeur, les éléments « reveal » restent visibles */
.editor-styles-wrapper .reveal { opacity: 1 !important; transform: none !important; }

/* =========================================================
   ADRESSES E-MAIL EN IMAGE (règle anti-spam, 25/11/2026)
========================================================= */
.fab-email-img {
  display: inline-block;
  width: 189px;
  max-width: 100%;
  height: auto;
  vertical-align: middle;
}
.footer-contact .footer-email {
  margin: 0;
}
/* La carte « E-mail » du Contact n'est plus un lien */
div.contact-card.contact-card--mail {
  cursor: default;
}
.fab-editable .cta-letter .signature {
  margin-bottom: 0;
}
.fab-editable .cta-letter .wp-block-buttons {
  margin-top: 1.4rem;
}
