/* Poly-Tech — styles partagés du site public
   Base : template d'origine (bleus Poly-Tech, Plus Jakarta Sans, grille de points)
   Touches : slash diagonal (FB Pompe), titres soulignés centrés, vagues d'eau */
:root {
    --navy: #012B45;
    --primary: #004B87;
    --accent: #0072BC;
    --cyan: #00A3E0;
    --slate: #2F4558;
}

html { scroll-behavior: smooth; }
body { font-family: 'Plus Jakarta Sans', ui-sans-serif, system-ui, sans-serif; background: #fff; color: #1e293b; }
section, footer { scroll-margin-top: 130px; }

.glass { backdrop-filter: blur(12px); -webkit-backdrop-filter: blur(12px); }
.industrial-grid { background-image: radial-gradient(circle at 2px 2px, rgba(1, 43, 69, 0.04) 1px, transparent 0); background-size: 48px 48px; }
.dot-grid-dark { background-image: radial-gradient(circle at 2px 2px, rgba(255, 255, 255, 0.05) 1px, transparent 0); background-size: 48px 48px; }

/* Logo sur fond sombre : le texte noir devient blanc, l'engrenage reste bleu */
.logo-on-dark { filter: invert(1) hue-rotate(180deg) saturate(1.3) brightness(1.15); }

/* Menus déroulants */
.dropdown .dropdown-menu { position: absolute; left: 50%; top: 100%; z-index: 50; opacity: 0; visibility: hidden; transform: translate(-50%, 8px); transition: all .25s ease; }
.dropdown:hover .dropdown-menu, .dropdown:focus-within .dropdown-menu { opacity: 1; visibility: visible; transform: translate(-50%, 0); }

/* Bouton nav "Demander un devis" coupé en diagonale (clin d'œil FB Pompe) */
.slash-cta { clip-path: polygon(22px 0, 100% 0, 100% 100%, 0 100%); position: relative; }
.slash-cta::before { content: ""; position: absolute; left: 0; top: 0; bottom: 0; width: 4px; background: var(--cyan); transform: skewX(-12deg); transform-origin: bottom; }

/* Déco slash dans les blocs sombres */
.slash-deco { position: absolute; right: -40px; top: -20%; bottom: -20%; width: 180px; transform: skewX(-14deg); pointer-events: none;
    background: linear-gradient(90deg, transparent 0 40%, rgba(0, 163, 224, .55) 40% 44%, rgba(255, 255, 255, .06) 44% 100%); }

/* Titre de section centré souligné (FB Pompe) */
.section-title { position: relative; display: inline-block; font-size: clamp(1.6rem, 3vw, 2.25rem); font-weight: 800; letter-spacing: -0.02em; text-transform: uppercase; color: #0f172a; }
.section-title::after { content: ""; position: absolute; left: 50%; bottom: -18px; width: 140px; height: 2px; transform: translateX(-50%); background: linear-gradient(90deg, var(--primary), var(--cyan)); }
.eyebrow { font-family: 'JetBrains Mono', monospace; font-size: 11px; font-weight: 700; letter-spacing: .4em; text-transform: uppercase; color: var(--primary); }

/* Champs */
.input-site { width: 100%; background: #f8fafc; border: 1px solid #e2e8f0; border-radius: 12px; padding: 11px 14px; font-size: 13px; color: #0f172a; transition: border-color .2s; }
.input-site:focus { outline: none; border-color: var(--primary); background: #fff; }
/* Tuiles "Applications" du filtre catalogue */
.sector-tile { display: flex; align-items: center; gap: 10px; text-align: left; padding: 12px; border-radius: 12px; background: #fff;
    border: 1px solid #e2e8f0; color: #64748b; font-size: 12.5px; font-weight: 600; line-height: 1.25; transition: all .2s; }
.sector-tile svg { color: #94a3b8; transition: color .2s; }
.sector-tile:hover { border-color: var(--primary); color: var(--primary); }
.sector-tile:hover svg { color: var(--primary); }
.sector-tile.is-active { background: var(--primary); border-color: var(--primary); color: #fff; box-shadow: 0 10px 20px -10px rgba(0,75,135,.6); }
.sector-tile.is-active svg { color: #fff; }

/* Filtres marques */
[data-cat] { border: 1px solid #e2e8f0; color: #334155; background: #fff; }
[data-cat]:hover { border-color: var(--primary); color: var(--primary); }
[data-cat].is-active { background: var(--primary); border-color: var(--primary); color: #fff; }

/* Showroom défilant */
@keyframes marquee { from { transform: translateX(0); } to { transform: translateX(-50%); } }
.marquee-track { display: flex; width: max-content; animation: marquee 70s linear infinite; }
.marquee-track:hover { animation-play-state: paused; }

/* Cartes chiffres "Pourquoi choisir" */
.stat-card { transition: transform .35s ease, box-shadow .35s ease, border-color .35s ease; }
.stat-card:hover { transform: translateY(-6px); box-shadow: 0 24px 48px -20px rgba(1, 43, 69, .35); }
.stat-card .slash-deco { right: -120px; }
.stat-bar { position: absolute; left: 0; bottom: 0; height: 4px; width: 0; background: linear-gradient(90deg, var(--primary), var(--cyan)); transition: width .5s ease; }
.stat-card:hover .stat-bar { width: 100%; }

/* Accordéon "Applications" (façon Sectors Masdaf) */
.sector-row { display: flex; flex-direction: column; gap: 14px; }
.sector-card { position: relative; display: block; height: 120px; border-radius: 14px; overflow: hidden; color: #fff; isolation: isolate; }
.sector-card img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; z-index: -2; transition: transform .8s ease; }
.sector-shade { position: absolute; inset: 0; z-index: -1; background: rgba(1, 43, 69, .78); transition: background .5s ease; }
.sector-card.is-open .sector-shade { background: linear-gradient(to top, rgba(1, 43, 69, .85), rgba(1, 43, 69, .25) 60%, rgba(1, 43, 69, .35)); }
.sector-card:hover img { transform: scale(1.05); }
.sector-icon { position: absolute; width: 34px; height: 34px; top: 50%; right: 22px; transform: translateY(-50%); opacity: .9; }
.sector-vtitle { display: none; }
.sector-body { position: absolute; left: 22px; right: 70px; top: 50%; transform: translateY(-50%); }
.sector-desc, .sector-more { display: none; }

@media (min-width: 1024px) {
    .sector-row { flex-direction: row; height: 520px; }
    .sector-card { height: 100%; flex: 1 1 0; min-width: 0; transition: flex .6s cubic-bezier(.2, .7, .2, 1); }
    .sector-card.is-open { flex: 2.8 1 0; }
    .sector-icon { width: 56px; height: 56px; top: 44px; right: auto; left: 50%; transform: translateX(-50%); transition: left .5s ease, transform .5s ease; }
    .sector-card.is-open .sector-icon { left: 44px; transform: none; }
    .sector-vtitle { display: block; position: absolute; left: 50%; bottom: 44px; transform: translateX(-50%) rotate(180deg); writing-mode: vertical-rl;
        white-space: nowrap; font-size: 1.5rem; font-weight: 800; letter-spacing: -.01em; transition: opacity .3s ease; }
    .sector-card.is-open .sector-vtitle { opacity: 0; }
    .sector-body { top: auto; transform: none; left: 44px; right: 44px; bottom: 40px; opacity: 0; transition: opacity .35s ease .15s; pointer-events: none; }
    .sector-card.is-open .sector-body { opacity: 1; }
    .sector-desc { display: block; margin-top: 10px; max-width: 26rem; color: rgba(255, 255, 255, .8); font-size: .95rem; line-height: 1.6; }
    .sector-more { display: inline-flex; align-items: center; gap: 10px; margin-top: 18px; font-size: 11px; font-weight: 800; letter-spacing: .2em; text-transform: uppercase; color: var(--cyan); }
}

/* Académie Poly-Tech : bannière "Comprendre une pompe" */
.academy { background: radial-gradient(ellipse at 75% 40%, #0b2d4a 0%, #04111d 65%); }
.academy-grid { position: absolute; inset: 0; pointer-events: none; opacity: .5;
    background-image: linear-gradient(rgba(0,163,224,.08) 1px, transparent 1px), linear-gradient(90deg, rgba(0,163,224,.08) 1px, transparent 1px);
    background-size: 44px 44px; mask-image: radial-gradient(ellipse at 70% 50%, #000 30%, transparent 75%); }
.ac-chip { padding: 9px 16px; border-radius: 999px; border: 1px solid rgba(255,255,255,.18); font-size: 11px; font-weight: 800; letter-spacing: .12em; text-transform: uppercase; color: rgba(255,255,255,.7); transition: all .25s; }
.ac-chip:hover, .ac-chip.is-active { background: #00A3E0; border-color: #00A3E0; color: #fff; }
.ac-card { position: relative; border: 1px solid rgba(255,255,255,.12); background: rgba(255,255,255,.04); border-radius: 22px; padding: 24px 24px 28px; min-height: 178px; overflow: hidden; }
.ac-progress { position: absolute; left: 0; right: 0; bottom: 0; height: 3px; background: rgba(255,255,255,.08); }
.ac-progress span { display: block; height: 100%; width: 20%; background: linear-gradient(90deg, #0072BC, #00A3E0); transition: width .5s ease; }
.ac-unit { border: 1px solid rgba(255,255,255,.12); border-radius: 16px; padding: 14px 8px; }
.ac-svg .ac-pipe { fill: none; stroke: #0d3550; stroke-width: 30; stroke-linecap: round; stroke-linejoin: round; }
.ac-svg .ac-flow { fill: none; stroke: #00A3E0; stroke-width: 4; stroke-dasharray: 10 14; stroke-linecap: round; animation: ac-flow 1.2s linear infinite; }
@keyframes ac-flow { to { stroke-dashoffset: -48; } }
.ac-svg .ac-body { fill: #0a2740; stroke: rgba(0,163,224,.45); stroke-width: 1.5; }
.ac-svg .ac-volute { fill: #0a2740; stroke: rgba(0,163,224,.45); stroke-width: 1.5; }
.ac-svg .ac-line { fill: none; stroke: rgba(0,163,224,.35); stroke-width: 1.5; }
.ac-svg .ac-imp-disc { fill: #0d3550; stroke: rgba(0,163,224,.6); stroke-width: 1.5; }
.ac-svg .ac-blade { fill: none; stroke: #7fd6f5; stroke-width: 3; stroke-linecap: round; }
.ac-svg .ac-impeller { transform-box: fill-box; transform-origin: center; animation: ac-spin 2.4s linear infinite; }
@keyframes ac-spin { to { transform: rotate(360deg); } }
.ac-svg .ac-part { transition: filter .4s ease; }
.ac-svg .ac-part.is-lit { filter: drop-shadow(0 0 14px rgba(0,163,224,.85)); }
.ac-svg .ac-dot { cursor: pointer; }
.ac-svg .ac-dot circle { fill: #04111d; stroke: #00A3E0; stroke-width: 2; transition: all .3s; }
.ac-svg .ac-dot text { fill: #fff; font: 800 13px 'Plus Jakarta Sans', sans-serif; text-anchor: middle; pointer-events: none; }
.ac-svg .ac-dot.is-active circle { fill: #00A3E0; stroke: #fff; }
.ac-svg .ac-dot::before { content: none; }
.ac-svg .ac-dot circle { animation: ac-pulse 2s ease-in-out infinite; transform-box: fill-box; transform-origin: center; }
@keyframes ac-pulse { 50% { stroke-width: 6; stroke-opacity: .5; } }

/* Parcours "Ce que nous faisons" (page Entreprise) */
.process { position: relative; display: grid; gap: 40px; list-style: none; padding: 0; margin: 0; }
.process-step { position: relative; padding-left: 84px; }
.process-dot { position: absolute; left: 0; top: 0; width: 60px; height: 60px; border-radius: 999px; display: flex; align-items: center; justify-content: center;
    background: #04111d; border: 2px solid #00A3E0; color: #00A3E0; box-shadow: 0 0 0 8px rgba(0,163,224,.08); transition: all .3s ease; z-index: 1; }
.process-step:hover .process-dot { background: #00A3E0; color: #fff; box-shadow: 0 0 0 10px rgba(0,163,224,.18), 0 0 30px rgba(0,163,224,.5); }
.process-step .font-mono { margin-top: 0; }
.process::before { content: ""; position: absolute; left: 29px; top: 30px; bottom: 30px; width: 2px;
    background: repeating-linear-gradient(to bottom, #00A3E0 0 10px, transparent 10px 20px); background-size: 2px 20px; animation: process-flow-v 1.2s linear infinite; opacity: .6; }
@keyframes process-flow-v { to { background-position: 0 20px; } }
@media (min-width: 1024px) {
    .process { grid-template-columns: repeat(4, 1fr); gap: 32px; }
    .process-step { padding-left: 0; }
    .process-dot { position: relative; width: 72px; height: 72px; }
    .process-step .font-mono { margin-top: 24px; }
    .process::before { left: 36px; right: calc((100% - 96px) / 4 - 36px); top: 35px; bottom: auto; width: auto; height: 2px;
        background: repeating-linear-gradient(to right, #00A3E0 0 10px, transparent 10px 20px); background-size: 20px 2px; animation-name: process-flow-h; }
    @keyframes process-flow-h { to { background-position: 20px 0; } }
}

/* Page contact : pastilles "Objet" */
.subject-chip { padding: 9px 16px; border-radius: 999px; border: 1px solid #e2e8f0; background: #fff; font-size: 11px; font-weight: 800; letter-spacing: .08em; text-transform: uppercase; color: #475569; transition: all .2s; }
.subject-chip:hover { border-color: var(--primary); color: var(--primary); }
.subject-chip.is-active { background: var(--primary); border-color: var(--primary); color: #fff; }

/* Popup "Demande de devis" */
.qm { position: fixed; inset: 0; z-index: 250; display: flex; align-items: center; justify-content: center; padding: 16px; }
.qm.hidden { display: none; }
.qm-backdrop { position: absolute; inset: 0; background: rgba(4, 17, 29, .72); backdrop-filter: blur(8px); -webkit-backdrop-filter: blur(8px); opacity: 0; transition: opacity .25s ease; }
.qm-panel { position: relative; width: 100%; max-width: 980px; max-height: calc(100vh - 32px); overflow-y: auto; display: grid; grid-template-columns: 1fr;
    background: #fff; border-radius: 32px; box-shadow: 0 40px 80px -20px rgba(0, 0, 0, .5);
    opacity: 0; transform: translateY(14px) scale(.97); transition: opacity .25s ease, transform .3s cubic-bezier(.2, .8, .2, 1); }
.qm.is-open .qm-backdrop { opacity: 1; }
.qm.is-open .qm-panel { opacity: 1; transform: none; }
.qm-side { position: relative; overflow: hidden; padding: 28px 28px 24px; display: flex; flex-direction: column; justify-content: space-between; }
.qm-side .qm-points, .qm-side .qm-call { display: none; }
.qm-form { position: relative; padding: 28px; display: flex; flex-direction: column; gap: 16px; }
.qm-label { display: block; margin-bottom: 6px; font-size: 10px; font-weight: 800; letter-spacing: .14em; text-transform: uppercase; color: #64748b; }
.qm-check { width: 22px; height: 22px; border-radius: 999px; display: inline-flex; align-items: center; justify-content: center; background: rgba(0, 163, 224, .18); color: #00A3E0; flex-shrink: 0; }
.qm-close { position: absolute; top: 18px; right: 18px; width: 38px; height: 38px; border-radius: 999px; display: flex; align-items: center; justify-content: center;
    background: #f1f5f9; color: #475569; transition: all .2s; }
.qm-close:hover { background: #0f172a; color: #fff; transform: rotate(90deg); }
.qm-side + .qm-form .qm-close { z-index: 2; }
.qm-submit { width: 100%; padding: 16px; border-radius: 16px; color: #fff; font-size: 11px; font-weight: 800; letter-spacing: .2em; text-transform: uppercase;
    background: linear-gradient(90deg, var(--primary), var(--accent)); box-shadow: 0 16px 30px -12px rgba(0, 75, 135, .55); transition: transform .2s, box-shadow .2s; }
.qm-submit:hover { transform: translateY(-2px); box-shadow: 0 22px 36px -12px rgba(0, 75, 135, .65); }
.qm-submit:disabled { opacity: .6; transform: none; }
@media (max-width: 767px) { .qm-form { position: static; } .qm-close { top: 14px; right: 14px; background: rgba(255,255,255,.14); color: #fff; } .qm-panel { border-radius: 24px; } }
@media (min-width: 768px) {
    .qm-panel { grid-template-columns: 2fr 3fr; }
    .qm-side { padding: 44px 40px; }
    .qm-side .qm-points, .qm-side .qm-call { display: block; }
    .qm-form { padding: 44px 44px 32px; }
    .qm-form > div:first-of-type { padding-right: 44px; }
}

/* Vague d'eau animée entre sections */
.wave { display: block; width: 100%; height: 70px; }
.wave path { animation: wave-shift 9s ease-in-out infinite alternate; }
@keyframes wave-shift { from { transform: translateX(0); } to { transform: translateX(-60px); } }

@media (prefers-reduced-motion: reduce) {
    *, *::before, *::after { animation: none !important; transition: none !important; scroll-behavior: auto !important; }
}
