/* ============================================================
   Compta GTI - site vitrine
   ============================================================ */

:root {
  --ink: #0F1B2D;
  --body-text: #33465F;
  --muted: #6B7C93;
  --bg: #F3F6FB;
  --surface: #FFFFFF;
  --surface-tint: #EEF3FB;
  --border: #DCE4F0;
  --primary: #1D5FAF;
  --primary-deep: #123B73;
  --primary-tint: #E7EFFA;
  --accent: #DDA23A;
  --accent-tint: #FBF1DE;
  --success: #2E8B57;
  --shadow: 0 20px 45px -25px rgba(15, 27, 45, 0.35);
}

@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --ink: #EEF3FB;
    --body-text: #C6D2E4;
    --muted: #93A4BD;
    --bg: #0B1420;
    --surface: #101C2C;
    --surface-tint: #162437;
    --border: #223350;
    --primary: #5B93E0;
    --primary-deep: #8FB6EC;
    --primary-tint: #16253D;
    --accent: #E8B45C;
    --accent-tint: #2B2314;
    --success: #4FAE7C;
    --shadow: 0 20px 45px -25px rgba(0, 0, 0, 0.6);
  }
}

:root[data-theme="dark"] {
  --ink: #EEF3FB;
  --body-text: #C6D2E4;
  --muted: #93A4BD;
  --bg: #0B1420;
  --surface: #101C2C;
  --surface-tint: #162437;
  --border: #223350;
  --primary: #5B93E0;
  --primary-deep: #8FB6EC;
  --primary-tint: #16253D;
  --accent: #E8B45C;
  --accent-tint: #2B2314;
  --success: #4FAE7C;
  --shadow: 0 20px 45px -25px rgba(0, 0, 0, 0.6);
}

* { box-sizing: border-box; }

html { color-scheme: light dark; }

body {
  margin: 0;
  background: var(--bg);
  color: var(--body-text);
  font-family: "Public Sans", -apple-system, "Segoe UI", sans-serif;
  font-size: 16px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

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

h1, h2, h3, h4 {
  font-family: "Fraunces", Georgia, serif;
  color: var(--ink);
  line-height: 1.15;
  margin: 0;
  text-wrap: balance;
}

h1 { font-size: clamp(2.1rem, 4.2vw, 3.4rem); font-weight: 600; }
h2 { font-size: clamp(1.6rem, 2.6vw, 2.2rem); font-weight: 600; }
h3 { font-size: 1.2rem; font-weight: 600; }

p { margin: 0; }

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

.wrap {
  max-width: 1120px;
  margin: 0 auto;
  padding-inline: 1.5rem;
}

/* ── En-tête ── */
.entete {
  position: sticky;
  top: 0;
  z-index: 20;
  background: color-mix(in srgb, var(--surface) 88%, transparent);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--border);
}

.entete .wrap {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1.5rem;
  padding-block: 0.85rem;
}

.marque {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  font-family: "Fraunces", serif;
  font-weight: 600;
  font-size: 1.15rem;
  color: var(--ink);
  text-decoration: none;
}

.marque img { height: 32px; width: auto; }

/* Quand le logo accole deux noms (société + produit, cf. compta-gti.html) */
.marque-texte { display: flex; flex-direction: column; line-height: 1.15; }
.marque-societe {
  font-family: "Public Sans", sans-serif;
  font-weight: 500;
  font-size: 0.68rem;
  color: var(--muted);
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.nav-principale {
  display: flex;
  align-items: center;
  gap: 1.75rem;
}

.nav-principale a {
  color: var(--body-text);
  text-decoration: none;
  font-size: 0.92rem;
  font-weight: 500;
}

.nav-principale a:hover { color: var(--primary); }

.nav-cta { display: flex; align-items: center; }

.menu-mobile-bouton {
  display: none;
  background: none;
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 0.4rem 0.6rem;
  font-size: 1.1rem;
  color: var(--ink);
}

/* ── Boutons ── */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.7rem 1.35rem;
  border-radius: 999px;
  font-weight: 600;
  font-size: 0.92rem;
  text-decoration: none;
  border: 1px solid transparent;
  cursor: pointer;
}

.btn-primaire {
  background: var(--primary);
  color: #fff;
  box-shadow: 0 10px 24px -12px color-mix(in srgb, var(--primary) 70%, transparent);
}

