/*
Theme Name: RecipeHub
Description: Thème recettes — mise en page reprise section par section du modèle demandé, chaque site gardant sa propre couleur d'accent.
Version: 1.0
*/

/* ------------------------------------------------------------------ palette
   Only --accent / --accent-soft / --accent-ink change from one site to the next;
   everything else is shared so eleven sites stay visibly related. */
:root {
  --accent: #e4572e;
  --accent-soft: #fde3d8;
  --accent-ink: #7d2c14;

  --ink: #13293d;
  --ink-2: #3d5468;
  --muted: #6b7f92;
  --line: #e4e9ee;
  --bg: #ffffff;
  --bg-2: #f7f9fb;
  --bg-3: #eef3f7;

  --sans: "Figtree", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  --serif: "Playfair Display", Georgia, "Times New Roman", serif;
  --script: "Caveat", "Homemade Apple", cursive;

  --wrap: 1180px;
  --radius: 14px;
  --shadow: 0 2px 14px rgba(19, 41, 61, .07);
  --shadow-lg: 0 10px 34px rgba(19, 41, 61, .12);
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0; background: var(--bg); color: var(--ink);
  font-family: var(--sans); font-size: 17px; line-height: 1.75;
  -webkit-font-smoothing: antialiased;
}
img { max-width: 100%; height: auto; display: block; }
a { color: var(--accent-ink); text-decoration: none; }
a:hover { text-decoration: underline; }
h1, h2, h3, h4 { font-family: var(--serif); line-height: 1.22; color: var(--ink); margin: 0 0 .6em; }
h1 { font-size: clamp(1.9rem, 4.2vw, 2.9rem); }
h2 { font-size: clamp(1.45rem, 3vw, 2rem); }
h3 { font-size: clamp(1.2rem, 2.3vw, 1.45rem); }
p { margin: 0 0 1.15em; }
.wrap { max-width: var(--wrap); margin: 0 auto; padding: 0 20px; }
.sr-only {
  position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0;
}

