/*
 * Le Consultant — feuille de style du site public (refonte, novembre 2026).
 * Aucune dépendance externe : polices système, icônes SVG en ligne, pas de CDN ni de compilation.
 */

:root {
  --blue: #0136ba;
  --blue-dark: #012a8f;
  --blue-soft: #e8eefb;
  --red: #ff5858;          /* rouge du logo */
  --red-strong: #d93838;   /* même rouge, assez foncé pour du texte blanc ou du texte sur fond clair */
  --red-soft: #ffeded;
  --green: #1d7a46;
  --green-soft: #e8f6ee;
  --amber: #a15c07;
  --amber-soft: #fff4e5;
  --ink: #14181f;
  --text: #2f3542;
  --muted: #6b7280;
  --border: #e5e3dc;
  --bg: #f5f4f0;
  --card: #ffffff;
  --radius: 14px;
  --radius-sm: 10px;
  --shadow: 0 1px 2px rgba(20, 24, 31, .04), 0 8px 24px rgba(20, 24, 31, .06);
  --font: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  --container: 1160px;
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
body { margin: 0; font-family: var(--font); font-size: 16px; line-height: 1.6; color: var(--text); background: var(--bg); }
img, svg { max-width: 100%; display: block; }
a { color: var(--blue); text-decoration: none; }
a:hover { text-decoration: underline; }
h1, h2, h3, h4 { color: var(--ink); line-height: 1.25; margin: 0 0 .5em; font-weight: 700; letter-spacing: -.01em; }
h1 { font-size: clamp(1.9rem, 4vw, 2.9rem); }
h2 { font-size: clamp(1.45rem, 2.6vw, 2rem); }
h3 { font-size: 1.15rem; }
p { margin: 0 0 1em; }
:focus-visible { outline: 3px solid rgba(1, 54, 186, .35); outline-offset: 2px; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

.container { width: 100%; max-width: var(--container); margin: 0 auto; padding: 0 20px; }
.section { padding: 64px 0; }
.section-sm { padding: 40px 0; }
.section-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 16px; margin-bottom: 28px; flex-wrap: wrap; }
.section-head p { color: var(--muted); margin: 0; max-width: 620px; }
.eyebrow { display: inline-flex; align-items: center; gap: 8px; font-size: .78rem; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; color: var(--red-strong); margin-bottom: 8px; }
.eyebrow::before { content: ""; width: 18px; height: 3px; border-radius: 2px; background: var(--red); }
.muted { color: var(--muted); }
.small { font-size: .875rem; }
.center { text-align: center; }
.stack > * + * { margin-top: 12px; }

/* ── En-tête ── */
.site-header { position: sticky; top: 0; z-index: 100; background: rgba(255, 255, 255, .96); backdrop-filter: saturate(160%) blur(8px); border-bottom: 1px solid var(--border); }
.site-header .container { display: flex; align-items: center; justify-content: space-between; height: 68px; gap: 16px; }
.brand img { height: 38px; width: auto; }
.nav { display: flex; align-items: center; gap: 4px; }
.nav a { color: var(--text); font-weight: 500; font-size: .95rem; padding: 8px 12px; border-radius: 8px; }
.nav a:hover { background: var(--blue-soft); color: var(--blue); text-decoration: none; }
.nav a.active { color: var(--blue); font-weight: 700; }
.nav .btn { margin-left: 6px; }
.nav a.btn-primary, .nav a.btn-primary:hover { color: #fff; background: var(--blue); }
.nav a.btn-primary:hover { background: var(--blue-dark); }
.nav a.btn-red, .nav a.btn-red:hover { color: #fff; background: var(--red-strong); }
.nav a.btn-red:hover { background: #bf2c2c; }
.nav-toggle { display: none; background: none; border: 0; padding: 8px; cursor: pointer; color: var(--ink); }
@media (max-width: 900px) {
  .nav-toggle { display: block; }
  .nav { position: absolute; top: 68px; left: 0; right: 0; flex-direction: column; align-items: stretch; background: #fff; border-bottom: 1px solid var(--border); padding: 12px 20px 20px; display: none; box-shadow: var(--shadow); }
  .nav.open { display: flex; }
  .nav a { padding: 12px; }
  .nav .btn { margin: 8px 0 0; }
}

/* ── Boutons ── */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-height: 44px; padding: 10px 20px; border-radius: 999px; border: 1px solid transparent; font: inherit; font-weight: 600; font-size: .95rem; cursor: pointer; text-decoration: none; transition: background .15s, color .15s, border-color .15s, transform .15s; white-space: nowrap; }
.btn:hover { text-decoration: none; transform: translateY(-1px); }
.btn-primary { background: var(--blue); color: #fff; }
.btn-primary:hover { background: var(--blue-dark); color: #fff; }
.btn-red { background: var(--red-strong); color: #fff; }
.btn-red:hover { background: #bf2c2c; color: #fff; }
.btn-outline { background: #fff; color: var(--blue); border-color: rgba(1, 54, 186, .35); }
.btn-outline:hover { border-color: var(--blue); }
.btn-ghost-light { background: rgba(255, 255, 255, .12); color: #fff; border-color: rgba(255, 255, 255, .4); }
.btn-ghost-light:hover { background: rgba(255, 255, 255, .2); color: #fff; }
.btn-light { background: #fff; color: var(--blue); }
.btn-sm { min-height: 36px; padding: 6px 14px; font-size: .875rem; }
.btn-block { width: 100%; }
.btn[disabled] { opacity: .55; cursor: not-allowed; transform: none; }

/* ── Bandeau d'accueil ── */
.hero { background: linear-gradient(135deg, var(--blue) 0%, #0a47d6 60%, #1f5be0 100%); color: #fff; padding: 72px 0 88px; position: relative; overflow: hidden; }
.hero .container { position: relative; z-index: 1; }
.hero-grid { display: grid; grid-template-columns: minmax(0, 1.25fr) minmax(0, .75fr); align-items: end; gap: 24px; }
.hero-photo { align-self: end; margin-bottom: -88px; }
.hero-photo img { width: 100%; max-width: 420px; margin-left: auto; filter: drop-shadow(0 18px 40px rgba(0, 0, 0, .25)); }
@media (max-width: 860px) { .hero-grid { grid-template-columns: 1fr; } .hero-photo { display: none; } }
.hero .mark { position: relative; white-space: nowrap; }
.hero .mark::after { content: ""; position: absolute; left: 0; right: 0; bottom: -4px; height: 6px; border-radius: 3px; background: var(--red); }
.hero .eyebrow { color: #fff; }
.hero .eyebrow::before { background: var(--red); }
.hero::after { content: ""; position: absolute; right: -120px; top: -120px; width: 420px; height: 420px; border-radius: 50%; background: rgba(255, 255, 255, .06); }
.hero h1 { color: #fff; max-width: 760px; }
.hero p.lead { font-size: 1.15rem; color: rgba(255, 255, 255, .86); max-width: 640px; }
.hero .actions { display: flex; gap: 12px; flex-wrap: wrap; margin-top: 24px; }
.hero .sources { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 28px; }
.hero .sources span { font-size: .8rem; font-weight: 600; padding: 6px 12px; border-radius: 999px; background: rgba(255, 255, 255, .12); border: 1px solid rgba(255, 255, 255, .25); }
.page-hero { background: var(--blue); color: #fff; padding: 44px 0; }
.page-hero h1 { color: #fff; margin: 0; }
.page-hero p { color: rgba(255, 255, 255, .85); margin: 8px 0 0; }

/* ── Cartes et grilles ── */
.grid { display: grid; gap: 20px; }
.grid-2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.grid-3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.grid-4 { grid-template-columns: repeat(4, minmax(0, 1fr)); }
@media (max-width: 960px) { .grid-3, .grid-4 { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 640px) { .grid-2, .grid-3, .grid-4 { grid-template-columns: 1fr; } }
.card { background: var(--card); border: 1px solid var(--border); border-radius: var(--radius); padding: 24px; box-shadow: var(--shadow); }
.card-link { display: block; color: inherit; transition: transform .15s, box-shadow .15s, border-color .15s; }
.card-link:hover { text-decoration: none; transform: translateY(-2px); border-color: rgba(1, 54, 186, .35); }
.card h3 { margin-bottom: 6px; }

.offer { display: flex; flex-direction: column; gap: 12px; height: 100%; }
.offer-top { display: flex; align-items: center; gap: 12px; }
.offer-logo { width: 48px; height: 48px; border-radius: 10px; object-fit: cover; border: 1px solid var(--border); background: #fff; flex: none; }
.offer-org { font-size: .85rem; color: var(--muted); font-weight: 600; }
.offer-title { color: var(--ink); font-weight: 700; font-size: 1.02rem; line-height: 1.4; }
.offer-meta { display: flex; flex-wrap: wrap; gap: 8px 16px; margin-top: auto; font-size: .85rem; color: var(--muted); }
.offer-meta strong { color: var(--text); }

.badge { display: inline-flex; align-items: center; gap: 6px; font-size: .75rem; font-weight: 700; padding: 4px 10px; border-radius: 999px; background: var(--blue-soft); color: var(--blue); }
.badge-red { background: var(--red-soft); color: var(--red-strong); }
.badge-green { background: var(--green-soft); color: var(--green); }
.badge-amber { background: var(--amber-soft); color: var(--amber); }
.badge-gray { background: #eef0f3; color: var(--muted); }

/* ── Grille compacte des appels d'offres : 6 par ligne sur grand écran ── */
.container-wide, .wide .site-header .container, .wide .site-footer .container { max-width: 1440px; }
.grid-offers { display: grid; gap: 14px; grid-template-columns: repeat(6, minmax(0, 1fr)); }
@media (max-width: 1280px) { .grid-offers { grid-template-columns: repeat(4, minmax(0, 1fr)); } }
@media (max-width: 960px) { .grid-offers { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
@media (max-width: 720px) { .grid-offers { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 460px) { .grid-offers { grid-template-columns: 1fr; } }
.offer-card { display: flex; flex-direction: column; gap: 8px; padding: 14px; border-radius: 12px; height: 100%; }
.offer-card .offer-top { gap: 8px; }
.offer-card .offer-logo { width: 32px; height: 32px; border-radius: 8px; }
.offer-card .offer-org { font-size: .74rem; line-height: 1.3; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.offer-card .offer-title { font-size: .9rem; line-height: 1.35; display: -webkit-box; -webkit-line-clamp: 4; -webkit-box-orient: vertical; overflow: hidden; }
.offer-card .badges { display: flex; gap: 4px; flex-wrap: wrap; }
.offer-card .badge { font-size: .66rem; padding: 2px 8px; }
.offer-card .dates { margin-top: auto; font-size: .76rem; color: var(--muted); display: grid; gap: 2px; }
.offer-card .dates strong { color: var(--text); }
.offer-card .btn { min-height: 32px; font-size: .8rem; padding: 4px 10px; }
dialog.sheet { border: 0; border-radius: 16px; padding: 0; width: min(640px, calc(100% - 32px)); box-shadow: 0 24px 64px rgba(0, 0, 0, .25); }
dialog.sheet::backdrop { background: rgba(20, 24, 31, .45); }
dialog.sheet .sheet-body { padding: 24px; }
dialog.sheet .sheet-close { position: absolute; top: 10px; right: 12px; background: none; border: 0; font-size: 26px; line-height: 1; cursor: pointer; color: var(--muted); }

/* ── Étapes ── */
.steps { counter-reset: step; }
.step { position: relative; padding-top: 52px; }
.step::before { counter-increment: step; content: counter(step); position: absolute; top: 0; left: 0; width: 38px; height: 38px; border-radius: 50%; background: var(--red-strong); color: #fff; font-weight: 700; display: grid; place-items: center; }

/* ── Tarifs ── */
.price-card { display: flex; flex-direction: column; gap: 14px; }
.price-card { border-top: 4px solid var(--red); }
.price-card.featured { border: 2px solid var(--blue); border-top-width: 4px; border-top-color: var(--red); position: relative; }
.price-card.featured::before { content: "Le plus choisi"; position: absolute; top: -12px; left: 24px; background: var(--blue); color: #fff; font-size: .72rem; font-weight: 700; padding: 3px 10px; border-radius: 999px; }
.price { font-size: 2rem; font-weight: 800; color: var(--ink); line-height: 1; }
.price small { font-size: .9rem; font-weight: 600; color: var(--muted); }
.checklist { list-style: none; padding: 0; margin: 0; }
.checklist li { position: relative; padding-left: 26px; margin: 8px 0; }
.checklist li::before { content: ""; position: absolute; left: 0; top: .45em; width: 14px; height: 8px; border-left: 2.5px solid var(--green); border-bottom: 2.5px solid var(--green); transform: rotate(-45deg); }

/* ── Formulaires ── */
.form-grid { display: grid; gap: 16px; }
.field label { display: block; font-weight: 600; font-size: .9rem; color: var(--ink); margin-bottom: 6px; }
.field .hint { font-size: .8rem; color: var(--muted); margin-top: 4px; }
.input, select.input, textarea.input { width: 100%; min-height: 46px; padding: 10px 14px; border: 1px solid #cfd3da; border-radius: var(--radius-sm); background: #fff; font: inherit; color: var(--ink); }
textarea.input { min-height: 120px; resize: vertical; }
.input:focus { border-color: var(--blue); outline: 3px solid rgba(1, 54, 186, .15); }
.field.has-error .input { border-color: var(--red-strong); }
.error-text { color: var(--red-strong); font-size: .82rem; margin-top: 4px; }
.check { display: flex; gap: 10px; align-items: flex-start; font-size: .92rem; }
.check input { margin-top: 4px; width: 18px; height: 18px; accent-color: var(--blue); }
.search-bar { display: grid; grid-template-columns: 2fr 1fr 1fr auto; gap: 10px; background: #fff; padding: 12px; border-radius: var(--radius); box-shadow: 0 12px 32px rgba(0, 0, 0, .15); }
.search-bar-5 { grid-template-columns: 2fr 1fr 1fr 1fr auto; }
@media (max-width: 860px) { .search-bar, .search-bar-5 { grid-template-columns: 1fr; } }

/* ── Alertes et encadrés ── */
.notice { border-radius: var(--radius-sm); padding: 14px 16px; border: 1px solid; font-size: .95rem; }
.notice-info { background: var(--blue-soft); border-color: rgba(1, 54, 186, .2); color: var(--blue-dark); }
.notice-success { background: var(--green-soft); border-color: rgba(29, 122, 70, .25); color: var(--green); }
.notice-warning { background: var(--amber-soft); border-color: rgba(161, 92, 7, .25); color: var(--amber); }
.notice-error { background: var(--red-soft); border-color: rgba(217, 56, 56, .3); color: var(--red-strong); }

/* ── Bandeau d'appel ── */
.cta { background: var(--ink); color: #fff; border-radius: 20px; padding: 44px; display: flex; align-items: center; justify-content: space-between; gap: 24px; flex-wrap: wrap; }
.cta h2 { color: #fff; margin: 0 0 6px; }
.cta p { color: rgba(255, 255, 255, .75); margin: 0; }

/* ── Tableaux ── */
.table-wrap { overflow-x: auto; border: 1px solid var(--border); border-radius: var(--radius); background: #fff; }
table.table { width: 100%; border-collapse: collapse; font-size: .92rem; }
.table th, .table td { padding: 12px 14px; text-align: left; border-bottom: 1px solid var(--border); vertical-align: top; }
.table th { font-size: .78rem; text-transform: uppercase; letter-spacing: .05em; color: var(--muted); background: #fafaf8; }
.table tr:last-child td { border-bottom: 0; }

/* ── Pagination (vue layout.pagination) ── */
.pagination { display: flex; gap: 6px; flex-wrap: wrap; justify-content: center; list-style: none; padding: 0; margin: 28px 0 0; }
.pagination a, .pagination span { display: inline-grid; place-items: center; min-width: 40px; height: 40px; padding: 0 10px; border-radius: 10px; border: 1px solid var(--border); background: #fff; color: var(--text); font-weight: 600; }
.pagination .active span { background: var(--blue); border-color: var(--blue); color: #fff; }

/* ── Pied de page : bleu du site (#0136ba), décision du client ── */
.site-footer { background: var(--blue); color: rgba(255, 255, 255, .85); padding: 56px 0 24px; margin-top: 64px; border-top: 5px solid var(--red); }
.site-footer a { color: #fff; }
.site-footer h4 { color: #fff; font-size: .95rem; margin-bottom: 12px; }
.site-footer ul { list-style: none; padding: 0; margin: 0; }
.site-footer li { margin: 6px 0; }
.footer-grid { display: grid; grid-template-columns: 2fr 1fr 1fr 1fr; gap: 32px; }
@media (max-width: 860px) { .footer-grid { grid-template-columns: 1fr 1fr; } }
@media (max-width: 520px) { .footer-grid { grid-template-columns: 1fr; } }
.footer-bottom { border-top: 1px solid rgba(255, 255, 255, .2); margin-top: 40px; padding-top: 20px; font-size: .85rem; display: flex; justify-content: space-between; gap: 12px; flex-wrap: wrap; }
.footer-logo { background: #fff; border-radius: 10px; padding: 8px 12px; display: inline-block; }
.footer-logo img { height: 32px; }

/* ── Divers ── */
.empty { text-align: center; padding: 48px 20px; color: var(--muted); }
.js .reveal { opacity: 0; transform: translateY(12px); transition: opacity .5s ease, transform .5s ease; }
.reveal.visible { opacity: 1; transform: none; }
@media (prefers-reduced-motion: reduce) { .js .reveal { opacity: 1; transform: none; transition: none; } .btn:hover, .card-link:hover { transform: none; } }

/* ── Parcours (étapes) ── */
.stepper { display: flex; gap: 8px; list-style: none; padding: 0; margin: 0 0 28px; counter-reset: s; flex-wrap: wrap; }
.stepper li { flex: 1; min-width: 120px; display: flex; align-items: center; gap: 10px; font-size: .88rem; font-weight: 600; color: var(--muted); padding: 10px 12px; border-radius: 12px; background: #fff; border: 1px solid var(--border); }
.stepper li::before { counter-increment: s; content: counter(s); width: 26px; height: 26px; border-radius: 50%; display: grid; place-items: center; background: #eef0f3; color: var(--muted); flex: none; font-size: .8rem; }
.stepper li.done::before { content: "✓"; background: var(--green-soft); color: var(--green); }
.stepper li.current { color: var(--ink); border-color: var(--blue); }
.stepper li.current::before { background: var(--red-strong); color: #fff; }
.choices { display: flex; flex-wrap: wrap; gap: 8px; }
.choice { position: relative; }
.choice input { position: absolute; opacity: 0; pointer-events: none; }
.choice span { display: inline-block; padding: 8px 14px; border-radius: 999px; border: 1px solid #cfd3da; background: #fff; font-size: .9rem; cursor: pointer; user-select: none; }
.choice input:checked + span { background: var(--blue); border-color: var(--blue); color: #fff; }
.choice input:focus-visible + span { outline: 3px solid rgba(1, 54, 186, .3); outline-offset: 2px; }
.pack-option { display: block; cursor: pointer; }
.pack-option input { position: absolute; opacity: 0; }
.pack-option .card { transition: border-color .15s, box-shadow .15s; }
.pack-option input:checked + .card { border: 2px solid var(--blue); box-shadow: 0 0 0 4px rgba(1, 54, 186, .1); }
.summary { display: grid; grid-template-columns: max-content 1fr; gap: 8px 18px; margin: 0; }
.summary dt { color: var(--muted); }
.summary dd { margin: 0; font-weight: 600; color: var(--ink); }

/* ── Espace client ── */
.account-grid { display: grid; grid-template-columns: 250px minmax(0, 1fr); gap: 24px; align-items: start; }
@media (max-width: 860px) { .account-grid { grid-template-columns: 1fr; } }
.account-nav a, .account-nav .logout { display: block; padding: 10px 12px; border-radius: 10px; color: var(--text); font-weight: 500; text-decoration: none; background: none; border: 0; width: 100%; text-align: left; font: inherit; cursor: pointer; }
.account-nav a:hover { background: var(--blue-soft); color: var(--blue); }
.account-nav a.active { background: var(--blue-soft); color: var(--blue); font-weight: 700; }
.account-nav .logout { color: var(--red-strong); }
.account-nav .logout:hover { background: var(--red-soft); }
.page-title { display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap; margin-bottom: 18px; }
.page-title h1 { font-size: 1.6rem; margin: 0; }
.alert-row { display: flex; gap: 16px; align-items: flex-start; justify-content: space-between; flex-wrap: wrap; }
.alert-row .actions { display: flex; gap: 8px; flex-wrap: wrap; }

/* ── Rappel de renouvellement ── */
.renew-bar { background: var(--red-strong); color: #fff; font-size: .92rem; }
.renew-bar .container { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding-top: 10px; padding-bottom: 10px; flex-wrap: wrap; }
.renew-bar strong { font-variant-numeric: tabular-nums; }
