/* ==========================================================================
   CHANTIERAPIDE — Feuille de style globale
   Charte : bleu #1e40af / orange #f97316 — mobile-first, léger, sans dépendance
   ========================================================================== */

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

:root {
  --bleu: #1e40af;
  --bleu-fonce: #16308a;
  --bleu-clair: #3b82f6;
  --orange: #f97316;
  --orange-hover: #ea6a08;
  --texte: #1f2937;
  --texte-doux: #6b7280;
  --gris: #f3f4f6;
  --gris-bordure: #e5e7eb;
  --blanc: #ffffff;
  --vert: #16a34a;
  --radius: 12px;
  --maxw: 1080px;
  --shadow-sm: 0 1px 3px rgba(17, 24, 39, 0.08);
  --shadow-md: 0 8px 30px rgba(30, 64, 175, 0.10);
}

html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }

body {
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  color: var(--texte);
  background: var(--blanc);
  line-height: 1.6;
  font-size: 16px;
}

img { max-width: 100%; height: auto; display: block; }
a { color: var(--bleu); }

/* ── Conteneur ── */
.container { max-width: var(--maxw); margin: 0 auto; padding: 0 1.25rem; }
.container-narrow { max-width: 760px; margin: 0 auto; padding: 0 1.25rem; }

/* ── Header / navigation ── */
.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: var(--blanc);
  border-bottom: 1px solid var(--gris-bordure);
}
.nav {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding: 0.85rem 1.25rem;
  max-width: var(--maxw);
  margin: 0 auto;
}
.brand {
  /* inline-block (et non inline-flex) : indispensable pour que le mot-marque
     « CHANTIER<span>APIDE</span> » reste un seul mot. En inline-flex, « CHANTIER »
     et « APIDE » deviennent deux éléments flex séparés et un éventuel gap
     insère un espace VISUEL au milieu du nom (« CHANTIER APIDE »). */
  display: inline-block;
  white-space: nowrap;
  font-size: 1.25rem;
  font-weight: 800;
  letter-spacing: -0.5px;
  color: var(--bleu);
  text-decoration: none;
}
/* Cible uniquement le « APIDE » du mot-marque, jamais le badge (voir plus bas). */
.brand > span:not(.badge-beta) { color: var(--orange); }
.brand .badge-beta {
  display: inline-block;
  vertical-align: middle;
  margin-left: 0.4rem;
  position: relative;
  top: -1px;
  background: var(--orange);
  color: var(--blanc);
  font-size: 0.62rem;
  font-weight: 700;
  padding: 2px 7px;
  border-radius: 20px;
  letter-spacing: 0.5px;
}
.nav-links {
  display: flex;
  align-items: center;
  gap: 1.6rem;
  list-style: none;
}
.nav-links a {
  color: var(--texte);
  text-decoration: none;
  font-size: 0.94rem;
  font-weight: 500;
  transition: color 0.15s;
}
.nav-links a:hover, .nav-links a[aria-current="page"] { color: var(--bleu); }
.nav-cta {
  background: var(--orange);
  color: var(--blanc) !important;
  padding: 0.55rem 1.15rem;
  border-radius: var(--radius);
  font-weight: 700 !important;
  box-shadow: var(--shadow-sm);
  transition: background 0.2s, transform 0.15s;
}
.nav-cta:hover { background: var(--orange-hover); transform: translateY(-1px); }
.nav-toggle {
  display: none;
  background: none;
  border: none;
  cursor: pointer;
  padding: 0.35rem;
  color: var(--bleu);
}
.nav-toggle svg { width: 26px; height: 26px; }

@media (max-width: 860px) {
  .nav-toggle { display: inline-flex; }
  .nav-links {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    flex-direction: column;
    align-items: stretch;
    gap: 0;
    background: var(--blanc);
    border-bottom: 1px solid var(--gris-bordure);
    padding: 0.5rem 1.25rem 1rem;
    box-shadow: var(--shadow-md);
    display: none;
  }
  .nav-links.open { display: flex; }
  .nav-links li { border-top: 1px solid var(--gris-bordure); }
  .nav-links li:first-child { border-top: none; }
  .nav-links a { display: block; padding: 0.85rem 0; }
  .nav-cta { text-align: center; margin-top: 0.75rem; }
}

