/*
Theme Name: RENOVAO Blog
Theme URI: https://beta.renovao.com
Author: RENOVAO IA
Description: Thème du blog de RENOVAO IA : mêmes couleurs, police, menu et pied de page que le site principal.
Version: 1.0.0
Requires at least: 6.0
Tested up to: 6.7
Requires PHP: 7.4
License: Propriétaire
Text Domain: renovao-blog
*/

/* ---------- Jetons (identiques à ceux du site : resources/css/app.css) ---------- */
:root {
  --mint: #c0ffa5;
  --band: #8fdc72;
  --surface: #ffffff;
  --surface-alt: #eef3f1;
  --border: #dce5e1;
  --text: #0b1d26;
  --muted: #53655f;
  --brand: #0a8a62;
  --brand-dark: #076f4e;
  --brand-50: #e8f7f0;
  --brand-600: #076f4e;
  --ink-100: #eef3f1;
  --ink-200: #dce5e1;
  --ink-600: #46574f;
  --ink-700: #2a3d3a;
  --ink-900: #0b1d26;
  --deep: #06402f;
  --radius: 16px;
  --font: "Plus Jakarta Sans", "Inter", ui-sans-serif, system-ui, -apple-system, "Segoe UI", sans-serif;
}

/* ---------- Base ---------- */
*, *::before, *::after { box-sizing: border-box; }
[hidden] { display: none !important; }
html { -webkit-text-size-adjust: 100%; }
body { margin: 0; min-height: 100vh; display: flex; flex-direction: column; background: var(--mint); color: var(--text); font-family: var(--font); font-size: 16px; line-height: 1.6; -webkit-font-smoothing: antialiased; }
img, video, iframe { max-width: 100%; height: auto; }
a { color: var(--brand); text-decoration-thickness: 1px; text-underline-offset: 2px; }
a:hover { color: var(--brand-dark); }
.rb-main { flex: 1; }
.rb-skip { position: absolute; left: -9999px; top: 0; background: #fff; color: var(--text); padding: .75rem 1rem; z-index: 100; }
.rb-skip:focus { left: 1rem; top: 1rem; border-radius: 8px; }
.screen-reader-text { position: absolute !important; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.rb-wrap { max-width: 1200px; margin: 0 auto; padding-left: 1rem; padding-right: 1rem; }
.rb-wrap--narrow { max-width: 780px; }
.rb-section { padding-top: 2.5rem; padding-bottom: 4rem; }
@media (min-width: 640px) { .rb-wrap { padding-left: 1.5rem; padding-right: 1.5rem; } }

/* ---------- Boutons ---------- */
.rb-btn { display: inline-flex; align-items: center; justify-content: center; border-radius: 9999px; padding: .55rem 1.1rem; font: 500 .875rem/1.2 var(--font); text-decoration: none; cursor: pointer; border: 1px solid transparent; transition: background-color .15s, color .15s; white-space: nowrap; }
.rb-btn--primary { background: var(--brand); color: #fff; }
.rb-btn--primary:hover { background: var(--brand-dark); color: #fff; }
.rb-btn--project { background: #4f46e5; color: #fff; }
.rb-btn--project:hover { background: #4338ca; color: #fff; }
.rb-btn--outline { border-color: var(--ink-900); color: var(--ink-900); background: transparent; }
.rb-btn--outline:hover { background: var(--ink-100); color: var(--ink-900); }
.rb-btn--ghost { border-color: rgba(255, 255, 255, .6); color: #fff; }
.rb-btn--ghost:hover { background: rgba(255, 255, 255, .12); color: #fff; }

/* ---------- En-tête ---------- */
.rb-header { position: sticky; top: 0; z-index: 40; background: rgba(255, 255, 255, .95); border-bottom: 1px solid var(--ink-200); backdrop-filter: blur(8px); }
.admin-bar .rb-header { top: 32px; }
@media (max-width: 782px) { .admin-bar .rb-header { top: 46px; } }
.rb-header__bar { max-width: 1280px; margin: 0 auto; padding: 0 1rem; height: 72px; display: flex; align-items: center; justify-content: space-between; gap: 1rem; }
@media (min-width: 640px) { .rb-header__bar { padding: 0 1.5rem; } }
.rb-logo { display: inline-flex; align-items: center; gap: .5rem; font-size: 1.25rem; font-weight: 800; letter-spacing: -.02em; color: var(--ink-900); text-decoration: none; flex-shrink: 0; }
.rb-logo:hover { color: var(--ink-900); }
.rb-logo__dot { display: inline-block; width: .75rem; height: .75rem; border-radius: 9999px; background: var(--brand); }
.rb-logo__ia { color: var(--brand); }
.rb-nav { display: none; align-items: center; gap: .25rem; font-size: 15px; font-weight: 500; color: var(--ink-600); }
.rb-nav__link { padding: .5rem .875rem; border-radius: 9999px; color: inherit; text-decoration: none; transition: background-color .15s, color .15s; }
.rb-nav__link:hover { background: var(--ink-100); color: var(--ink-900); }
.rb-nav__link.is-current { background: var(--brand-50); color: var(--brand-600); font-weight: 600; }
.rb-header__actions { display: flex; align-items: center; gap: .5rem; }
.rb-hide-mobile { display: none; }
.rb-burger { display: grid; place-items: center; width: 44px; height: 44px; border-radius: 9999px; border: 1px solid #b9c8c2; background: transparent; color: var(--ink-900); cursor: pointer; }
.rb-burger:hover { background: var(--ink-100); }
@media (min-width: 768px) { .rb-hide-mobile { display: inline-flex; } }
@media (min-width: 1024px) { .rb-nav { display: flex; } .rb-burger { display: none; } }
.rb-mobile { background: #fff; border-top: 1px solid var(--ink-200); box-shadow: 0 12px 24px rgba(0, 0, 0, .08); }
.rb-mobile nav { max-width: 1280px; margin: 0 auto; padding: .75rem 1rem; }
.rb-mobile ul { list-style: none; margin: 0; padding: 0; }
.rb-mobile li + li { border-top: 1px solid var(--ink-100); }
.rb-mobile li a { display: block; padding: .9rem 0; color: var(--ink-900); font-weight: 500; text-decoration: none; }
.rb-mobile li a.is-current { color: var(--brand-600); font-weight: 600; }
.rb-mobile__actions { display: flex; flex-wrap: wrap; gap: .75rem; margin: .75rem 0 .5rem; padding-top: 1rem; border-top: 1px solid var(--ink-200); }

/* Sélecteur de langue FR / ES (identique à celui du site) */
.rb-lang { display: inline-flex; align-items: center; border: 1px solid var(--ink-200); border-radius: 9999px; overflow: hidden; font-size: .875rem; font-weight: 500; }
.rb-lang a { padding: .375rem .7rem; color: var(--ink-600); text-decoration: none; }
.rb-lang a:hover { color: var(--ink-900); }
.rb-lang a.is-current { background: var(--ink-900); color: #fff; }
.rb-lang--mobile { margin-left: auto; }
.rb-lang.rb-hide-mobile { display: none; }
@media (min-width: 768px) { .rb-lang.rb-hide-mobile { display: inline-flex; } }

/* ---------- Bandeau de titre ---------- */
.rb-hero { padding: 3.5rem 0 2rem; text-align: center; }
.rb-hero h1 { margin: 0 auto; max-width: 20ch; font-size: clamp(2rem, 5vw, 3.25rem); line-height: 1.1; font-weight: 800; letter-spacing: -.025em; color: var(--ink-900); }
.rb-hero--article { padding-bottom: 1rem; }
.rb-hero--article h1 { max-width: 40ch; font-size: clamp(1.75rem, 4vw, 2.75rem); }
.rb-hero__lead { margin: 1rem auto 0; max-width: 56ch; font-size: 1.125rem; color: var(--ink-700); }
.rb-hero__actions { display: flex; flex-wrap: wrap; justify-content: center; gap: .75rem; margin-top: 1.5rem; }
.rb-404 { margin: 0 0 .5rem; font-size: 5rem; font-weight: 800; line-height: 1; color: var(--brand); }
.rb-hero .rb-search { margin: 1.75rem auto 0; }

/* Titre des archives : le nom de la catégorie en pastille verte, comme le bouton « Rechercher » */
.rb-hero h1.rb-pill { display: inline-flex; align-items: center; max-width: 100%; margin: 0; padding: .6rem 1.75rem; border-radius: 9999px; background: var(--brand); color: #fff; font-size: clamp(1.15rem, 3vw, 1.6rem); font-weight: 600; line-height: 1.3; letter-spacing: 0; }

/* ---------- Recherche ---------- */
.rb-search { display: flex; gap: .5rem; max-width: 460px; }
.rb-search input[type=search] { flex: 1; min-width: 0; border: 1px solid var(--border); border-radius: 9999px; padding: .6rem 1.1rem; font: inherit; background: #fff; color: var(--text); }
.rb-search input[type=search]:focus { outline: 2px solid var(--brand); outline-offset: 1px; }

/* ---------- Cartes d'articles ---------- */
.rb-grid { display: grid; gap: 1.5rem; grid-template-columns: 1fr; }
@media (min-width: 700px) { .rb-grid { grid-template-columns: repeat(2, 1fr); } }
@media (min-width: 1024px) { .rb-grid { grid-template-columns: repeat(3, 1fr); } }
.rb-card { display: flex; flex-direction: column; overflow: hidden; background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); transition: box-shadow .2s, transform .2s; }
.rb-card:hover { box-shadow: 0 10px 30px rgba(6, 64, 47, .15); transform: translateY(-2px); }
.rb-card__media { display: block; aspect-ratio: 16 / 9; background: var(--surface-alt); overflow: hidden; }
.rb-card__media img { display: block; width: 100%; height: 100%; object-fit: cover; }
.rb-card__placeholder { display: grid; place-items: center; width: 100%; height: 100%; background: linear-gradient(135deg, var(--brand-50), var(--band)); }
.rb-card__placeholder .rb-logo__dot { width: 2rem; height: 2rem; opacity: .85; }
.rb-card__body { display: flex; flex-direction: column; flex: 1; padding: 1.25rem; }
.rb-card__title { margin: .5rem 0 .5rem; font-size: 1.2rem; line-height: 1.3; font-weight: 700; }
.rb-card__title a { color: var(--ink-900); text-decoration: none; }
.rb-card__title a:hover { color: var(--brand-dark); }
.rb-card__excerpt { margin: 0 0 1rem; color: var(--muted); font-size: .95rem; }
.rb-card__more { margin-top: auto; font-weight: 600; font-size: .9rem; text-decoration: none; }
.rb-meta { display: flex; flex-wrap: wrap; align-items: center; justify-content: center; gap: .5rem .9rem; margin: 0 0 .75rem; font-size: .8rem; color: var(--muted); }
.rb-card .rb-meta { justify-content: flex-start; margin: 0; }
.rb-tag { display: inline-block; padding: .15rem .65rem; border-radius: 9999px; background: var(--brand-50); color: var(--brand-600); font-weight: 600; text-decoration: none; }
a.rb-tag:hover { background: var(--band); color: var(--ink-900); }

/* ---------- Pagination ---------- */
.navigation.pagination { margin-top: 2.5rem; margin-bottom: 1rem; }
.nav-links { display: flex; flex-wrap: wrap; justify-content: center; gap: .5rem; }
.page-numbers { display: inline-flex; align-items: center; padding: .5rem 1rem; border-radius: 9999px; background: #fff; border: 1px solid var(--border); color: var(--ink-900); text-decoration: none; font-weight: 500; font-size: .9rem; }
a.page-numbers:hover { background: var(--ink-100); }
.page-numbers.current { background: var(--brand); border-color: var(--brand); color: #fff; }
.page-numbers.dots { border: 0; background: transparent; }

/* ---------- Article ---------- */
.rb-paper { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); padding: 1.5rem; }
@media (min-width: 700px) { .rb-paper { padding: 2.5rem 3rem; } }
.rb-article__cover { margin: -1.5rem -1.5rem 1.5rem; border-radius: var(--radius) var(--radius) 0 0; overflow: hidden; }
@media (min-width: 700px) { .rb-article__cover { margin: -2.5rem -3rem 2rem; } }
.rb-article__cover img { display: block; width: 100%; }
.rb-content { font-size: 1.05rem; line-height: 1.75; color: var(--ink-700); overflow-wrap: anywhere; }
.rb-content > *:first-child { margin-top: 0; }
.rb-content h2, .rb-content h3, .rb-content h4 { color: var(--ink-900); line-height: 1.25; letter-spacing: -.015em; margin: 2em 0 .6em; }
.rb-content h2 { font-size: 1.6rem; padding: .45rem 1rem; background: var(--band); border-radius: 10px; }
.rb-content h3 { font-size: 1.3rem; }
.rb-content p, .rb-content ul, .rb-content ol { margin: 0 0 1.2em; }
.rb-content .rb-lead { font-size: 1.2rem; line-height: 1.7; color: var(--ink-900); }
/* L'en-tête collant (72 px) ne doit pas masquer le titre vers lequel pointe un lien d'ancre du sommaire */
.rb-content [id], .rb-content h2[id], .rb-content h3[id] { scroll-margin-top: 110px; }
.admin-bar .rb-content [id] { scroll-margin-top: 110px; }
.rb-content li + li { margin-top: .35em; }
/* Rien ne dépasse de la carte blanche : images, légendes classiques (largeur en ligne), blocs, vidéos, tableaux */
.rb-content, .rb-content * { max-width: 100%; }
.rb-content img, .rb-content video, .rb-content iframe { height: auto; border-radius: 12px; }
.rb-content iframe { width: 100%; aspect-ratio: 16 / 9; height: auto; }
.rb-content .wp-caption, .rb-content figure, .rb-content .wp-block-image, .rb-content .wp-block-embed { width: auto !important; max-width: 100% !important; }
.rb-content .alignwide, .rb-content .alignfull { width: 100% !important; max-width: 100% !important; margin-left: 0; margin-right: 0; }
.rb-content table { display: block; overflow-x: auto; }
.rb-content blockquote { margin: 1.5em 0; padding: 1rem 1.25rem; border-left: 4px solid var(--brand); background: var(--brand-50); border-radius: 0 12px 12px 0; color: var(--ink-900); }
.rb-content blockquote p:last-child { margin-bottom: 0; }
.rb-content pre, .rb-content code { font-family: ui-monospace, SFMono-Regular, Menlo, monospace; font-size: .9em; }
.rb-content code { background: var(--surface-alt); padding: .1em .35em; border-radius: 6px; }
.rb-content pre { overflow-x: auto; padding: 1rem; border-radius: 12px; background: var(--ink-900); color: #e6f3ee; }
.rb-content pre code { background: transparent; padding: 0; }
.rb-content table { width: 100%; border-collapse: collapse; margin: 1.5em 0; font-size: .95rem; }
.rb-content th, .rb-content td { padding: .6rem .8rem; border: 1px solid var(--border); text-align: left; }
.rb-content th { background: var(--surface-alt); color: var(--ink-900); }
.rb-content hr { border: 0; border-top: 1px solid var(--border); margin: 2em 0; }
.rb-content figure { margin: 1.5em 0; }
.rb-content figcaption, .wp-caption-text { font-size: .85rem; color: var(--muted); text-align: center; margin-top: .4rem; }
.rb-content .alignleft { float: left; margin: .25rem 1.25rem 1rem 0; }
.rb-content .alignright { float: right; margin: .25rem 0 1rem 1.25rem; }
.rb-content .aligncenter { display: block; margin-left: auto; margin-right: auto; }
.rb-content::after { content: ""; display: table; clear: both; }
.wp-block-button__link, .rb-content .wp-element-button { background: var(--brand); color: #fff; border-radius: 9999px; padding: .65rem 1.3rem; font-weight: 600; text-decoration: none; }
.wp-block-button__link:hover { background: var(--brand-dark); color: #fff; }
.rb-pages, .rb-tags { margin: 1.5rem 0 0; font-size: .9rem; color: var(--muted); }
.rb-tags a { display: inline-block; margin: 0 .35rem .35rem 0; padding: .1rem .65rem; border-radius: 9999px; background: var(--surface-alt); color: var(--ink-700); text-decoration: none; }

/* ---------- Appel à l'action ---------- */
.rb-cta { margin: 2rem 0; padding: 2rem 1.5rem; border-radius: var(--radius); background: var(--deep); color: #fff; text-align: center; }
.rb-cta h2 { margin: 0 0 .5rem; font-size: 1.5rem; line-height: 1.25; color: #fff; }
.rb-cta p { margin: 0 auto; max-width: 52ch; color: #d6f1e6; }
.rb-cta__actions { display: flex; flex-wrap: wrap; justify-content: center; gap: .75rem; margin-top: 1.25rem !important; }
.rb-cta .rb-btn--primary { background: var(--band); color: var(--ink-900); }
.rb-cta .rb-btn--primary:hover { background: #a6ea8c; color: var(--ink-900); }

/* Encadré « démo » au milieu d'un article (shortcode [renovao_demo]) */
.rb-callout { display: flex; flex-direction: column; align-items: flex-start; gap: 1rem; margin: 2rem 0; padding: 1.5rem; border: 1px solid var(--brand); border-left-width: 6px; border-radius: var(--radius); background: var(--brand-50); }
.rb-callout__title { margin: 0 0 .35rem; font-size: 1.2rem; font-weight: 700; line-height: 1.3; color: var(--ink-900); }
.rb-callout__text { margin: 0; color: var(--ink-700); }
@media (min-width: 700px) { .rb-callout { flex-direction: row; align-items: center; justify-content: space-between; } .rb-callout .rb-btn { flex-shrink: 0; } }

.rb-postnav { display: flex; justify-content: space-between; gap: 1rem; margin: 1.5rem 0; font-weight: 600; font-size: .95rem; }
.rb-postnav span { max-width: 48%; }
.rb-postnav span:last-child { text-align: right; margin-left: auto; }
.rb-postnav a { color: var(--ink-900); text-decoration: none; }
.rb-postnav a:hover { color: var(--brand-dark); }
.rb-box { background: #fff; border: 1px solid var(--border); border-radius: var(--radius); padding: 2rem; text-align: center; }

/* ---------- Commentaires ---------- */
.rb-comments { margin-top: 2rem; padding: 1.5rem; background: #fff; border: 1px solid var(--border); border-radius: var(--radius); }
.rb-comments h2, .rb-comments .comment-reply-title { margin: 0 0 1rem; font-size: 1.25rem; }
.rb-comments__list { list-style: none; margin: 0 0 1.5rem; padding: 0; }
.rb-comments__list .children { list-style: none; padding-left: 1.25rem; }
.rb-comments .comment-body { padding: 1rem 0; border-bottom: 1px solid var(--border); }
.rb-comments .avatar { border-radius: 9999px; vertical-align: middle; margin-right: .5rem; }
.rb-comments .comment-metadata { font-size: .8rem; }
.rb-comments label { display: block; font-size: .875rem; color: var(--muted); margin-bottom: .25rem; }
.rb-comments input[type=text], .rb-comments input[type=email], .rb-comments input[type=url], .rb-comments textarea { width: 100%; border: 1px solid var(--border); border-radius: 12px; padding: .6rem .9rem; font: inherit; }
.rb-comments .comment-form > p { margin: 0 0 1rem; }
.rb-comments input[type=submit] { border: 0; cursor: pointer; }

/* ---------- Pied de page ---------- */
.rb-footer { border-top: 1px solid rgba(11, 29, 38, .1); background: var(--mint); color: var(--ink-700); }
.rb-footer__grid { max-width: 1280px; margin: 0 auto; padding: 3rem 1rem; display: grid; gap: 2rem; grid-template-columns: 1fr; font-size: .875rem; }
@media (min-width: 640px) { .rb-footer__grid { padding-left: 1.5rem; padding-right: 1.5rem; } }
@media (min-width: 768px) { .rb-footer__grid { grid-template-columns: repeat(3, 1fr); } }
.rb-footer .rb-logo { font-size: 1.125rem; font-weight: 700; }
.rb-footer .rb-logo__dot { width: .625rem; height: .625rem; }
.rb-footer__tagline { margin: .75rem 0 0; line-height: 1.6; }
.rb-footer__title { margin: 0; font-weight: 600; color: var(--ink-900); }
.rb-footer ul { list-style: none; margin: .75rem 0 0; padding: 0; }
.rb-footer li + li { margin-top: .5rem; }
.rb-footer ul a { color: inherit; text-decoration: none; }
.rb-footer ul a:hover { color: var(--brand-600); }
.rb-footer__legal { max-width: 1280px; margin: 0 auto; padding: 1.25rem 1rem; border-top: 1px solid rgba(11, 29, 38, .1); font-size: .75rem; }
@media (min-width: 640px) { .rb-footer__legal { padding-left: 1.5rem; padding-right: 1.5rem; } }

/* ---------- Bouton « remonter en haut » ---------- */
.rb-totop { position: fixed; right: 1.25rem; bottom: 1.25rem; z-index: 50; display: grid; place-items: center; width: 48px; height: 48px; border: 0; border-radius: 9999px; background: var(--brand); color: #fff; box-shadow: 0 6px 18px rgba(6, 64, 47, .3); cursor: pointer; transition: background-color .15s, transform .15s; }
.rb-totop:hover { background: var(--brand-dark); transform: translateY(-2px); }
.rb-totop:focus-visible { outline: 3px solid var(--band); outline-offset: 2px; }
.rb-totop[hidden] { display: none; }
@media (max-width: 640px) { .rb-totop { right: 1rem; bottom: 1rem; width: 44px; height: 44px; } }

@media (prefers-reduced-motion: reduce) { * { transition: none !important; } }
