/* =========================================================
   Gweva Legal Force — Espace paiement & facturation
   Aesthetic : editorial Côte d'Azur — sobre, institutionnel
   ========================================================= */

@import url('https://fonts.googleapis.com/css2?family=Fraunces:ital,opsz,wght@0,9..144,400;0,9..144,500;0,9..144,600;1,9..144,400&family=Newsreader:wght@400;500&family=Spline+Sans+Mono:wght@400;500&display=swap');

:root {
  --bleu-nuit: #16243a;
  --bleu-profond: #1f3556;
  --azur: #2f6f9f;
  --sable: #f4efe6;
  --sable-fonce: #e7dfd0;
  --creme: #fbf8f2;
  --terre: #b5562f;
  --vert-valide: #2f6b48;
  --rouge-echec: #9b2c2c;
  --encre: #1a1a1a;
  --gris-doux: #6b6257;
  --bordure: #d9cfbc;

  --serif-display: 'Fraunces', Georgia, serif;
  --serif-body: 'Newsreader', Georgia, serif;
  --mono: 'Spline Sans Mono', monospace;

  --max: 1080px;
}

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

html {
  scroll-behavior: smooth;
  overflow-x: hidden;            /* garde-fou : aucun defilement horizontal possible */
  -webkit-text-size-adjust: 100%; /* iOS : pas de re-scaling auto du texte en paysage */
}

body {
  font-family: var(--serif-body);
  font-size: 1.08rem;
  line-height: 1.7;
  color: var(--encre);
  background: var(--creme);
  background-image:
    radial-gradient(circle at 12% -5%, rgba(47,111,159,0.06), transparent 45%),
    radial-gradient(circle at 95% 110%, rgba(181,86,47,0.05), transparent 40%);
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
  overflow-wrap: break-word;     /* un mot/URL trop long casse plutot que de deborder */
  word-wrap: break-word;
}

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

/* ---------- Bandeau supérieur ---------- */
.topbar {
  background: var(--bleu-nuit);
  color: var(--sable);
  font-family: var(--mono);
  font-size: 0.72rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  text-align: center;
  padding: 0.5rem 1rem;
}

/* ---------- En-tête ---------- */
header.site {
  border-bottom: 1px solid var(--bordure);
  background: var(--creme);
}
.header-inner {
  max-width: var(--max);
  margin: 0 auto;
  padding: 1.6rem 1.5rem;
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 0.8rem;
}
.brand {
  font-family: var(--serif-display);
  font-weight: 600;
  font-size: 1.45rem;
  letter-spacing: -0.01em;
  color: var(--bleu-nuit);
  text-decoration: none;
  line-height: 1.1;
}
.brand small {
  display: block;
  font-family: var(--mono);
  font-size: 0.62rem;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--azur);
  margin-top: 0.25rem;
  font-weight: 400;
}
nav.site a {
  font-family: var(--mono);
  font-size: 0.74rem;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--bleu-profond);
  text-decoration: none;
  margin-left: 1.4rem;
  padding-bottom: 2px;
  border-bottom: 1px solid transparent;
  transition: border-color 0.2s, color 0.2s;
}
nav.site a:hover { border-color: var(--terre); color: var(--terre); }

/* ---------- Conteneur ---------- */
main {
  max-width: var(--max);
  margin: 0 auto;
  padding: 3.5rem 1.5rem 4rem;
}
.narrow { max-width: 760px; }

