/*
Theme Name: Indépendants.pro
Theme URI: https://www.independants.pro/
Author: Indépendants.pro
Description: Thème sur mesure d'independants.pro — comparateur de fournisseurs pour freelances et indépendants.
Version: 1.0.0
Requires PHP: 8.0
Text Domain: independants
*/

/* Inter (Rasmus Andersson), SIL Open Font License 1.1 — police variable hébergée sur le site, sous-ensemble latin */
@font-face { font-family: "Inter"; font-style: normal; font-weight: 100 900; font-display: swap; src: url("fonts/inter-latin.woff2") format("woff2"); unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD; }

:root {
  --ink: #14213D;
  --ink-2: #2C3A5A;
  --green: #0A7550;
  --green-2: #075A3D;
  --green-soft: #E4F4EC;
  --amber: #E9A417;
  --amber-soft: #FFF4DC;
  --paper: #F5F7FA;
  --line: #DDE3EC;
  --muted: #5A6579;
  --white: #FFFFFF;
  --radius: 14px;
  --shadow: 0 1px 2px rgba(20,33,61,.06), 0 8px 24px rgba(20,33,61,.07);
  --font: "Inter", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
}
*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body { margin: 0; font-family: var(--font); color: var(--ink); background: var(--white); font-size: 17px; line-height: 1.65; -webkit-font-smoothing: antialiased; }
img { max-width: 100%; height: auto; }
a { color: var(--green); text-underline-offset: 3px; }
a:hover { color: var(--green-2); }
h1, h2, h3, h4 { line-height: 1.2; letter-spacing: -.015em; margin: 0 0 .5em; }
h1 { font-size: clamp(2rem, 4.4vw, 3.1rem); font-weight: 800; }
h2 { font-size: clamp(1.5rem, 2.8vw, 2.05rem); font-weight: 800; margin-top: 1.6em; }
[id] { scroll-margin-top: 84px; }
h3 { font-size: 1.22rem; font-weight: 700; margin-top: 1.4em; }
p, ul, ol { margin: 0 0 1.1em; }
.wrap { max-width: 1160px; margin: 0 auto; padding: 0 20px; }
.wrap-narrow { max-width: 780px; }
.muted { color: var(--muted); }
.skip-link { position: absolute; left: -9999px; }
.skip-link:focus { left: 12px; top: 12px; background: var(--white); padding: 8px 12px; z-index: 100; }

/* En-tête */
.site-header { position: sticky; top: 0; z-index: 50; background: rgba(255,255,255,.95); backdrop-filter: saturate(1.4) blur(8px); border-bottom: 1px solid var(--line); }
.nav { display: flex; align-items: center; justify-content: space-between; gap: 20px; min-height: 68px; }
.brand { display: flex; align-items: center; gap: 10px; color: var(--ink); text-decoration: none; font-weight: 800; font-size: 1.12rem; letter-spacing: -.01em; }
.brand svg { width: 36px; height: 36px; flex: none; }
.brand small { display: block; font-size: .72rem; font-weight: 600; color: var(--muted); letter-spacing: .02em; }
.nav-menu { display: flex; align-items: center; gap: 16px; }
.nav-menu .menu { display: flex; gap: 16px; list-style: none; margin: 0; padding: 0; }
.nav-menu .menu a { color: var(--ink); text-decoration: none; font-weight: 600; font-size: .9rem; white-space: nowrap; }
.brand span, .nav-cta { white-space: nowrap; }
.nav-menu .menu a:hover, .nav-menu .menu .current-menu-item > a { color: var(--green); }
.nav-toggle { display: none; background: none; border: 0; padding: 8px; cursor: pointer; }
.nav-toggle span { display: block; width: 22px; height: 2px; background: var(--ink); margin: 5px 0; }

/* Boutons */
.btn { display: inline-block; padding: 12px 22px; border-radius: 999px; font-weight: 700; text-decoration: none; font-size: .96rem; border: 2px solid transparent; transition: background .15s, color .15s; }
.btn-primary { background: var(--green); color: var(--white); }
.btn-primary:hover { background: var(--green-2); color: var(--white); }
.btn-ghost { border-color: var(--ink); color: var(--ink); }
.btn-ghost:hover { background: var(--ink); color: var(--white); }
.btn-light { background: var(--white); color: var(--ink); }
.btn-light:hover { background: var(--paper); color: var(--ink); }
.btn-row { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 26px; }
.nav-cta { padding: 9px 18px; font-size: .9rem; }

