/* ══════════════════════════════════════
   SHARED.CSS — Styles communs à toutes les pages
   VectorizePro
   ══════════════════════════════════════ */

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html, body { height: 100%; overflow: hidden; }

:root {
  --blue:     #2563a8;
  --blue-d:   #1a4a82;
  --blue-bg:  #eef4fc;
  --blue-bd:  #c2d8f4;
  --ink:      #1a1816;
  --ink-mid:  #52504c;
  --ink-soft: #9a9690;
  --bg:       #f6f4ef;
  --white:    #ffffff;
  --rule:     #e8e4db;
  --rule-s:   #f0ece4;
  --sand:     #f0ece3;
  --nav-h:    56px;
}

body {
  font-family: 'Inter', sans-serif;
  background: var(--bg);
  color: var(--ink);
  -webkit-font-smoothing: antialiased;
  display: flex;
  flex-direction: column;
}

/* ── Canvas BG ── */
#bg-canvas { position: fixed; inset: 0; z-index: 0; pointer-events: none; }

/* ── Topbar ── */
.topbar {
  position: fixed; top: 0; left: 0; right: 0;
  height: var(--nav-h);
  background: rgba(246,244,239,0.93);
  backdrop-filter: blur(14px);
  border-bottom: 1px solid var(--rule);
  display: flex; align-items: center;
  padding: 0 32px; gap: 32px; z-index: 200;
}
.logo { display: flex; align-items: center; gap: 10px; flex-shrink: 0; }
.logo img { width: 32px; height: 32px; border-radius: 7px; display: block; }
.logo-txt {
  font-family: 'Fraunces', serif; font-optical-sizing: auto;
  font-size: 15px; font-weight: 600; letter-spacing: -0.3px;
  color: var(--ink); white-space: nowrap;
}
.logo-txt em { color: var(--blue); font-style: italic; }
.sep { width: 1px; height: 22px; background: var(--rule); flex-shrink: 0; }
.nav-tabs { display: flex; align-items: center; gap: 2px; flex: 1; }
.nav-tab {
  display: flex; align-items: center; gap: 8px;
  padding: 7px 14px; border-radius: 8px;
  font-size: 13px; font-weight: 400; color: var(--ink-soft);
  text-decoration: none; white-space: nowrap;
  transition: background 0.15s, color 0.15s; position: relative;
}
.nav-tab:hover { background: var(--sand); color: var(--ink); }
.nav-tab.active {
  background: var(--blue-bg); color: var(--blue-d); font-weight: 500;
}
.nav-tab.active::after {
  content: ''; position: absolute;
  bottom: -14px; left: 50%; transform: translateX(-50%);
  width: 28px; height: 2.5px; background: var(--blue); border-radius: 2px;
}
.nav-tab-ico {
  width: 26px; height: 26px; border-radius: 6px;
  background: rgba(0,0,0,0.05);
  display: flex; align-items: center; justify-content: center;
  flex-shrink: 0; color: var(--ink-soft);
  transition: background 0.15s, color 0.15s;
}
.nav-tab.active .nav-tab-ico { background: rgba(37,99,168,0.12); color: var(--blue); }
.nav-tab-ico svg { width: 13px; height: 13px; }
.tab-sep { width: 1px; height: 18px; background: var(--rule); margin: 0 4px; flex-shrink: 0; }
.topbar-right { margin-left: auto; flex-shrink: 0; display: flex; align-items: center; gap: 12px; }
.topbar-pill {
  font-size: 13px; font-weight: 600; padding: 8px 18px; border-radius: 10px;
  background: var(--blue); color: #fff; border: none;
  white-space: nowrap; letter-spacing: 0.01em;
  box-shadow: 0 2px 12px rgba(37,99,168,0.28);
}

/* ── Contenu principal ── */
.main {
  margin-top: var(--nav-h);
  height: calc(100vh - var(--nav-h));
  overflow-y: auto; position: relative; z-index: 1;
}
.page { padding: 52px 64px; max-width: 1100px; margin: 0 auto; }

/* ── En-tête de page ── */
.page-hdr { margin-bottom: 32px; padding-bottom: 20px; border-bottom: 1px solid var(--rule); }
.page-hdr h2 {
  font-family: 'Fraunces', serif; font-optical-sizing: auto;
  font-size: 28px; font-weight: 400; font-style: italic;
  letter-spacing: -0.3px; color: var(--ink);
}
.page-hdr p { font-size: 13.5px; color: var(--ink-soft); margin-top: 6px; font-weight: 300; }

