/* SeSame ERP – site de présentation et démo (version Lite). Charte Indigo « Clarté ». */
:root {
  --brand: #2f3a8f; --brand-600: #3743a8; --brand-700: #252f78; --brand-900: #161c4d; --brand-50: #eef0fa; --brand-100: #dde1f5;
  --accent: #e0a526; --ink: #1a1f2e; --ink-500: #4d5566; --ink-300: #9aa1b0;
  --line: #e3e6ef; --surface: #ffffff; --surface-2: #f6f7fb; --ok: #1f7a4d; --warn: #9a5b00; --err: #b42318;
  --radius: 12px; --shadow: 0 1px 2px rgba(20, 26, 50, .06), 0 8px 24px rgba(20, 26, 50, .08);
  --shadow-lg: 0 2px 6px rgba(20, 26, 50, .08), 0 24px 60px rgba(20, 26, 50, .18);
}
* { box-sizing: border-box }
html { scroll-behavior: smooth; scroll-padding-top: 72px }
body { margin: 0; font-family: "Inter", "Segoe UI", system-ui, -apple-system, Arial, sans-serif; color: var(--ink); background: var(--surface); font-size: 16px; line-height: 1.6; -webkit-font-smoothing: antialiased }
img { max-width: 100%; height: auto; display: block }
a { color: var(--brand-600) }
.wrap { max-width: 1200px; margin: 0 auto; padding: 0 24px }
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; height: 44px; padding: 0 20px; border-radius: 8px; font-weight: 600; font-size: 15px; text-decoration: none; border: 1px solid transparent; cursor: pointer; font-family: inherit; transition: background .15s, border-color .15s, transform .15s }
.btn:active { transform: translateY(1px) }
.btn-primary { background: var(--brand); color: #fff }
.btn-primary:hover { background: var(--brand-600) }
.btn-secondary { background: #fff; color: var(--ink); border-color: var(--line) }
.btn-secondary:hover { border-color: var(--ink-300) }
.btn-light { background: #fff; color: var(--brand-700) }
.btn-light:hover { background: var(--brand-50) }
.btn-ghost { background: rgba(255, 255, 255, .08); color: #fff; border-color: rgba(255, 255, 255, .28) }
.btn-ghost:hover { background: rgba(255, 255, 255, .16) }
.btn-sm { height: 34px; padding: 0 14px; font-size: 14px }

/* En-tête */
#site-header { position: sticky; top: 0; z-index: 30; background: rgba(255, 255, 255, .92); backdrop-filter: saturate(1.4) blur(10px); border-bottom: 1px solid transparent; transition: border-color .2s, box-shadow .2s }
#site-header.scrolled { border-color: var(--line); box-shadow: 0 2px 12px rgba(20, 26, 50, .06) }
#site-header .wrap { display: flex; align-items: center; gap: 28px; height: 68px }
#site-header .brand img { height: 34px; width: auto }
#site-nav { display: flex; gap: 24px; margin-left: auto }
#site-nav a { color: var(--ink-500); text-decoration: none; font-size: 15px; font-weight: 500; transition: color .15s }
#site-nav a:hover { color: var(--brand) }
@media (max-width: 900px) { #site-nav { display: none } #site-header .btn { margin-left: auto } }
#site-header .short { display: none }
@media (max-width: 560px) { #site-header .long { display: none } #site-header .short { display: inline } #site-header .brand img { height: 28px } #site-header .wrap { height: 60px } }

/* Typographie */
.kicker { display: inline-block; color: var(--brand); font-weight: 700; font-size: 13px; letter-spacing: .08em; text-transform: uppercase; margin: 0 0 12px }
h1 { font-size: 52px; line-height: 1.08; margin: 0 0 20px; letter-spacing: -.025em; font-weight: 800 }
h2 { font-size: 38px; line-height: 1.15; margin: 0 0 14px; letter-spacing: -.02em; font-weight: 800 }
h3 { font-size: 19px; line-height: 1.3; margin: 0 0 8px; font-weight: 700 }
.lead { font-size: 18px; color: var(--ink-500); max-width: 720px; margin: 0 0 28px }
.center { text-align: center }
.center .lead { margin-left: auto; margin-right: auto }
@media (max-width: 640px) { h1 { font-size: 34px } h2 { font-size: 27px } .lead { font-size: 16.5px } }

section.block { padding: 96px 0 }
section.block.alt { background: var(--surface-2) }
@media (max-width: 640px) { section.block { padding: 60px 0 } }

/* Cadre navigateur autour des captures */
.frame { background: #fff; border-radius: var(--radius); box-shadow: var(--shadow-lg); overflow: hidden; border: 1px solid rgba(20, 26, 50, .08) }
.frame-bar { display: flex; align-items: center; gap: 6px; height: 34px; padding: 0 14px; background: #f1f3f8; border-bottom: 1px solid var(--line) }
.frame-bar i { width: 11px; height: 11px; border-radius: 50%; background: #d5d9e3; display: block }
.frame-bar span { margin-left: 12px; flex: 1; max-width: 340px; height: 20px; border-radius: 6px; background: #fff; border: 1px solid var(--line); font-size: 11.5px; color: var(--ink-300); line-height: 18px; padding: 0 10px; overflow: hidden; white-space: nowrap; text-overflow: ellipsis }
.frame img { width: 100%; cursor: zoom-in }

/* Héros */
#hero { position: relative; overflow: hidden; padding: 88px 0 0; color: #fff;
  background: radial-gradient(1200px 500px at 85% -10%, rgba(120, 136, 255, .35), transparent 60%), radial-gradient(900px 500px at -10% 110%, rgba(224, 165, 38, .16), transparent 60%), linear-gradient(160deg, var(--brand-900), var(--brand-700) 55%, var(--brand)) }
#hero::before { content: ""; position: absolute; inset: 0; background-image: linear-gradient(rgba(255, 255, 255, .05) 1px, transparent 1px), linear-gradient(90deg, rgba(255, 255, 255, .05) 1px, transparent 1px); background-size: 48px 48px; mask-image: linear-gradient(to bottom, #000 30%, transparent 85%); pointer-events: none }
#hero .wrap { position: relative }
#hero .hero-text { max-width: 820px; margin: 0 auto; text-align: center }
#hero h1 { color: #fff }
#hero h1 em { font-style: normal; color: #c9d0ff }
#hero .lead { color: rgba(255, 255, 255, .82); margin: 0 auto 32px }
#hero .actions { display: flex; flex-wrap: wrap; gap: 12px; justify-content: center }
#hero .note { font-size: 14px; color: rgba(255, 255, 255, .7); margin: 18px 0 0 }
#hero .hero-shot { position: relative; margin: 56px auto -2px; max-width: 1120px }
#hero .hero-shot .frame { border-radius: 14px 14px 0 0; border-bottom: 0 }
.float-card { position: absolute; z-index: 2; display: flex; align-items: center; gap: 12px; background: #fff; color: var(--ink); border-radius: 12px; padding: 12px 16px; box-shadow: var(--shadow-lg); font-size: 14px; line-height: 1.35 }
.float-card .ic { width: 38px; height: 38px; border-radius: 10px; display: grid; place-items: center; font-size: 17px; flex: none }
.float-card small { display: block; color: var(--ink-500); font-size: 12.5px }
.float-card.fc-1 { left: -28px; top: 26%; }
.float-card.fc-1 .ic { background: #e7f5ee; color: var(--ok) }
.float-card.fc-2 { right: -28px; top: 52% }
.float-card.fc-2 .ic { background: var(--brand-50); color: var(--brand) }
@media (max-width: 1200px) { .float-card.fc-1 { left: 12px } .float-card.fc-2 { right: 12px } }
@media (max-width: 760px) { .float-card { display: none } #hero { padding-top: 56px } #hero .hero-shot { margin-top: 36px } }

/* Mot changeant du titre */
.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0 }
.rotator { display: block }
.rotator em { display: inline-block; position: relative; white-space: nowrap; font-style: normal; color: #c9d0ff; transition: opacity .35s ease, transform .35s ease }
.rotator em.out { opacity: 0; transform: translateY(-14px) }
.rotator em.in-start { opacity: 0; transform: translateY(14px) }
#hero h1 .rotator em::after { content: ""; position: absolute; left: 0; right: 0; bottom: -2px; height: 4px; border-radius: 2px; background: linear-gradient(90deg, var(--accent), rgba(224, 165, 38, 0)); opacity: .9 }

@media (max-width: 380px) { #hero h1 { font-size: 28px } }

/* Carrousel d'écrans du haut de page */
#hero-carousel .frame { position: relative }
.hc-track { position: relative; aspect-ratio: 1800 / 1095; background: #eef0f6; overflow: hidden }
.hc-slide { position: absolute; inset: 0; opacity: 0; transform: scale(1.025); transition: opacity .8s ease, transform 6s ease; pointer-events: none }
.hc-slide.active { opacity: 1; transform: scale(1); pointer-events: auto; z-index: 1 }
.hc-slide img { width: 100%; height: 100%; object-fit: cover; object-position: top left }
.hc-arrow { position: absolute; top: 50%; z-index: 3; width: 46px; height: 46px; margin-top: -23px; border-radius: 50%; border: 0; background: rgba(255, 255, 255, .94); color: var(--brand-700); box-shadow: var(--shadow); cursor: pointer; font-size: 16px; opacity: 0; transition: opacity .2s, transform .2s }
.hc-prev { left: 16px } .hc-next { right: 16px }
#hero-carousel:hover .hc-arrow, .hc-arrow:focus-visible { opacity: 1 }
.hc-arrow:hover { transform: scale(1.06) }
.hc-nav { position: relative; z-index: 2; display: flex; justify-content: center; flex-wrap: wrap; gap: 8px; padding: 18px 12px 22px; background: #fff; border-left: 1px solid rgba(20, 26, 50, .08); border-right: 1px solid rgba(20, 26, 50, .08) }
.hc-nav button { position: relative; overflow: hidden; display: inline-flex; align-items: center; gap: 8px; height: 38px; padding: 0 14px; border-radius: 8px; border: 1px solid var(--line); background: #fff; color: var(--ink-500); font: inherit; font-size: 14px; font-weight: 500; cursor: pointer; transition: color .15s, border-color .15s, background .15s }
.hc-nav button:hover { color: var(--brand); border-color: var(--brand-100) }
.hc-nav button[aria-selected="true"] { color: var(--brand-700); border-color: var(--brand-100); background: var(--brand-50); font-weight: 600 }
.hc-nav button .bar { position: absolute; left: 0; bottom: 0; height: 3px; width: 0; background: var(--brand) }
.hc-nav button[aria-selected="true"] .bar { animation: hc-progress var(--hc-delay, 5.5s) linear forwards }
#hero-carousel.paused .hc-nav button[aria-selected="true"] .bar { animation-play-state: paused }
@keyframes hc-progress { from { width: 0 } to { width: 100% } }
.float-card { transition: opacity .35s ease, transform .35s ease }
.float-card.swap { opacity: 0; transform: translateY(8px) }
@media (max-width: 760px) { .hc-nav button span { display: none } .hc-nav button { padding: 0 12px } .hc-arrow { opacity: 1; width: 38px; height: 38px; margin-top: -19px } }
@media (prefers-reduced-motion: reduce) { .hc-slide { transition: opacity .2s; transform: none !important } .hc-nav button .bar { animation: none !important } .rotator em { transition: none } }

/* Bandeau d'atouts */
#atouts { border-bottom: 1px solid var(--line); background: #fff }
#atouts ul { list-style: none; margin: 0; padding: 28px 0; display: grid; grid-template-columns: repeat(4, 1fr); gap: 24px }
#atouts li { display: flex; gap: 14px; align-items: flex-start }
#atouts li i { width: 42px; height: 42px; border-radius: 10px; background: var(--brand-50); color: var(--brand); display: grid; place-items: center; font-size: 18px; flex: none }
#atouts b { display: block; font-size: 15px }
#atouts span { font-size: 13.5px; color: var(--ink-500); line-height: 1.45 }
@media (max-width: 960px) { #atouts ul { grid-template-columns: repeat(2, 1fr) } }
@media (max-width: 560px) { #atouts ul { grid-template-columns: 1fr } }

/* Grilles et cartes */
.grid { display: grid; gap: 20px }
.grid-3 { grid-template-columns: repeat(3, 1fr) }
.grid-4 { grid-template-columns: repeat(4, 1fr) }
@media (max-width: 960px) { .grid-3, .grid-4 { grid-template-columns: repeat(2, 1fr) } }
@media (max-width: 600px) { .grid-3, .grid-4 { grid-template-columns: 1fr } }
.card { background: #fff; border: 1px solid var(--line); border-radius: var(--radius); padding: 24px }
.card p { margin: 0; color: var(--ink-500); font-size: 15px }
.card .ico { width: 44px; height: 44px; border-radius: 10px; background: var(--brand-50); color: var(--brand); display: grid; place-items: center; margin-bottom: 16px; font-size: 19px }
.card ul { margin: 8px 0 0; padding-left: 18px; color: var(--ink-500); font-size: 15px }
.feature-card { transition: transform .2s, box-shadow .2s, border-color .2s }
.feature-card:hover { transform: translateY(-3px); box-shadow: var(--shadow); border-color: var(--brand-100) }

/* Types d'organisation */
.org-tabs { display: flex; flex-wrap: wrap; gap: 8px; margin: 28px 0 20px }
.org-tabs button { height: 40px; padding: 0 16px; border-radius: 20px; border: 1px solid var(--line); background: #fff; font: inherit; font-size: 14.5px; cursor: pointer; color: var(--ink-500); transition: all .15s }
.org-tabs button:hover { border-color: var(--brand-100); color: var(--brand) }
.org-tabs button[aria-selected="true"] { background: var(--brand); border-color: var(--brand); color: #fff; box-shadow: 0 4px 12px rgba(47, 58, 143, .25) }
#org-panel { display: grid; grid-template-columns: 1.3fr 1fr; gap: 20px }
#org-panel .mods { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 8px }
.chip { display: inline-block; padding: 4px 11px; border-radius: 14px; font-size: 13px; border: 1px solid var(--line); background: #fff }
.chip.on { border-color: #c4cbee; background: var(--brand-50); color: var(--brand) }
.chip.off { color: var(--ink-300); text-decoration: line-through }
@media (max-width: 860px) { #org-panel { grid-template-columns: 1fr } }

/* Vitrines (texte + capture en alternance) */
.showcase { display: grid; grid-template-columns: 1fr 1.35fr; gap: 64px; align-items: center }
.showcase + .showcase { margin-top: 112px }
.showcase.reverse > .showcase-text { order: 2 }
.showcase-text .tag { display: inline-flex; align-items: center; gap: 8px; color: var(--brand); background: var(--brand-50); border-radius: 999px; padding: 5px 12px; font-size: 13px; font-weight: 700; margin-bottom: 16px }
.showcase-text h3 { font-size: 28px; line-height: 1.2; letter-spacing: -.015em; margin-bottom: 14px }
.showcase-text p { color: var(--ink-500); margin: 0 0 18px; font-size: 16.5px }
.checks { list-style: none; padding: 0; margin: 0; display: grid; gap: 10px }
.checks li { position: relative; padding-left: 30px; font-size: 15.5px }
.checks li::before { content: "\f00c"; font-family: "Font Awesome 6 Free"; font-weight: 900; position: absolute; left: 0; top: 2px; width: 20px; height: 20px; border-radius: 50%; background: #e7f5ee; color: var(--ok); font-size: 10.5px; display: grid; place-items: center }
.showcase-media { position: relative }
.showcase-media .frame + .frame { position: absolute; width: 58%; right: -24px; bottom: -48px }
@media (max-width: 960px) {
  .showcase { grid-template-columns: 1fr; gap: 32px }
  .showcase.reverse > .showcase-text { order: 0 }
  .showcase + .showcase { margin-top: 72px }
  .showcase-media .frame + .frame { position: static; width: 100%; margin-top: 16px }
}

/* Galerie à onglets */
.gallery-tabs { display: flex; flex-wrap: wrap; justify-content: center; gap: 8px; margin: 32px 0 28px }
.gallery-tabs button { display: inline-flex; align-items: center; gap: 8px; height: 40px; padding: 0 16px; border-radius: 8px; border: 1px solid var(--line); background: #fff; font: inherit; font-size: 14.5px; font-weight: 500; color: var(--ink-500); cursor: pointer; transition: all .15s }
.gallery-tabs button:hover { color: var(--brand); border-color: var(--brand-100) }
.gallery-tabs button[aria-selected="true"] { background: var(--brand); border-color: var(--brand); color: #fff }
.gallery-stage { max-width: 1080px; margin: 0 auto }
.gallery-stage img { transition: opacity .25s }
.gallery-stage figcaption { text-align: center; color: var(--ink-500); font-size: 15px; margin-top: 18px }
.gallery-stage figure { margin: 0 }
.zoom-hint { text-align: center; font-size: 13px; color: var(--ink-300); margin-top: 6px }

/* Agrandissement d'image */
#zoom { border: 0; padding: 0; background: transparent; max-width: 96vw; max-height: 94vh; overflow: visible }
#zoom::backdrop { background: rgba(12, 16, 40, .82); backdrop-filter: blur(3px) }
#zoom img { max-width: 96vw; max-height: 88vh; width: auto; border-radius: 10px; box-shadow: var(--shadow-lg); cursor: zoom-out; background: #fff }
#zoom p { color: #fff; text-align: center; margin: 12px 0 0; font-size: 14.5px }
#zoom button { position: absolute; top: -14px; right: -14px; width: 38px; height: 38px; border-radius: 50%; border: 0; background: #fff; color: var(--ink); font-size: 16px; cursor: pointer; box-shadow: var(--shadow) }

/* Démo */
#demo-app { box-shadow: var(--shadow); border-radius: var(--radius) }

/* Éditions */
.ed { display: flex; flex-direction: column; padding: 28px }
.ed h3 { font-size: 22px }
.ed .price { font-size: 14.5px; color: var(--ink-500); margin: 2px 0 16px }
.ed ul { flex: 1; list-style: none; padding: 0; display: grid; gap: 9px; align-content: start }
.ed li { position: relative; padding-left: 26px; color: var(--ink) }
.ed li::before { content: "\f00c"; font-family: "Font Awesome 6 Free"; font-weight: 900; position: absolute; left: 0; color: var(--brand); font-size: 13px; top: 2px }
.ed.featured { border: 2px solid var(--brand); box-shadow: 0 16px 40px rgba(47, 58, 143, .16); position: relative }
.ed.featured .badge { position: absolute; top: -13px; left: 28px; background: var(--brand); color: #fff; font-size: 12px; font-weight: 700; border-radius: 999px; padding: 4px 12px; letter-spacing: .02em }
.ed .btn { width: 100%; margin-top: 22px }

/* Appel à l'action */
#cta { background: linear-gradient(135deg, var(--brand-900), var(--brand) 70%); color: #fff; padding: 72px 0 }
#cta .wrap { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 28px }
#cta h2 { color: #fff; margin: 0 0 8px; font-size: 32px }
#cta p { margin: 0; color: rgba(255, 255, 255, .8); font-size: 17px }
#cta .actions { display: flex; gap: 12px; flex-wrap: wrap }

/* Contact */
#contact .contact-grid { display: grid; grid-template-columns: 1.15fr 1fr; gap: 48px; align-items: start }
#contact form { display: grid; gap: 14px; padding: 28px; box-shadow: var(--shadow) }
#contact label { font-size: 14px; font-weight: 600; color: var(--ink) }
#contact input, #contact select, #contact textarea { width: 100%; margin-top: 6px; height: 44px; border: 1px solid var(--line); border-radius: 8px; padding: 0 12px; font: inherit; font-weight: 400; background: #fff; transition: border-color .15s, box-shadow .15s }
#contact textarea { height: auto; padding: 10px 12px; resize: vertical }
#contact input:focus, #contact select:focus, #contact textarea:focus { outline: 0; border-color: var(--brand); box-shadow: 0 0 0 3px var(--brand-100) }
#contact .form-note { font-size: 13px; color: var(--ink-500); margin: 0 }
.company-card { padding: 28px; background: var(--surface-2); border: 1px solid var(--line); border-radius: var(--radius) }
.company-card img { height: 40px; width: auto; margin-bottom: 16px }
#contact dl { display: grid; grid-template-columns: 110px 1fr; gap: 10px 14px; margin: 18px 0 0; font-size: 15px }
#contact dt { color: var(--ink-500) }
#contact dd { margin: 0; font-weight: 500; overflow-wrap: anywhere; min-width: 0 }
#contact .contact-grid > * { min-width: 0 }
@media (max-width: 860px) { #contact .contact-grid { grid-template-columns: 1fr } }
@media (max-width: 480px) { #contact dl { grid-template-columns: 1fr; gap: 2px } #contact dd { margin-bottom: 8px } #contact form, .company-card { padding: 20px } }

/* Pied de page */
#site-footer { background: var(--brand-900); color: rgba(255, 255, 255, .72); padding: 48px 0 32px; font-size: 14px }
#site-footer .foot { display: grid; grid-template-columns: 1.4fr 1fr 1fr; gap: 32px; padding-bottom: 28px; border-bottom: 1px solid rgba(255, 255, 255, .12) }
#site-footer .foot-logo { display: inline-block; background: #fff; border-radius: 10px; padding: 8px 12px; margin-bottom: 14px }
#site-footer .foot-logo img { height: 30px; width: auto }
#site-footer h4 { color: #fff; font-size: 14px; margin: 4px 0 12px }
#site-footer ul { list-style: none; margin: 0; padding: 0; display: grid; gap: 8px }
#site-footer a { color: rgba(255, 255, 255, .78); text-decoration: none }
#site-footer a:hover { color: #fff }
#site-footer .legal { display: flex; flex-wrap: wrap; gap: 12px; justify-content: space-between; padding-top: 22px; font-size: 13px }
@media (max-width: 760px) { #site-footer .foot { grid-template-columns: 1fr } }

/* Apparition au défilement */
.js .reveal { opacity: 0; transform: translateY(18px); transition: opacity .5s ease, transform .5s ease }
.js .reveal.in { opacity: 1; transform: none }
@media (prefers-reduced-motion: reduce) { .js .reveal { opacity: 1; transform: none; transition: none } html { scroll-behavior: auto } }

/* Démo : les colonnes peuvent se réduire sous la largeur de leur contenu (tableaux défilants) */
#demo-app .demo-grid > *, #demo-exp > * { min-width: 0 }
@media (max-width: 760px) {
  #demo-app .demo-grid { grid-template-columns: 1fr !important }
  #demo-exp { grid-template-columns: 1fr !important }
}
#demo-add { min-width: 0 }
