/* LA DÉBROUILLE DE BIBI — CSS WORDPRESS + KADENCE
   Version corrigée : styles du design isolés pour ne pas dérégler Kadence/WooCommerce.
   Remplacer l'ancien contenu de style-bibi.css par ce fichier complet. */

@import url('https://fonts.googleapis.com/css2?family=Fredoka:wght@500;600;700&family=Nunito:wght@400;600;700;800&display=swap');

:root {
  --bibi-rose: #E9A9A5;
  --bibi-miel: #E8C77B;
  --bibi-sauge: #A9BDA2;
  --bibi-lilas: #B7A7C9;
  --bibi-ivoire: #FAF3E8;
  --bibi-rose-clair: #F6DCDA;
  --bibi-miel-clair: #F5E6C2;
  --bibi-sauge-claire: #DDE6D9;
  --bibi-lilas-clair: #E4DCEC;
  --bibi-texte: #2B2118;
  --bibi-texte-doux: #5E4B3C;
  --bibi-violet: #5E4A78;
}

/* Base commune uniquement dans les blocs personnalisés Bibi */
.bibi,
.bibi *,
.bibi *::before,
.bibi *::after { box-sizing: border-box; }

.bibi {
  width: 100%;
  max-width: 100%;
  margin-inline: auto;
  color: var(--bibi-texte);
  font-family: Nunito, system-ui, sans-serif;
  line-height: 1.5;
  text-align: left;
  overflow-wrap: break-word;
}

.bibi h1, .bibi h2, .bibi h3, .bibi h4 {
  color: var(--bibi-texte);
  font-family: Fredoka, Nunito, sans-serif;
  font-weight: 600;
  letter-spacing: -0.01em;
}
.bibi a { color: inherit; }
.bibi img, .bibi video, .bibi iframe, .bibi svg { max-width: 100%; }
.bibi img { height: auto; }
.bibi button, .bibi input, .bibi select, .bibi textarea { font: inherit; }
.bibi button { cursor: pointer; }
.bibi form { max-width: 100%; }
.bibi input, .bibi select, .bibi textarea { min-width: 0; max-width: 100%; }
.bibi table { width: 100%; max-width: 100%; border-collapse: collapse; }
.bibi th, .bibi td { overflow-wrap: anywhere; }

/* Les éléments en grille/flex doivent pouvoir se réduire dans les colonnes Kadence. */
.bibi section, .bibi div, .bibi article, .bibi form { min-width: 0; }
.bibi [style*="display: grid"],
.bibi [style*="display: flex"] { min-width: 0; }

/* Boutons du design Bibi seulement : aucune règle globale sur les boutons du thème. */
.bibi button,
.bibi input[type="submit"] {
  border-radius: 999px;
}

/* Le thème Kadence peut limiter la largeur des blocs Gutenberg HTML.
   On libère uniquement les blocs qui contiennent le wrapper .bibi. */
.entry-content > .wp-block-html:has(> .bibi),
.entry-content .wp-block-html:has(.bibi) {
  width: 100%;
  max-width: none;
  margin-left: 0;
  margin-right: 0;
}
.entry-content > .wp-block-html:has(> .bibi) > .bibi,
.entry-content .wp-block-html:has(.bibi) .bibi {
  width: 100%;
  max-width: 100%;
  margin-left: auto;
  margin-right: auto;
}

/* Pages entières intégrées en contenu : ne touche pas aux pages ordinaires. */
.bibi-page {
  width: 100%;
  max-width: 100%;
  margin: 0 auto;
  background: var(--bibi-ivoire);
  color: var(--bibi-texte);
  font-family: Nunito, system-ui, sans-serif;
}

@media (max-width: 767px) {
  .bibi { max-width: 100%; }
  .bibi h1 { font-size: clamp(30px, 8vw, 40px) !important; line-height: 1.12 !important; }
  .bibi h2 { font-size: clamp(25px, 6vw, 32px) !important; line-height: 1.2 !important; }
  .bibi h3 { font-size: clamp(20px, 5vw, 24px) !important; }
  .bibi section { max-width: 100%; }
  .bibi [style*="flex: 1 1 520px"],
  .bibi [style*="flex: 1 1 480px"],
  .bibi [style*="flex: 1 1 460px"],
  .bibi [style*="flex: 1 1 420px"] { flex-basis: 100% !important; }
  .bibi [style*="height: 400px"] { height: 220px !important; }
  .bibi form button, .bibi input[type="submit"] { max-width: 100%; }
  .bibi table { font-size: 14px; }
}