/* ── Boutons ── */
.btn {
  display: inline-block;
  font-weight: 700;
  font-size: 1rem;
  padding: 0.95rem 2rem;
  border-radius: var(--radius);
  text-decoration: none;
  text-align: center;
  cursor: pointer;
  border: none;
  font-family: inherit;
  transition: background 0.2s, transform 0.15s, box-shadow 0.2s;
}
.btn-primary {
  background: var(--orange);
  color: var(--blanc);
  box-shadow: 0 4px 18px rgba(249, 115, 22, 0.35);
}
.btn-primary:hover { background: var(--orange-hover); transform: translateY(-2px); }
.btn-secondary {
  background: var(--blanc);
  color: var(--bleu);
  border: 1.5px solid var(--gris-bordure);
}
.btn-secondary:hover { border-color: var(--bleu); transform: translateY(-1px); }
.btn-ghost {
  background: rgba(255,255,255,0.12);
  color: var(--blanc);
  border: 1.5px solid rgba(255,255,255,0.4);
}
.btn-ghost:hover { background: rgba(255,255,255,0.2); }

/* ── Sections génériques ── */
.section { padding: 4.5rem 0; }
.section-tight { padding: 3rem 0; }
.bg-gris { background: var(--gris); }
.bg-bleu { background: var(--bleu); color: var(--blanc); }
.bg-bleu p { color: rgba(255,255,255,0.85); }

.eyebrow {
  display: inline-block;
  font-size: 0.75rem;
  font-weight: 700;
  color: var(--orange);
  letter-spacing: 1px;
  text-transform: uppercase;
  margin-bottom: 0.6rem;
}
h1, h2, h3, h4 { line-height: 1.2; font-weight: 800; color: inherit; }
.section h2 { font-size: clamp(1.6rem, 4vw, 2.35rem); margin-bottom: 1rem; }
.section > .container > p, .section > .container-narrow > p { color: var(--texte-doux); font-size: 1.06rem; max-width: 640px; }
.bg-bleu h2 { color: var(--blanc); }
.lead { font-size: 1.15rem; color: var(--texte-doux); max-width: 620px; }
.text-center { text-align: center; }
.mx-auto { margin-left: auto; margin-right: auto; }

/* ── Hero ── */
.hero {
  background: linear-gradient(140deg, var(--bleu) 0%, var(--bleu-fonce) 100%);
  color: var(--blanc);
  padding: 4.5rem 0 5rem;
  text-align: center;
}
.hero .tag {
  display: inline-block;
  background: rgba(249,115,22,0.18);
  border: 1px solid var(--orange);
  color: #fdba74;
  font-size: 0.78rem;
  font-weight: 600;
  padding: 5px 14px;
  border-radius: 20px;
  margin-bottom: 1.5rem;
}
.hero h1 {
  font-size: clamp(1.9rem, 5.2vw, 3.1rem);
  max-width: 760px;
  margin: 0 auto 1.1rem;
  color: var(--blanc);
}
.hero h1 em { color: #fdba74; font-style: normal; }
.hero .subtitle { font-size: 1.15rem; color: rgba(255,255,255,0.88); max-width: 620px; margin: 0 auto 1.4rem; }
.hero .benefit { font-size: 1rem; color: rgba(255,255,255,0.75); max-width: 620px; margin: 0 auto 2.4rem; }
.hero-cta-row { display: flex; gap: 0.9rem; justify-content: center; flex-wrap: wrap; }

/* ── Bloc "En bref" (GEO) ── */
.en-bref {
  background: #eff4ff;
  border: 1px solid #dbe4ff;
  border-left: 4px solid var(--bleu);
  border-radius: var(--radius);
  padding: 1.4rem 1.6rem;
  margin: 0 auto 0;
  max-width: 760px;
}
.en-bref h2 {
  font-size: 0.8rem !important;
  text-transform: uppercase;
  letter-spacing: 1px;
  color: var(--bleu);
  margin-bottom: 0.5rem !important;
}
.en-bref p { color: var(--texte) !important; font-size: 1rem; max-width: none !important; }

/* ── Grilles de cartes ── */
.grid { display: grid; gap: 1.25rem; margin-top: 2.5rem; }
.grid-2 { grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); }
.grid-3 { grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); }
.grid-4 { grid-template-columns: repeat(auto-fit, minmax(210px, 1fr)); }