/* ---------- Typo ---------- */
h1 {
  font-family: var(--serif-display);
  font-weight: 600;
  font-size: clamp(2rem, 5vw, 3.1rem);
  line-height: 1.08;
  letter-spacing: -0.02em;
  color: var(--bleu-nuit);
  margin-bottom: 1.2rem;
}
h2 {
  font-family: var(--serif-display);
  font-weight: 600;
  font-size: 1.55rem;
  color: var(--bleu-profond);
  margin: 2.6rem 0 0.9rem;
  letter-spacing: -0.01em;
}
h3 {
  font-family: var(--serif-display);
  font-weight: 500;
  font-size: 1.2rem;
  color: var(--bleu-profond);
  margin: 1.8rem 0 0.6rem;
}
p { margin-bottom: 1.05rem; }
a { color: var(--azur); }
.lead {
  font-size: 1.25rem;
  color: var(--gris-doux);
  font-style: italic;
  margin-bottom: 2rem;
}
.eyebrow {
  font-family: var(--mono);
  font-size: 0.72rem;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--terre);
  margin-bottom: 1rem;
  display: block;
}
ul, ol { margin: 0 0 1.05rem 1.3rem; }
li { margin-bottom: 0.5rem; }
strong { font-weight: 600; }

/* ---------- Boutons ---------- */
.btn {
  display: inline-block;
  font-family: var(--mono);
  font-size: 0.8rem;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  text-decoration: none;
  padding: 0.85rem 1.7rem;
  border-radius: 2px;
  transition: transform 0.15s, box-shadow 0.2s;
}
.btn-primary {
  background: var(--bleu-nuit);
  color: var(--sable);
  box-shadow: 0 4px 14px rgba(22,36,58,0.22);
}
.btn-primary:hover { transform: translateY(-2px); box-shadow: 0 7px 20px rgba(22,36,58,0.3); }
.btn-ghost {
  background: transparent;
  color: var(--bleu-nuit);
  border: 1px solid var(--bleu-nuit);
}
.btn-ghost:hover { background: var(--bleu-nuit); color: var(--sable); }
.btn-row { display: flex; gap: 1rem; flex-wrap: wrap; margin-top: 1.5rem; }

/* ---------- Cartes ---------- */
.cards {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(230px, 1fr));
  gap: 1.4rem;
  margin: 2.5rem 0;
}
.card {
  background: var(--creme);
  border: 1px solid var(--bordure);
  border-radius: 3px;
  padding: 1.6rem;
  transition: box-shadow 0.2s, transform 0.2s;
}
.card:hover { box-shadow: 0 8px 24px rgba(22,36,58,0.08); transform: translateY(-3px); }
.card h3 { margin-top: 0; }
.card .num {
  font-family: var(--mono);
  font-size: 0.7rem;
  letter-spacing: 0.15em;
  color: var(--azur);
  display: block;
  margin-bottom: 0.8rem;
}

/* ---------- Page de statut paiement ---------- */
.status-wrap {
  max-width: 620px;
  margin: 5vh auto 0;
  text-align: center;
}
.status-icon {
  width: 88px; height: 88px;
  margin: 0 auto 1.8rem;
  border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
}
.status-icon svg { width: 44px; height: 44px; }
.status-success .status-icon { background: rgba(47,107,72,0.12); }
.status-success .status-icon svg { stroke: var(--vert-valide); }
.status-fail .status-icon { background: rgba(155,44,44,0.12); }
.status-fail .status-icon svg { stroke: var(--rouge-echec); }
.status-wrap h1 { font-size: clamp(1.8rem, 4vw, 2.6rem); }
.status-note {
  background: var(--sable);
  border: 1px solid var(--bordure);
  border-left: 3px solid var(--azur);
  border-radius: 3px;
  padding: 1.1rem 1.3rem;
  font-size: 0.98rem;
  text-align: left;
  color: var(--gris-doux);
  margin: 2rem 0;
}
.ref-box {
  font-family: var(--mono);
  font-size: 0.85rem;
  background: var(--bleu-nuit);
  color: var(--sable);
  border-radius: 3px;
  padding: 0.9rem 1.2rem;
  margin: 1.5rem 0;
  word-break: break-all;
}

/* ---------- Encadré juridique ---------- */
.callout {
  background: var(--sable);
  border: 1px solid var(--bordure);
  border-left: 3px solid var(--terre);
  padding: 1.3rem 1.5rem;
  border-radius: 3px;
  margin: 2rem 0;
  font-size: 0.98rem;
}
.callout strong { color: var(--bleu-nuit); }

