/* Logiciels Lucidis inc. — site corporatif */
:root {
  --encre: #1f2a37;
  --sarcelle: #1a8f8a;
  --sarcelle-fonce: #146f6b;
  --sarcelle-claire: #3cc3b9;
  --ardoise: #5b6778;
  --brume: #9aa6b6;
  --nuit: #111a26;
  --fond: #ffffff;
  --fond-doux: #f4f7f8;
  --trait: #dfe5ea;
  --rayon: 14px;
  --max: 1120px;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; -webkit-tap-highlight-color: rgba(60,195,185,.25); }
body {
  margin: 0;
  font-family: "Inter", system-ui, -apple-system, "Segoe UI", sans-serif;
  color: var(--encre);
  background: var(--fond);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}
img { max-width: 100%; display: block; }
a { color: var(--sarcelle-fonce); }
a:hover { color: var(--encre); }
h1, h2, h3 { line-height: 1.2; margin: 0 0 .6em; letter-spacing: -0.015em; text-wrap: balance; }
h1 { font-size: clamp(2rem, 4.5vw, 3.2rem); font-weight: 700; }
h2 { font-size: clamp(1.5rem, 3vw, 2.1rem); font-weight: 700; }
h3 { font-size: 1.15rem; font-weight: 600; }
p { margin: 0 0 1em; }

.conteneur { width: 100%; max-width: var(--max); margin: 0 auto; padding: 0 24px; }
@media (max-width: 600px) { .conteneur { padding: 0 16px; } }

