/* HB Technology — feuille de style (mobile d'abord). Aucune valeur en ligne dans les gabarits : tout passe par des classes. */
:root {
  --marine: #1F3A5F; --marine-d: #162a45; --turq: #0E7C86; --turq-d: #0a626a;
  --orange: #E8833A; --orange-d: #c96d28; --gris: #EEF3F8; --texte: #1b2430; --muted: #5a6677;
  --ok: #1d7a46; --err: #b3261e; --warn: #8a5a00; --bord: #d5dde7; --blanc: #fff;
  --r: 10px; --shadow: 0 2px 10px rgba(31, 58, 95, .10);
}
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body { margin: 0; font: 400 1rem/1.6 Lato, system-ui, -apple-system, "Segoe UI", Roboto, Arial, sans-serif; color: var(--texte); background: var(--blanc); }
img { max-width: 100%; height: auto; display: block; }
a { color: var(--turq-d); }
a:hover { color: var(--marine); }
h1, h2, h3 { color: var(--marine); line-height: 1.2; margin: 0 0 .6em; }
h1 { font-size: 1.8rem; font-weight: 900; }
h2 { font-size: 1.4rem; font-weight: 900; margin-top: 1.6em; }
h3 { font-size: 1.1rem; font-weight: 700; }
p { margin: 0 0 1em; }
.wrap { width: 100%; max-width: 1080px; margin: 0 auto; padding: 0 16px; }
.skip { position: absolute; left: -999px; top: 0; background: var(--marine); color: #fff; padding: 8px 12px; z-index: 100; }
.skip:focus { left: 8px; top: 8px; }
:focus-visible { outline: 3px solid var(--orange); outline-offset: 2px; }
.muted { color: var(--muted); }
.small { font-size: .875rem; }
.center { text-align: center; }
.plain { list-style: none; padding: 0; margin: .4em 0 0; }
.plain li { margin: .25em 0; }

/* Bandeaux */
.banner { padding: 8px 16px; text-align: center; font-size: .9rem; font-weight: 700; }
.banner-test { background: #fff4d6; color: #5c4200; border-bottom: 2px solid #e0b100; }
.banner-info { background: var(--turq); color: #fff; }

/* En-tête */
.site-header { background: var(--marine); color: #fff; position: sticky; top: 0; z-index: 50; }
.header-row { display: flex; align-items: center; justify-content: space-between; min-height: 60px; flex-wrap: wrap; }
.brand { display: flex; align-items: center; gap: 10px; color: #fff; text-decoration: none; font-weight: 900; }
.brand-mark { background: var(--orange); color: var(--marine-d); width: 34px; height: 34px; border-radius: 8px; display: inline-grid; place-items: center; font-size: .95rem; }
.nav-toggle { background: transparent; color: #fff; border: 1px solid rgba(255,255,255,.5); border-radius: 8px; padding: 8px 14px; font: inherit; cursor: pointer; min-height: 44px; }
.nav { display: none; width: 100%; flex-direction: column; padding: 8px 0 14px; }
.nav.is-open { display: flex; }
.nav a { color: #fff; text-decoration: none; padding: 12px 4px; min-height: 44px; border-bottom: 1px solid rgba(255,255,255,.12); }
.nav a:hover { text-decoration: underline; color: #fff; }
.badge { background: var(--orange); color: var(--marine-d); border-radius: 99px; padding: 0 8px; font-size: .8rem; font-weight: 900; }

/* Boutons et formulaires */
.btn { display: inline-block; background: var(--orange); color: var(--marine-d); border: 0; border-radius: var(--r); padding: 13px 22px; font-family: inherit; font-weight: 700; font-size: 1rem; line-height: 1.2; text-decoration: none; cursor: pointer; min-height: 48px; text-align: center; }
.btn:hover { background: #f09a57; color: var(--marine-d); }
.btn:disabled { opacity: .6; cursor: not-allowed; }
.btn-secondary { background: var(--marine); color: #fff; }
.btn-secondary:hover { background: var(--marine-d); color: #fff; }
.btn-ghost { background: transparent; color: var(--marine); border: 2px solid var(--marine); }
.btn-ghost:hover { background: var(--marine); color: #fff; }
.btn-danger { background: var(--err); color: #fff; }
.btn-danger:hover { background: #8f1d17; color: #fff; }
.btn-small { padding: 8px 14px; min-height: 40px; font-size: .9rem; }
.btn-block { display: block; width: 100%; }
label { display: block; font-weight: 700; margin: 0 0 4px; }
input[type=text], input[type=email], input[type=password], input[type=tel], input[type=number], input[type=url], input[type=search], input[type=datetime-local], input[type=file], select, textarea {
  width: 100%; padding: 11px 12px; border: 1.5px solid #9aa8ba; border-radius: 8px; font: inherit; background: #fff; color: var(--texte); min-height: 46px;
}
textarea { min-height: 130px; resize: vertical; }
.field { margin-bottom: 16px; }
.hint { color: var(--muted); font-size: .875rem; margin-top: 4px; }
.check { display: flex; gap: 10px; align-items: flex-start; font-weight: 400; }
.check input { margin-top: 5px; width: 20px; height: 20px; flex: none; }
.hp { position: absolute; left: -5000px; height: 0; overflow: hidden; } /* pot de miel anti-robots */
.inline-form { display: inline; }

/* Alertes */
.alert { padding: 12px 16px; border-radius: 8px; margin: 16px 0; border-left: 5px solid; background: var(--gris); }
.alert-success { border-color: var(--ok); background: #e9f6ee; }
.alert-error { border-color: var(--err); background: #fdecea; }
.alert-info { border-color: var(--turq); background: #e6f4f5; }
.alert-warning { border-color: var(--orange); background: #fff3e6; }

/* Sections vitrine */
.hero { background: linear-gradient(135deg, var(--marine) 0%, #274b7a 100%); color: #fff; padding: 40px 0; margin: 0 -16px; }
.hero .wrap { display: grid; gap: 24px; }
.hero h1 { color: #fff; font-size: 2rem; }
.hero p { font-size: 1.1rem; max-width: 640px; }
.hero .btn-ghost { color: #fff; border-color: #fff; }
.hero .btn-ghost:hover { background: #fff; color: var(--marine); }
.btn-row { display: flex; flex-wrap: wrap; gap: 12px; }
.section { padding: 28px 0; }
.band { background: var(--gris); margin: 0 -16px; padding: 28px 16px; }
.grid { display: grid; gap: 18px; }
.card { background: #fff; border: 1px solid var(--bord); border-radius: var(--r); padding: 20px; box-shadow: var(--shadow); display: flex; flex-direction: column; }
.card h3 { margin-top: 0; }
.card .grow { flex: 1; }
.price { font-size: 1.5rem; font-weight: 900; color: var(--marine); }
.price-old { color: var(--muted); text-decoration: line-through; font-weight: 400; font-size: 1rem; margin-left: 8px; }
.tag { display: inline-block; background: var(--turq); color: #fff; border-radius: 99px; padding: 2px 12px; font-size: .8rem; font-weight: 700; margin-bottom: 8px; }
.tag-best { background: var(--orange); color: var(--marine-d); }
.ticks { list-style: none; padding: 0; margin: 0 0 1em; }
.ticks li { padding-left: 28px; position: relative; margin: .5em 0; }
.ticks li::before { content: "✓"; position: absolute; left: 0; color: var(--turq); font-weight: 900; }
.crosses li::before { content: "✗"; color: var(--err); }
.product-layout { display: grid; gap: 28px; padding: 24px 0; }
.buybox { border: 2px solid var(--marine); border-radius: var(--r); padding: 20px; background: #fff; align-self: start; }
.previews { display: grid; grid-template-columns: repeat(2, 1fr); gap: 12px; }
.previews img { border: 1px solid var(--bord); border-radius: 6px; }
.quote { font-style: italic; }
details { border: 1px solid var(--bord); border-radius: 8px; padding: 12px 16px; margin: 10px 0; background: #fff; }
summary { cursor: pointer; font-weight: 700; color: var(--marine); }
.trust { display: grid; gap: 10px; margin: 14px 0 0; padding: 0; list-style: none; font-size: .92rem; }

/* Tableaux */
.table-wrap { overflow-x: auto; }
table { border-collapse: collapse; width: 100%; font-size: .95rem; }
th, td { text-align: left; padding: 10px 12px; border-bottom: 1px solid var(--bord); vertical-align: top; }
th { background: var(--gris); color: var(--marine); white-space: nowrap; }
.right { text-align: right; }
.status { display: inline-block; padding: 2px 10px; border-radius: 99px; font-size: .8rem; font-weight: 700; background: var(--gris); }
.status-paid { background: #e9f6ee; color: var(--ok); }
.status-pending, .status-review { background: #fff3e6; color: var(--warn); }
.status-failed, .status-canceled, .status-expired, .status-refunded { background: #fdecea; color: var(--err); }

/* Auth / formulaires centrés */
.narrow { max-width: 480px; margin: 28px auto; }
.panel { background: #fff; border: 1px solid var(--bord); border-radius: var(--r); padding: 22px; box-shadow: var(--shadow); }
.spinner { width: 42px; height: 42px; border: 5px solid var(--gris); border-top-color: var(--turq); border-radius: 50%; animation: spin 1s linear infinite; margin: 0 auto 16px; }
@keyframes spin { to { transform: rotate(360deg); } }
@media (prefers-reduced-motion: reduce) { .spinner { animation: none; } }

/* Pied de page */
.site-footer { background: var(--marine); color: #dfe8f3; margin-top: 40px; padding: 28px 0 8px; font-size: .92rem; }
.site-footer a { color: #fff; }
.footer-grid { display: grid; gap: 20px; }
.footer-copy { border-top: 1px solid rgba(255,255,255,.2); margin-top: 18px; padding: 14px 16px; font-size: .85rem; }
.error-page { text-align: center; padding: 70px 16px; }
.error-code { font-size: 4rem; font-weight: 900; color: var(--orange); margin: 0; }
.prose { max-width: 760px; }
.prose h2 { margin-top: 1.4em; }
.draft-note { background: #fff3e6; border: 1px dashed var(--orange); padding: 10px 14px; border-radius: 8px; font-size: .9rem; }

/* Administration */
.admin-shell { display: grid; gap: 16px; padding: 16px 0 30px; }
.admin-nav { display: flex; flex-wrap: wrap; gap: 6px; background: var(--gris); padding: 8px; border-radius: var(--r); }
.admin-nav a { padding: 8px 12px; border-radius: 8px; text-decoration: none; color: var(--marine); font-weight: 700; font-size: .92rem; }
.admin-nav a:hover, .admin-nav a.is-active { background: var(--marine); color: #fff; }
.stats { display: grid; grid-template-columns: repeat(2, 1fr); gap: 12px; }
.stat { background: var(--gris); border-radius: var(--r); padding: 14px; }
.stat b { display: block; font-size: 1.6rem; color: var(--marine); }
.mono { font-family: ui-monospace, Menlo, Consolas, monospace; font-size: .9rem; word-break: break-all; }
.two-col { display: grid; gap: 18px; }
.qr { background: #fff; padding: 10px; border: 1px solid var(--bord); display: inline-block; }

@media (min-width: 720px) {
  h1 { font-size: 2.3rem; }
  .nav-toggle { display: none; }
  .nav { display: flex; flex-direction: row; width: auto; padding: 0; gap: 4px; align-items: center; }
  .nav a { border: 0; padding: 8px 12px; }
  .hero { padding: 64px 0; margin: 0; }
  .hero h1 { font-size: 2.8rem; }
  .band { margin: 0; padding: 36px 24px; border-radius: var(--r); }
  .grid-2 { grid-template-columns: repeat(2, 1fr); }
  .grid-3 { grid-template-columns: repeat(3, 1fr); }
  .product-layout { grid-template-columns: 1.6fr 1fr; }
  .buybox { position: sticky; top: 80px; }
  .previews { grid-template-columns: repeat(3, 1fr); }
  .footer-grid { grid-template-columns: 1.4fr 1fr 1fr 1.4fr; }
  .stats { grid-template-columns: repeat(4, 1fr); }
  .two-col { grid-template-columns: 1fr 1fr; }
}
@media print { .site-header, .site-footer, .banner { display: none; } }

/* Utilitaires */
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.narrow-form { max-width: 360px; margin: 16px 0; }
.nowrap { white-space: nowrap; }
.tall { min-height: 360px; }

/* Mobile : le bloc d'achat reste visible en bas de l'écran sur les fiches produit */
@media (max-width: 719px) {
  .buybox { position: sticky; bottom: 0; z-index: 20; border-radius: var(--r) var(--r) 0 0; box-shadow: 0 -4px 14px rgba(31, 58, 95, .2); padding: 12px 16px; margin: 0 -16px; }
  .buybox .trust, .buybox .small, .buybox .alert { display: none; }
  .buybox .price { margin: 0 0 8px; }
}

/* Partage WhatsApp / Facebook (fiche produit) */
.share { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; margin: 14px 0 0; }
.share-btn { display: inline-block; padding: 9px 14px; min-height: 44px; line-height: 26px; border: 2px solid var(--marine); border-radius: var(--r); color: var(--marine); font-weight: 700; text-decoration: none; background: #fff; }
.share-btn:hover { background: var(--gris); color: var(--marine-d); }

/* Barre d'achat collée en bas sur mobile (fiche produit) */
.mobile-buy { display: none; }
@media (max-width: 760px) {
  .mobile-buy { display: block; position: fixed; left: 0; right: 0; bottom: 0; z-index: 60; background: #fff; border-top: 2px solid var(--marine); padding: 8px 14px; }
  .mobile-buy form { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin: 0; }
  .mobile-buy-price { font-weight: 900; color: var(--marine); font-size: 1.15rem; }
  body:has(.mobile-buy) { padding-bottom: 72px; }
}
.crosssell { background: var(--gris); padding: 10px 12px; border-radius: var(--r); }

/* ===== Finitions « rendu professionnel » ===== */
h1 { font-size: clamp(1.7rem, 1.2rem + 2vw, 2.4rem); letter-spacing: -.01em; }
.hero h1 { font-size: clamp(1.8rem, 1.2rem + 2.6vw, 2.8rem); }
.prose, article p, .faq p { max-width: 70ch; }
.price, .mobile-buy-price { font-variant-numeric: tabular-nums; }
.card { transition: box-shadow .15s ease, border-color .15s ease; }
.card:hover { box-shadow: 0 6px 18px rgba(31, 58, 95, .16); border-color: var(--turq); }

/* Hero avec couvertures réelles des guides */
.hero-grid { align-items: center; }
.hero-covers { display: flex; justify-content: center; align-items: flex-end; padding: 8px 0 0; }
.hero-cover { width: 150px; height: auto; border-radius: 4px; box-shadow: 0 10px 26px rgba(0, 0, 0, .35); background: #fff; }
.hero-cover-1 { margin-left: -28px; margin-bottom: -10px; }
@media (min-width: 760px) {
  .hero { padding: 56px 0; }
  .hero-grid { grid-template-columns: 1.3fr 1fr; gap: 40px; }
  .hero-cover { width: 200px; }
}

/* Bandeau de réassurance */
.trustbar { display: grid; gap: 6px 20px; grid-template-columns: 1fr; padding: 16px; margin: 0 auto; font-weight: 700; font-size: .92rem; color: var(--marine); }
.trustbar li { position: relative; padding-left: 22px; margin: 0; }
.trustbar li::before { content: "✓"; position: absolute; left: 0; color: var(--turq); font-weight: 900; }
@media (min-width: 760px) { .trustbar { grid-template-columns: repeat(4, auto); justify-content: space-between; } }

/* Vignette produit */
.card-cover { display: block; background: var(--gris); border-radius: 6px; margin: -4px -4px 14px; padding: 14px; text-align: center; }
.card-cover img { height: 190px; width: auto; max-width: 100%; margin: 0 auto; object-fit: contain; }

/* Citation de l'auteure */
.author-quote { margin: 0 0 12px; padding: 4px 0 4px 18px; border-left: 4px solid var(--orange); }
.author-quote p { font-size: 1.2rem; font-weight: 700; color: var(--marine); margin-bottom: .5em; }
.author-quote footer { color: var(--muted); font-size: .92rem; }

/* Accessibilité et confort */
@media (prefers-reduced-motion: reduce) { * { transition: none !important; animation: none !important; scroll-behavior: auto !important; } }
@media print { .site-header, .site-footer, .mobile-buy, .share, .banner { display: none !important; } body { color: #000; } }

/* Administration → Configuration */
.cfg-nav { margin: 12px 0 18px; }
.cfg-grid { display: grid; gap: 0 18px; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); }
.cfg-inline { align-items: flex-end; margin-top: 8px; }
.cfg-result { border-left: 5px solid var(--turq); margin-bottom: 22px; }
.panel + .panel { margin-top: 22px; }
.status-note { color: var(--warn); font-weight: 700; }
pre.transcript { background: #101820; color: #d7e4ea; padding: 14px; border-radius: 8px; overflow-x: auto; font-size: .8rem; line-height: 1.5; white-space: pre-wrap; word-break: break-all; }