.card {
  background: var(--blanc);
  border: 1px solid var(--gris-bordure);
  border-radius: var(--radius);
  padding: 1.6rem;
  box-shadow: var(--shadow-sm);
}
.card .ico {
  width: 44px; height: 44px;
  display: inline-flex; align-items: center; justify-content: center;
  background: #eef2ff;
  color: var(--bleu);
  border-radius: 10px;
  margin-bottom: 1rem;
}
.card .ico svg { width: 24px; height: 24px; }
.card h3 { font-size: 1.08rem; margin-bottom: 0.45rem; }
.card p { color: var(--texte-doux); font-size: 0.95rem; }

.card-problem { border-left: 4px solid var(--orange); }

/* ── Étapes ── */
.steps { display: grid; gap: 1.5rem; margin-top: 2.5rem; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); }
.step { position: relative; padding: 1.6rem; border: 1px solid var(--gris-bordure); border-radius: var(--radius); background: var(--blanc); }
.step-num {
  width: 42px; height: 42px;
  background: var(--bleu); color: var(--blanc);
  border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  font-weight: 800; font-size: 1.05rem;
  margin-bottom: 1rem;
}
.step h3 { font-size: 1.1rem; margin-bottom: 0.4rem; }
.step p { color: var(--texte-doux); font-size: 0.95rem; }
.step .example {
  display: block;
  margin-top: 0.8rem;
  font-size: 0.88rem;
  font-style: italic;
  color: var(--bleu);
  background: #eef2ff;
  padding: 0.6rem 0.8rem;
  border-radius: 8px;
}

/* ── Liste à puces check ── */
.check-list { list-style: none; margin-top: 1.5rem; display: grid; gap: 0.8rem; }
.check-list li { position: relative; padding-left: 2rem; color: var(--texte); }
.check-list li::before {
  content: '';
  position: absolute;
  left: 0; top: 3px;
  width: 20px; height: 20px;
  background: var(--vert);
  border-radius: 50%;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='14' height='14' viewBox='0 0 24 24' fill='none' stroke='white' stroke-width='3' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpolyline points='20 6 9 17 4 12'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: center;
}
.bg-bleu .check-list li { color: rgba(255,255,255,0.9); }

/* ── FAQ (accordéon) ── */
.faq-list { margin-top: 2rem; max-width: 780px; }
.faq-item { border: 1px solid var(--gris-bordure); border-radius: var(--radius); margin-bottom: 0.9rem; background: var(--blanc); overflow: hidden; }
.faq-q {
  width: 100%;
  text-align: left;
  background: none;
  border: none;
  cursor: pointer;
  font-family: inherit;
  font-size: 1.02rem;
  font-weight: 600;
  color: var(--texte);
  padding: 1.15rem 1.3rem;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 1rem;
}
.faq-q::after { content: '+'; font-size: 1.5rem; color: var(--orange); font-weight: 400; line-height: 1; flex-shrink: 0; }
.faq-item.open .faq-q::after { content: '−'; }
.faq-a { max-height: 0; overflow: hidden; transition: max-height 0.25s ease; }
.faq-a-inner { padding: 0 1.3rem 1.2rem; color: var(--texte-doux); font-size: 0.98rem; }
.faq-item.open .faq-a { max-height: 500px; }

