/* YAN AGENCY — sections ajoutées au moteur Premium 3D Glass.
   Elles défilent dans le flux entre la scène cinématique et le contact, au-dessus du canvas. */
:root {
    --yx-cyan: #17d3f2; --yx-blue: #3b6bfd; --yx-violet: #b95af7;
    --yx-grad: linear-gradient(90deg, var(--yx-cyan), var(--yx-blue) 55%, var(--yx-violet));
    --yx-ink: #f2f7ff; --yx-muted: #a3adc2; --yx-dim: #6c7690;
    --yx-line: rgba(255, 255, 255, 0.12); --yx-line-strong: rgba(255, 255, 255, 0.24);
    --yx-glass: linear-gradient(160deg, rgba(255, 255, 255, 0.07), rgba(255, 255, 255, 0.015));
    --yx-wa: #25d366;
}

/* Header : navigation étendue + fond quand le contenu défile dessous */
.header-nav { gap: 26px; }
.nav-x {
    position: relative; padding: 6px 0; font-size: 12px; letter-spacing: 0.04em;
    color: rgba(255, 255, 255, 0.55); text-decoration: none; transition: color 0.4s;
}
.nav-x:hover { color: #fff; }
.main-header { position: relative; }
.main-header::before {
    content: ''; position: absolute; inset: 0 -60px; z-index: -1; opacity: 0; transition: opacity 0.5s;
    background: rgba(4, 7, 18, 0.72); border-bottom: 1px solid var(--yx-line);
    -webkit-backdrop-filter: blur(16px); backdrop-filter: blur(16px);
}
body.contact-open .main-header::before { opacity: 1; }
@media (max-width: 1180px) { .header-counter { display: none; } }
@media (max-width: 1060px) { .nav-x { display: none; } }
@media (max-width: 900px), (max-aspect-ratio: 4/5) { .main-header::before { inset: 0 -24px; } }

/* Conteneur : transparent, le fond WebGL du moteur (dégradé de marque + filets lumineux) reste visible */
.yx {
    position: relative; z-index: 8; color: var(--yx-ink);
    padding: 34vh 0 22vh;
}
.yx * { user-select: text; }
.yx-sec { max-width: 1320px; margin: 0 auto; padding: 120px 60px 0; }
.yx-sec.yx-full { max-width: none; padding-left: 0; padding-right: 0; }
.yx-sec.yx-full .yx-head { max-width: 1320px; margin-left: auto; margin-right: auto; padding: 0 60px; }
.yx-head { margin-bottom: 48px; max-width: 760px; }
.yx-eyebrow {
    display: flex; align-items: center; gap: 14px; margin-bottom: 26px;
    font: 500 11px/1 'Space Grotesk', sans-serif; letter-spacing: 0.22em; text-transform: uppercase; color: #cfd6e6;
}
.yx-title { font-size: clamp(34px, 4.2vw, 60px); line-height: 1.04; letter-spacing: -0.03em; font-weight: 400; margin-bottom: 22px; }
.yx-lead { font-size: 17px; line-height: 1.7; font-weight: 300; color: var(--yx-muted); max-width: 60ch; }

.yx-link {
    display: inline-flex; align-items: center; gap: 8px; padding: 0; border: 0; background: none;
    font: 500 13px/1 'Space Grotesk', sans-serif; letter-spacing: 0.02em; color: #fff; text-decoration: none;
    border-bottom: 1px solid rgba(255, 255, 255, 0.3); padding-bottom: 6px; transition: gap 0.35s, border-color 0.35s;
}
.yx-link:hover { gap: 14px; border-color: #fff; }

/* Bandeaux défilants */
.mq { overflow: hidden; -webkit-mask-image: linear-gradient(90deg, transparent, #000 8%, #000 92%, transparent); mask-image: linear-gradient(90deg, transparent, #000 8%, #000 92%, transparent); }
.mq-track { display: flex; width: max-content; animation: yx-marquee var(--mq-dur, 40s) linear infinite; }
.mq-reverse .mq-track { animation-direction: reverse; }
.mq:hover .mq-track { animation-play-state: paused; }
.mq-cards { overflow-x: auto; scrollbar-width: none; cursor: grab; overscroll-behavior-x: contain; }
.mq-cards::-webkit-scrollbar { display: none; }
.mq-cards .mq-track { animation: none; }
.mq-cards.is-dragging { cursor: grabbing; user-select: none; }
.mq-cards.is-dragging .proj, .mq-cards.is-dragging .prod { pointer-events: none; }
.mq-set { display: flex; gap: 20px; padding-right: 20px; flex-shrink: 0; }
@keyframes yx-marquee { to { transform: translateX(-50%); } }
@media (prefers-reduced-motion: reduce) { .mq-track { animation: none; } .mq { overflow-x: auto; } }

.yx-band { border-top: 1px solid var(--yx-line); border-bottom: 1px solid var(--yx-line); padding: 26px 0; background: rgba(255, 255, 255, 0.02); }
.yx-band-label { text-align: center; font: 500 11px/1 'Space Grotesk', sans-serif; letter-spacing: 0.22em; text-transform: uppercase; color: var(--yx-dim); margin-bottom: 20px; }
.yx-band .mq-set { gap: 54px; padding-right: 54px; }
.metier-item { display: inline-flex; align-items: center; gap: 12px; white-space: nowrap; font-size: 19px; font-weight: 400; color: #dfe5f2; }
.metier-item svg { width: 22px; height: 22px; color: var(--yx-cyan); }

/* Expertises */
.svc-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 22px; }
.svc {
    border: 1px solid var(--yx-line); border-radius: 22px; overflow: hidden; background: var(--yx-glass);
    -webkit-backdrop-filter: blur(14px); backdrop-filter: blur(14px); transition: border-color 0.35s, transform 0.35s;
}
.svc:hover { border-color: var(--yx-line-strong); transform: translateY(-4px); }
.svc-thumb { height: 170px; overflow: hidden; }
.svc-thumb img { width: 100%; height: 100%; object-fit: cover; display: block; filter: saturate(0.9); }
.svc-body { padding: 26px 26px 28px; }
.svc h3 { font-size: 20px; font-weight: 500; letter-spacing: -0.01em; margin-bottom: 10px; }
.svc p { font-size: 14.5px; line-height: 1.6; color: var(--yx-muted); margin-bottom: 18px; }
.svc-tags { display: flex; flex-wrap: wrap; gap: 7px; margin-bottom: 22px; }
.svc-tags span { font-size: 11px; letter-spacing: 0.03em; color: #c3cbe0; padding: 5px 11px; border: 1px solid var(--yx-line); border-radius: 999px; }

/* Vidéo */
.yx-video { position: relative; max-width: 1320px; margin: 120px auto 0; padding: 0 60px; }
.yx-video video { width: 100%; display: block; border-radius: 26px; border: 1px solid var(--yx-line); box-shadow: 0 40px 100px rgba(0, 0, 0, 0.5); background: #000; }
.yx-mute {
    position: absolute; right: 84px; bottom: 24px; padding: 9px 16px; border-radius: 999px;
    border: 1px solid rgba(255, 255, 255, 0.35); background: rgba(0, 0, 0, 0.45); color: #fff;
    font: 500 12px/1 'Space Grotesk', sans-serif; letter-spacing: 0.06em; -webkit-backdrop-filter: blur(10px); backdrop-filter: blur(10px);
}
.yx-mute span { color: var(--yx-cyan); }

/* Réalisations */
.mq-cards .mq-set { padding-top: 6px; padding-bottom: 10px; }
.proj {
    flex: 0 0 340px; position: relative; isolation: isolate; border-radius: 22px; padding: 22px; overflow: hidden;
    background-size: cover; background-position: center top; border: 1px solid var(--yx-line); transition: transform 0.35s, border-color 0.35s;
}
.proj::before { content: ''; position: absolute; inset: 0; z-index: -1; background: linear-gradient(180deg, rgba(4, 7, 18, 0.25) 0%, rgba(4, 7, 18, 0.75) 34%, rgba(4, 7, 18, 0.97) 55%, rgba(4, 7, 18, 0.99) 100%); }
.proj:hover { transform: translateY(-4px); border-color: var(--yx-line-strong); }
.proj-logo, .prod-logo {
    height: 118px; border-radius: 14px; margin-bottom: 18px; display: flex; align-items: center; justify-content: center;
    background: rgba(10, 18, 36, 0.45); border: 1px solid var(--yx-line); -webkit-backdrop-filter: blur(8px); backdrop-filter: blur(8px);
}
.proj-logo img, .prod-logo img { max-width: 64%; max-height: 62%; object-fit: contain; }
.proj-logo img.invert { filter: invert(1) brightness(1.4); }
.chip { display: inline-block; font-size: 10.5px; letter-spacing: 0.14em; text-transform: uppercase; color: var(--yx-cyan); margin-bottom: 10px; }
.proj h3 { font-size: 19px; font-weight: 500; margin-bottom: 8px; }
.proj p { font-size: 13.5px; line-height: 1.55; color: var(--yx-muted); margin-bottom: 18px; min-height: 4.6em; }

/* Solutions */
.sol-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 18px; }
.sol {
    display: flex; flex-direction: column; gap: 12px; text-align: left; padding: 26px 24px; border-radius: 20px;
    border: 1px solid var(--yx-line); background: var(--yx-glass); color: inherit; font: inherit;
    -webkit-backdrop-filter: blur(14px); backdrop-filter: blur(14px); transition: border-color 0.35s, transform 0.35s, background 0.35s;
}
.sol:hover { border-color: var(--yx-line-strong); transform: translateY(-4px); background: rgba(255, 255, 255, 0.07); }
.sol-cat { font-size: 10.5px; letter-spacing: 0.14em; text-transform: uppercase; color: var(--yx-cyan); }
.sol h3 { font-size: 18px; font-weight: 500; line-height: 1.25; }
.sol p { font-size: 13.5px; line-height: 1.6; color: var(--yx-muted); flex: 1; }
.sol .go { font-size: 12.5px; color: #fff; }

/* Logiciels */
.prod {
    flex: 0 0 320px; display: flex; flex-direction: column; padding: 22px; border-radius: 22px;
    border: 1px solid var(--yx-line); background: rgba(8, 12, 28, 0.82); transition: transform 0.35s, border-color 0.35s;
}
.prod:hover { transform: translateY(-4px); border-color: var(--yx-line-strong); }
.prod-kicker { font-size: 10.5px; letter-spacing: 0.14em; text-transform: uppercase; color: var(--yx-violet); margin-bottom: 10px; }
.prod p:not(.prod-kicker) { font-size: 14px; line-height: 1.6; color: var(--yx-muted); flex: 1; margin-bottom: 20px; }
.prod .yx-link { align-self: flex-start; }

/* Engagements */
.eng { list-style: none; display: grid; grid-template-columns: repeat(3, 1fr); gap: 14px; }
.eng li {
    display: flex; align-items: center; gap: 14px; padding: 20px 22px; border-radius: 16px;
    border: 1px solid var(--yx-line); background: var(--yx-glass); font-size: 15px;
}
.eng svg { flex: 0 0 26px; width: 26px; height: 26px; padding: 5px; border-radius: 50%; color: #04101a; background: var(--yx-grad); }

/* Méthode */
.steps { list-style: none; display: grid; grid-template-columns: repeat(3, 1fr); gap: 22px; counter-reset: none; }
.step { padding: 30px 28px; border-radius: 22px; border: 1px solid var(--yx-line); background: var(--yx-glass); }
.step-num {
    display: inline-flex; align-items: center; justify-content: center; width: 48px; height: 48px; border-radius: 50%;
    margin-bottom: 24px; font-size: 14px; font-weight: 600; color: #04101a; background: var(--yx-grad);
    box-shadow: 0 10px 30px -8px rgba(23, 211, 242, 0.55);
}
.step h3 { font-size: 20px; font-weight: 500; margin-bottom: 10px; }
.step p { font-size: 14.5px; line-height: 1.65; color: var(--yx-muted); }

/* Bandeau d'appel */
.yx-cta { max-width: 1320px; margin: 140px auto 0; padding: 0 60px; }
.yx-cta-inner {
    display: flex; align-items: center; justify-content: space-between; gap: 40px; flex-wrap: wrap;
    padding: 54px 56px; border-radius: 30px; border: 1px solid var(--yx-line-strong);
    background: radial-gradient(120% 140% at 0% 0%, rgba(23, 211, 242, 0.16), transparent 55%), radial-gradient(120% 140% at 100% 100%, rgba(185, 90, 247, 0.18), transparent 55%), rgba(8, 12, 28, 0.7);
}
.yx-cta h2 { font-size: clamp(30px, 3.4vw, 48px); line-height: 1.06; letter-spacing: -0.03em; font-weight: 400; }
.yx-cta-actions { display: flex; gap: 14px; flex-wrap: wrap; }
.yx-btn {
    display: inline-flex; align-items: center; gap: 10px; padding: 15px 24px; border-radius: 999px;
    font: 500 14px/1 'Space Grotesk', sans-serif; letter-spacing: 0.02em; text-decoration: none; color: #fff;
    transition: transform 0.3s, background 0.3s, border-color 0.3s;
}
.yx-btn svg { width: 18px; height: 18px; }
.yx-btn:hover { transform: translateY(-2px); }
.yx-btn-wa { background: var(--yx-wa); color: #04170b; box-shadow: 0 12px 30px -10px rgba(37, 211, 102, 0.7); }
.yx-btn-ghost { border: 1px solid rgba(255, 255, 255, 0.35); }
.yx-btn-ghost:hover { border-color: #fff; background: rgba(255, 255, 255, 0.06); }

/* Contact : WhatsApp + infos */
.contact-wa { margin-top: 34px; }
.contact-facts { display: flex; gap: 36px; flex-wrap: wrap; margin-top: 40px; }
.contact-facts dt { font-size: 10.5px; letter-spacing: 0.18em; text-transform: uppercase; color: var(--yx-dim); margin-bottom: 8px; }
.contact-facts dd { font-size: 14.5px; color: #e6ebf5; }
.contact-wa, .contact-facts { opacity: 0; transform: translateY(34px); transition: opacity 0.9s cubic-bezier(0.25, 1, 0.5, 1) 0.4s, transform 0.9s cubic-bezier(0.25, 1, 0.5, 1) 0.4s; }
.contact.is-visible .contact-wa, .contact.is-visible .contact-facts { opacity: 1; transform: none; }

/* Bouton WhatsApp flottant */
.wa-float {
    position: fixed; right: 26px; bottom: 26px; z-index: 30; width: 58px; height: 58px; border-radius: 50%;
    display: flex; align-items: center; justify-content: center; color: #fff; background: var(--yx-wa);
    box-shadow: 0 14px 34px -8px rgba(37, 211, 102, 0.75), inset 0 1px 0 rgba(255, 255, 255, 0.35);
    transition: transform 0.3s;
}
.wa-float svg { width: 30px; height: 30px; }
.wa-float:hover { transform: scale(1.08); }
.wa-float::after { content: ''; position: absolute; inset: 0; border-radius: 50%; border: 2px solid var(--yx-wa); animation: yx-ping 2.6s ease-out infinite; }
@keyframes yx-ping { from { transform: scale(1); opacity: 0.7; } to { transform: scale(1.6); opacity: 0; } }
body.is-loading .wa-float { opacity: 0; }

/* Modale solution */
.sol-modal { position: fixed; inset: 0; z-index: 9000; display: flex; align-items: center; justify-content: center; padding: 24px; }
.sol-modal[hidden] { display: none; }
.sol-modal-backdrop { position: absolute; inset: 0; background: rgba(2, 4, 12, 0.7); -webkit-backdrop-filter: blur(8px); backdrop-filter: blur(8px); }
.sol-modal-card {
    position: relative; width: min(860px, 100%); max-height: calc(100vh - 48px); overflow-y: auto; scrollbar-width: none;
    padding: 46px 48px 40px; border-radius: 30px; border: 1px solid var(--yx-line-strong); color: var(--yx-ink);
    background: linear-gradient(160deg, rgba(30, 40, 70, 0.92), rgba(10, 14, 30, 0.96));
    box-shadow: 0 40px 120px rgba(0, 0, 0, 0.6), inset 0 1px 0 rgba(255, 255, 255, 0.14);
    animation: yx-pop 0.45s cubic-bezier(0.16, 1, 0.3, 1);
}
.sol-modal-card * { user-select: text; }
@keyframes yx-pop { from { opacity: 0; transform: translateY(24px) scale(0.98); } }
.sol-modal-close { position: absolute; top: 18px; right: 20px; width: 40px; height: 40px; border-radius: 50%; border: 1px solid var(--yx-line-strong); background: transparent; color: #fff; font-size: 22px; line-height: 1; }
.sol-modal-card h3 { font-size: clamp(28px, 3.2vw, 42px); font-weight: 400; letter-spacing: -0.03em; line-height: 1.08; margin-bottom: 18px; }
.sm-lead { font-size: 16px; line-height: 1.7; color: var(--yx-muted); margin-bottom: 32px; }
.sm-feats { display: grid; grid-template-columns: 1fr 1fr; gap: 22px 34px; margin-bottom: 30px; }
.sm-feats h4 { font-size: 15.5px; font-weight: 500; margin-bottom: 6px; }
.sm-feats p { font-size: 13.5px; line-height: 1.6; color: var(--yx-muted); }
.sm-cases { display: flex; gap: 10px; flex-wrap: wrap; margin-bottom: 30px; }
.sm-cases:empty { display: none; }
.sm-case { display: inline-flex; align-items: center; gap: 10px; padding: 10px 16px; border-radius: 999px; border: 1px solid var(--yx-line-strong); color: #fff; text-decoration: none; font-size: 13px; background: none; font-family: inherit; }
.sm-case img { width: 22px; height: 22px; object-fit: contain; }
.sm-case.cross { color: var(--yx-violet); border-color: rgba(185, 90, 247, 0.4); }
.sm-cta { display: flex; gap: 12px; flex-wrap: wrap; }

/* Responsive */
@media (max-width: 1100px) {
    .svc-grid { grid-template-columns: repeat(2, 1fr); }
    .sol-grid { grid-template-columns: repeat(2, 1fr); }
    .eng { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 900px), (max-aspect-ratio: 4/5) {
    .yx-sec, .yx-video, .yx-cta { padding-left: 24px; padding-right: 24px; }
    .yx-sec { padding-top: 90px; }
    .yx-sec.yx-full .yx-head { padding: 0 24px; }
    .yx-mute { right: 40px; bottom: 16px; }
    .yx-cta-inner { padding: 36px 28px; }
    .steps { grid-template-columns: 1fr; }
}
@media (max-width: 640px) {
    .svc-grid, .sol-grid, .eng, .sm-feats { grid-template-columns: 1fr; }
    .proj { flex-basis: 280px; }
    .prod { flex-basis: 270px; }
    .metier-item { font-size: 16px; }
    .sol-modal-card { padding: 40px 24px 28px; }
    .wa-float { right: 16px; bottom: 16px; width: 54px; height: 54px; }
    .contact-facts { gap: 22px; }
}

/* Hors de la scène cinématique, les textes des chapitres s'effacent aussitôt */
body.contact-open .slide { opacity: 0 !important; visibility: hidden; transition: opacity 0.3s, visibility 0s 0.3s; }

/* Contact sur mobile : la colonne peut rétrécir, l'adresse e-mail passe à la ligne */
.contact-inner > * { min-width: 0; }
@media (max-width: 640px) {
    .contact-mail { gap: 14px; font-size: 16px; overflow-wrap: anywhere; }
    .contact-lead br { display: none; }
}

/* Logo néon dans le header, à la place de la marque texte */
.brand-logo { display: block; height: 48px; width: auto; filter: drop-shadow(0 0 14px rgba(59, 107, 253, 0.35)); }
@media (max-width: 640px) { .brand-logo { height: 38px; } }

/* Barre de progression sur tout le site : un tiret par chapitre 3D puis par section */
.story-progress { display: none; }
.yx-progress {
    position: fixed; top: 50%; right: 40px; transform: translateY(-50%); z-index: 25;
    display: flex; flex-direction: column; gap: 10px; pointer-events: none; transition: opacity 0.6s;
    --dash: min(34px, calc((62vh - 90px) / 10));
}
.yx-progress span { position: relative; display: block; width: 2px; height: var(--dash); border-radius: 2px; background: rgba(255, 255, 255, 0.15); overflow: hidden; }
.yx-progress i { position: absolute; inset: 0 0 auto; height: 100%; transform-origin: top; transform: scaleY(0); background: #fff; border-radius: 2px; }
.yx-progress span.is-current i { background: linear-gradient(180deg, var(--yx-cyan), var(--yx-violet)); }
body.is-loading .yx-progress { opacity: 0; }
@media (max-width: 900px), (max-aspect-ratio: 4/5) { .yx-progress { right: 10px; --dash: min(26px, calc((50vh - 90px) / 10)); } }