/* ------------------------------------------------------------------ header */
.topbar { background: var(--ink); color: #fff; font-size: 13px; }
.topbar .wrap { display: flex; justify-content: space-between; align-items: center; gap: 16px; min-height: 40px; }
.topbar a { color: #fff; opacity: .85; }
.social { display: flex; gap: 14px; align-items: center; }
.social a { display: inline-flex; }
.social svg { width: 17px; height: 17px; fill: currentColor; }

.masthead { border-bottom: 1px solid var(--line); background: var(--bg); }
.masthead .wrap { display: flex; align-items: center; justify-content: space-between; gap: 20px; padding-top: 22px; padding-bottom: 22px; }
.brand { font-family: var(--serif); font-size: 1.9rem; font-weight: 800; color: var(--ink); letter-spacing: -.02em; }
.brand:hover { text-decoration: none; }
.brand span { color: var(--accent); }
.brand small { display: block; font-family: var(--script); font-size: .95rem; color: var(--muted); font-weight: 500; letter-spacing: .02em; }

.nav { display: flex; gap: 26px; align-items: center; }
.nav a { color: var(--ink-2); font-weight: 600; font-size: 14.5px; text-transform: uppercase; letter-spacing: .06em; }
.nav a:hover { color: var(--accent); text-decoration: none; }
.searchbox { display: flex; align-items: center; border: 1px solid var(--line); border-radius: 999px; padding: 6px 8px 6px 14px; background: var(--bg-2); }
.searchbox input { border: 0; background: none; outline: none; font: inherit; font-size: 14px; width: 130px; color: var(--ink); }
.searchbox button { border: 0; background: var(--accent); color: #fff; border-radius: 999px; width: 30px; height: 30px; cursor: pointer; display: grid; place-items: center; }
.searchbox svg { width: 15px; height: 15px; fill: #fff; }
.burger { display: none; border: 1px solid var(--line); background: var(--bg-2); border-radius: 10px; padding: 8px 11px; cursor: pointer; font-size: 18px; line-height: 1; }

/* ------------------------------------------------------------------ category strip */
.catstrip { background: var(--bg-2); border-bottom: 1px solid var(--line); }
.catstrip .wrap { display: flex; gap: 10px; overflow-x: auto; padding-top: 12px; padding-bottom: 12px; scrollbar-width: none; }
.catstrip .wrap::-webkit-scrollbar { display: none; }
.chip {
  flex: 0 0 auto; padding: 8px 18px; border-radius: 999px; background: #fff;
  border: 1px solid var(--line); font-size: 13.5px; font-weight: 700;
  text-transform: uppercase; letter-spacing: .05em; color: var(--ink-2);
}
.chip:hover, .chip.is-on { background: var(--accent); border-color: var(--accent); color: #fff; text-decoration: none; }

/* ------------------------------------------------------------------ hero tiles */
.tiles { display: grid; grid-template-columns: repeat(3, 1fr); gap: 18px; margin: 34px 0; }
.tile { position: relative; border-radius: var(--radius); overflow: hidden; aspect-ratio: 4/3; box-shadow: var(--shadow); }
.tile img { width: 100%; height: 100%; object-fit: cover; transition: transform .5s; }
.tile:hover img { transform: scale(1.06); }
.tile b {
  position: absolute; inset: auto 0 0 0; padding: 46px 18px 16px; color: #fff;
  font-family: var(--serif); font-size: 1.3rem;
  background: linear-gradient(transparent, rgba(19, 41, 61, .82));
}

/* ------------------------------------------------------------------ sections */
.section { margin: 46px 0; }
.section-head { display: flex; align-items: baseline; justify-content: space-between; gap: 16px; margin-bottom: 22px; }
.section-head h2, .section-head h3 { margin: 0; }
.eyebrow { font-family: var(--script); color: var(--accent); font-size: 1.35rem; display: block; margin-bottom: -2px; }
.more { font-size: 13.5px; font-weight: 700; text-transform: uppercase; letter-spacing: .06em; color: var(--accent); white-space: nowrap; }

.grid { display: grid; gap: 24px; }
.grid-4 { grid-template-columns: repeat(4, 1fr); }
.grid-3 { grid-template-columns: repeat(3, 1fr); }
.grid-2 { grid-template-columns: repeat(2, 1fr); }

.card { background: #fff; border-radius: var(--radius); overflow: hidden; box-shadow: var(--shadow); transition: transform .3s, box-shadow .3s; }
.card:hover { transform: translateY(-4px); box-shadow: var(--shadow-lg); }
.card .thumb { position: relative; aspect-ratio: 4/3; overflow: hidden; background: var(--bg-3); }
.card .thumb img { width: 100%; height: 100%; object-fit: cover; }
.card .tag {
  position: absolute; top: 12px; left: 12px; background: var(--accent); color: #fff;
  padding: 5px 12px; border-radius: 999px; font-size: 11px; font-weight: 800;
  text-transform: uppercase; letter-spacing: .07em;
}
.card .body { padding: 16px 16px 20px; }
.card h3 { font-size: 1.06rem; line-height: 1.35; margin: 0 0 8px; }
.card h3 a { color: var(--ink); }
.card p { font-size: 14px; color: var(--muted); margin: 0 0 10px; }
.meta { display: flex; gap: 14px; font-size: 12.5px; color: var(--muted); flex-wrap: wrap; }
.meta span { display: inline-flex; align-items: center; gap: 5px; }

/* numbered list, used by Top 10 */
.ranked { list-style: none; margin: 0; padding: 0; }
.ranked li { display: flex; gap: 14px; align-items: center; padding: 11px 0; border-bottom: 1px solid var(--line); }
.ranked li:last-child { border-bottom: 0; }
.ranked .n { font-family: var(--serif); font-size: 1.5rem; color: var(--accent); width: 30px; flex: 0 0 30px; text-align: center; }
.ranked img { width: 62px; height: 62px; border-radius: 10px; object-fit: cover; flex: 0 0 62px; }
.ranked a { color: var(--ink); font-weight: 600; font-size: 14.5px; line-height: 1.35; }

/* ------------------------------------------------------------------ author bio */
.bio { background: var(--bg-2); border-radius: var(--radius); padding: 34px; display: grid; grid-template-columns: 190px 1fr; gap: 30px; align-items: center; }
.bio img { width: 190px; height: 190px; border-radius: 50%; object-fit: cover; box-shadow: var(--shadow); }
.bio .hi { font-family: var(--script); color: var(--accent); font-size: 1.6rem; }
.bio h2 { margin: 0 0 10px; }

/* ------------------------------------------------------------------ newsletter */
.newsletter { background: var(--ink); color: #fff; border-radius: var(--radius); padding: 40px; text-align: center; margin: 46px 0; }
.newsletter h2 { color: #fff; }
.newsletter p { color: #c6d3de; max-width: 540px; margin: 0 auto 20px; }
.newsletter form { display: flex; gap: 10px; max-width: 470px; margin: 0 auto; }
.newsletter input { flex: 1; border: 0; border-radius: 999px; padding: 13px 20px; font: inherit; font-size: 15px; }
.newsletter button { border: 0; border-radius: 999px; background: var(--accent); color: #fff; padding: 13px 26px; font: inherit; font-weight: 800; cursor: pointer; }

/* ------------------------------------------------------------------ single */
.crumbs { font-size: 13px; color: var(--muted); margin: 22px 0 14px; }
.crumbs a { color: var(--muted); }
.layout { display: grid; grid-template-columns: minmax(0, 1fr) 320px; gap: 46px; align-items: start; margin-bottom: 50px; }
.entry-head { margin-bottom: 22px; }
.entry-head h1 { margin-bottom: 12px; }
.entry-meta { display: flex; flex-wrap: wrap; gap: 18px; font-size: 13.5px; color: var(--muted); padding-bottom: 16px; border-bottom: 1px solid var(--line); }
.entry-meta strong { color: var(--ink-2); }

.hero-wrap { position: relative; border-radius: var(--radius); overflow: hidden; margin: 22px 0; }
.pinit {
  position: absolute; top: 14px; left: 14px; background: #e60023; color: #fff;
  border-radius: 999px; padding: 8px 16px; font-size: 13px; font-weight: 800;
  display: inline-flex; align-items: center; gap: 7px;
}
.pinit:hover { text-decoration: none; opacity: .92; }

.share { display: flex; gap: 8px; flex-wrap: wrap; margin: 18px 0 26px; }
.share a {
  display: inline-flex; align-items: center; gap: 7px; padding: 9px 16px;
  border-radius: 999px; font-size: 13px; font-weight: 700; color: #fff;
}
.share a:hover { text-decoration: none; opacity: .9; }
.share svg { width: 15px; height: 15px; fill: currentColor; }
.share .fb { background: #1877f2; } .share .pin { background: #e60023; }
.share .x { background: #14171a; } .share .wa { background: #25d366; }
.share .mail { background: var(--ink-2); }

.toc { background: var(--bg-2); border: 1px solid var(--line); border-left: 4px solid var(--accent); border-radius: 10px; padding: 20px 24px; margin: 0 0 28px; }
.toc b { display: block; font-family: var(--serif); font-size: 1.15rem; margin-bottom: 10px; }
.toc ol { margin: 0; padding-left: 20px; }
.toc li { margin: 5px 0; }
.toc a { color: var(--ink-2); font-size: 15px; }

.entry-content { font-size: 17.5px; }
.entry-content h2 { margin-top: 1.7em; padding-top: .2em; }
.entry-content h3 { margin-top: 1.4em; }
.entry-content img { border-radius: 12px; margin: 1.4em 0; }
.entry-content ul, .entry-content ol { padding-left: 24px; }
.entry-content li { margin: .45em 0; }
.entry-content blockquote {
  margin: 1.6em 0; padding: 4px 0 4px 22px; border-left: 4px solid var(--accent);
  color: var(--ink-2); font-style: italic;
}

/* recipe card, rebuilt from the article's own ingredients / instructions */
.recipe-card { border: 2px solid var(--accent); border-radius: var(--radius); overflow: hidden; margin: 40px 0; }
.recipe-card > header { background: var(--accent); color: #fff; padding: 20px 24px; }
.recipe-card > header h2 { color: #fff; margin: 0; font-size: 1.4rem; }
.recipe-card .stats { display: flex; flex-wrap: wrap; gap: 0; border-bottom: 1px solid var(--line); }
.recipe-card .stats div { flex: 1 1 33%; padding: 15px 10px; text-align: center; border-right: 1px solid var(--line); }
.recipe-card .stats div:last-child { border-right: 0; }
.recipe-card .stats b { display: block; font-size: 11px; text-transform: uppercase; letter-spacing: .08em; color: var(--muted); font-weight: 800; }
.recipe-card .stats span { font-family: var(--serif); font-size: 1.15rem; color: var(--ink); }
.recipe-card .cols { display: grid; grid-template-columns: 1fr 1fr; gap: 0; }
.recipe-card .cols > div { padding: 22px 24px; }
.recipe-card .cols > div:first-child { border-right: 1px solid var(--line); background: var(--bg-2); }
.recipe-card h3 { font-size: 1.12rem; margin-bottom: .6em; }

.authorbox { display: grid; grid-template-columns: 110px 1fr; gap: 22px; align-items: center; background: var(--bg-2); border-radius: var(--radius); padding: 26px; margin: 40px 0; }
.authorbox img { width: 110px; height: 110px; border-radius: 50%; object-fit: cover; }
.authorbox h3 { margin: 0 0 6px; }
.authorbox p { margin: 0; font-size: 15px; color: var(--ink-2); }

.postnav { display: grid; grid-template-columns: 1fr 1fr; gap: 18px; margin: 34px 0; }
.postnav a { display: block; padding: 18px 20px; border: 1px solid var(--line); border-radius: var(--radius); color: var(--ink); font-weight: 600; }
.postnav a:hover { border-color: var(--accent); text-decoration: none; }
.postnav small { display: block; color: var(--muted); font-size: 12px; text-transform: uppercase; letter-spacing: .07em; margin-bottom: 5px; }
.postnav .next { text-align: right; }

/* ------------------------------------------------------------------ sidebar */
.sidebar { position: sticky; top: 20px; }
.widget { margin-bottom: 32px; }
.widget > h3 {
  font-size: 1.1rem; padding-bottom: 10px; margin-bottom: 16px;
  border-bottom: 2px solid var(--accent); display: inline-block;
}
.widget-about { text-align: center; background: var(--bg-2); border-radius: var(--radius); padding: 26px; }
.widget-about img { width: 130px; height: 130px; border-radius: 50%; object-fit: cover; margin: 0 auto 14px; }
.widget-about .hi { font-family: var(--script); color: var(--accent); font-size: 1.35rem; }
.widget-about p { font-size: 14.5px; color: var(--ink-2); }

/* ------------------------------------------------------------------ archive */
.archive-head { text-align: center; padding: 40px 0 10px; }
.archive-head .eyebrow { font-size: 1.5rem; }
.pagination { display: flex; gap: 8px; justify-content: center; margin: 40px 0; flex-wrap: wrap; }
.pagination .page-numbers {
  padding: 9px 16px; border: 1px solid var(--line); border-radius: 10px;
  color: var(--ink-2); font-weight: 600; font-size: 14.5px;
}
.pagination .current, .pagination a:hover { background: var(--accent); border-color: var(--accent); color: #fff; text-decoration: none; }

/* ------------------------------------------------------------------ footer */
.site-footer { background: var(--ink); color: #c6d3de; margin-top: 60px; padding: 48px 0 26px; }
.site-footer h4 { color: #fff; font-size: 1.05rem; margin-bottom: 14px; }
.site-footer a { color: #c6d3de; font-size: 14.5px; }
.site-footer a:hover { color: #fff; }
.footer-grid { display: grid; grid-template-columns: 2fr 1fr 1fr; gap: 40px; }
.footer-grid ul { list-style: none; margin: 0; padding: 0; }
.footer-grid li { margin: 7px 0; }
.legal { border-top: 1px solid rgba(255, 255, 255, .13); margin-top: 34px; padding-top: 20px; font-size: 13px; text-align: center; color: #94a8b8; }

/* ------------------------------------------------------------------ responsive */
@media (max-width: 980px) {
  .layout { grid-template-columns: 1fr; }
  .sidebar { position: static; }
  .grid-4 { grid-template-columns: repeat(3, 1fr); }
  .footer-grid { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 760px) {
  body { font-size: 16.5px; }
  .nav, .searchbox { display: none; }
  .nav.is-open { display: flex; flex-direction: column; position: absolute; inset: 100% 0 auto 0; background: #fff; padding: 18px 22px; gap: 14px; box-shadow: var(--shadow-lg); z-index: 40; }
  .masthead .wrap { position: relative; }
  .burger { display: block; }
  .tiles, .grid-4, .grid-3 { grid-template-columns: repeat(2, 1fr); }
  .bio, .authorbox { grid-template-columns: 1fr; text-align: center; }
  .bio img, .authorbox img { margin: 0 auto; }
  .recipe-card .cols { grid-template-columns: 1fr; }
  .recipe-card .cols > div:first-child { border-right: 0; border-bottom: 1px solid var(--line); }
  .newsletter form { flex-direction: column; }
  .postnav { grid-template-columns: 1fr; }
  .postnav .next { text-align: left; }
}
@media (max-width: 480px) {
  .tiles, .grid-4, .grid-3, .grid-2 { grid-template-columns: 1fr; }
  .footer-grid { grid-template-columns: 1fr; }
}

/* ------------------------------------------------------------------ FAQ
   Converted from Bootstrap accordion markup to <details>, so questions open and close
   with no JavaScript at all. */
.faq { margin: 1.6em 0; border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; }
.faq-item { border-bottom: 1px solid var(--line); background: #fff; }
.faq-item:last-child { border-bottom: 0; }
.faq-item > summary {
  list-style: none; cursor: pointer; padding: 16px 52px 16px 20px; position: relative;
  font-family: var(--serif); font-size: 1.06rem; font-weight: 600; color: var(--ink);
  transition: background .2s;
}
.faq-item > summary::-webkit-details-marker { display: none; }
.faq-item > summary:hover { background: var(--bg-2); }
.faq-item > summary::after {
  content: "+"; position: absolute; right: 18px; top: 50%; transform: translateY(-50%);
  width: 26px; height: 26px; border-radius: 50%; background: var(--accent-soft);
  color: var(--accent-ink); display: grid; place-items: center;
  font-family: var(--sans); font-size: 18px; font-weight: 700; line-height: 1;
}
.faq-item[open] > summary { background: var(--bg-2); }
.faq-item[open] > summary::after { content: "−"; background: var(--accent); color: #fff; }
.faq-a { padding: 0 20px 18px; color: var(--ink-2); font-size: 16px; }
.faq-a p:last-child { margin-bottom: 0; }

/* ------------------------------------------------------------------ recipe card lists */
.recipe-card .cols ul, .recipe-card .cols ol { margin: 0; padding-left: 1.25em; }
.recipe-card .cols li { margin: .5em 0; line-height: 1.6; }
.recipe-card .cols ol li { padding-left: .2em; }
.recipe-card .cols ul li::marker { color: var(--accent); }
.recipe-card .cols ol li::marker { color: var(--accent); font-weight: 700; }
.recipe-card .cols > div { max-height: none; }
.recipe-card .empty { color: var(--muted); font-style: italic; }
.recipe-card .cols p.sub {
  margin: 1em 0 .4em; font-family: var(--serif); font-size: .98rem;
  font-weight: 700; color: var(--accent-ink);
}
.recipe-card .cols p.sub:first-child { margin-top: 0; }

/* the card carries the dish's own photo — it is what Pinterest saves and what readers
   scroll back to when they start cooking */
.recipe-card-img { width: 100%; aspect-ratio: 16/9; object-fit: cover; display: block; }
.recipe-card > header p { margin: 6px 0 0; color: rgba(255,255,255,.9); font-size: 14.5px; }