/* ── Tarifs ── */
.pricing { display: grid; gap: 1.5rem; margin-top: 2.5rem; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); align-items: stretch; }
.plan {
  border: 1.5px solid var(--gris-bordure);
  border-radius: 16px;
  padding: 2rem 1.7rem;
  background: var(--blanc);
  display: flex;
  flex-direction: column;
}
.plan.featured { border-color: var(--orange); box-shadow: 0 10px 40px rgba(249,115,22,0.15); position: relative; }
.plan.featured::before {
  content: 'Le plus choisi';
  position: absolute; top: -13px; left: 50%; transform: translateX(-50%);
  background: var(--orange); color: var(--blanc);
  font-size: 0.72rem; font-weight: 700;
  padding: 4px 14px; border-radius: 20px; white-space: nowrap;
}
.plan h3 { font-size: 1.25rem; margin-bottom: 0.3rem; }
.plan .price { font-size: 2.4rem; font-weight: 800; color: var(--bleu); margin: 0.6rem 0 0.1rem; }
.plan .price small { font-size: 0.95rem; font-weight: 500; color: var(--texte-doux); }
.plan .plan-desc { color: var(--texte-doux); font-size: 0.92rem; margin-bottom: 1.2rem; }
.plan .check-list { margin-top: 0.5rem; margin-bottom: 1.6rem; }
.plan .check-list li { font-size: 0.94rem; }
.plan .btn { margin-top: auto; }
.banner-beta {
  background: #fff7ed;
  border: 1px solid #fed7aa;
  border-radius: var(--radius);
  padding: 1rem 1.3rem;
  color: #9a3412;
  font-size: 0.95rem;
  font-weight: 500;
  margin-top: 2rem;
  text-align: center;
}
.tva-note { text-align: center; color: var(--texte-doux); font-size: 0.88rem; margin-top: 1rem; }