/* ── Cards ── */
.cards-row { display: grid; grid-template-columns: repeat(3,1fr); gap: 14px; margin-bottom: 28px; }
.card {
  background: var(--white); border: 1px solid var(--rule);
  border-radius: 14px; padding: 24px 22px;
  transition: box-shadow 0.2s, border-color 0.2s, transform 0.2s;
}
.card:hover { box-shadow: 0 6px 28px rgba(37,99,168,0.08); border-color: var(--blue-bd); transform: translateY(-2px); }
.card-num {
  font-family: 'Fraunces', serif; font-optical-sizing: auto;
  font-size: 12px; font-weight: 400; font-style: italic;
  color: var(--blue); margin-bottom: 12px; opacity: 0.7;
}
.card h3 { font-family: 'Fraunces', serif; font-optical-sizing: auto; font-size: 16px; font-weight: 400; color: var(--ink); margin-bottom: 8px; }
.card p { font-size: 12.5px; color: var(--ink-soft); line-height: 1.6; }

/* ── Metrics ── */
.metrics { display: flex; gap: 0; margin-bottom: 36px; border: 1px solid var(--rule); border-radius: 12px; overflow: hidden; background: var(--white); }
.metric { flex: 1; padding: 18px 24px; border-right: 1px solid var(--rule); }
.metric:last-child { border-right: none; }
.metric-n { font-family: 'Fraunces', serif; font-optical-sizing: auto; font-size: 26px; font-weight: 600; color: var(--ink); letter-spacing: -0.5px; line-height: 1; margin-bottom: 5px; }
.metric-n em { color: var(--blue); font-style: italic; }
.metric-l { font-size: 11.5px; color: var(--ink-soft); line-height: 1.4; }