/* Héros d'accueil */
.hero { background: var(--paper); padding: 64px 0 72px; overflow: hidden; }
.hero-grid { display: grid; grid-template-columns: 1.05fr .95fr; gap: 48px; align-items: center; }
.hero .lead { font-size: 1.18rem; color: var(--ink-2); max-width: 54ch; }
.hero-map { width: 100%; height: auto; border-radius: 20px; box-shadow: var(--shadow); background: var(--white); }
.eyebrow { display: inline-block; font-size: .78rem; font-weight: 700; letter-spacing: .1em; text-transform: uppercase; color: var(--green); margin-bottom: 12px; }

/* En-tête de page */
.page-hero { background: var(--paper); padding: 52px 0 44px; border-bottom: 1px solid var(--line); }
.page-hero .lead { font-size: 1.14rem; color: var(--ink-2); max-width: 66ch; margin: 0; }
.crumbs { font-size: .86rem; color: var(--muted); margin-bottom: 14px; }
.crumbs a { color: var(--muted); }

/* Sections */
.section { padding: 72px 0; }
.section-paper { background: var(--paper); }
.section-head { max-width: 680px; margin-bottom: 36px; }
.section-head h2 { margin-top: 0; }
.grid-2 { display: grid; grid-template-columns: repeat(2, 1fr); gap: 22px; }
.grid-3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 22px; }
.grid-4 { display: grid; grid-template-columns: repeat(4, 1fr); gap: 18px; }
.card { background: var(--white); border: 1px solid var(--line); border-radius: var(--radius); padding: 26px; box-shadow: var(--shadow); }
.card h3 { margin-top: 0; }
.card p:last-child { margin-bottom: 0; }
a.card { display: block; color: var(--ink); text-decoration: none; transition: transform .15s, border-color .15s; }
a.card:hover { transform: translateY(-2px); border-color: var(--green); }
.card .more { color: var(--green); font-weight: 700; font-size: .92rem; }
.icon { width: 44px; height: 44px; border-radius: 12px; background: var(--green-soft); display: grid; place-items: center; margin-bottom: 14px; }
.icon svg { width: 24px; height: 24px; }
.kpi { background: var(--white); border: 1px solid var(--line); border-radius: var(--radius); padding: 20px; }
.kpi b { display: block; font-size: 1.9rem; font-weight: 800; color: var(--green); letter-spacing: -.02em; }
.kpi span { font-size: .9rem; color: var(--muted); }

/* Contenu éditorial */
.entry { padding: 48px 0 72px; }
.entry h2:first-child { margin-top: 0; }
.entry ul li, .entry ol li { margin-bottom: .4em; }
.note { background: var(--green-soft); border-left: 4px solid var(--green); border-radius: 0 var(--radius) var(--radius) 0; padding: 18px 22px; margin: 26px 0; }
.note.warn { background: var(--amber-soft); border-left-color: var(--amber); }
.note p:last-child { margin-bottom: 0; }
.toc { background: var(--paper); border-radius: var(--radius); padding: 20px 24px; margin: 0 0 32px; }
.toc strong { display: block; margin-bottom: 6px; }
.toc ol { margin: 0; padding-left: 20px; }
.toc a { color: var(--ink); }
.table-wrap { overflow-x: auto; margin: 22px 0 8px; border: 1px solid var(--line); border-radius: var(--radius); }
table { width: 100%; border-collapse: collapse; font-size: .94rem; }
th, td { padding: 10px 14px; text-align: left; border-bottom: 1px solid var(--line); white-space: nowrap; }
th { background: var(--paper); font-weight: 700; }
td.num, th.num { text-align: right; font-variant-numeric: tabular-nums; }
tr:last-child td { border-bottom: 0; }
.source { font-size: .84rem; color: var(--muted); }
figure { margin: 28px 0; }
figure svg { width: 100%; height: auto; }
figcaption { font-size: .86rem; color: var(--muted); margin-top: 8px; }
details { border: 1px solid var(--line); border-radius: 12px; padding: 14px 18px; margin: 10px 0; background: var(--white); }
details summary { font-weight: 700; cursor: pointer; }
details[open] summary { margin-bottom: 8px; }
.steps { counter-reset: s; list-style: none; padding: 0; }
.steps > li { counter-increment: s; position: relative; padding-left: 52px; margin-bottom: 18px; }
.steps > li::before { content: counter(s); position: absolute; left: 0; top: 0; width: 36px; height: 36px; border-radius: 50%; background: var(--ink); color: var(--white); font-weight: 800; display: grid; place-items: center; }

