/* ===== RESET & BASE ===== */

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

html {
  scroll-behavior: smooth;
}

body {
  font-family: "Segoe UI", "Helvetica Neue", Arial, sans-serif;
  color: #2a2a2a;
  line-height: 1.6;
}

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

a {
  color: inherit;
  text-decoration: none;
}

/* ===== NAVIGATION ===== */

.navbar {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 100;
  background: rgba(15, 45, 84, 0.92);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  /* Contenu aligné sur la colonne de la page (960px centrée + 2rem de retrait) */
  padding: 0 max(2rem, calc((100% - 960px) / 2 + 2rem));
  height: 56px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.navbar .logo img {
  height: 36px;
  background: #e8edf5;
  border-radius: 999px;
  padding: 4px 6px;
}

.navbar nav {
  display: flex;
  align-items: center;
  gap: 2rem;
}

.navbar nav a {
  color: #ffffff;
  font-size: 0.9rem;
  font-weight: 700;
  letter-spacing: 0.3px;
  opacity: 0.85;
  transition: opacity 0.2s;
}

.navbar nav a:hover {
  opacity: 1;
}

.navbar nav a.active {
  background: #ecc85a;
  color: #1a2e4a;
  font-weight: 700;
  opacity: 1;
  padding: 0.32rem 0.95rem;
  border-radius: 999px;
}

/* ===== HAMBURGER (mobile uniquement) ===== */

.nav-toggle {
  display: none;
  flex-direction: column;
  justify-content: center;
  gap: 5px;
  width: 44px;
  height: 44px;
  padding: 10px;
  background: transparent;
  border: none;
  cursor: pointer;
}

.nav-toggle-bar {
  display: block;
  width: 24px;
  height: 2px;
  background: #ffffff;
  border-radius: 2px;
  transition: transform 0.25s ease, opacity 0.25s ease;
}

/* Transformation en croix quand le menu est ouvert */
.nav-toggle[aria-expanded="true"] .nav-toggle-bar:nth-child(1) {
  transform: translateY(7px) rotate(45deg);
}

.nav-toggle[aria-expanded="true"] .nav-toggle-bar:nth-child(2) {
  opacity: 0;
}

.nav-toggle[aria-expanded="true"] .nav-toggle-bar:nth-child(3) {
  transform: translateY(-7px) rotate(-45deg);
}

/* ===== HERO ===== */

.hero {
  background: linear-gradient(165deg, #1a4b8c 0%, #2565aa 50%, #1a4b8c 100%);
  color: #ffffff;
  min-height: 100vh;
  padding: clamp(70px, 10vh, 120px) clamp(1rem, 4vw, 3rem) clamp(2rem, 5vh, 4rem);
  text-align: center;
  display: flex;
  flex-direction: column;
  justify-content: center;
}

.hero-surtitre {
  font-size: clamp(1rem, 2vw, 1.6rem);
  font-style: italic;
  font-weight: 400;
  opacity: 0.85;
  max-width: 960px;
  margin: 0 auto clamp(1.5rem, 4vh, 4rem);
  text-align: left;
}

.hero-content {
  max-width: 960px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  gap: clamp(1rem, 3vw, 3rem);
}

.hero-text {
  flex: 0 0 38%;
  text-align: left;
}

.hero-headline {
  font-size: clamp(1.3rem, 2.2vw, 2rem);
  font-weight: 700;
  line-height: 1.25;
  margin-bottom: clamp(0.8rem, 2vh, 2rem);
}

.hero-headline .accent {
  color: #f4d37c;
}

.hero-description {
  font-size: clamp(0.85rem, 1.1vw, 1rem);
  line-height: 1.6;
  font-weight: 300;
  opacity: 0.93;
}

/* Liens dans le texte des zones à fond bleu (hero, bandeau offre) */
.hero-description a,
.offre-compat a {
  color: #f4d37c;
  font-weight: 600;
  text-decoration: underline;
  text-underline-offset: 3px;
}

.hero-description a:hover,
.offre-compat a:hover {
  color: #ffffff;
}

.hero-visual {
  flex: 1;
}

.hero-visual img {
  max-height: clamp(180px, 40vh, 400px);
  filter: drop-shadow(0 8px 24px rgba(0, 0, 0, 0.3));
}

/* ===== TRANSITION BAR ===== */

.transition-bar {
  height: 4px;
  background: linear-gradient(90deg, #ecc85a 0%, #f4d37c 50%, #ecc85a 100%);
}

/* ===== FEATURES (4 blocs) ===== */

.features {
  padding: 4rem 2rem;
  max-width: 960px;
  margin: 0 auto;
}

.features-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1.5rem;
}

.feature-bloc {
  background: #f5f7fb;
  border-radius: 8px;
  padding: 1.5rem;
  border-left: 3px solid #ecc85a;
}

.feature-bloc h3 {
  font-size: 1.1rem;
  font-weight: 700;
  color: #1a4b8c;
  margin-bottom: 0.5rem;
}

.feature-bloc p {
  font-size: 0.95rem;
  color: #3a3a3a;
  line-height: 1.5;
}

/* Paire de boutons (Fonctions + Démo), sous le comparatif et sous les blocs */
.cta-paire {
  text-align: center;
  margin-top: 2.5rem;
}

.cta-paire .demo-btn {
  margin: 0.4rem 0.5rem;
  min-width: 240px;
}

/* ===== COMPARATIF SANS / AVEC (accueil) ===== */

.comparatif {
  padding: 4rem 2rem;
  max-width: 960px;
  margin: 0 auto;
}

.comparatif-titre {
  font-size: 1.6rem;
  font-weight: 700;
  color: #1a4b8c;
  text-align: center;
  margin-bottom: 2rem;
}

/* Même grille pour les en-têtes et pour chaque ligne : les colonnes s'alignent */
.comparatif-entetes,
.comparatif-ligne summary {
  display: grid;
  grid-template-columns: 1fr 1fr 1.5rem;
  gap: 0 2rem;
  align-items: center;
}

.comparatif-entetes {
  padding: 0 1.25rem 0.75rem;
  font-size: 0.85rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  color: #777;
}

.comparatif-entetes span:nth-child(2) {
  color: #1a4b8c;
}

.comparatif-ligne {
  background: #f5f7fb;
  border-radius: 8px;
  border-left: 3px solid #ecc85a;
  margin-bottom: 0.75rem;
}

.comparatif-ligne summary {
  padding: 1rem 1.25rem;
  cursor: pointer;
  list-style: none;
}

.comparatif-ligne summary::-webkit-details-marker {
  display: none;
}

/* Chevron : pointe en bas, se retourne quand la ligne est ouverte */
.comparatif-ligne summary::after {
  content: "";
  width: 0.55rem;
  height: 0.55rem;
  border-right: 2px solid #1a4b8c;
  border-bottom: 2px solid #1a4b8c;
  transform: rotate(45deg);
  justify-self: center;
  transition: transform 0.2s;
}

.comparatif-ligne[open] summary::after {
  transform: rotate(-135deg);
}

.comparatif-ligne summary:hover .comparatif-avec {
  text-decoration: underline;
  text-underline-offset: 3px;
}

.comparatif-sans {
  font-size: 0.95rem;
  color: #666;
  line-height: 1.45;
}

.comparatif-avec {
  font-size: 1.05rem;
  font-weight: 700;
  color: #1a4b8c;
  line-height: 1.35;
}

.comparatif-detail {
  padding: 0.25rem 1.25rem 1.25rem;
  font-size: 0.95rem;
  color: #3a3a3a;
  line-height: 1.55;
  border-top: 1px solid #e1e6f0;
  margin-top: 0;
  padding-top: 1rem;
}

.comparatif-aide {
  text-align: center;
  font-size: 0.85rem;
  font-style: italic;
  color: #777;
  margin-top: 1.25rem;
}

/* ===== EN-TÊTE DE PAGE (Fonctions) ===== */

.page-entete {
  background: linear-gradient(165deg, #1a4b8c 0%, #2565aa 50%, #1a4b8c 100%);
  color: #ffffff;
  text-align: center;
  padding: calc(56px + 3rem) 2rem 3rem;
}

.page-entete h1 {
  font-size: clamp(1.5rem, 3vw, 2.2rem);
  font-weight: 700;
  line-height: 1.25;
  margin-bottom: 0.75rem;
}

.page-entete h1 .accent {
  color: #f4d37c;
}

.page-entete p {
  font-size: 1.05rem;
  font-weight: 300;
  opacity: 0.93;
  max-width: 720px;
  margin: 0 auto;
}

/* ===== BANDEAU OFFRE ===== */

.bandeau-offre {
  background: linear-gradient(165deg, #1a4b8c 0%, #2565aa 50%, #1a4b8c 100%);
  color: #ffffff;
  padding: 3rem 2rem;
  text-align: center;
  border-top: 4px solid #ecc85a;
}

.offre-titre {
  font-size: 1.2rem;
  font-weight: 600;
  margin-bottom: 1.5rem;
  max-width: 820px;
  margin-left: auto;
  margin-right: auto;
}

.offre-liste {
  list-style: none;
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 0.5rem 2rem;
  margin-bottom: 1.5rem;
}

.offre-liste li {
  font-size: 1rem;
}

.offre-liste li::before {
  content: "\2713";
  color: #f4d37c;
  font-weight: 700;
  margin-right: 0.4rem;
}

/* Saut de ligne forcé dans la liste (masqué en mobile, où la liste est en colonne) */
.offre-liste .offre-saut {
  flex-basis: 100%;
  height: 0;
}

.offre-liste .offre-saut::before {
  content: none;
}

.offre-conclusion {
  font-size: 1.3rem;
  font-weight: 700;
  font-style: italic;
  margin-top: 0.5rem;
}

.offre-conclusion .accent {
  color: #f4d37c;
}

.offre-compat {
  font-size: 0.85rem;
  font-weight: 300;
  opacity: 0.93;
  max-width: 820px;
  margin: 1.2rem auto 0;
}

/* ===== SECTIONS DETAIL ===== */

.section-detail {
  padding: 3.5rem 2rem;
  max-width: 960px;
  margin: 0 auto;
}

.section-detail:nth-child(even) {
  background: #f8f9fc;
}

.section-detail-wrapper:nth-child(even) {
  background: #f8f9fc;
}

.section-detail-wrapper:nth-child(odd) {
  background: #ffffff;
}

.section-detail-wrapper .section-detail {
  background: transparent;
}

.section-header {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  margin-bottom: 2rem;
}

.section-header::before {
  content: "";
  width: 4px;
  height: 28px;
  background: #ecc85a;
  border-radius: 2px;
  flex-shrink: 0;
}

.section-header h2 {
  font-size: 1.4rem;
  font-weight: 700;
  color: #1a4b8c;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.section-items {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1.5rem 2.5rem;
}

.section-item h4 {
  font-size: 1rem;
  font-weight: 700;
  color: #2a2a2a;
  margin-bottom: 0.3rem;
}

.section-item p {
  font-size: 0.92rem;
  color: #555;
  line-height: 1.55;
}

/* ===== TAGLINE ===== */

.tagline-bar {
  background: linear-gradient(90deg, #1a4b8c, #2565aa);
  color: #ffffff;
  text-align: center;
  padding: 1.5rem 2rem;
}

.tagline-bar p {
  font-size: 1.1rem;
  font-style: italic;
  font-weight: 600;
}

/* ===== FOOTER ===== */

.footer {
  background: #0f2d54;
  color: #ffffff;
  /* Contenu aligné sur la colonne de la page (960px centrée + 2rem de retrait) */
  padding: 2rem max(2rem, calc((100% - 960px) / 2 + 2rem));
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.footer .contact-info {
  font-size: 0.9rem;
  opacity: 0.8;
}

.footer .logo img {
  height: 32px;
  background: #e8edf5;
  border-radius: 999px;
  padding: 4px 6px;
}

/* ===== PAGES À FOND BLEU (Demo, Contact) ===== */

html:has(body.page-bleue) {
  background: #1a4b8c;
}

body.page-bleue {
  background: linear-gradient(165deg, #1a4b8c 0%, #2565aa 50%, #1a4b8c 100%);
  background-attachment: fixed;
  /* 56px = hauteur navbar fixe + 4rem de respiration sous le menu */
  padding-top: calc(56px + 4rem);
}

/* ===== PAGE CONTACT ===== */

.contact-section {
  max-width: 600px;
  margin: 0 auto 4rem;
  padding: 0 2rem;
  text-align: center;
}

.contact-card {
  background: #f5f7fb;
  border-radius: 12px;
  padding: 3rem;
  border-top: 4px solid #ecc85a;
}

.contact-card h2 {
  font-size: 1.3rem;
  color: #1a4b8c;
  margin-bottom: 2rem;
}

.contact-item {
  margin-bottom: 1.5rem;
}

.contact-item .label {
  font-size: 0.85rem;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  color: #888;
  margin-bottom: 0.3rem;
}

.contact-item .value {
  font-size: 1.2rem;
  font-weight: 600;
  color: #1a4b8c;
}

.contact-item a {
  color: #1a4b8c;
  transition: color 0.2s;
}

.contact-item a:hover {
  color: #2565aa;
}

/* ===== PAGE DEMO ===== */

.demo-intro {
  max-width: 960px;
  margin: 0 auto;
  padding: 0 2rem;
}

.demo-cadre {
  background: #f5f7fb;
  border: 1px solid #dbe2ee;
  border-left: 4px solid #ecc85a;
  border-radius: 8px;
  padding: 2rem 2.25rem;
}

.demo-cadre p {
  font-size: 1rem;
  color: #3a3a3a;
  line-height: 1.6;
}

.demo-cadre ul {
  list-style: none;
  margin: 1rem 0;
}

.demo-cadre li {
  position: relative;
  padding-left: 1.5rem;
  margin-bottom: 0.75rem;
  font-size: 0.95rem;
  color: #555;
  line-height: 1.6;
}

.demo-cadre li::before {
  content: "\2192";
  position: absolute;
  left: 0;
  color: #ecc85a;
  font-weight: 700;
}

.demo-cadre strong {
  color: #1a4b8c;
}

.demo-cadre-note {
  margin-top: 1.25rem;
  padding-top: 1rem;
  border-top: 1px solid #dbe2ee;
  font-size: 1.05rem;
}

.demo-cadre-note strong {
  color: #1a4b8c;
}

.demo-acces {
  max-width: 960px;
  margin: 0 auto;
  padding: 3rem 2rem 4rem;
}

.demo-colonnes {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1.5rem;
  align-items: stretch;
}

/* Deuxième étage : 2 cartes centrées sous les 3 premières */
.demo-colonnes + .demo-colonnes {
  margin-top: 3rem;
}

.demo-colonnes--deux {
  grid-template-columns: repeat(2, 1fr);
  max-width: 620px;
  margin-left: auto;
  margin-right: auto;
}

.demo-colonne {
  display: flex;
  flex-direction: column;
  background: #ffffff;
  border: 1px solid #dbe2ee;
  border-top: 4px solid #ecc85a;
  border-radius: 10px;
  padding: 1.75rem 1.5rem;
  box-shadow: 0 2px 10px rgba(15, 45, 84, 0.06);
}

.demo-role {
  font-size: 1.25rem;
  font-weight: 700;
  color: #1a4b8c;
  margin-bottom: 1rem;
}

.demo-desc {
  font-size: 0.92rem;
  color: #555;
  line-height: 1.55;
  flex: 1;
  margin-bottom: 1.5rem;
}

.demo-btn {
  display: inline-block;
  text-align: center;
  background: #1a4b8c;
  color: #ffffff;
  font-size: 0.95rem;
  font-weight: 600;
  padding: 0.8rem 1.25rem;
  border-radius: 8px;
  transition: background 0.2s;
}

.demo-btn:hover {
  background: #2565aa;
}

/* Variante dorée pour CTA principal */
.demo-btn--or {
  background: #ecc85a;
  color: #1a2e4a;
}

.demo-btn--or:hover {
  background: #f4d37c;
}

/* Variante "ghost" (contour) pour CTA secondaire sur fond bleu */
.demo-btn--ghost {
  background: transparent;
  color: #ffffff;
  border: 2px solid rgba(255, 255, 255, 0.7);
  padding: calc(0.8rem - 2px) calc(1.25rem - 2px);
}

.demo-btn--ghost:hover {
  background: rgba(255, 255, 255, 0.12);
}

/* ===== PAGE TARIFS ===== */

.tarifs-accroche {
  max-width: 880px;
  margin: 0 auto;
  padding: 0 2rem;
  text-align: center;
  color: #ffffff;
}

.tarifs-accroche h2 {
  font-size: clamp(1.7rem, 4vw, 2.4rem);
  font-weight: 700;
  line-height: 1.2;
  margin-bottom: 1rem;
}

.tarifs-accroche h2 .accent {
  color: #f4d37c;
}

.tarifs-accroche p {
  font-size: 1.1rem;
  line-height: 1.6;
  opacity: 0.92;
}

.tarifs-prix-bloc {
  max-width: 640px;
  margin: 2.5rem auto;
  padding: 0 2rem;
}

.tarifs-prix-card {
  background: #ffffff;
  border-radius: 14px;
  border-top: 5px solid #ecc85a;
  padding: 2.5rem 2rem;
  text-align: center;
  box-shadow: 0 8px 28px rgba(0, 0, 0, 0.2);
}

.tarifs-prix-chiffre {
  font-size: clamp(3.5rem, 12vw, 5rem);
  font-weight: 800;
  color: #1a4b8c;
  line-height: 1;
}

.tarifs-prix-label {
  font-size: 1.05rem;
  color: #555;
  margin-top: 0.75rem;
}

.tarifs-prix-second {
  margin-top: 1.5rem;
  padding-top: 1.25rem;
  border-top: 1px solid #e4e9f2;
}

.tarifs-prix-pourcent {
  font-size: 1.25rem;
  font-weight: 800;
  color: #1a4b8c;
  line-height: 1.2;
}

.tarifs-prix-second-label {
  font-size: 0.95rem;
  color: #555;
  margin-top: 0.25rem;
}

.tarifs-inclus {
  max-width: 760px;
  margin: 0 auto 2.5rem;
  padding: 0 2rem;
}

.tarifs-inclus-card {
  background: #f5f7fb;
  border-radius: 12px;
  padding: 2rem 2.25rem;
}

.tarifs-inclus-card h3 {
  font-size: 1.25rem;
  color: #1a4b8c;
  text-align: center;
  margin-bottom: 1.5rem;
}

.tarifs-inclus-card ul {
  list-style: none;
}

.tarifs-inclus-card li {
  position: relative;
  padding-left: 2rem;
  margin-bottom: 1rem;
  color: #3a3a3a;
  line-height: 1.55;
}

.tarifs-inclus-card li::before {
  content: "\2713";
  position: absolute;
  left: 0;
  top: 0.15rem;
  width: 1.3rem;
  height: 1.3rem;
  border-radius: 50%;
  background: #ecc85a;
  color: #ffffff;
  font-size: 0.8rem;
  font-weight: 700;
  display: flex;
  align-items: center;
  justify-content: center;
}

.tarifs-inclus-card strong {
  color: #1a4b8c;
}

/* Sous-liste : petit point doré au lieu de la coche */
.tarifs-inclus-card ul ul {
  margin: 0.7rem 0 0.25rem;
}

.tarifs-inclus-card ul ul li {
  padding-left: 1.4rem;
  margin-bottom: 0.55rem;
  font-size: 0.95rem;
  color: #555;
}

.tarifs-inclus-card ul ul li::before {
  content: "";
  width: 7px;
  height: 7px;
  top: 0.5rem;
  left: 0.25rem;
  background: #ecc85a;
}

.tarifs-notes {
  max-width: 760px;
  margin: 0 auto 3rem;
  padding: 0 2rem;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1.25rem;
}

.tarifs-note {
  background: rgba(255, 255, 255, 0.1);
  border: 1px solid rgba(255, 255, 255, 0.25);
  border-radius: 10px;
  padding: 1.5rem;
  color: #ffffff;
}

.tarifs-note .montant {
  font-size: 1.7rem;
  font-weight: 800;
  color: #f4d37c;
  margin-bottom: 0.5rem;
}

.tarifs-note p {
  font-size: 0.92rem;
  line-height: 1.5;
  opacity: 0.92;
}

.tarifs-cta {
  text-align: center;
  padding: 0 2rem 4rem;
}

.tarifs-cta .demo-btn {
  margin: 0.4rem;
}

/* ===== RESPONSIVE ===== */

@media (max-width: 768px) {
  .hero-content {
    flex-direction: column;
    text-align: center;
  }

  .hero-surtitre {
    text-align: center;
  }

  .hero-text {
    text-align: center;
    flex: none;
  }

  .hero-visual {
    flex: none;
  }

  .hero-visual img {
    max-height: 200px;
  }

  .hero {
    min-height: 100svh;
  }

  .features-grid {
    grid-template-columns: 1fr;
  }

  /* Comparatif : chaque ligne devient une carte, « Sans » au-dessus de « Avec » */
  .comparatif {
    padding: 3rem 1rem;
  }

  .comparatif-entetes {
    display: none;
  }

  .comparatif-ligne summary {
    grid-template-columns: 1fr 1.5rem;
    gap: 0.6rem 1rem;
  }

  .comparatif-sans,
  .comparatif-avec {
    grid-column: 1;
  }

  .comparatif-ligne summary::after {
    grid-column: 2;
    grid-row: 1 / span 2;
  }

  .comparatif-sans::before,
  .comparatif-avec::before {
    display: block;
    font-size: 0.72rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-bottom: 0.15rem;
  }

  .comparatif-sans::before {
    content: "Sans Caisse-Connect";
    color: #888;
  }

  .comparatif-avec::before {
    content: "Avec Caisse-Connect";
    color: #1a4b8c;
    opacity: 0.7;
  }

  .section-items {
    grid-template-columns: 1fr;
  }

  .demo-colonnes {
    grid-template-columns: 1fr;
  }

  .demo-cadre {
    padding: 1.5rem 1.25rem;
  }

  .tarifs-notes {
    grid-template-columns: 1fr;
  }

  .tarifs-cta .demo-btn {
    display: block;
    margin: 0.6rem auto;
    max-width: 320px;
  }

  .cta-paire .demo-btn {
    display: block;
    margin: 0.6rem auto;
    max-width: 320px;
  }

  .offre-liste {
    flex-direction: column;
    align-items: center;
    gap: 0.4rem;
  }

  .offre-liste .offre-saut {
    display: none;
  }

  .nav-toggle {
    display: flex;
  }

  .navbar nav {
    position: absolute;
    top: 56px;
    left: 0;
    right: 0;
    flex-direction: column;
    align-items: stretch;
    gap: 0;
    padding: 0.5rem 0;
    background: rgba(15, 45, 84, 0.98);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.25);
    display: none;
  }

  .navbar nav.open {
    display: flex;
  }

  .navbar nav a {
    padding: 0.9rem 2rem;
    font-size: 1rem;
    opacity: 1;
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
  }

  .navbar nav a:last-child {
    border-bottom: none;
  }

  .navbar nav a.active {
    background: rgba(236, 200, 90, 0.16);
    color: #f4d37c;
    border-radius: 0;
    padding: 0.9rem 2rem 0.9rem calc(2rem - 4px);
    border-left: 4px solid #ecc85a;
  }

  .footer {
    flex-direction: column;
    gap: 1rem;
    text-align: center;
  }
}