/* ── Formulaire ── */
.form-section { background: var(--gris); }
.btn-submit {
  width: 100%;
  background: var(--orange);
  color: var(--blanc);
  font-weight: 700;
  font-size: 1rem;
  padding: 1rem;
  border: none;
  border-radius: var(--radius);
  cursor: pointer;
  margin-top: 1rem;
  font-family: inherit;
  transition: background 0.2s, transform 0.15s;
}
.btn-submit:hover { background: var(--orange-hover); transform: translateY(-1px); }
.btn-submit:disabled { opacity: 0.6; cursor: not-allowed; transform: none; }
.form-card {
  background: var(--blanc);
  border-radius: 16px;
  padding: 2.4rem 2rem;
  max-width: 580px;
  margin: 2.5rem auto 0;
  box-shadow: var(--shadow-md);
  border: 1px solid var(--gris-bordure);
}
.form-card h3 { font-size: 1.3rem; text-align: center; margin-bottom: 0.35rem; }
.form-card .form-sub { text-align: center; color: var(--texte-doux); font-size: 0.92rem; margin-bottom: 1.6rem; }
.form-row { display: grid; grid-template-columns: 1fr 1fr; gap: 0.8rem; }
@media (max-width: 480px) { .form-row { grid-template-columns: 1fr; } }
.form-group { display: flex; flex-direction: column; gap: 0.3rem; margin-bottom: 0.8rem; }
.form-group label { font-size: 0.83rem; font-weight: 600; color: var(--texte); }
.form-group input {
  border: 1.5px solid var(--gris-bordure);
  border-radius: 8px;
  padding: 0.72rem 1rem;
  font-size: 0.95rem;
  font-family: inherit;
  color: var(--texte);
  width: 100%;
  transition: border-color 0.2s;
}
.form-group input:focus { outline: none; border-color: var(--bleu); }
.consent-group { display: flex; align-items: flex-start; gap: 0.6rem; margin-top: 1.1rem; font-size: 0.82rem; line-height: 1.45; }
.consent-group input[type="checkbox"] { width: 18px; height: 18px; min-width: 18px; margin-top: 2px; accent-color: var(--orange); cursor: pointer; }
.consent-group label { font-weight: 500; cursor: pointer; }
.consent-group a { color: var(--bleu); font-weight: 600; }
.alert { padding: 0.9rem 1.2rem; border-radius: 8px; font-size: 0.9rem; font-weight: 600; margin-top: 1rem; display: none; }
.alert-success { background: #e6f9f0; color: #15803d; border: 1px solid #bbf7d0; }
.alert-error { background: #fef2f2; color: #b91c1c; border: 1px solid #fecaca; }
.rgpd-note { font-size: 0.78rem; color: var(--texte-doux); text-align: center; margin-top: 1rem; }
.rgpd-note a { color: var(--bleu); }

/* ── Fil d'ariane ── */
.breadcrumb { padding: 1rem 0 0; font-size: 0.85rem; color: var(--texte-doux); }
.breadcrumb ol { list-style: none; display: flex; flex-wrap: wrap; gap: 0.4rem; }
.breadcrumb a { color: var(--texte-doux); text-decoration: none; }
.breadcrumb a:hover { color: var(--bleu); }
.breadcrumb li + li::before { content: '›'; margin-right: 0.4rem; color: var(--gris-bordure); }

/* ── Blog ── */
.article-grid { display: grid; gap: 1.5rem; margin-top: 2.5rem; grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); }
.article-card {
  border: 1px solid var(--gris-bordure);
  border-radius: var(--radius);
  padding: 1.6rem;
  background: var(--blanc);
  box-shadow: var(--shadow-sm);
  text-decoration: none;
  color: inherit;
  transition: transform 0.15s, box-shadow 0.2s;
  display: block;
}
.article-card:hover { transform: translateY(-3px); box-shadow: var(--shadow-md); }
.article-card .tag-cat { font-size: 0.72rem; font-weight: 700; color: var(--orange); text-transform: uppercase; letter-spacing: 0.5px; }
.article-card h3 { font-size: 1.12rem; margin: 0.5rem 0; }
.article-card p { color: var(--texte-doux); font-size: 0.94rem; }
.article-card .read-more { color: var(--bleu); font-weight: 600; font-size: 0.9rem; margin-top: 0.8rem; display: inline-block; }

/* ── Article (placeholder) ── */
.article-body { max-width: 720px; margin: 0 auto; }
.article-body h1 { font-size: clamp(1.7rem, 4.5vw, 2.5rem); margin-bottom: 1rem; }
.article-body .intro { font-size: 1.12rem; color: var(--texte-doux); margin-bottom: 1.6rem; }
.article-body .wip {
  background: var(--gris);
  border-radius: var(--radius);
  padding: 1.5rem;
  text-align: center;
  color: var(--texte-doux);
  font-weight: 500;
  margin: 1.5rem 0 2rem;
}
.article-body .article-actions { display: flex; gap: 0.8rem; flex-wrap: wrap; }

/* ── Footer ── */
.site-footer { background: #111827; color: rgba(255,255,255,0.6); padding: 3rem 0 2rem; font-size: 0.9rem; }
.footer-grid { display: grid; gap: 2rem; grid-template-columns: 1.4fr 1fr 1fr 1fr; }
@media (max-width: 760px) { .footer-grid { grid-template-columns: 1fr 1fr; } }
@media (max-width: 460px) { .footer-grid { grid-template-columns: 1fr; } }
.site-footer .brand { color: var(--blanc); margin-bottom: 0.7rem; }
.site-footer .brand span { color: var(--orange); }
.site-footer h4 { color: var(--blanc); font-size: 0.95rem; margin-bottom: 0.8rem; font-weight: 700; }
.site-footer ul { list-style: none; display: grid; gap: 0.5rem; }
.site-footer a { color: rgba(255,255,255,0.6); text-decoration: none; }
.site-footer a:hover { color: var(--blanc); }
.footer-about { max-width: 280px; }
.footer-bottom { border-top: 1px solid rgba(255,255,255,0.12); margin-top: 2.2rem; padding-top: 1.4rem; text-align: center; font-size: 0.82rem; color: rgba(255,255,255,0.45); }
.footer-bottom a { color: rgba(255,255,255,0.55); }

/* ── Utilitaires ── */
.mt-1 { margin-top: 1rem; }
.mt-2 { margin-top: 2rem; }
.cta-band { text-align: center; }
.cta-band .btn { margin-top: 1.5rem; }
.visually-hidden { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0,0,0,0); border: 0; }
