/* P2AI — Page d'accueil (même langage visuel que parcours / chaudière) */
:root {
  --bg: #0b1220;
  --bg2: #0e1829;
  --blue: #00aeef;
  --green: #8dc63f;
  --amber: #ffb020;
  --text: #e6edf6;
  --muted: #9fb0c6;
  --card: rgba(13, 24, 42, 0.82);
  --line: rgba(0, 174, 239, 0.28);
  --radius: 16px;
  --wrap: 1160px;
}
* { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: 84px; }
@media (max-width: 920px) { html { scroll-padding-top: 130px; } }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }
body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: Inter, system-ui, -apple-system, 'Segoe UI', Roboto, sans-serif;
  font-size: 16px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}
a { color: inherit; }
img, svg { display: block; }
.hm-wrap { width: min(var(--wrap), 100% - 2.5rem); margin: 0 auto; }
.hm-skip { position: absolute; left: -9999px; top: 0; z-index: 100; background: var(--green); color: #0b1220; padding: .5rem 1rem; border-radius: 0 0 8px 0; font-weight: 700; }
.hm-skip:focus { left: 0; }
:focus-visible { outline: 2px solid var(--blue); outline-offset: 3px; border-radius: 6px; }

/* ---------- En-tête ---------- */
.hm-header {
  position: sticky; top: 0; z-index: 50;
  background: rgba(11, 18, 32, .72);
  backdrop-filter: blur(12px); -webkit-backdrop-filter: blur(12px);
  border-bottom: 1px solid rgba(255, 255, 255, .06);
  transition: background .25s ease, border-color .25s ease;
}
.hm-header-in { width: min(1240px, 100% - 2rem); margin: 0 auto; display: flex; align-items: center; justify-content: space-between; gap: 1rem; min-height: 72px; }
.hm-brand { display: flex; align-items: center; gap: .7rem; text-decoration: none; color: var(--green); flex: 0 0 auto; }
.hm-brand img { height: 52px; width: auto; }
.hm-brand-text { display: flex; flex-direction: column; font-family: Manrope, Inter, sans-serif; font-weight: 700; line-height: .95; letter-spacing: -.02em; }
.hm-brand-text span:first-child { font-size: 24px; }
.hm-brand-text span:last-child { font-size: 17px; }
.hm-brand:hover .hm-brand-text { color: #a3e635; }
.hm-nav ul { list-style: none; margin: 0; padding: 0; display: flex; align-items: center; gap: .25rem; }
.hm-nav a {
  display: block; text-decoration: none; font-size: .9rem; font-weight: 600; color: var(--text);
  padding: .5rem .8rem; border-radius: 999px; transition: color .2s, background .2s, border-color .2s;
}
.hm-nav a:hover { color: var(--blue); background: rgba(0, 174, 239, .08); }
.hm-nav a[aria-current="page"] { color: var(--green); }
.hm-nav a.hm-nav-cta { border: 1px solid rgba(141, 198, 63, .55); color: var(--green); margin-left: .35rem; }
.hm-nav a.hm-nav-cta:hover { background: var(--green); color: #0b1220; }

/* ---------- Héros ---------- */
.hm-hero { position: relative; padding: clamp(1.8rem, 5vh, 3.4rem) 0 clamp(1.6rem, 4vh, 2.4rem); overflow: hidden; text-align: center; }
.hm-hero-glow {
  position: absolute; inset: -20% -10% auto; height: 140%; pointer-events: none; z-index: -1;
  background:
    radial-gradient(40% 50% at 30% 20%, rgba(0, 174, 239, .16), transparent 70%),
    radial-gradient(35% 45% at 72% 30%, rgba(141, 198, 63, .12), transparent 70%);
}
.hm-hero::after { /* trame de grille discrète, comme le sol des scènes 3D */
  content: ''; position: absolute; inset: 0; z-index: -1; pointer-events: none; opacity: .5;
  background-image: linear-gradient(rgba(0,174,239,.06) 1px, transparent 1px), linear-gradient(90deg, rgba(0,174,239,.06) 1px, transparent 1px);
  background-size: 48px 48px;
  -webkit-mask-image: radial-gradient(ellipse at 50% 30%, #000 20%, transparent 70%);
  mask-image: radial-gradient(ellipse at 50% 30%, #000 20%, transparent 70%);
}
.hm-eyebrow { margin: 0 0 .7rem; font-size: .78rem; font-weight: 700; letter-spacing: .16em; text-transform: uppercase; color: var(--green); }
.hm-hero h1 {
  margin: 0; font-family: Manrope, Inter, sans-serif; font-weight: 800; letter-spacing: -.035em;
  font-size: clamp(2.4rem, 6vw, 4.3rem); line-height: 1.02; color: #fff;
}
.hm-hero h1 span { color: var(--blue); }
.hm-tagline { margin: .8rem auto 0; font-family: Manrope, Inter, sans-serif; font-weight: 700; font-size: clamp(1.05rem, 2.2vw, 1.45rem); color: var(--text); letter-spacing: -.01em; }
.hm-lead { margin: .6rem auto 0; max-width: 46rem; color: var(--muted); font-size: 1rem; }
.hm-choose { margin: 1.3rem 0 0; display: inline-flex; align-items: center; gap: .6rem; font-weight: 600; font-size: .95rem; color: var(--text); padding: .45rem 1rem; border-radius: 999px; border: 1px solid var(--line); background: rgba(11, 20, 36, .6); }
.hm-dot { width: 8px; height: 8px; border-radius: 50%; background: var(--green); box-shadow: 0 0 10px var(--green); animation: hm-pulse 2s ease-in-out infinite; }
@keyframes hm-pulse { 50% { opacity: .35; } }
@media (prefers-reduced-motion: reduce) { .hm-dot { animation: none; } }

/* ---------- Cartes démonstration ---------- */
.hm-demos { padding: 0 0 clamp(3rem, 8vh, 5rem); }
.hm-cards { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: clamp(1rem, 2.5vw, 1.75rem); }
.hm-card {
  --accent: var(--blue);
  position: relative; display: flex; flex-direction: column; text-decoration: none; color: inherit;
  border-radius: var(--radius); overflow: hidden;
  background: linear-gradient(170deg, rgba(16, 29, 50, .92), rgba(11, 20, 36, .92));
  border: 1px solid rgba(0, 174, 239, .22);
  box-shadow: 0 10px 34px rgba(0, 0, 0, .35);
  transition: transform .35s cubic-bezier(.2,.7,.2,1), border-color .3s, box-shadow .35s;
}
.hm-card--warm { --accent: var(--amber); border-color: rgba(255, 176, 32, .2); }
.hm-card::before { /* liseré coloré en haut, façon cartes du parcours */
  content: ''; position: absolute; left: 0; right: 0; top: 0; height: 3px; z-index: 2;
  background: linear-gradient(90deg, var(--green), var(--accent));
}
.hm-card:hover, .hm-card:focus-visible { transform: translateY(-4px); border-color: color-mix(in srgb, var(--accent) 70%, transparent); box-shadow: 0 18px 48px rgba(0, 0, 0, .45), 0 0 36px color-mix(in srgb, var(--accent) 18%, transparent); }
@media (prefers-reduced-motion: reduce) { .hm-card, .hm-card:hover, .hm-preview img, .hm-card:hover .hm-preview img { transition: none; transform: none; } }
.hm-preview { position: relative; aspect-ratio: 16 / 10; background: #0d1626; overflow: hidden; }
.hm-preview img { width: 100%; height: 100%; object-fit: cover; transform: scale(1.001); transition: transform .6s cubic-bezier(.2,.7,.2,1), filter .4s; filter: saturate(.95); }
.hm-card:hover .hm-preview img, .hm-card:focus-visible .hm-preview img { transform: scale(1.045); filter: saturate(1.08) brightness(1.05); }
.hm-preview::after { /* fondu bas vers le corps de carte */
  content: ''; position: absolute; inset: auto 0 0; height: 30%; pointer-events: none;
  background: linear-gradient(rgba(11, 20, 36, 0), rgba(12, 22, 39, .85));
}
.hm-card-body { padding: 1.15rem 1.35rem 1.4rem; display: flex; flex-direction: column; gap: .55rem; flex: 1; }
.hm-card-kicker { margin: 0; font-size: .72rem; font-weight: 700; letter-spacing: .14em; text-transform: uppercase; color: var(--accent); }
.hm-card h2 { margin: 0; font-family: Manrope, Inter, sans-serif; font-weight: 800; letter-spacing: -.02em; font-size: clamp(1.35rem, 2.4vw, 1.75rem); line-height: 1.15; color: #fff; }
.hm-card-body > p:not(.hm-card-kicker) { margin: 0; color: var(--muted); font-size: .95rem; }
.hm-chips { list-style: none; margin: .2rem 0 0; padding: 0; display: flex; flex-wrap: wrap; gap: .4rem; }
.hm-chips li { font-size: .74rem; font-weight: 600; padding: .22rem .6rem; border-radius: 999px; border: 1px solid rgba(141, 198, 63, .4); color: #cfe6ae; background: rgba(141, 198, 63, .06); }
.hm-card-cta { margin-top: auto; padding-top: .6rem; font-weight: 700; font-size: .95rem; color: var(--blue); display: inline-flex; gap: .4rem; align-items: center; }
.hm-card--warm .hm-card-cta { color: var(--amber); }
.hm-card-cta span { transition: transform .25s; }
.hm-card:hover .hm-card-cta span { transform: translateX(4px); }

/* ---------- Sections ---------- */
.hm-section { padding: clamp(3rem, 8vh, 5rem) 0; border-top: 1px solid rgba(255, 255, 255, .05); }
.hm-section--alt { background: linear-gradient(180deg, var(--bg2), var(--bg)); }
.hm-h2 { margin: 0 0 1.6rem; font-family: Manrope, Inter, sans-serif; font-weight: 800; letter-spacing: -.025em; font-size: clamp(1.6rem, 3.4vw, 2.3rem); line-height: 1.15; color: #fff; }
.hm-trades { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 1.25rem; }
.hm-trade {
  padding: 1.35rem 1.35rem 1.25rem; border-radius: 14px;
  background: var(--card); border: 1px solid rgba(255, 255, 255, .07); border-left: 3px solid var(--green);
  display: flex; flex-direction: column;
}
.hm-trade-icon { width: 42px; height: 42px; border-radius: 10px; display: grid; place-items: center; background: rgba(0, 174, 239, .1); border: 1px solid rgba(0, 174, 239, .35); margin-bottom: .9rem; }
.hm-trade-icon svg { width: 22px; height: 22px; fill: none; stroke: var(--blue); stroke-width: 1.6; stroke-linecap: round; stroke-linejoin: round; }
.hm-trade h3 { margin: 0 0 .45rem; font-family: Manrope, Inter, sans-serif; font-weight: 800; font-size: 1.2rem; letter-spacing: -.01em; color: #fff; }
.hm-trade p { margin: 0 0 1rem; color: var(--muted); font-size: .93rem; }
.hm-links { list-style: none; margin: auto 0 0; padding: .8rem 0 0; border-top: 1px solid rgba(255,255,255,.07); display: grid; gap: .3rem; }
.hm-links a { text-decoration: none; font-weight: 600; font-size: .9rem; color: var(--blue); }
.hm-links a::after { content: ' →'; transition: margin .2s; }
.hm-links a:hover { color: var(--green); }

/* ---------- Contact ---------- */
.hm-contact { display: grid; grid-template-columns: 1.1fr .9fr; gap: 2rem; align-items: center; }
.hm-contact .hm-h2 { margin-bottom: .8rem; }
.hm-contact-lead { margin: 0; color: var(--muted); max-width: 32rem; }
.hm-contact-card { padding: 1.5rem; border-radius: 14px; background: var(--card); border: 1px solid rgba(0, 174, 239, .3); box-shadow: 0 0 30px rgba(0, 174, 239, .08); }
.hm-btn {
  display: block; text-align: center; text-decoration: none; font-weight: 700; color: #0b1220; background: var(--green);
  padding: .85rem 1.2rem; border-radius: 999px; transition: background .2s, transform .2s; overflow-wrap: anywhere;
}
.hm-btn:hover { background: #a3e635; transform: translateY(-1px); }
.hm-contact-card dl { margin: 1.2rem 0 0; display: grid; gap: .7rem; }
.hm-contact-card dl div { display: grid; grid-template-columns: 7rem 1fr; gap: .5rem; }
.hm-contact-card dt { color: var(--muted); font-size: .85rem; font-weight: 600; }
.hm-contact-card dd { margin: 0; font-size: .93rem; }
.hm-contact-card dd a { text-decoration: none; color: var(--text); }
.hm-contact-card dd a:hover { color: var(--blue); }

/* ---------- Pied de page ---------- */
.hm-footer { border-top: 1px solid rgba(255, 255, 255, .07); padding: 1.6rem 0 2rem; font-size: .85rem; color: var(--muted); }
.hm-footer-in { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: .8rem 1.5rem; }
.hm-footer p { margin: 0; }
.hm-footer ul { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; gap: .4rem 1.2rem; }
.hm-footer a { text-decoration: none; color: var(--muted); }
.hm-footer a:hover { color: var(--blue); }

/* ---------- Responsive ---------- */
@media (max-width: 1080px) {
  .hm-nav a { padding: .45rem .55rem; font-size: .85rem; }
}
@media (max-width: 920px) {
  .hm-header-in { flex-wrap: wrap; gap: .2rem 1rem; padding: .45rem 0 .35rem; }
  .hm-nav { width: 100%; }
  .hm-nav ul { flex-wrap: wrap; gap: .15rem .1rem; margin-left: -.55rem; }
  .hm-nav a { padding: .35rem .55rem; font-size: .84rem; white-space: nowrap; }
  .hm-nav a.hm-nav-cta { margin-left: .2rem; }
  .hm-trades { grid-template-columns: 1fr; }
  .hm-contact { grid-template-columns: 1fr; }
}
@media (max-width: 760px) {
  .hm-cards { grid-template-columns: 1fr; }
  .hm-header-in { min-height: 0; }
  .hm-brand img { height: 40px; }
  .hm-brand-text span:first-child { font-size: 19px; }
  .hm-brand-text span:last-child { font-size: 14px; }
  .hm-choose { font-size: .82rem; padding: .4rem .85rem; }
  .hm-hero { padding-top: 1.6rem; }
  .hm-lead { font-size: .93rem; }
  .hm-tagline { font-size: 1.02rem; }
  .hm-contact-card dl div { grid-template-columns: 1fr; gap: 0; }
}