.btn-primaire:hover { background: var(--primary-deep); }

.btn-discret {
  background: transparent;
  color: var(--ink);
  border-color: var(--border);
}

.btn-discret:hover { border-color: var(--primary); color: var(--primary); }

/* ── Hero ── */
.hero {
  padding-block: clamp(3rem, 7vw, 6rem) clamp(2.5rem, 6vw, 5rem);
}

.hero .wrap {
  display: grid;
  grid-template-columns: minmax(0, 1.05fr) minmax(0, 0.95fr);
  gap: clamp(2rem, 5vw, 4rem);
  align-items: center;
}

/* Page d'accueil GT Integration : pas de second colonne (le schéma Compta GTI
   n'a pas lieu d'être ici), texte seul centré plutôt que collé à gauche. Le
   conteneur garde la même largeur que les autres sections (.wrap, 1120px) ;
   seul le paragraphe reste limité en largeur pour rester confortable à lire. */
.hero-seul .wrap {
  grid-template-columns: minmax(0, 1fr);
  text-align: center;
}
.hero-seul .hero-actions { justify-content: center; }
.hero-seul p.chapeau { max-width: 60ch; margin-inline: auto; }

.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  background: var(--primary-tint);
  color: var(--primary-deep);
  border-radius: 999px;
  padding: 0.35rem 0.85rem;
  font-size: 0.8rem;
  font-weight: 600;
  letter-spacing: 0.02em;
  margin-bottom: 1.1rem;
}

.hero p.chapeau {
  margin-top: 1.1rem;
  font-size: 1.1rem;
  max-width: 46ch;
  color: var(--body-text);
}

.hero-actions {
  display: flex;
  align-items: center;
  gap: 1rem;
  margin-top: 1.75rem;
  flex-wrap: wrap;
}

.hero-note {
  font-size: 0.85rem;
  color: var(--muted);
}

.hero-graphique {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 20px;
  box-shadow: var(--shadow);
  padding: 1.25rem;
}

.hero-graphique svg { width: 100%; height: auto; }

.hero-graphique figcaption {
  margin-top: 0.9rem;
  font-size: 0.82rem;
  color: var(--muted);
  text-align: center;
}

/* ── Sections génériques ── */
.section { padding-block: clamp(3rem, 6vw, 5rem); }
.section-tint { background: var(--surface-tint); }

.section-tete {
  max-width: 62ch;
  margin-bottom: clamp(2rem, 4vw, 3rem);
}

.section-tete .eyebrow { margin-bottom: 0.9rem; }

.section-tete p { margin-top: 0.85rem; font-size: 1.03rem; color: var(--body-text); }

/* ── Constat (problème) ── */
.constat-grille {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 1.25rem;
}

.constat-carte {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 14px;
  padding: 1.5rem;
}

.constat-carte .chiffre {
  font-family: "Fraunces", serif;
  font-size: 2.1rem;
  font-weight: 600;
  color: var(--primary);
  display: block;
  margin-bottom: 0.5rem;
}

.constat-carte p { font-size: 0.92rem; color: var(--muted); }

/* ── Fonctionnalités ── */
.fonctions-grille {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 1.25rem;
}

