/* ══════════════════════════════════════════════
   RENCONTRE PRO — global.css
   Shared resets, utilities, and common components
   ══════════════════════════════════════════════ */

/* ── RESET ── */
*,*::before,*::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
body { margin: 0; line-height: 1.5; -webkit-font-smoothing: antialiased; }
img,video { display: block; max-width: 100%; }
input,button,textarea,select { font: inherit; }
p,h1,h2,h3,h4,h5,h6 { overflow-wrap: break-word; margin: 0; }
ul,ol { list-style: none; margin: 0; padding: 0; }
a { color: inherit; }
summary { list-style: none; }
summary::-webkit-details-marker { display: none; }

/* ── CONTAINER ── */
.rp-container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 28px;
}

/* ── PROSE (article body) ── */
.rp-prose { color: #1a1a2e; font-size: 16.5px; line-height: 1.85; }
.rp-prose h2 { font-size: 27px; font-weight: 700; margin: 48px 0 16px; color: inherit; }
.rp-prose h3 { font-size: 21px; font-weight: 700; margin: 36px 0 12px; }
.rp-prose p { margin: 0 0 20px; }
.rp-prose ul,.rp-prose ol { margin: 0 0 20px; padding-left: 24px; }
.rp-prose ul { list-style: disc; }
.rp-prose ol { list-style: decimal; }
.rp-prose li { margin-bottom: 6px; }
.rp-prose a { color: var(--brand, #4f46e5); text-decoration: underline; }
.rp-prose blockquote { border-left: 3px solid #e5e7eb; padding-left: 20px; margin: 28px 0; color: #6b7280; font-style: italic; }
.rp-prose img { border-radius: 8px; margin: 24px 0; }
.rp-prose strong { font-weight: 700; }
.rp-prose code { background: #f3f4f6; border-radius: 4px; padding: 2px 6px; font-size: .9em; }
.rp-prose pre { background: #1e1e2e; color: #e0e0f0; border-radius: 8px; padding: 20px; overflow-x: auto; margin: 24px 0; }
.rp-prose table { width: 100%; border-collapse: collapse; margin: 24px 0; }
.rp-prose th,.rp-prose td { text-align: left; padding: 10px 14px; border-bottom: 1px solid #e5e7eb; font-size: 15px; }
.rp-prose th { font-weight: 700; background: #f9fafb; }

/* ── CARD ── */
.rp-card { background: #fff; border: 1px solid #e5e7eb; border-radius: 10px; overflow: hidden; transition: box-shadow .2s, transform .2s; }
.rp-card:hover { box-shadow: 0 8px 24px rgba(0,0,0,.08); transform: translateY(-2px); }
.rp-card__img img { display: block; width: 100%; height: 220px; object-fit: cover; }
.rp-card__body { padding: 20px; }
.rp-card__title { font-size: 17px; font-weight: 700; margin-bottom: 8px; line-height: 1.35; }
.rp-card__excerpt { color: #6b7280; font-size: 14px; }

/* ── BUTTON TEXT ── */
.rp-btn-text { font-size: 14px; font-weight: 700; color: var(--brand, #4f46e5); text-decoration: none; }
.rp-btn-text:hover { text-decoration: underline; }

/* ── PAGINATION ── */
.rp-pagination { display: flex; justify-content: center; gap: 8px; margin-top: 56px; flex-wrap: wrap; }
.rp-pagination a,.rp-pagination span { display: inline-flex; align-items: center; justify-content: center; width: 40px; height: 40px; border-radius: 8px; border: 1px solid #e5e7eb; font-size: 14px; font-weight: 600; text-decoration: none; color: #374151; transition: background .15s; }
.rp-pagination a:hover { background: #f3f4f6; }
.rp-pagination .current { background: var(--brand, #4f46e5); border-color: var(--brand, #4f46e5); color: #fff; }

/* ── ARCHIVE GRID ── */
.rp-archive-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 28px; }
@media (max-width: 1024px) { .rp-archive-grid { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 640px) { .rp-archive-grid { grid-template-columns: 1fr; } }

/* ── TAGS ── */
.rp-tags { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 32px; }
.rp-tags a { background: #f3f4f6; color: #374151; font-size: 12px; font-weight: 600; padding: 4px 12px; border-radius: 50px; text-decoration: none; transition: background .15s; }
.rp-tags a:hover { background: #e5e7eb; }

/* ── SCROLL TO TOP ── */
#rp-top { position: fixed; bottom: 24px; right: 24px; z-index: 200; width: 44px; height: 44px; border-radius: 50%; background: var(--brand, #4f46e5); color: #fff; border: none; font-size: 18px; cursor: pointer; display: none; align-items: center; justify-content: center; box-shadow: 0 4px 12px rgba(0,0,0,.25); transition: opacity .2s; }
#rp-top.visible { display: flex; }
#rp-top:hover { opacity: .85; }

/* ── WP ALIGNMENTS (block editor compat) ── */
.alignleft { float: left; margin: 0 28px 16px 0; }
.alignright { float: right; margin: 0 0 16px 28px; }
.aligncenter { margin: 0 auto 16px; display: block; }
.wp-caption { max-width: 100%; }
.wp-caption-text { font-size: 12px; color: #9ca3af; text-align: center; margin-top: 6px; }

/* ── SKIP LINK ── */
.skip-link { position: absolute; top: -100px; left: 0; background: var(--brand, #4f46e5); color: #fff; font-size: 13px; font-weight: 700; padding: 10px 20px; z-index: 9999; }
.skip-link:focus { top: 0; }

/* ── SCREEN READER TEXT ── */
.screen-reader-text { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0,0,0,0); white-space: nowrap; }

/* ═══════════════════════════════════════════════════════════
   PREMIUM POLISH v1.0.11 — Global
   ═══════════════════════════════════════════════════════════ */

/* ── Smooth focus styles (accessibility) ── */
*:focus-visible { outline: 2px solid var(--brand, #4f46e5); outline-offset: 3px; border-radius: 4px; }

/* ── Image lazy reveal ── */
img[loading="lazy"] { opacity: 0; transition: opacity .4s ease; }
img[loading="lazy"].loaded { opacity: 1; }

/* ── Reduce motion — animations décoratives LP/hero uniquement ── */
@media (prefers-reduced-motion: reduce) {
  [class*="lp-"] *, .rp-anim { animation-duration: .01ms !important; transition-duration: .01ms !important; }
}

/* ── Scrollbar polish ── */
::-webkit-scrollbar { width: 8px; height: 8px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb { background: rgba(0,0,0,.2); border-radius: 4px; }
::-webkit-scrollbar-thumb:hover { background: rgba(0,0,0,.35); }

/* ── Selection highlight ── */
::selection { background: var(--brand-soft, rgba(79,70,229,.18)); color: inherit; }

/* ── Button base improved ── */
button { cursor: pointer; }

/* ── rp-card polish ── */
.rp-card { transition: box-shadow .3s ease, transform .3s ease; }
.rp-card:hover { box-shadow: 0 12px 36px rgba(0,0,0,.12); transform: translateY(-3px); }
.rp-card__img img { transition: transform .4s ease; }
.rp-card:hover .rp-card__img img { transform: scale(1.04); }

/* ═══════════════════════════════════════════════════════════
   FAQ — <details>/<summary> natifs dans le contenu WordPress
   Aucune classe ni JS requis. Couvre toutes les pages/posts.
   ═══════════════════════════════════════════════════════════ */
:is(.entry-content, .rp-prose, .sa-prose, .sb-prose, .wp-block-post-content) details {
  border: 1px solid #e2e8f0;
  border-radius: 10px;
  margin-bottom: 10px;
  overflow: hidden;
  background: #fff;
  transition: box-shadow .2s ease;
}
:is(.entry-content, .rp-prose, .sa-prose, .sb-prose, .wp-block-post-content) details[open] {
  box-shadow: 0 4px 20px rgba(0,0,0,.07);
}
:is(.entry-content, .rp-prose, .sa-prose, .sb-prose, .wp-block-post-content) details summary {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 18px 22px;
  font-size: 16px;
  font-weight: 700;
  color: #0f172a;
  cursor: pointer;
  user-select: none;
  list-style: none;
  transition: background .15s ease;
}
:is(.entry-content, .rp-prose, .sa-prose, .sb-prose, .wp-block-post-content) details summary::-webkit-details-marker { display: none; }
:is(.entry-content, .rp-prose, .sa-prose, .sb-prose, .wp-block-post-content) details summary:hover { background: #f8fafc; }
:is(.entry-content, .rp-prose, .sa-prose, .sb-prose, .wp-block-post-content) details[open] summary { background: #f8fafc; border-bottom: 1px solid #e2e8f0; }
/* Icône +/× */
:is(.entry-content, .rp-prose, .sa-prose, .sb-prose, .wp-block-post-content) details summary::after {
  content: '';
  display: inline-flex;
  flex-shrink: 0;
  width: 28px;
  height: 28px;
  border-radius: 50%;
  background-color: var(--brand, #4f46e5);
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='white' stroke-width='2.5' stroke-linecap='round'%3E%3Cline x1='12' y1='5' x2='12' y2='19'/%3E%3Cline x1='5' y1='12' x2='19' y2='12'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: center;
  background-size: 14px 14px;
  transition: background-color .2s ease;
}
:is(.entry-content, .rp-prose, .sa-prose, .sb-prose, .wp-block-post-content) details[open] summary::after {
  background-color: #334155;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='white' stroke-width='2.5' stroke-linecap='round'%3E%3Cline x1='18' y1='6' x2='6' y2='18'/%3E%3Cline x1='6' y1='6' x2='18' y2='18'/%3E%3C/svg%3E");
}
/* Contenu réponse */
:is(.entry-content, .rp-prose, .sa-prose, .sb-prose, .wp-block-post-content) details p,
:is(.entry-content, .rp-prose, .sa-prose, .sb-prose, .wp-block-post-content) details ul,
:is(.entry-content, .rp-prose, .sa-prose, .sb-prose, .wp-block-post-content) details ol {
  padding: 0 22px;
  color: #475569;
  font-size: 15px;
  line-height: 1.8;
  margin-top: 0;
  margin-bottom: .8em;
}
:is(.entry-content, .rp-prose, .sa-prose, .sb-prose, .wp-block-post-content) details p:first-of-type { padding-top: 16px; }
:is(.entry-content, .rp-prose, .sa-prose, .sb-prose, .wp-block-post-content) details p:last-child { padding-bottom: 20px; margin-bottom: 0; }
:is(.entry-content, .rp-prose, .sa-prose, .sb-prose, .wp-block-post-content) details ul,
:is(.entry-content, .rp-prose, .sa-prose, .sb-prose, .wp-block-post-content) details ol { padding-left: 42px; }
:is(.entry-content, .rp-prose, .sa-prose, .sb-prose, .wp-block-post-content) details li { margin-bottom: .4em; }
:is(.entry-content, .rp-prose, .sa-prose, .sb-prose, .wp-block-post-content) details a { color: var(--brand, #4f46e5); text-decoration: underline; text-underline-offset: 2px; }
@media (max-width: 640px) {
  :is(.entry-content, .rp-prose, .sa-prose, .sb-prose, .wp-block-post-content) details summary { font-size: 15px; padding: 15px 16px; }
  :is(.entry-content, .rp-prose, .sa-prose, .sb-prose, .wp-block-post-content) details p,
  :is(.entry-content, .rp-prose, .sa-prose, .sb-prose, .wp-block-post-content) details ul,
  :is(.entry-content, .rp-prose, .sa-prose, .sb-prose, .wp-block-post-content) details ol { padding: 0 16px; font-size: 14px; }
  :is(.entry-content, .rp-prose, .sa-prose, .sb-prose, .wp-block-post-content) details p:last-child { padding-bottom: 16px; }
}
