/* ==========================================================================
   Funecap — Landing pages fournisseurs / règles de facturation SAP
   ========================================================================== */

:root {
  --color-primary: #6e1526;
  --color-primary-dark: #4a0e1a;
  --color-primary-light: #8c2436;
  --color-bg: #fbf8f6;
  --color-bg-alt: #f3ece9;
  --color-surface: #ffffff;
  --color-text: #241417;
  --color-text-muted: #5c4b4e;
  --color-border: #e4d9d6;
  --color-warning-bg: #fff4e5;
  --color-warning-border: #e8a33d;
  --color-warning-text: #7a4a05;

  --font-serif: "Playfair Display", "Georgia", serif;
  --font-sans: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;

  --radius-s: 8px;
  --radius-m: 14px;
  --radius-l: 20px;
  --shadow-card: 0 4px 24px rgba(74, 14, 26, 0.08);
  --shadow-card-hover: 0 8px 32px rgba(74, 14, 26, 0.14);
  --max-width: 1080px;
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  margin: 0;
  font-family: var(--font-sans);
  font-size: 16px;
  line-height: 1.6;
  color: var(--color-text);
  background: var(--color-bg);
  -webkit-font-smoothing: antialiased;
}

img { max-width: 100%; display: block; }

a { color: var(--color-primary); }

.container {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0 24px;
}

/* ---------- Header / logo ---------- */

.site-header {
  padding: 24px 0;
  border-bottom: 1px solid var(--color-border);
  background: var(--color-surface);
}

.site-header .container {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}

.logo-link {
  display: inline-flex;
  align-items: center;
}

.logo-img {
  height: 56px;
  width: auto;
  display: block;
}

.header-tagline {
  font-size: 14px;
  color: var(--color-text-muted);
  text-align: right;
}

/* ---------- Hero ---------- */

.hero {
  background: linear-gradient(180deg, var(--color-bg-alt) 0%, var(--color-bg) 100%);
  padding: 64px 0;
}

.hero-grid {
  display: grid;
  grid-template-columns: 1fr 1.2fr;
  gap: 48px;
  align-items: center;
}

.eyebrow {
  display: inline-block;
  font-size: 13px;
  font-weight: 600;
  letter-spacing: 1.5px;
  text-transform: uppercase;
  color: var(--color-primary);
  background: rgba(110, 21, 38, 0.08);
  padding: 6px 14px;
  border-radius: 999px;
  margin-bottom: 18px;
}

h1 {
  font-family: var(--font-serif);
  font-size: 40px;
  line-height: 1.2;
  margin: 0 0 20px;
  color: var(--color-primary-dark);
}

.hero-lead p {
  font-size: 17px;
  color: var(--color-text-muted);
  margin: 0 0 14px;
}

.hero-lead strong { color: var(--color-text); }

.hero-banner {
  height: 100%;
  min-height: 460px;
  display: flex;
  align-items: center;
  justify-content: center;
}

@keyframes floatSoft {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-14px); }
}

.hero-banner img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  display: block;
  animation: floatSoft 5s ease-in-out infinite;
}

/* ---------- Sections ---------- */

section { padding: 56px 0; }

h2 {
  font-family: var(--font-serif);
  font-size: 28px;
  color: var(--color-primary-dark);
  margin: 0 0 8px;
}

.section-intro {
  font-size: 16px;
  color: var(--color-text-muted);
  max-width: 680px;
  margin: 0 0 36px;
}

.section-header {
  text-align: center;
  margin: 0 auto 36px;
}

.section-header h2 { margin-bottom: 12px; }

.section-header .section-intro {
  max-width: 900px;
  margin: 0 auto;
}

/* ---------- Règles (tronc commun) ---------- */

.rules-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 24px;
}

@keyframes fadeSlideUp {
  from { opacity: 0; transform: translateY(18px); }
  to { opacity: 1; transform: translateY(0); }
}

.rule-card {
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-m);
  padding: 28px 24px;
  box-shadow: var(--shadow-card);
  animation: fadeSlideUp 0.6s ease both;
  transition: transform 0.25s ease, box-shadow 0.25s ease;
}

.rule-card:nth-child(1) { animation-delay: 0.05s; }
.rule-card:nth-child(2) { animation-delay: 0.18s; }
.rule-card:nth-child(3) { animation-delay: 0.31s; }

.rule-card:hover {
  transform: translateY(-5px);
  box-shadow: var(--shadow-card-hover);
}

.rule-number {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: var(--color-primary);
  color: #fff;
  font-weight: 700;
  font-size: 15px;
  margin-bottom: 16px;
}

.rule-card h3 {
  font-size: 17px;
  margin: 0 0 8px;
  color: var(--color-text);
}

.rule-card p {
  font-size: 15px;
  color: var(--color-text-muted);
  margin: 0;
}

/* ---------- Adresse de facturation (callout) ---------- */

.invoice-callout {
  background: var(--color-primary);
  background: linear-gradient(135deg, var(--color-primary) 0%, var(--color-primary-dark) 100%);
  color: #fff;
  border-radius: var(--radius-m);
  padding: 32px;
  margin-top: 36px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  gap: 8px;
}