/* ── CTA Band ── */
.cta-band { background: var(--blue); border-radius: 14px; padding: 26px 32px; display: flex; align-items: center; justify-content: space-between; gap: 24px; }
.cta-band-txt h3 { font-family: 'Fraunces', serif; font-optical-sizing: auto; font-size: 20px; font-weight: 400; font-style: italic; color: #fff; margin-bottom: 5px; }
.cta-band-txt p { font-size: 13px; color: rgba(255,255,255,0.65); font-weight: 300; }

/* ── Boutons ── */
.btn-white { background: #fff; color: var(--blue-d); font-family: 'Inter', sans-serif; font-size: 13px; font-weight: 600; padding: 12px 24px; border-radius: 9px; border: none; cursor: pointer; white-space: nowrap; flex-shrink: 0; display: flex; align-items: center; gap: 9px; text-decoration: none; transition: background 0.15s, transform 0.15s; }
.btn-white:hover { background: var(--blue-bg); transform: translateY(-1px); }
.btn-white svg { width: 14px; height: 14px; }
.btn-blue { background: var(--blue); color: #fff; font-family: 'Inter', sans-serif; font-size: 13px; font-weight: 600; padding: 12px 24px; border-radius: 9px; border: none; cursor: pointer; white-space: nowrap; display: flex; align-items: center; gap: 9px; transition: background 0.15s, transform 0.15s; }
.btn-blue:hover { background: var(--blue-d); transform: translateY(-1px); }
.btn-blue svg { width: 14px; height: 14px; }

/* ── Formulaires ── */
.form-wrap { max-width: 680px; }
.fsec { margin-bottom: 28px; }
.fsec-lbl { font-size: 10px; font-weight: 600; text-transform: uppercase; letter-spacing: 0.12em; color: var(--ink-soft); margin-bottom: 16px; display: flex; align-items: center; gap: 10px; }
.fsec-lbl::after { content: ''; flex: 1; height: 1px; background: var(--rule-s); }
.frow { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.fld { margin-bottom: 13px; }
.fld:last-child { margin-bottom: 0; }
label { display: block; font-size: 12px; font-weight: 500; color: var(--ink-mid); margin-bottom: 5px; }
label .req { color: var(--blue); margin-left: 2px; }
input[type="text"], input[type="email"], select, textarea {
  width: 100%; font-family: 'Inter', sans-serif; font-size: 13.5px;
  color: var(--ink); background: var(--white);
  border: 1px solid var(--rule); border-radius: 8px;
  padding: 10px 13px; outline: none;
  transition: border-color 0.15s, box-shadow 0.15s;
  appearance: none; -webkit-appearance: none;
}
input:focus, select:focus, textarea:focus { border-color: var(--blue); box-shadow: 0 0 0 3px rgba(37,99,168,0.1); }
input::placeholder, textarea::placeholder { color: var(--ink-soft); font-weight: 300; }
select {
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 24 24' fill='none' stroke='%239a9690' stroke-width='2'%3E%3Cpolyline points='6 9 12 15 18 9'/%3E%3C/svg%3E");
  background-repeat: no-repeat; background-position: right 11px center;
  padding-right: 32px; cursor: pointer;
}
textarea { resize: vertical; min-height: 92px; line-height: 1.65; }
.chip-grp { display: flex; flex-wrap: wrap; gap: 8px; }
.chip { display: inline-flex; align-items: center; gap: 5px; font-size: 12.5px; font-weight: 400; color: var(--ink-mid); background: var(--white); border: 1px solid var(--rule); border-radius: 99px; padding: 7px 15px; cursor: pointer; transition: all 0.12s; user-select: none; }
.chip:hover { border-color: var(--blue-bd); color: var(--blue); }
.chip.selected { background: var(--blue-bg); border-color: var(--blue-bd); color: var(--blue-d); font-weight: 500; }
.chip.selected::before { content: '✓ '; font-size: 10px; font-weight: 700; }
.form-foot { margin-top: 28px; padding-top: 22px; border-top: 1px solid var(--rule-s); display: flex; align-items: center; justify-content: space-between; gap: 16px; flex-wrap: wrap; }
.foot-note { font-size: 11.5px; color: var(--ink-soft); display: flex; align-items: center; gap: 6px; font-weight: 300; }
.foot-note svg { width: 13px; height: 13px; }

/* ── Erreurs de validation ── */
.input-error,
input.input-error:focus,
select.input-error:focus,
textarea.input-error:focus {
  border-color: #dc2626 !important;
  box-shadow: 0 0 0 3px rgba(220,38,38,0.12) !important;
}
.chip-grp.group-error {
  border: 1px solid #f0b4b4;
  background: #fdf3f3;
  border-radius: 10px;
  padding: 10px;
  margin: 0 -2px;
}
.field-error {
  display: flex;
  align-items: center;
  gap: 5px;
  margin-top: 7px;
  font-size: 11.5px;
  font-weight: 500;
  color: #dc2626;
  line-height: 1.4;
}
.field-error::before {
  content: '';
  flex-shrink: 0;
  width: 13px; height: 13px;
  background: no-repeat center / contain
    url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23dc2626' stroke-width='2.2'%3E%3Ccircle cx='12' cy='12' r='10'/%3E%3Cline x1='12' y1='8' x2='12' y2='12'/%3E%3Cline x1='12' y1='16' x2='12.01' y2='16'/%3E%3C/svg%3E");
}

/* ── Succès ── */
.suc { display: none; text-align: center; padding: 60px 0; }
.suc-ico { width: 56px; height: 56px; background: var(--blue-bg); border: 1px solid var(--blue-bd); border-radius: 50%; display: flex; align-items: center; justify-content: center; margin: 0 auto 20px; }
.suc-ico svg { width: 22px; height: 22px; color: var(--blue); }
.suc h2 { font-family: 'Fraunces', serif; font-optical-sizing: auto; font-size: 28px; font-weight: 400; font-style: italic; margin-bottom: 12px; color: var(--ink); }
.suc p { font-size: 14px; color: var(--ink-mid); line-height: 1.7; max-width: 400px; margin: 0 auto; font-weight: 300; }
.suc-badge { margin-top: 20px; display: inline-flex; align-items: center; gap: 7px; font-size: 12px; color: var(--blue-d); background: var(--blue-bg); padding: 7px 18px; border-radius: 99px; border: 1px solid var(--blue-bd); }

/* ── Responsive ── */
@media (max-width: 860px) {
  .cards-row { grid-template-columns: 1fr 1fr; }
  .nav-tab .nav-tab-lbl { display: none; }
  .page { padding: 32px 24px; }
}
@media (max-width: 600px) {
  .cards-row { grid-template-columns: 1fr; }
  .metrics { flex-direction: column; }
  .metric { border-right: none; border-bottom: 1px solid var(--rule); }
  .frow { grid-template-columns: 1fr; }
  .cta-band { flex-direction: column; align-items: flex-start; }
  .topbar { padding: 0 12px; gap: 8px; }
  /* Libère la place pour afficher tous les pictos de navigation (dont Contact) */
  .topbar-pill { display: none; }
  .sep { display: none; }
  .nav-tabs { gap: 2px; }
  .nav-tab { padding: 6px 6px; }
  .tab-sep { margin: 0 1px; }
  /* Le nom du site reste visible à côté du logo sur tous les mobiles (iOS inclus) */
  .logo { gap: 7px; }
  .logo-txt { font-size: 14px; }
}