.fonction-carte {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 16px;
  padding: 1.5rem;
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

.fonction-icone {
  width: 40px;
  height: 40px;
  border-radius: 10px;
  background: var(--primary-tint);
  color: var(--primary-deep);
  display: grid;
  place-items: center;
}

.fonction-carte p { font-size: 0.92rem; color: var(--body-text); }

/* ── Étapes ── */
.etapes {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 1.5rem;
  counter-reset: etape;
}

.etape {
  position: relative;
  padding-top: 2.75rem;
}

.etape::before {
  counter-increment: etape;
  content: counter(etape);
  position: absolute;
  top: 0;
  left: 0;
  width: 2.25rem;
  height: 2.25rem;
  border-radius: 50%;
  background: var(--primary);
  color: #fff;
  font-family: "Fraunces", serif;
  font-weight: 600;
  display: grid;
  place-items: center;
}

.etape h3 { margin-bottom: 0.45rem; }
.etape p { font-size: 0.9rem; color: var(--muted); }

/* ── Profils (pour qui) ── */
.profils-grille {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 1.5rem;
}

.profil-carte {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 18px;
  padding: 2rem;
}

.profil-carte .eyebrow { margin-bottom: 1rem; }

.profil-carte ul {
  margin: 1.1rem 0 0;
  padding: 0;
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 0.6rem;
}

.profil-carte li {
  display: flex;
  gap: 0.6rem;
  font-size: 0.92rem;
  color: var(--body-text);
}

.profil-carte li::before {
  content: "";
  flex-shrink: 0;
  width: 0.4rem;
  height: 0.4rem;
  border-radius: 50%;
  background: var(--success);
  margin-top: 0.55rem;
}

/* ── Appel à l'action ── */
.cta {
  background: linear-gradient(135deg, var(--primary-deep), var(--primary));
  border-radius: 24px;
  padding: clamp(2.25rem, 5vw, 3.5rem);
  color: #fff;
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  gap: 2rem;
}

.cta h2 { color: #fff; }
.cta p { color: color-mix(in srgb, #fff 82%, transparent); margin-top: 0.6rem; }

/* Même raison que pour le lien email ci-dessous : le badge .eyebrow par défaut
   (fond bleu clair, texte bleu foncé) se fond dans le dégradé bleu du bloc. */
.cta .eyebrow { background: rgba(255, 255, 255, 0.18); color: #fff; }

.cta .btn-primaire {
  background: #fff;
  color: var(--primary-deep);
}
.cta .btn-primaire:hover { background: var(--accent-tint); }

/* Lien email : le blanc du texte de .cta écrase le bleu par défaut des <a>,
   sans quoi il se fond dans le fond bleu du bloc. */
.cta p a {
  color: #fff;
  text-decoration: underline;
  text-decoration-color: color-mix(in srgb, #fff 50%, transparent);
}
.cta p a:hover { text-decoration-color: #fff; }

/* ── Marqueur « à compléter » (repris des mentions légales) ── */
.a-completer {
  background: var(--accent-tint);
  color: var(--ink);
  border: 1px solid var(--accent);
  border-radius: 4px;
  padding: 0 0.35rem;
  font-style: italic;
  font-size: 0.95em;
}

/* ── Page Mentions légales ── */
.mentions .retour {
  display: inline-block;
  margin-bottom: 2rem;
  color: var(--muted);
  text-decoration: none;
  font-size: 0.9rem;
}
.mentions .retour:hover { color: var(--primary); }

.mentions h2 { margin-top: 2.5rem; }
.mentions h2:first-of-type { margin-top: 2rem; }
.mentions p { margin-top: 0.85rem; color: var(--body-text); }
.mentions ul { margin-top: 0.85rem; padding-left: 1.25rem; }
.mentions li { margin-top: 0.4rem; color: var(--body-text); }

/* ── Pied de page ── */
.pied {
  border-top: 1px solid var(--border);
  padding-block: 2.5rem;
  margin-top: 2rem;
}

.pied .wrap {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 1.5rem;
  align-items: center;
}

.pied-marque {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  color: var(--muted);
  font-size: 0.85rem;
}

.pied-marque img { height: 22px; }

.pied-liens {
  display: flex;
  gap: 1.5rem;
  flex-wrap: wrap;
}

.pied-liens a {
  font-size: 0.85rem;
  color: var(--muted);
  text-decoration: none;
}

.pied-liens a:hover { color: var(--primary); }

/* ── Responsive ── */
@media (max-width: 900px) {
  .hero .wrap { grid-template-columns: 1fr; }
  .hero-graphique { order: -1; }
  .constat-grille,
  .fonctions-grille { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .etapes { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .profils-grille { grid-template-columns: 1fr; }
  .cta { grid-template-columns: 1fr; text-align: center; }
  .cta .hero-actions { justify-content: center; }
}

@media (max-width: 620px) {
  .nav-principale, .nav-cta { display: none; }
  .nav-principale.ouvert {
    display: flex;
    flex-direction: column;
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background: var(--surface);
    border-bottom: 1px solid var(--border);
    padding: 1rem 1.5rem;
    gap: 1rem;
  }
  .menu-mobile-bouton { display: inline-flex; }
  .constat-grille,
  .fonctions-grille,
  .etapes { grid-template-columns: 1fr; }
}