.invoice-callout .label {
  font-size: 14px;
  letter-spacing: 0.5px;
  opacity: 0.85;
  margin: 0 0 4px;
}

.invoice-callout .email-link {
  font-family: var(--font-serif);
  font-size: 29px;
  color: #fff;
  text-decoration: none;
  border-bottom: 2px solid rgba(255,255,255,0.5);
}

.invoice-callout .email-link:hover { border-color: #fff; }

/* ---------- Section alt background ---------- */

.section-alt { background: var(--color-bg-alt); }

/* ---------- Stepper (parcours) ---------- */

.steps {
  display: flex;
  flex-direction: column;
  gap: 0;
}

.step {
  display: grid;
  grid-template-columns: 56px 1fr;
  gap: 20px;
  position: relative;
  padding-bottom: 36px;
}

.step:last-child { padding-bottom: 0; }

.step-marker {
  display: flex;
  flex-direction: column;
  align-items: center;
}

.step-number {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background: var(--color-surface);
  border: 2px solid var(--color-primary);
  color: var(--color-primary);
  font-family: var(--font-serif);
  font-weight: 700;
  font-size: 17px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.step-line {
  flex: 1;
  width: 2px;
  background: var(--color-border);
  margin-top: 6px;
}

.step:last-child .step-line { display: none; }

.step-content {
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-m);
  padding: 20px 24px;
  box-shadow: var(--shadow-card);
}

.step-content h3 {
  font-size: 17px;
  margin: 0 0 6px;
}

.step-content p {
  font-size: 15px;
  color: var(--color-text-muted);
  margin: 0;
}

/* ---------- Point de vigilance (warning) ---------- */

.warning-box {
  background: var(--color-warning-bg);
  border: 1px solid var(--color-warning-border);
  border-radius: var(--radius-m);
  margin-top: 40px;
  display: grid;
  grid-template-columns: 96px 1fr;
  align-items: stretch;
  overflow: hidden;
}

.warning-icon-col {
  background: rgba(232, 163, 61, 0.22);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px 12px;
}

.warning-icon {
  width: 44px;
  height: 44px;
  flex-shrink: 0;
}

.warning-content {
  padding: 24px 28px;
}

.warning-box h3 {
  font-size: 16px;
  margin: 0 0 6px;
  color: var(--color-warning-text);
}

.warning-box p {
  font-size: 15px;
  margin: 0;
  color: #5c4a2c;
}

/* ---------- Table (produits + prestations) ---------- */

.table-wrap {
  overflow-x: auto;
  border-radius: var(--radius-m);
  box-shadow: var(--shadow-card);
  border: 1px solid var(--color-border);
}

table {
  width: 100%;
  border-collapse: collapse;
  background: var(--color-surface);
  min-width: 620px;
}

thead th {
  background: var(--color-primary);
  color: #fff;
  font-size: 13px;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  text-align: left;
  padding: 14px 20px;
}

tbody td {
  padding: 18px 20px;
  font-size: 15px;
  color: var(--color-text);
  border-top: 1px solid var(--color-border);
  vertical-align: top;
}

tbody tr:nth-child(even) { background: var(--color-bg-alt); }

td .email-type {
  font-weight: 600;
  color: var(--color-primary-dark);
}

/* ---------- Règle commune callout ---------- */

.common-rule {
  margin-top: 40px;
  border-left: 4px solid var(--color-primary);
  background: var(--color-surface);
  border-radius: 0 var(--radius-m) var(--radius-m) 0;
  padding: 22px 28px;
  box-shadow: var(--shadow-card);
}

.common-rule h3 {
  font-size: 16px;
  margin: 0 0 6px;
  color: var(--color-primary-dark);
}

.common-rule p { margin: 0; font-size: 15px; color: var(--color-text-muted); }

/* ---------- Contact / footer ---------- */

.contact-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 24px;
}

.contact-card {
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-m);
  padding: 26px 28px;
  box-shadow: var(--shadow-card);
  text-align: center;
}

.contact-card h3 {
  font-size: 17px;
  margin: 0 0 8px;
  color: var(--color-text);
}

.contact-card a.contact-email {
  display: inline-block;
  font-weight: 600;
  font-size: 21px;
  color: var(--color-primary);
  margin-bottom: 8px;
  text-decoration: none;
}

.contact-card a.contact-email:hover { text-decoration: underline; }

.contact-card p {
  font-size: 14px;
  color: var(--color-text-muted);
  margin: 0;
}

.site-footer {
  padding: 28px 0;
  text-align: center;
  font-size: 13px;
  color: var(--color-text-muted);
  border-top: 1px solid var(--color-border);
}

/* ---------- Responsive ---------- */

@media (max-width: 860px) {
  .hero-grid { grid-template-columns: 1fr; gap: 32px; }
  .hero-banner { min-height: unset; height: 220px; order: 2; }
  .rules-grid { grid-template-columns: 1fr; }
  .contact-grid { grid-template-columns: 1fr; }
  h1 { font-size: 30px; }
}

@media (max-width: 560px) {
  .site-header .container { flex-direction: column; align-items: flex-start; gap: 12px; }
  .header-tagline { text-align: left; }
  section { padding: 40px 0; }
}