/* ---------- Bloc identité légale ---------- */
.legal-id {
  font-family: var(--mono);
  font-size: 0.85rem;
  line-height: 1.9;
  background: var(--creme);
  border: 1px solid var(--bordure);
  border-radius: 3px;
  padding: 1.4rem 1.6rem;
  margin: 1.5rem 0;
}
.legal-id dt { color: var(--azur); display: inline; }
.legal-id .row { display: block; }

/* ---------- Tableaux ---------- */
table {
  width: 100%;
  border-collapse: collapse;
  margin: 1.5rem 0;
  font-size: 0.98rem;
}
th, td {
  text-align: left;
  padding: 0.8rem 1rem;
  border-bottom: 1px solid var(--bordure);
  vertical-align: top;
}
th {
  font-family: var(--mono);
  font-size: 0.72rem;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--azur);
  background: var(--sable);
}

/* ---------- Pied de page ---------- */
footer.site {
  border-top: 1px solid var(--bordure);
  background: var(--bleu-nuit);
  color: var(--sable);
  margin-top: 4rem;
}
.footer-inner {
  max-width: var(--max);
  margin: 0 auto;
  padding: 2.6rem 1.5rem;
  display: grid;
  grid-template-columns: 2fr 1fr 1fr;
  gap: 2rem;
}
footer.site h4 {
  font-family: var(--mono);
  font-size: 0.7rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--azur);
  margin-bottom: 0.9rem;
}
footer.site a { color: var(--sable); text-decoration: none; opacity: 0.85; display: block; margin-bottom: 0.5rem; font-size: 0.9rem; }
footer.site a:hover { opacity: 1; text-decoration: underline; }
footer.site .brand-foot {
  font-family: var(--serif-display);
  font-size: 1.3rem;
  font-weight: 600;
  margin-bottom: 0.7rem;
}
footer.site p { font-size: 0.85rem; opacity: 0.75; margin-bottom: 0.3rem; }
.footer-bottom {
  border-top: 1px solid rgba(244,239,230,0.15);
  text-align: center;
  padding: 1.1rem;
  font-family: var(--mono);
  font-size: 0.68rem;
  letter-spacing: 0.05em;
  opacity: 0.6;
}

/* ---------- Animations entrée ---------- */
@keyframes rise { from { opacity: 0; transform: translateY(18px); } to { opacity: 1; transform: none; } }
.rise { animation: rise 0.6s ease both; }
.rise-2 { animation: rise 0.6s ease 0.12s both; }
.rise-3 { animation: rise 0.6s ease 0.24s both; }

/* Respect des préférences système : pas d'animation si l'utilisateur la désactive */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; scroll-behavior: auto !important; }
}

/* Le bloc référence (mono) ne déborde jamais, même avec une longue chaîne */
.ref-box, .legal-id { overflow-wrap: anywhere; word-break: break-word; }

/* ---------- Responsive ---------- */
@media (max-width: 720px) {
  .footer-inner { grid-template-columns: 1fr; }
  nav.site a { margin-left: 0; margin-right: 1rem; }
  .header-inner { flex-direction: column; align-items: flex-start; }
  main { padding: 2.5rem 1.2rem 3rem; }
  h1 { hyphens: auto; -webkit-hyphens: auto; }
}

@media (max-width: 440px) {
  body { font-size: 1.02rem; }
  /* Sur très petit écran, le tableau scrolle horizontalement au lieu de compresser */
  table { display: block; overflow-x: auto; -webkit-overflow-scrolling: touch; white-space: normal; }
  .legal-id { font-size: 0.78rem; padding: 1.1rem 1.1rem; }
  .btn { width: 100%; text-align: center; }
  .btn-row { flex-direction: column; }
  .status-wrap .btn-row .btn { width: 100%; }
}