/* Bandeau d'appel */
.cta-band { background: var(--ink); color: var(--white); padding: 60px 0; }
.cta-band h2 { color: var(--white); margin-top: 0; }
.cta-band p { color: #C9D3E0; max-width: 60ch; }
.entry .cta-band { border-radius: 18px; padding: 34px; margin: 40px 0 0; }

/* Formulaire */
.ip-form label { display: block; font-weight: 600; font-size: .92rem; margin: 14px 0 6px; }
.ip-form input[type=text], .ip-form input[type=email], .ip-form input[type=tel], .ip-form select, .ip-form textarea { width: 100%; padding: 11px 13px; border: 1px solid #C5CEd8; border-radius: 10px; font: inherit; background: var(--white); }
.ip-form input:focus, .ip-form select:focus, .ip-form textarea:focus { outline: 2px solid var(--green); outline-offset: 1px; border-color: var(--green); }
.ip-form button { background: var(--green); color: var(--white); border: 0; border-radius: 999px; padding: 13px 26px; font: inherit; font-weight: 700; cursor: pointer; }
.ip-form button:hover { background: var(--green-2); }
.ip-form .grid-2 { gap: 0 18px; }

/* Pied de page */
.site-footer { background: #0D1630; color: #B7C2D0; padding: 56px 0 28px; font-size: .94rem; }
.site-footer a { color: #DCE4EE; text-decoration: none; }
.site-footer a:hover { color: var(--white); text-decoration: underline; }
.site-footer h4 { color: var(--white); font-size: .95rem; margin: 0 0 12px; }
.site-footer ul { list-style: none; margin: 0; padding: 0; }
.site-footer li { margin-bottom: 7px; }
.footer-grid { display: grid; grid-template-columns: 1.4fr 1fr 1fr; gap: 36px; }
.footer-bottom { border-top: 1px solid #223055; margin-top: 36px; padding-top: 20px; display: flex; justify-content: space-between; flex-wrap: wrap; gap: 10px; font-size: .86rem; }
.site-footer .brand { color: var(--white); }
.site-footer .brand small { color: #8FA0B5; }

@media (max-width: 960px) {
  .hero-grid, .grid-3, .grid-4, .footer-grid { grid-template-columns: 1fr 1fr; }
  .hero-grid { grid-template-columns: 1fr; }
}
@media (max-width: 1240px) {
  .nav-toggle { display: block; }
  .nav-menu { display: none; position: absolute; top: 68px; left: 0; right: 0; background: var(--white); border-bottom: 1px solid var(--line); flex-direction: column; align-items: flex-start; padding: 14px 20px 20px; gap: 14px; }
  .nav-menu.open { display: flex; }
  .nav-menu .menu { flex-direction: column; gap: 12px; }
}
@media (max-width: 760px) {
  body { font-size: 16px; }
  .grid-2, .grid-3, .grid-4, .footer-grid { grid-template-columns: 1fr; }
  .section { padding: 52px 0; }
  .hero { padding: 40px 0 48px; }
  th, td { padding: 8px 10px; }
}

/* Mention de vérification */
.verified { display: flex; align-items: flex-start; gap: 8px; flex-wrap: nowrap; font-size: .9rem; color: var(--ink-2); margin: 16px 0 0; }
.verified svg { width: 18px; height: 18px; flex: none; margin-top: 2px; }

/* Comparatifs */
.cmp-filters { display: flex; flex-wrap: wrap; gap: 8px; margin: 18px 0 4px; }
.cmp-filters button { font: inherit; font-size: .88rem; font-weight: 600; padding: 7px 14px; border-radius: 999px; border: 1px solid var(--line); background: var(--white); color: var(--ink); cursor: pointer; }
.cmp-filters button.on { background: var(--ink); border-color: var(--ink); color: var(--white); }
table.cmp th { position: sticky; top: 0; }
table.cmp td, table.cmp th { white-space: normal; vertical-align: top; min-width: 110px; }
table.cmp td:first-child, table.cmp th:first-child { min-width: 170px; }
table.cmp td:first-child strong { display: block; }
table.cmp small { color: var(--muted); display: block; font-size: .8rem; }
.price { font-weight: 800; font-variant-numeric: tabular-nums; white-space: nowrap; }
.yes { color: var(--green-2); font-weight: 700; }
.no { color: #A33B3B; font-weight: 700; }
.badge { display: inline-block; font-size: .74rem; font-weight: 700; padding: 2px 8px; border-radius: 999px; background: var(--paper); color: var(--ink-2); border: 1px solid var(--line); margin: 2px 4px 2px 0; white-space: nowrap; }
.badge.g { background: var(--green-soft); border-color: #BFE3D0; color: var(--green-2); }
.badge.a { background: var(--amber-soft); border-color: #F3D48E; color: #7A5300; }
.offers { display: grid; gap: 18px; margin: 22px 0; }
.offer { border: 1px solid var(--line); border-radius: var(--radius); padding: 22px 24px; background: var(--white); }
.offer h3 { margin: 0 0 4px; }
.offer .meta { font-size: .9rem; color: var(--muted); margin-bottom: 10px; }
.offer ul { margin-bottom: .6em; }
.offer .pros-cons { display: grid; grid-template-columns: 1fr 1fr; gap: 18px; }
.offer .pros-cons h4 { font-size: .9rem; margin: 6px 0; }
.pick { display: grid; grid-template-columns: repeat(auto-fit, minmax(230px, 1fr)); gap: 14px; margin: 22px 0; }
.pick div { border: 1px solid var(--line); border-radius: var(--radius); padding: 16px 18px; background: var(--paper); }
.pick b { display: block; margin-bottom: 4px; }
.pick p { margin: 0; font-size: .94rem; }
.card.soon { opacity: .75; border-style: dashed; box-shadow: none; }
@media (max-width: 760px) { .offer .pros-cons { grid-template-columns: 1fr; } }

/* Espace client */
.ip-tabs { display: flex; flex-wrap: wrap; gap: 6px; margin: 0 0 26px; border-bottom: 1px solid var(--line); }
.ip-tabs a { padding: 10px 14px; text-decoration: none; color: var(--ink-2); font-weight: 600; font-size: .94rem; border-bottom: 3px solid transparent; margin-bottom: -1px; }
.ip-tabs a.on { color: var(--green-2); border-bottom-color: var(--green); }
.ip-tabs a:last-child { margin-left: auto; color: var(--muted); font-weight: 500; }
.ip-inline { display: flex; gap: 8px; }
.ip-inline input { flex: 1 1 90px; min-width: 0; }
.ip-inline select { flex: 0 0 auto; width: auto; }
.ip-checks { display: grid; grid-template-columns: repeat(auto-fit, minmax(230px, 1fr)); gap: 4px 18px; }
.ip-checks label, .ip-form .ip-checks label { font-weight: 400; margin: 4px 0; }
.ip-form input[type=password], .ip-form input[type=date], .ip-form input[type=file] { width: 100%; padding: 11px 13px; border: 1px solid #C5CEd8; border-radius: 10px; font: inherit; background: var(--white); }
.ip-form input[disabled] { background: var(--paper); color: var(--muted); }
.ip-form button.ip-danger { background: #A33B3B; }
.ip-form button.ip-danger:hover { background: #7E2A2A; }
.ip-auth { align-items: start; gap: 36px; }
.ip-auth h2 { margin-top: 0; }
.nav-account { font-weight: 600; font-size: .92rem; color: var(--ink); text-decoration: none; white-space: nowrap; }

/* Simulateur public */
.ip-simu { background: var(--paper); border: 1px solid var(--line); border-radius: 18px; padding: 26px 26px 12px; margin: 34px 0; }
.ip-simu .table-wrap { background: var(--white); }

/* Bandeau de consentement */
.ip-consent { position: fixed; left: 16px; right: 16px; bottom: 16px; z-index: 200; max-width: 560px; margin: 0 auto; background: var(--white); border: 1px solid var(--line); border-radius: 16px; box-shadow: 0 12px 40px rgba(20,33,61,.18); padding: 18px 20px; font-size: .92rem; }
.ip-consent[hidden] { display: none; }
.ip-consent p { margin: 0 0 12px; }
.ip-consent-btns { display: flex; gap: 10px; }
.ip-consent-btns button { flex: 1; font: inherit; font-weight: 700; padding: 10px 14px; border-radius: 999px; border: 2px solid var(--ink); background: var(--white); color: var(--ink); cursor: pointer; }

/* Présentation des comparatifs : résumé, cartes, signature */
.resume { border: 1px solid var(--line); border-left: 4px solid var(--green); border-radius: 0 var(--radius) var(--radius) 0; background: var(--white); padding: 18px 22px 8px; margin: 26px 0; }
.resume-titre { font-weight: 800; margin: 0 0 8px; }
.resume ol { padding-left: 20px; margin: 0 0 10px; }
.resume li { margin-bottom: .45em; }
.resume a { color: var(--ink); }
.offer-badge { vertical-align: middle; font-size: .74rem; margin-left: 6px; }
.offer .pros-cons { margin-top: 12px; }
.offer ul.plus, .offer ul.moins { list-style: none; padding: 0; margin: 0; font-size: .93rem; }
.offer ul.plus li, .offer ul.moins li { position: relative; padding-left: 22px; margin-bottom: .35em; }
.offer ul.plus li::before { content: "+"; position: absolute; left: 4px; font-weight: 800; color: var(--green); }
.offer ul.moins li::before { content: "–"; position: absolute; left: 4px; font-weight: 800; color: #A33B3B; }
.offer-cta { margin: 14px 0 0; }
.offer-cta .btn { padding: 8px 18px; font-size: .9rem; }
.byline { font-size: .86rem; color: var(--muted); margin: 10px 0 0; }
