/* Feuille de style commune du site vitrine de Résa (accueil + pages de référencement générées
   par seo/build.mjs). Écrite à la main, chargée par toutes ces pages.
   Palette alignée sur automation.akapa.fr (bleu AKAPA). */
:root {
  --accent: #2563eb;
  --accent-dark: #1d4ed8;
  --accent-darker: #1e40af;
  --accent-light: #eff6ff;
  --accent-light-2: #dbeafe;
  --navy: #1e3a8a;
  --bg-page: #f9fafb;
  --bg-card: #ffffff;
  --border: #e5e7eb;
  --text-primary: #111827;
  --text-secondary: #4b5563;
  --text-muted: #6b7280;
  --success-bg: #f0fdf4;
  --success-text: #15803d;
  --error-bg: #fef2f2;
  --error-text: #dc2626;
  --shadow-card: 0 1px 3px rgba(17,24,39,0.06), 0 4px 12px rgba(17,24,39,0.05);
  --shadow-card-hover: 0 8px 20px rgba(17,24,39,0.09), 0 2px 6px rgba(17,24,39,0.06);
  --radius-card: 16px;
  --radius-btn: 10px;
}
* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  background: var(--bg-page);
  color: var(--text-primary);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}
a { color: var(--accent); }
img { max-width: 100%; }
.wrap { max-width: 1080px; margin: 0 auto; padding: 0 24px; }
.wrap-narrow { max-width: 760px; margin: 0 auto; padding: 0 24px; }
.skip { position: absolute; left: -9999px; }
.skip:focus { left: 12px; top: 12px; background: #fff; padding: 8px 12px; z-index: 100; border-radius: 8px; }

/* ---------- En-tête ---------- */
header.site-header { background: var(--bg-card); box-shadow: 0 1px 2px rgba(17,24,39,0.05); position: sticky; top: 0; z-index: 20; }
.site-header .wrap { display: flex; align-items: center; justify-content: space-between; padding-top: 12px; padding-bottom: 12px; gap: 16px; }
.brand { display: flex; align-items: center; gap: 10px; text-decoration: none; color: var(--text-primary); }
.brand img { height: 26px; width: auto; }
.brand .brand-name { font-weight: 800; font-size: 17px; letter-spacing: -0.2px; padding-left: 10px; border-left: 1px solid var(--border); }
nav.site-nav { display: flex; align-items: center; gap: 22px; font-size: 14px; }
nav.site-nav a:not(.btn) { color: var(--text-secondary); text-decoration: none; font-weight: 500; }
nav.site-nav a:hover, nav.site-nav a[aria-current="page"] { color: var(--accent); }
.nav-mobile { display: none; position: relative; }
.nav-mobile summary { list-style: none; cursor: pointer; border: 1px solid var(--border); border-radius: var(--radius-btn); padding: 8px 12px; font-size: 14px; font-weight: 600; }
.nav-mobile summary::-webkit-details-marker { display: none; }
.nav-mobile .panel { position: absolute; right: 0; top: calc(100% + 8px); background: #fff; border: 1px solid var(--border); border-radius: 12px; box-shadow: var(--shadow-card-hover); padding: 8px; min-width: 230px; display: flex; flex-direction: column; }
.nav-mobile .panel a { padding: 10px 12px; border-radius: 8px; color: var(--text-primary); text-decoration: none; font-size: 15px; }
.nav-mobile .panel a:hover { background: var(--accent-light); }

/* ---------- Boutons ---------- */
.btn { display: inline-block; border: none; border-radius: var(--radius-btn); padding: 11px 20px; font-size: 14px; font-weight: 600; cursor: pointer; text-decoration: none; text-align: center; transition: background-color .2s, border-color .2s, color .2s, transform .2s, box-shadow .2s; }
.btn-primary { background: linear-gradient(135deg, var(--accent), var(--accent-dark)); color: #fff; box-shadow: 0 4px 12px rgba(37,99,235,0.25); }
.btn-primary:hover { background: linear-gradient(135deg, var(--accent-dark), var(--accent-darker)); transform: translateY(-1px); }
.btn-sm { padding: 8px 14px; font-size: 13px; box-shadow: none; }
.btn-ghost { background: none; color: var(--text-primary); border: 1px solid var(--border); }
.btn-ghost:hover { border-color: var(--accent); color: var(--accent); }

/* ---------- Bandeau haut de page ---------- */
.hero { padding: 84px 0 88px; text-align: center; color: #fff; background: linear-gradient(135deg, #2563eb 0%, #1e3a8a 100%); }
.hero .kicker { display: inline-block; font-size: 13px; font-weight: 600; letter-spacing: .3px; background: rgba(255,255,255,0.14); border: 1px solid rgba(255,255,255,0.3); padding: 5px 12px; border-radius: 999px; margin-bottom: 18px; }
.hero h1 { font-size: 44px; line-height: 1.15; font-weight: 800; margin: 0 auto 18px; letter-spacing: -0.6px; max-width: 820px; }
.hero p.lead { font-size: 18px; color: rgba(255,255,255,0.88); max-width: 680px; margin: 0 auto 32px; }
.hero .actions { display: flex; gap: 14px; justify-content: center; flex-wrap: wrap; }
.hero .btn { padding: 13px 26px; font-size: 15px; }
.hero .btn-primary { background: #fff; color: var(--accent-dark); box-shadow: 0 4px 14px rgba(0,0,0,0.15); }
.hero .btn-primary:hover { background: #f3f6ff; }
.hero .btn-ghost { background: rgba(255,255,255,0.08); border: 1px solid rgba(255,255,255,0.55); color: #fff; }
.hero .btn-ghost:hover { background: rgba(255,255,255,0.18); border-color: #fff; color: #fff; }
.hero .proof { display: flex; flex-wrap: wrap; justify-content: center; gap: 10px 22px; margin: 34px auto 0; padding: 0; list-style: none; font-size: 14px; color: rgba(255,255,255,0.9); }
.hero .proof li::before { content: "✓"; font-weight: 700; margin-right: 7px; }

.page-hero { padding: 40px 0 44px; background: linear-gradient(135deg, #2563eb 0%, #1e3a8a 100%); color: #fff; }
.page-hero h1 { font-size: 36px; line-height: 1.2; font-weight: 800; margin: 10px 0 14px; letter-spacing: -0.4px; max-width: 820px; }
.page-hero .lead { font-size: 17px; color: rgba(255,255,255,0.88); max-width: 720px; margin: 0 0 24px; }
.page-hero .actions { display: flex; gap: 12px; flex-wrap: wrap; }
.page-hero .btn-primary { background: #fff; color: var(--accent-dark); }
.page-hero .btn-ghost { color: #fff; border-color: rgba(255,255,255,0.55); }
.page-hero .btn-ghost:hover { color: #fff; border-color: #fff; background: rgba(255,255,255,0.12); }
.breadcrumb { font-size: 13px; color: rgba(255,255,255,0.78); }
.breadcrumb ol { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; gap: 6px; }
.breadcrumb li + li::before { content: "›"; margin-right: 6px; }
.breadcrumb a { color: rgba(255,255,255,0.9); text-decoration: none; }
.breadcrumb a:hover { text-decoration: underline; }
.kicker-small { font-size: 13px; font-weight: 700; text-transform: uppercase; letter-spacing: .6px; color: #bfdbfe; margin-top: 18px; }

/* ---------- Sections ---------- */
section { padding: 64px 0; }
section.alt { background: var(--bg-card); }
.section-head { text-align: center; max-width: 640px; margin: 0 auto 40px; }
.section-head h2 { font-size: 30px; line-height: 1.25; font-weight: 800; margin: 0 0 10px; letter-spacing: -0.3px; }
.section-head p { color: var(--text-secondary); font-size: 16px; margin: 0; }

.intro-box { background: var(--bg-card); border: 1px solid var(--accent-light-2); border-radius: var(--radius-card); padding: 26px 30px; box-shadow: var(--shadow-card); max-width: 860px; margin: -44px auto 0; position: relative; }
.intro-box h2 { font-size: 20px; margin: 0 0 8px; }
.intro-box p { margin: 0; color: var(--text-secondary); font-size: 16px; }

.modes { display: grid; grid-template-columns: 1fr 1fr; gap: 22px; }
.mode { background: var(--bg-card); border-radius: var(--radius-card); padding: 30px; box-shadow: var(--shadow-card); border-top: 4px solid var(--accent); display: flex; flex-direction: column; }
.mode.m2 { border-top-color: #7c3aed; }
.mode-head { display: flex; align-items: center; gap: 12px; margin-bottom: 10px; }
.mode-head .icon { width: 42px; height: 42px; border-radius: 10px; display: flex; align-items: center; justify-content: center; background: var(--accent-light); color: var(--accent-dark); flex: none; }
.mode.m2 .mode-head .icon { background: #f5f3ff; color: #6d28d9; }
.mode h3 { font-size: 20px; margin: 0; line-height: 1.3; }
.mode p { color: var(--text-secondary); margin: 0 0 14px; font-size: 15px; }
.mode ul { margin: 0 0 18px; padding-left: 20px; color: var(--text-secondary); font-size: 14px; }
.mode .more { margin-top: auto; font-weight: 600; text-decoration: none; font-size: 14px; }

.card-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; }
.card-grid.two { grid-template-columns: repeat(2, 1fr); }
.card { background: var(--bg-card); border-radius: var(--radius-card); padding: 24px; box-shadow: var(--shadow-card); transition: transform .2s, box-shadow .2s; text-decoration: none; color: inherit; display: flex; flex-direction: column; border: 1px solid transparent; }
a.card:hover { transform: translateY(-3px); box-shadow: var(--shadow-card-hover); border-color: var(--accent-light-2); }
.card .icon { width: 42px; height: 42px; border-radius: 10px; display: flex; align-items: center; justify-content: center; margin-bottom: 16px; background: var(--accent-light); color: var(--accent-dark); border: 1px solid var(--accent-light-2); }
.card h3 { font-size: 16px; font-weight: 700; margin: 0 0 6px; }
.card p { font-size: 14px; color: var(--text-secondary); margin: 0; }
.card .go { margin-top: 12px; font-size: 13px; font-weight: 600; color: var(--accent); }

.steps { display: grid; grid-template-columns: repeat(3, 1fr); gap: 24px; counter-reset: step; }
.step { text-align: center; }
.step .num { width: 40px; height: 40px; border-radius: 50%; background: linear-gradient(135deg, var(--accent), var(--accent-dark)); color: #fff; display: flex; align-items: center; justify-content: center; font-weight: 700; margin: 0 auto 14px; box-shadow: 0 4px 12px rgba(37,99,235,0.25); }
.step h3 { font-size: 16px; margin: 0 0 6px; }
.step p { font-size: 14px; color: var(--text-secondary); margin: 0; }

/* ---------- Tableaux ---------- */
.table-wrap { overflow-x: auto; background: var(--bg-card); border-radius: var(--radius-card); box-shadow: var(--shadow-card); }
table.compare { width: 100%; border-collapse: collapse; font-size: 14px; min-width: 620px; }
table.compare th, table.compare td { padding: 12px 16px; text-align: left; border-bottom: 1px solid var(--border); vertical-align: top; }
table.compare thead th { background: var(--accent-light); font-size: 13px; }
table.compare thead th.us { background: var(--accent); color: #fff; }
table.compare td.us { background: #f8fbff; font-weight: 600; }
table.compare tr:last-child td { border-bottom: none; }
.yes { color: var(--success-text); font-weight: 700; }
.no { color: #9ca3af; }
.table-note { font-size: 13px; color: var(--text-muted); margin-top: 10px; }

/* ---------- Article (pages de référencement) ---------- */
.article { padding: 48px 0 24px; }
.tldr { background: var(--accent-light); border-left: 4px solid var(--accent); border-radius: 0 12px 12px 0; padding: 18px 22px; margin: 0 0 36px; }
.tldr strong.label { display: block; font-size: 12px; text-transform: uppercase; letter-spacing: .7px; color: var(--accent-darker); margin-bottom: 4px; }
.tldr p { margin: 0; font-size: 16px; }
.article h2 { font-size: 25px; line-height: 1.3; margin: 40px 0 12px; letter-spacing: -0.2px; }
.article h3 { font-size: 18px; margin: 26px 0 8px; }
.article p, .article li { font-size: 16px; color: #1f2937; }
.article ul, .article ol { padding-left: 22px; }
.article li { margin-bottom: 6px; }
.article .table-wrap { margin: 18px 0; }
.checklist { list-style: none; padding-left: 0 !important; }
.checklist li { padding-left: 28px; position: relative; }
.checklist li::before { content: "✓"; position: absolute; left: 4px; color: var(--success-text); font-weight: 700; }
.callout { background: #fffbeb; border: 1px solid #fde68a; border-radius: 12px; padding: 16px 20px; margin: 22px 0; font-size: 15px; }
.template { background: var(--bg-card); border: 1px solid var(--border); border-radius: 12px; padding: 18px 20px; margin: 16px 0; font-size: 15px; white-space: pre-line; box-shadow: var(--shadow-card); }
.template .obj { display: block; font-weight: 700; margin-bottom: 8px; }
.updated { font-size: 13px; color: var(--text-muted); margin-top: 28px; }

/* ---------- FAQ ---------- */
.faq { max-width: 820px; margin: 0 auto; }
.faq details { background: var(--bg-card); border-radius: 12px; box-shadow: var(--shadow-card); margin-bottom: 12px; border: 1px solid transparent; }
.faq details[open] { border-color: var(--accent-light-2); }
.faq summary { cursor: pointer; padding: 18px 50px 18px 22px; font-weight: 600; font-size: 16px; list-style: none; position: relative; }
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after { content: "+"; position: absolute; right: 22px; top: 50%; transform: translateY(-50%); font-size: 22px; color: var(--accent); font-weight: 400; }
.faq details[open] summary::after { content: "–"; }
.faq .answer { padding: 0 22px 18px; color: var(--text-secondary); font-size: 15px; }
.faq .answer p { margin: 0 0 8px; }
.article-faq { margin-top: 44px; }
.article-faq h2 { margin-bottom: 18px; }

/* ---------- Bandeau d'appel à l'action ---------- */
.cta-band { background: linear-gradient(135deg, #1d4ed8, #1e3a8a); color: #fff; border-radius: 20px; padding: 40px; display: flex; align-items: center; justify-content: space-between; gap: 24px; flex-wrap: wrap; }
.cta-band h2 { margin: 0 0 6px; font-size: 24px; }
.cta-band p { margin: 0; color: rgba(255,255,255,0.85); }
.cta-band p a { color: #fff; }
.cta-band .btn-primary { background: #fff; color: var(--accent-dark); }

/* ---------- Contact ---------- */
.contact-wrap { display: grid; grid-template-columns: 1fr 1fr; gap: 48px; align-items: start; }
.contact-info h2 { font-size: 30px; line-height: 1.25; font-weight: 800; margin: 0 0 12px; letter-spacing: -0.3px; }
.contact-info p { color: var(--text-secondary); font-size: 16px; margin: 0 0 20px; }
.contact-info .info-row { display: flex; align-items: center; gap: 10px; font-size: 14px; color: var(--text-secondary); margin-bottom: 10px; }
.contact-info .chip { width: 32px; height: 32px; border-radius: 9px; background: var(--accent-light); color: var(--accent-dark); display: flex; align-items: center; justify-content: center; flex: none; }
form.contact-form { background: var(--bg-card); border-radius: var(--radius-card); padding: 28px; display: flex; flex-direction: column; gap: 14px; box-shadow: var(--shadow-card); }
.field label { display: block; font-size: 13px; font-weight: 500; margin-bottom: 6px; }
/* 16px minimum : en dessous, iOS zoome sur le champ au focus. */
.field input, .field textarea { width: 100%; padding: 10px 12px; border: 1px solid var(--border); border-radius: var(--radius-btn); font-size: 16px; font-family: inherit; }
.field input:focus, .field textarea:focus { outline: none; border-color: var(--accent); box-shadow: 0 0 0 3px rgba(37,99,235,0.15); }
.row-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.hp-field { position: absolute; left: -9999px; top: -9999px; }
.form-msg { font-size: 13px; padding: 10px 12px; border-radius: 8px; display: none; }
.form-msg.success { background: var(--success-bg); color: var(--success-text); display: block; }
.form-msg.error { background: var(--error-bg); color: var(--error-text); display: block; }
button.submit-btn { background: linear-gradient(135deg, var(--accent), var(--accent-dark)); color: #fff; border: none; padding: 12px 18px; border-radius: var(--radius-btn); font-size: 14px; font-weight: 600; cursor: pointer; box-shadow: 0 4px 12px rgba(37,99,235,0.25); }
button.submit-btn:disabled { opacity: .6; cursor: not-allowed; }

/* ---------- Pied de page ---------- */
footer.site-footer { background: #0f172a; color: #cbd5e1; padding: 48px 0 28px; font-size: 14px; }
.footer-grid { display: grid; grid-template-columns: 1.4fr 1fr 1fr 1fr; gap: 32px; }
.footer-grid h3 { color: #fff; font-size: 14px; margin: 0 0 12px; }
.footer-grid ul { list-style: none; padding: 0; margin: 0; }
.footer-grid li { margin-bottom: 8px; }
.footer-grid a { color: #cbd5e1; text-decoration: none; }
.footer-grid a:hover { color: #fff; text-decoration: underline; }
.footer-about p { margin: 10px 0 0; color: #94a3b8; font-size: 13px; }
.footer-logo { display: inline-block; background: #fff; padding: 6px 10px; border-radius: 8px; }
.footer-logo img { height: 22px; display: block; }
.footer-bottom { border-top: 1px solid #1e293b; margin-top: 36px; padding-top: 20px; font-size: 13px; color: #94a3b8; display: flex; flex-wrap: wrap; gap: 8px 16px; justify-content: space-between; }
.footer-bottom a { color: #94a3b8; }

@media (max-width: 900px) {
  nav.site-nav { display: none; }
  .nav-mobile { display: block; }
  .card-grid { grid-template-columns: 1fr 1fr; }
  .footer-grid { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 640px) {
  .wrap, .wrap-narrow { padding: 0 16px; }
  .hero { padding: 60px 0 70px; }
  .hero h1 { font-size: 31px; }
  .hero p.lead { font-size: 16px; }
  .page-hero h1 { font-size: 27px; }
  .modes, .card-grid, .card-grid.two, .steps, .contact-wrap, .row-2 { grid-template-columns: 1fr; }
  .section-head h2 { font-size: 25px; }
  section { padding: 48px 0; }
  .intro-box { padding: 20px; margin-top: -36px; }
  .cta-band { padding: 28px 22px; }
  .footer-grid { grid-template-columns: 1fr; }
  .brand .brand-name { font-size: 15px; }

  /* Tableaux comparatifs en cartes empilées : une ligne = une carte, le critère (1re cellule)
     en titre, puis « colonne : valeur » grâce au data-label posé par seo/build.mjs. */
  .table-wrap { background: none; box-shadow: none; border-radius: 0; overflow: visible; }
  table.compare { min-width: 0; display: block; }
  table.compare thead { display: none; }
  table.compare tbody { display: grid; gap: 12px; }
  table.compare tr { display: block; background: var(--bg-card); border-radius: 12px; box-shadow: var(--shadow-card); padding: 6px 16px 10px; }
  table.compare td { display: flex; justify-content: space-between; gap: 12px; padding: 8px 0; border-bottom: 1px solid var(--border); text-align: right; }
  table.compare td:first-child { display: block; font-weight: 700; text-align: left; padding: 10px 0 6px; border-bottom: 1px solid var(--border); }
  table.compare td::before { content: attr(data-label); flex: 0 0 auto; color: var(--text-secondary); font-weight: 500; text-align: left; }
  table.compare td:first-child::before { content: none; }
  table.compare td.us { background: none; }
  table.compare td.us::before { color: var(--accent); font-weight: 700; }
  table.compare tr:last-child td { border-bottom: 1px solid var(--border); }
  table.compare td:last-child { border-bottom: none; }
}
