/* h4sh.fr — guides/comparatifs affiliés.
   Inspiration : affilae.com — blanc, accent orange, navy, coins arrondis,
   beaucoup d'air, sans-serif géométrique amicale, touches de couleur par catégorie. */

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

:root {
  --bg: #ffffff;
  --bg-soft: #f6f6f9;
  --ink: #16162a;        /* navy quasi-noir */
  --text: #2b2b3d;
  --text-soft: #565669;
  --muted: #8a8a9a;
  --border: #ececf1;
  --border-2: #dedee6;
  --accent: #fb5a2d;     /* orange Affilae-like */
  --accent-dark: #e6481c;
  --accent-soft: #fff1ec;
  --navy: #16162a;
  --good: #18a06a;
  --bad: #e0483b;
  --star: #fb5a2d;
  /* couleurs catégories */
  --c-orange: #fb5a2d;
  --c-purple: #6c54f0;
  --c-green: #12a06f;
  --c-pink: #ec4d8b;
  --c-blue: #2d8cff;
  --font: "Plus Jakarta Sans", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  --container: 1120px;
  --measure: 730px;
  --r: 12px;
  --r-lg: 18px;
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
body {
  margin: 0;
  font-family: var(--font);
  color: var(--text);
  background: var(--bg);
  font-size: 17px;
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
}
img { max-width: 100%; height: auto; display: block; }
a { color: var(--accent); text-decoration: none; }
a:hover { color: var(--accent-dark); }

h1, h2, h3, h4 { color: var(--ink); font-weight: 800; line-height: 1.18; letter-spacing: -.02em; }
h1 { font-size: clamp(2rem, 4.6vw, 3.1rem); margin: 0 0 .35em; }
h2 { font-size: clamp(1.5rem, 3vw, 2rem); margin: 1.8em 0 .55em; }
h3 { font-size: 1.2rem; margin: 0 0 .35em; font-weight: 700; }
p { margin: 0 0 1.05em; color: var(--text-soft); }
strong { color: var(--ink); font-weight: 700; }

.container { width: 100%; max-width: var(--container); margin: 0 auto; padding: 0 22px; }
.narrow { max-width: var(--measure); }

/* ---------- header ---------- */
.site-header { position: sticky; top: 0; z-index: 50; background: rgba(255,255,255,.9); backdrop-filter: blur(10px); border-bottom: 1px solid var(--border); }
.nav { display: flex; align-items: center; justify-content: space-between; height: 66px; }
.brand { font-weight: 800; font-size: 1.3rem; color: var(--ink); letter-spacing: -.03em; }
.brand:hover { text-decoration: none; color: var(--ink); }
.brand .brand-dot { color: var(--accent); }
.nav-links { display: flex; gap: 28px; align-items: center; }
.nav-links a { color: var(--text-soft); font-weight: 600; font-size: .95rem; }
.nav-links a:hover { color: var(--ink); text-decoration: none; }
@media (max-width: 680px) { .nav-links { display: none; } }

/* ---------- hero ---------- */
.hero { padding: clamp(44px, 7vw, 86px) 0 clamp(28px, 4vw, 48px); position: relative; overflow: hidden; }
.hero::before { content: ""; position: absolute; top: -180px; right: -120px; width: 480px; height: 480px; border-radius: 50%; background: radial-gradient(circle, rgba(251,90,45,.1), transparent 65%); z-index: -1; }
.hero h1 { max-width: 17ch; }
.hero .sub { font-size: clamp(1.08rem, 2.2vw, 1.27rem); color: var(--text-soft); max-width: 54ch; margin: 0 0 1.6em; }
.hero-cta { display: flex; flex-wrap: wrap; gap: 14px; }

/* ---------- article header ---------- */
.post-head { padding: 24px 0 6px; }
.post-meta { font-size: .85rem; color: var(--muted); font-weight: 600; margin: 0 0 .4em; }
.post-meta span + span::before { content: "•"; margin: 0 9px; color: var(--border-2); }

/* ---------- buttons ---------- */
.btn {
  display: inline-flex; align-items: center; gap: 8px; justify-content: center;
  font-family: inherit; font-weight: 700; font-size: 1rem; padding: 14px 28px;
  border-radius: 10px; border: 2px solid transparent; cursor: pointer;
  transition: transform .15s, background .15s, border-color .15s, color .15s, box-shadow .2s;
}
.btn:hover { text-decoration: none; }
.btn-primary { background: var(--accent); color: #fff; box-shadow: 0 8px 20px rgba(251,90,45,.28); }
.btn-primary:hover { background: var(--accent-dark); color: #fff; transform: translateY(-2px); box-shadow: 0 12px 26px rgba(251,90,45,.34); }
.btn-outline { background: var(--bg); color: var(--ink); border-color: var(--border-2); }
.btn-outline:hover { border-color: var(--accent); color: var(--accent); }
.btn-block { width: 100%; }

/* ---------- disclosure ---------- */
.notice { background: var(--accent-soft); border: 1px solid #ffd9cc; border-radius: var(--r); padding: 13px 18px; margin: 22px 0; font-size: .88rem; color: #8a4a32; }
.notice strong { color: #7a3a25; }

/* ---------- résumé / verdict ---------- */
.summary-box { background: var(--bg-soft); border: 1px solid var(--border); border-radius: var(--r-lg); padding: 20px 24px; margin: 26px 0; }
.summary-box .title { font-size: .8rem; font-weight: 800; text-transform: uppercase; letter-spacing: .05em; color: var(--accent); margin: 0 0 8px; }
.summary-box p { margin: 0; color: var(--text); font-size: .98rem; }

/* ---------- cartes index ---------- */
.cards { display: grid; gap: 20px; }
.cards.c3 { grid-template-columns: repeat(3, 1fr); }
.cards.c2 { grid-template-columns: repeat(2, 1fr); }
@media (max-width: 800px) { .cards.c3, .cards.c2 { grid-template-columns: 1fr; } }
.card { background: var(--bg); border: 1px solid var(--border); border-radius: var(--r-lg); padding: 26px; transition: transform .18s, box-shadow .2s, border-color .2s; }
a.card { color: inherit; display: block; }
a.card:hover { text-decoration: none; transform: translateY(-4px); box-shadow: 0 16px 36px rgba(22,22,42,.09); border-color: transparent; }
.card .tag { display: inline-block; font-size: .74rem; font-weight: 800; text-transform: uppercase; letter-spacing: .05em; color: var(--accent); padding: 5px 11px; border-radius: 999px; background: var(--accent-soft); }
.card h3 { margin: 14px 0 7px; font-size: 1.18rem; font-weight: 800; }
.card p { font-size: .93rem; margin: 0; }
.card .more { display: inline-block; margin-top: 14px; color: var(--accent); font-weight: 700; font-size: .93rem; }
.card.soon { opacity: .85; }
/* couleurs de catégorie par position */
/* grille blog + pastilles de catégorie explicites */
.cards.blog { grid-template-columns: repeat(3, 1fr); }
@media (max-width: 900px) { .cards.blog { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 620px) { .cards.blog { grid-template-columns: 1fr; } }
.card .meta { display: block; margin-top: 12px; font-size: .8rem; color: var(--muted); font-weight: 600; }
.tag.tg-orange { color: var(--c-orange); background: #fff1ec; }
.tag.tg-purple { color: var(--c-purple); background: #f0edff; }
.tag.tg-green  { color: var(--c-green);  background: #e7f7f0; }
.tag.tg-pink   { color: var(--c-pink);   background: #fdebf3; }
.tag.tg-blue   { color: var(--c-blue);   background: #e8f2ff; }

.cards.c2 .card:nth-child(1) .tag { color: var(--c-orange); background: #fff1ec; }
.cards.c2 .card:nth-child(2) .tag { color: var(--c-purple); background: #f0edff; }
.cards.c3 .card:nth-child(1) .tag { color: var(--c-green); background: #e7f7f0; }
.cards.c3 .card:nth-child(2) .tag { color: var(--c-pink); background: #fdebf3; }
.cards.c3 .card:nth-child(3) .tag { color: var(--c-blue); background: #e8f2ff; }

/* ---------- recommandations ---------- */
.reco { background: var(--bg); border: 1px solid var(--border); border-radius: var(--r-lg); padding: 26px; margin: 20px 0; box-shadow: 0 4px 16px rgba(22,22,42,.04); }
.reco.best { border: 2px solid var(--accent); }
.reco .label { display: inline-block; font-size: .74rem; font-weight: 800; color: #fff; background: var(--accent); padding: 4px 12px; border-radius: 999px; margin-bottom: 12px; text-transform: uppercase; letter-spacing: .04em; }
.reco:not(.best) .label { color: var(--ink); background: var(--bg-soft); }
.reco-top { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 14px; justify-content: space-between; }
.reco-top h3 { margin: 0; font-size: 1.3rem; font-weight: 800; }
.rating { color: var(--star); font-size: .98rem; white-space: nowrap; letter-spacing: 1px; }
.rating .num { color: var(--muted); font-weight: 700; font-size: .85rem; margin-left: 6px; letter-spacing: 0; }
.reco > p { margin-top: 12px; }
.proscons { display: grid; grid-template-columns: 1fr 1fr; gap: 22px; margin: 16px 0; }
@media (max-width: 600px) { .proscons { grid-template-columns: 1fr; gap: 12px; } }
.proscons h4 { font-size: .76rem; margin: 0 0 8px; text-transform: uppercase; letter-spacing: .05em; font-weight: 800; }
.pros h4 { color: var(--good); } .cons h4 { color: var(--bad); }
.proscons ul { list-style: none; padding: 0; margin: 0; }
.proscons li { font-size: .9rem; padding: 4px 0 4px 22px; position: relative; color: var(--text-soft); }
.pros li::before { content: "✓"; position: absolute; left: 0; color: var(--good); font-weight: 800; }
.cons li::before { content: "✕"; position: absolute; left: 0; color: var(--bad); font-weight: 800; }
.best-for { font-size: .9rem; color: var(--text-soft); background: var(--bg-soft); border-radius: 10px; padding: 11px 15px; margin: 0 0 18px; }
.best-for strong { color: var(--ink); }

/* ---------- tableau ---------- */
.table-wrap { overflow-x: auto; margin: 24px 0; border: 1px solid var(--border); border-radius: var(--r-lg); }
table.cmp { width: 100%; border-collapse: collapse; font-size: .92rem; min-width: 560px; }
table.cmp th, table.cmp td { padding: 13px 16px; text-align: left; border-bottom: 1px solid var(--border); }
table.cmp thead th { background: var(--bg-soft); font-weight: 800; font-size: .78rem; text-transform: uppercase; letter-spacing: .04em; color: var(--text-soft); }
table.cmp tbody tr:last-child td { border-bottom: none; }
table.cmp td:first-child, table.cmp th:first-child { font-weight: 700; color: var(--ink); }
table.cmp .ok { color: var(--good); font-weight: 700; }
table.cmp .no { color: var(--bad); font-weight: 700; }

/* ---------- inscription (bloc navy) ---------- */
.signup { background: var(--navy); color: #fff; border-radius: var(--r-lg); padding: clamp(26px, 4vw, 40px); margin: 38px 0; position: relative; overflow: hidden; }
.signup::after { content: ""; position: absolute; right: -80px; bottom: -120px; width: 320px; height: 320px; border-radius: 50%; background: radial-gradient(circle, rgba(251,90,45,.22), transparent 65%); }
.signup h2 { color: #fff; margin: 0 0 8px; font-size: 1.45rem; position: relative; }
.signup p { color: rgba(255,255,255,.78); margin: 0 0 4px; font-size: .96rem; position: relative; }
.signup ul { margin: 12px 0 0; padding-left: 20px; color: rgba(255,255,255,.85); font-size: .92rem; position: relative; }
.signup ul li { margin: 4px 0; }
.signup form { display: flex; flex-wrap: wrap; gap: 11px; margin-top: 18px; max-width: 520px; position: relative; }
.signup input[type=email] { flex: 1 1 240px; padding: 14px 16px; border: 2px solid rgba(255,255,255,.18); background: rgba(255,255,255,.06); color: #fff; border-radius: 10px; font-size: 1rem; font-family: inherit; }
.signup input[type=email]::placeholder { color: rgba(255,255,255,.5); }
.signup input[type=email]:focus { outline: none; border-color: var(--accent); }
.signup .consent { display: flex; gap: 8px; align-items: flex-start; font-size: .8rem; color: rgba(255,255,255,.65); margin-top: 13px; max-width: 520px; position: relative; }
.signup .consent a { color: #ffb59f; text-decoration: underline; }
.signup .form-msg { margin-top: 11px; font-weight: 700; font-size: .9rem; min-height: 1.1em; color: #fff; position: relative; }

/* ---------- FAQ ---------- */
.faq details { border: 1px solid var(--border); border-radius: var(--r); margin: 12px 0; background: var(--bg); transition: border-color .15s; }
.faq details[open] { border-color: var(--border-2); }
.faq summary { cursor: pointer; padding: 16px 50px 16px 20px; font-weight: 700; color: var(--ink); list-style: none; position: relative; }
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after { content: "+"; position: absolute; right: 18px; top: 13px; font-size: 1.4rem; color: var(--accent); font-weight: 400; }
.faq details[open] summary::after { content: "–"; }
.faq details > div { padding: 0 20px 18px; color: var(--text-soft); font-size: .95rem; }
.faq details > div p:last-child { margin-bottom: 0; }

/* ---------- breadcrumb ---------- */
.crumb { font-size: .85rem; color: var(--muted); padding: 18px 0 0; font-weight: 600; }
.crumb a { color: var(--muted); }
.crumb a:hover { color: var(--accent); }

/* ---------- prose ---------- */
.prose p, .prose ul { max-width: var(--measure); }
.prose ul { padding-left: 22px; color: var(--text-soft); }
.prose li { margin: 6px 0; }
hr.sep { border: 0; border-top: 1px solid var(--border); margin: 36px 0; max-width: var(--measure); }

/* ---------- footer ---------- */
.site-footer { background: var(--navy); color: rgba(255,255,255,.72); padding: 52px 0 30px; margin-top: 64px; }
.foot-grid { display: grid; grid-template-columns: 2fr 1fr 1fr; gap: 32px; }
@media (max-width: 700px) { .foot-grid { grid-template-columns: 1fr; gap: 24px; } }
.site-footer .brand { color: #fff; font-size: 1.25rem; }
.site-footer .brand .brand-dot { color: var(--accent); }
.site-footer p { color: rgba(255,255,255,.6); font-size: .88rem; }
.site-footer h4 { color: #fff; font-size: .8rem; text-transform: uppercase; letter-spacing: .05em; margin: 0 0 14px; font-weight: 800; }
.site-footer ul { list-style: none; padding: 0; margin: 0; }
.site-footer li { margin: 9px 0; font-size: .9rem; }
.site-footer a { color: rgba(255,255,255,.72); }
.site-footer a:hover { color: #fff; }
.foot-bottom { border-top: 1px solid rgba(255,255,255,.12); margin-top: 36px; padding-top: 20px; font-size: .82rem; color: rgba(255,255,255,.5); display: flex; flex-wrap: wrap; gap: 8px; justify-content: space-between; }

.center { text-align: center; }

/* ---------- blog : cartes avec couverture ---------- */
.card.has-cover { padding: 0; overflow: hidden; }
.card .cover { width: 100%; aspect-ratio: 16 / 9; object-fit: cover; display: block; background: var(--bg-soft); }
.card .card-body { padding: 22px; }
.blog-masthead { padding: clamp(34px, 5vw, 56px) 0 8px; }
.blog-masthead h1 { font-size: clamp(1.9rem, 4vw, 2.6rem); max-width: 18ch; }
.blog-masthead p { font-size: 1.1rem; color: var(--text-soft); max-width: 56ch; }

/* ---------- article : couverture + contenu riche ---------- */
.post-cover { width: 100%; max-height: 460px; object-fit: cover; border-radius: var(--r-lg); margin: 10px 0 6px; background: var(--bg-soft); }
.prose img { max-width: 100%; border-radius: 10px; margin: 20px 0; }
.prose h2 { font-size: 1.55rem; margin: 1.7em 0 .5em; }
.prose h3 { font-size: 1.2rem; margin: 1.4em 0 .4em; }
.prose blockquote { margin: 20px 0; padding: 6px 0 6px 18px; border-left: 3px solid var(--accent); color: var(--text-soft); font-style: italic; }
.prose a { text-decoration: underline; }
.cat-pill { display: inline-block; font-size: .74rem; font-weight: 800; text-transform: uppercase; letter-spacing: .05em; color: var(--accent); background: var(--accent-soft); padding: 5px 12px; border-radius: 999px; }

/* ---------- admin ---------- */
.admin-top { background: #16162a; color: #fff; }
.admin-top .bar { max-width: 1080px; margin: 0 auto; padding: 14px 22px; display: flex; align-items: center; justify-content: space-between; gap: 14px; }
.admin-top a { color: #cfcfe0; font-weight: 600; font-size: .92rem; }
.admin-top a:hover { color: #fff; }
.admin-top .brand { color: #fff; font-size: 1.05rem; }
.admin-wrap { max-width: 1080px; margin: 0 auto; padding: 26px 22px 70px; }
.admin-wrap .btn { padding: 10px 18px; font-size: .92rem; }
.atable { width: 100%; border-collapse: collapse; background: #fff; border: 1px solid var(--border); border-radius: var(--r); overflow: hidden; }
.atable th, .atable td { padding: 12px 14px; text-align: left; border-bottom: 1px solid var(--border); font-size: .92rem; }
.atable th { background: var(--bg-soft); font-size: .76rem; text-transform: uppercase; letter-spacing: .04em; color: var(--text-soft); }
.atable tr:last-child td { border-bottom: 0; }
.badge { display: inline-block; font-size: .72rem; font-weight: 700; padding: 3px 9px; border-radius: 999px; }
.badge.pub { background: #e7f7f0; color: #0f7a4f; }
.badge.draft { background: #fff3e6; color: #9a5a14; }
.field { margin: 16px 0; }
.field label { display: block; font-weight: 700; font-size: .85rem; margin-bottom: 6px; color: var(--ink); }
.field input[type=text], .field textarea, .field select { width: 100%; padding: 11px 13px; border: 1px solid var(--border-2); border-radius: 9px; font-size: .95rem; font-family: inherit; }
.field input:focus, .field textarea:focus, .field select:focus { outline: none; border-color: var(--accent); }
.field .hint { font-size: .8rem; color: var(--muted); margin-top: 4px; }
.cover-prev { max-width: 240px; border-radius: 10px; margin-top: 10px; display: none; }
.row2 { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
@media (max-width: 700px){ .row2 { grid-template-columns: 1fr; } }
.ql-editor { min-height: 360px; font-size: 16px; }
.flash { background: #e7f7f0; border: 1px solid #b6e6cf; color: #0f7a4f; padding: 11px 15px; border-radius: 10px; margin-bottom: 16px; font-size: .92rem; }

/* ---------- sélecteur de langue ---------- */
.langsw { font-size: .82rem; display: inline-flex; align-items: center; gap: 2px; margin-left: 6px; }
.langsw a { color: var(--muted); font-weight: 700; padding: 2px 4px; }
.langsw a.on { color: var(--accent); }
.langsw a:hover { color: var(--ink); text-decoration: none; }
.langsw i { color: var(--border-2); font-style: normal; }
@media (max-width: 680px){ .langsw { display: inline-flex; margin-left: 0; } }

/* ---------- FAQ schema (article) ---------- */
.post-faq { margin-top: 8px; }
.post-faq h2 { margin-bottom: 12px; }

/* ---------- barre de recherche ---------- */
.navsearch { display: flex; align-items: center; gap: 8px; flex: 1; max-width: 340px; margin: 0 22px;
  background: var(--bg-soft); border: 1px solid var(--border); border-radius: 999px; padding: 9px 15px; color: var(--muted); transition: border-color .15s, background .15s; }
.navsearch:focus-within { border-color: var(--accent); background: #fff; }
.navsearch svg { flex: 0 0 auto; }
.navsearch input { border: 0; background: transparent; outline: none; font-size: .92rem; font-family: inherit; width: 100%; color: var(--ink); }
.navsearch input::placeholder { color: var(--muted); }
@media (max-width: 680px) { .navsearch { margin: 0 0 0 12px; max-width: none; } }
.search-head { padding: clamp(28px,4vw,46px) 0 6px; }
.search-head h1 { font-size: clamp(1.5rem,3vw,2rem); }
.search-head .q { color: var(--accent); }