.saut { position: absolute; left: -9999px; }
.saut:focus { left: 16px; top: 16px; background: #fff; padding: 8px 12px; z-index: 100; }

/* En-tête */
.entete { position: sticky; top: 0; z-index: 50; background: rgba(17,26,38,.96); backdrop-filter: blur(8px); border-bottom: 1px solid #243244; }
.entete .nav a:not(.btn) { color: #d8e0e8; }
.entete .nav a:not(.btn):hover { color: var(--sarcelle-claire); }
.entete .btn-principal { background: var(--sarcelle-claire); color: var(--nuit) !important; }
.entete .btn-principal:hover { background: #fff; }
.entete .conteneur { display: flex; align-items: center; justify-content: space-between; gap: 16px; height: 72px; }
.entete .logo img { height: 34px; width: auto; }
.nav { display: flex; align-items: center; gap: 28px; }
.nav a { text-decoration: none; color: var(--encre); font-weight: 500; font-size: .95rem; }
.nav a:hover { color: var(--sarcelle-fonce); }
@media (max-width: 760px) { .nav { gap: 16px; } .nav a { font-size: .85rem; } }
@media (max-width: 420px) { .nav a[href$="approche"] { display: none; } }
@media (max-width: 600px) { .heros h1 br { display: none; } }

/* Boutons */
.btn { display: inline-flex; align-items: center; gap: 8px; padding: 11px 20px; border-radius: 10px; font-weight: 600; font-size: .95rem; text-decoration: none; border: 1.5px solid transparent; cursor: pointer; touch-action: manipulation; }
.btn-principal { background: var(--encre); color: #fff !important; }
.btn-principal:hover { background: var(--sarcelle-fonce); }
.btn-secondaire { background: transparent; color: var(--encre) !important; border-color: var(--trait); }
.btn-secondaire:hover { border-color: var(--encre); }
.btn svg { width: 16px; height: 16px; }

.btn-accent { background: var(--sarcelle-claire); color: var(--nuit) !important; }
.btn-accent:hover { background: #fff; }

/* Accueil */
.heros { padding: 80px 0 72px; background: radial-gradient(ellipse at 85% 30%, rgba(26,143,138,.28), transparent 55%), linear-gradient(160deg, var(--nuit) 0%, var(--encre) 100%); color: #fff; overflow: hidden; }
.heros-grille { display: grid; grid-template-columns: 1.3fr 1fr; gap: 48px; align-items: center; }
.heros .surtitre { display: inline-block; font-size: .8rem; font-weight: 600; letter-spacing: .12em; text-transform: uppercase; color: var(--sarcelle-claire); margin-bottom: 18px; }
.heros p.intro { font-size: 1.2rem; color: #c9d3de; max-width: 640px; }
.heros .actions { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 28px; }
.heros .btn-principal { background: var(--sarcelle-claire); color: var(--nuit) !important; }
.heros .btn-principal:hover { background: #fff; }
.heros .btn-secondaire { color: #fff !important; border-color: rgba(255,255,255,.35); }
.heros .btn-secondaire:hover { border-color: #fff; }
.motif { width: 100%; max-width: 340px; justify-self: center; }
.motif { overflow: visible; }
.m-encre { fill: #2c3b4d; }
.m-sarcelle { fill: #1a8f8a; }
.m-claire { fill: #3cc3b9; opacity: .55; }
.m-brume { fill: #9aa6b6; opacity: .35; }
.m-centre { fill: #3cc3b9; }
@media (max-width: 860px) { .heros-grille { grid-template-columns: 1fr; } .motif { display: none; } }

section { padding: 64px 0; }
section.teinte { background: #e4eaf0; }
section.doux { background: #d7ecea; }
section.fonce { background: var(--encre); color: #fff; }
section.fonce p { color: #c9d3de; }
section.fonce a:not(.btn) { color: var(--sarcelle-claire); }
section.fonce .contact dt { color: var(--brume); }
.titre-section { max-width: 680px; margin-bottom: 40px; }
.titre-section p { color: var(--ardoise); font-size: 1.05rem; }

/* Produits */
.carte-produit { max-width: 760px; background: #fff; border: 1px solid var(--trait); border-top: 5px solid var(--sarcelle); border-radius: var(--rayon); padding: 40px; box-shadow: 0 12px 32px rgba(31,42,55,.06); }
.carte-produit .logo-produit { height: 44px; width: auto; margin-bottom: 20px; }
.carte-produit ul { padding: 0; margin: 0 0 24px; list-style: none; }
.carte-produit li { padding-left: 28px; position: relative; margin-bottom: 10px; }
.carte-produit li::before { content: ""; position: absolute; left: 0; top: .5em; width: 12px; height: 12px; border-radius: 3px; background: var(--sarcelle); }
.carte-produit .actions { display: flex; flex-wrap: wrap; gap: 12px; }
@media (max-width: 860px) { .carte-produit { padding: 28px; } }

/* Grille de valeurs */
.grille { display: grid; grid-template-columns: repeat(3, 1fr); gap: 24px; }
.grille .bloc { background: #fff; border: 0; border-left: 5px solid var(--sarcelle); border-radius: var(--rayon); padding: 28px; }
.grille .bloc:nth-child(2) { border-left-color: var(--encre); }
.grille .bloc:nth-child(3) { border-left-color: var(--sarcelle-claire); }
.grille .bloc p { color: var(--ardoise); margin: 0; }
.icone { width: 40px; height: 40px; border-radius: 10px; background: #e3f4f3; color: var(--sarcelle-fonce); display: grid; place-items: center; margin-bottom: 16px; }
.icone svg { width: 22px; height: 22px; }
@media (max-width: 860px) { .grille { grid-template-columns: 1fr; } }

/* Contact */
.contact { display: grid; grid-template-columns: 1fr 1fr; gap: 40px; align-items: start; }
.contact dl { margin: 0; }
.contact dt { font-size: .8rem; text-transform: uppercase; letter-spacing: .1em; color: var(--ardoise); font-weight: 600; margin-top: 18px; }
.contact dd { margin: 4px 0 0; font-size: 1.05rem; }
@media (max-width: 760px) { .contact { grid-template-columns: 1fr; } }


/* Pages de texte */
body:has(.texte) { background: #e4eaf0; }
.texte { max-width: 760px; margin: 48px auto 64px; padding: 40px 48px; background: #fff; border-radius: var(--rayon); border-top: 5px solid var(--sarcelle); }
@media (max-width: 600px) { .texte { padding: 28px 20px; margin: 24px 16px 40px; width: auto; } }
.texte h2 { font-size: 1.35rem; margin-top: 2em; }
.texte .maj { color: var(--ardoise); font-size: .9rem; }

/* Pied de page */
.pied { background: var(--nuit); color: var(--brume); padding: 48px 0 32px; font-size: .92rem; }
.pied a { color: #d8e0e8; text-decoration: none; }
.pied a:hover { color: var(--sarcelle-claire); }
.pied .haut { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 32px; margin-bottom: 32px; }
.pied .logo img { height: 32px; width: auto; }
.pied ul { list-style: none; padding: 0; margin: 0; display: flex; flex-wrap: wrap; gap: 24px; }
.pied .bas { border-top: 1px solid #243244; padding-top: 20px; display: flex; flex-wrap: wrap; justify-content: space-between; gap: 12px; }

/* ---------- Dynamisme (avec site.js) ---------- */
html { scroll-padding-top: 72px; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }
.progres { position: absolute; left: 0; right: 0; bottom: -1px; height: 3px; background: var(--sarcelle-claire); transform: scaleX(0); transform-origin: left; }
.entete .nav a.actif:not(.btn) { color: var(--sarcelle-claire); }

/* Démonstration interactive de la fiche Donafisc */
.scenes[hidden] { display: none; }
.carte-produit.interactive { max-width: none; display: grid; grid-template-columns: 1.15fr 1fr; gap: 40px; align-items: center; }
.interactive li { padding: 0; margin-bottom: 4px; }
.interactive li::before { top: 1.15em; left: 12px; pointer-events: none; }
.point { width: 100%; padding: 10px 12px 10px 38px; border: 0; border-radius: 8px; background: transparent; font: inherit; color: inherit; text-align: left; cursor: pointer; touch-action: manipulation; }
.point:hover { background: #eef5f5; }
.point[aria-pressed="true"] { background: #d7ecea; }
.point:focus-visible { outline: 2px solid var(--sarcelle-fonce); outline-offset: 2px; }
.scenes { position: relative; aspect-ratio: 4 / 3; border-radius: var(--rayon); background: linear-gradient(150deg, var(--nuit), var(--encre)); overflow: hidden; }
.scene { position: absolute; inset: 0; width: 100%; height: 100%; padding: 6%; opacity: 0; }
.scene.active { opacity: 1; }
.s-fond { fill: #2c3b4d; }
.s-tete, .s-noyau { fill: var(--sarcelle); }
.s-suite rect { fill: var(--sarcelle-claire); }
.s-trace, .s-ligne, .s-liens path { fill: none; stroke: var(--sarcelle-claire); stroke-width: 12; stroke-linecap: round; stroke-linejoin: round; }
.s-ligne, .s-liens path { stroke: #4a5b70; stroke-width: 6; }
@media (max-width: 860px) { .carte-produit.interactive { grid-template-columns: minmax(0, 1fr); gap: 28px; } }

@media screen and (prefers-reduced-motion: no-preference) {
  .heros-grille > div > * { animation: monter .7s cubic-bezier(.2,.7,.2,1) backwards; }
  .heros h1 { animation-delay: .08s; }
  .heros .intro { animation-delay: .16s; }
  .heros .actions { animation-delay: .24s; }
  .motif g { transition: transform .5s ease-out; }
  .motif path { animation: assembler 1.1s cubic-bezier(.2,.8,.2,1) backwards; }
  .m-encre { --x: -70px; --y: -30px; }
  .m-sarcelle { --x: 70px; --y: 30px; }
  .motif .m-claire { --x: -40px; --y: 60px; animation-delay: .25s; }
  .motif .m-brume { --x: 40px; --y: -60px; animation-delay: .25s; }
  .m-centre { transform-box: fill-box; transform-origin: center; animation: assembler .5s .8s backwards, pulser 1.1s 1.4s 2; }

  .btn { position: relative; transition: transform .2s; }
  .btn::after { content: ""; position: absolute; inset: -1.5px; border-radius: inherit; box-shadow: 0 8px 20px rgba(17,26,38,.22); opacity: 0; transition: opacity .2s; pointer-events: none; }
  .btn:hover::after { opacity: 1; }
  .btn:hover { transform: translateY(-2px); }
  .btn:active { transform: none; }
  .btn:active::after { opacity: 0; }
  .grille .bloc { position: relative; transition: transform .25s; }
  .grille .bloc::after { content: ""; position: absolute; inset: 0 0 0 -5px; border-radius: inherit; box-shadow: 0 14px 30px rgba(31,42,55,.13); opacity: 0; transition: opacity .25s; pointer-events: none; }
  .grille .bloc:hover::after { opacity: 1; }
  .grille .bloc:hover { transform: translateY(-5px); }
  .bloc:hover .icone { background: var(--sarcelle); color: #fff; }

  .a-reveler { opacity: 0; }
  .revele { animation: apparaitre .7s cubic-bezier(.2,.7,.2,1) var(--delai, 0s) backwards; }

  .scene { transition: opacity .25s; }
  .active .s-suite rect { transform-box: fill-box; transform-origin: left center; animation: etirer .4s backwards; }
  .active .s-suite rect:nth-child(2) { animation-delay: .12s; }
  .active .s-suite rect:nth-child(3) { animation-delay: .24s; }
  .active .s-suite rect:nth-child(4) { animation-delay: .36s; }
  .active .s-trace, .active .s-liens path { stroke-dasharray: 1; animation: tracer .7s .1s backwards; }
  .active .s-envoi { animation: envoyer .7s cubic-bezier(.2,.8,.2,1); }
}
@keyframes monter { from { opacity: 0; transform: translateY(22px); } }
@keyframes assembler { from { opacity: 0; transform: translate(var(--x, 0px), var(--y, 0px)); } }
@keyframes pulser { 50% { transform: scale(1.4); } }
@keyframes apparaitre { from { opacity: 0; translate: 0 28px; } }
@keyframes etirer { from { opacity: 0; transform: scaleX(0); } }
@keyframes tracer { from { stroke-dashoffset: 1; } to { stroke-dashoffset: 0; } }
@keyframes envoyer { from { opacity: 0; transform: translateX(-90px); } }
