/*
 * Identité visuelle du site vitrine Trivomarket.
 *
 * Palette alignée sur le vrai logo Trivomarket (dégradés cyan → bleu → indigo →
 * violet), volontairement DISTINCTE de la charte "AssurRebond" (bleu nuit + doré,
 * registre assurance/rassurant) : ici, registre "agence digitale / tech premium".
 * Typographie système uniquement (aucune police externe à charger, cohérent avec
 * le choix de ne dépendre d'aucun service tiers ni build step — HTML/CSS/JS vanilla).
 */

:root {
    --ink: #0F172A;              /* graphite très foncé : header, footer, titres */
    --ink-soft: #1E293B;
    --text: #1F2937;
    --text-muted: #55617a;
    --bg: #F7F8FC;               /* fond général, légèrement bleuté */
    --bg-alt: #EEF1F8;           /* sections alternées */
    --surface: #FFFFFF;
    --border: #E2E6F0;

    /* Dégradé de référence du logo : cyan -> bleu -> indigo -> violet */
    --accent-cyan: #06B6D4;
    --accent-cyan-bright: #00F2FE;
    --accent-blue: #3B82F6;
    --accent-indigo: #6366F1;
    --accent-violet: #4F46E5;

    --accent-gradient: linear-gradient(135deg, var(--accent-cyan) 0%, var(--accent-blue) 45%, var(--accent-indigo) 75%, var(--accent-violet) 100%);
    --accent-gradient-soft: linear-gradient(135deg, rgba(6, 182, 212, 0.12), rgba(99, 102, 241, 0.12));

    --radius: 14px;
    --radius-lg: 22px;
    --shadow-soft: 0 8px 24px rgba(15, 23, 42, 0.08);
    --shadow-lift: 0 20px 44px rgba(15, 23, 42, 0.16);
    --shadow-glow: 0 0 0 1px rgba(99, 102, 241, 0.12), 0 20px 44px rgba(37, 99, 235, 0.16);

    --font-system: -apple-system, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
}

* {
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    margin: 0;
    font-family: var(--font-system);
    color: var(--text);
    background: var(--bg);
    line-height: 1.65;
    -webkit-font-smoothing: antialiased;
}

.sr-only {
    position: absolute;
    width: 1px;
    height: 1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
}

.container {
    max-width: 1120px;
    margin: 0 auto;
    padding: 0 24px;
}

.container--narrow {
    max-width: 780px;
}

/* --- Hiérarchie typographique --- */

h1, h2, h3 {
    color: var(--ink);
    line-height: 1.15;
    letter-spacing: -0.01em;
}

h1 { font-size: clamp(2.1rem, 3.8vw, 3.1rem); font-weight: 800; margin: 0 0 18px; }
h2 { font-size: clamp(1.45rem, 2.4vw, 2rem); font-weight: 750; margin: 0 0 14px; }
h3 { font-size: 1.12rem; font-weight: 700; margin: 0 0 8px; letter-spacing: -0.005em; }

a {
    color: var(--accent-violet);
    text-decoration: none;
}

a:hover {
    text-decoration: underline;
}

p {
    margin: 0 0 16px;
    color: var(--text-muted);
}

.eyebrow {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    text-transform: uppercase;
    letter-spacing: 2px;
    font-size: 0.78rem;
    font-weight: 700;
    color: var(--accent-cyan);
    margin-bottom: 14px;
}

.eyebrow::before {
    content: "";
    display: inline-block;
    width: 18px;
    height: 2px;
    border-radius: 2px;
    background: var(--accent-gradient);
}

.eyebrow--on-dark { color: var(--accent-cyan-bright); }

/* --- Header --- */

.site-header {
    background: var(--ink);
    position: sticky;
    top: 0;
    z-index: 50;
    border-bottom: 1px solid rgba(255, 255, 255, 0.06);
}

.site-header__inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 14px 24px;
}

.brand {
    display: flex;
    align-items: center;
}

.brand:hover {
    text-decoration: none;
}

/*
 * Le SVG du logo utilise un texte foncé (#0F172A / #475569) pensé pour un fond
 * clair. Le header et le footer sont sur fond graphite (--ink) : sans traitement,
 * le texte du logo deviendrait quasi illisible (même piège que sur AssurRebond,
 * qui a dû être posé sur une plaque claire pour rester lisible sur fond bleu nuit).
 * On reproduit donc ici la même solution : une "plaque" blanche arrondie derrière
 * le logo, plutôt qu'un logo posé nu sur le graphite.
 */
.brand__plate {
    display: inline-flex;
    align-items: center;
    background: #fff;
    border-radius: 10px;
    padding: 7px 14px;
    box-shadow: 0 1px 2px rgba(15, 23, 42, 0.15);
}

.brand__logo {
    display: block;
    height: 34px;
    width: auto;
}

.brand__plate--footer {
    padding: 8px 16px;
}

.main-nav {
    display: flex;
    align-items: center;
    gap: 30px;
}

.main-nav a {
    position: relative;
    color: #CBD5E1;
    font-weight: 500;
    font-size: 0.95rem;
    padding-bottom: 4px;
}

.main-nav a::after {
    content: "";
    position: absolute;
    left: 0;
    right: 0;
    bottom: -2px;
    height: 2px;
    border-radius: 2px;
    background: var(--accent-gradient);
    transform: scaleX(0);
    transform-origin: left;
    transition: transform 0.25s ease;
}

.main-nav a:hover {
    color: #fff;
    text-decoration: none;
}

.main-nav a:hover::after {
    transform: scaleX(1);
}

.main-nav__cta {
    background: var(--accent-gradient);
    color: #fff !important;
    padding: 9px 20px;
    border-radius: 999px;
}

.main-nav__cta::after {
    display: none;
}

.nav-toggle {
    display: none;
    flex-direction: column;
    gap: 5px;
    background: none;
    border: none;
    cursor: pointer;
    padding: 8px;
}

.nav-toggle__bar {
    width: 22px;
    height: 2px;
    background: #fff;
    display: block;
}

/* --- Hero --- */

.hero {
    position: relative;
    overflow: hidden;
    isolation: isolate;
    background: var(--ink);
    color: #fff;
    padding: 104px 0 112px;
    --mx: 70%;
    --my: 15%;
}

/* Grille "mesh" discrète, en lien avec l'univers digital/tech du nouveau logo */
.hero__grid {
    position: absolute;
    inset: 0;
    z-index: 0;
    background-image:
        linear-gradient(rgba(255, 255, 255, 0.045) 1px, transparent 1px),
        linear-gradient(90deg, rgba(255, 255, 255, 0.045) 1px, transparent 1px);
    background-size: 42px 42px;
    -webkit-mask-image: radial-gradient(ellipse 70% 60% at 72% 20%, black 0%, transparent 75%);
    mask-image: radial-gradient(ellipse 70% 60% at 72% 20%, black 0%, transparent 75%);
}

/* Halo qui suit le curseur (mis à jour via JS en --mx/--my), effet "spotlight" */
.hero::after {
    content: "";
    position: absolute;
    inset: 0;
    z-index: 1;
    pointer-events: none;
    background: radial-gradient(560px circle at var(--mx) var(--my), rgba(6, 182, 212, 0.22), transparent 62%);
    transition: background-position 0.15s ease;
    mix-blend-mode: screen;
}

.hero__decor {
    position: absolute;
    inset: 0;
    z-index: 0;
}

.hero__shapes {
    position: absolute;
    top: -8%;
    right: -6%;
    width: 62%;
    min-width: 480px;
    height: 130%;
}

.hero__float--a { animation: heroFloatA 9s ease-in-out infinite; transform-box: fill-box; transform-origin: center; }
.hero__float--b { animation: heroFloatB 12s ease-in-out infinite; transform-box: fill-box; transform-origin: center; }
.hero__float--c { animation: heroFloatC 15s ease-in-out infinite; transform-box: fill-box; transform-origin: center; }

@keyframes heroFloatA {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(-16px); }
}

@keyframes heroFloatB {
    0%, 100% { transform: translate(0, 0) rotate(0deg); }
    50% { transform: translate(-10px, 12px) rotate(6deg); }
}

@keyframes heroFloatC {
    0%, 100% { transform: scale(1); opacity: 0.55; }
    50% { transform: scale(1.12); opacity: 0.85; }
}

.hero__parallax {
    transition: transform 0.2s ease-out;
}

.hero__inner {
    position: relative;
    z-index: 2;
    max-width: 720px;
}

.hero__title {
    color: #fff;
}

.hero__title-accent {
    background: var(--accent-gradient);
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
}

.hero__lede {
    color: #CBD5E1;
    font-size: 1.12rem;
    max-width: 580px;
}

.hero__actions {
    display: flex;
    gap: 16px;
    flex-wrap: wrap;
    margin-top: 30px;
}

.hero__stats {
    display: flex;
    gap: 40px;
    flex-wrap: wrap;
    margin-top: 56px;
    padding-top: 28px;
    border-top: 1px solid rgba(255, 255, 255, 0.12);
}

.hero__stat-value {
    display: block;
    font-size: 1.7rem;
    font-weight: 800;
    color: #fff;
    letter-spacing: -0.01em;
}

.hero__stat-label {
    display: block;
    font-size: 0.82rem;
    color: #94A3B8;
    margin-top: 2px;
}

@media (prefers-reduced-motion: reduce) {
    .hero__float--a, .hero__float--b, .hero__float--c {
        animation: none;
    }
    .hero__parallax {
        transition: none;
    }
}

/* --- Boutons --- */

.btn {
    position: relative;
    display: inline-block;
    overflow: hidden;
    padding: 13px 26px;
    border-radius: 999px;
    font-weight: 600;
    font-size: 0.95rem;
    cursor: pointer;
    border: 1px solid transparent;
    transition: transform 0.15s ease, box-shadow 0.15s ease;
}

.btn::before {
    content: "";
    position: absolute;
    top: 0;
    left: -60%;
    width: 40%;
    height: 100%;
    background: linear-gradient(120deg, transparent, rgba(255, 255, 255, 0.45), transparent);
    transform: skewX(-20deg);
    transition: left 0.6s ease;
}

.btn:hover::before {
    left: 130%;
}

.btn:hover {
    text-decoration: none;
    transform: translateY(-2px);
}

.btn--primary {
    background: var(--accent-gradient);
    color: #fff;
    box-shadow: var(--shadow-soft);
}

.btn--primary:hover {
    box-shadow: var(--shadow-glow);
}

.btn--ghost {
    background: transparent;
    color: #fff;
    border-color: rgba(255, 255, 255, 0.35);
}

.btn--full {
    width: 100%;
    text-align: center;
    border: none;
}

/* --- Sections génériques --- */

.section {
    padding: 80px 0;
}

.section--alt {
    background: var(--bg-alt);
}

.section__head {
    max-width: 640px;
    margin-bottom: 12px;
}

.page-header {
    background: var(--surface);
    border-bottom: 1px solid var(--border);
    padding: 68px 0 52px;
}

.page-header__lede {
    max-width: 620px;
    font-size: 1.05rem;
}

/* --- Grilles --- */

.grid-2 {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 28px;
}

.grid-3 {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 24px;
    margin-top: 12px;
}

@media (max-width: 860px) {
    .grid-2, .grid-3 {
        grid-template-columns: 1fr;
    }
}

/* --- Cartes --- */

.card {
    position: relative;
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 32px;
    box-shadow: var(--shadow-soft);
    transition: transform 0.28s ease, box-shadow 0.28s ease, border-color 0.28s ease;
}

.card:hover {
    transform: translateY(-6px);
    box-shadow: var(--shadow-glow);
    border-color: rgba(99, 102, 241, 0.3);
}

.card__icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 56px;
    height: 56px;
    border-radius: 14px;
    background: var(--accent-gradient-soft);
    margin-bottom: 18px;
    transition: transform 0.3s ease;
}

.card:hover .card__icon {
    transform: scale(1.08) rotate(-4deg);
}

.card__icon svg {
    width: 28px;
    height: 28px;
    fill: none;
    stroke: url(#icon-grad);
    stroke-width: 2.4;
    stroke-linecap: round;
    stroke-linejoin: round;
}

.link-arrow {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    font-weight: 600;
    font-size: 0.92rem;
}

.link-arrow__arrow {
    display: inline-block;
    transition: transform 0.2s ease;
}

.link-arrow:hover .link-arrow__arrow {
    transform: translateX(4px);
}

.feature {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 26px;
    transition: transform 0.28s ease, box-shadow 0.28s ease, border-color 0.28s ease;
}

.feature:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow-lift);
    border-color: rgba(99, 102, 241, 0.25);
}

.section--alt .feature {
    background: var(--surface);
}

.feature__icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 44px;
    height: 44px;
    border-radius: 12px;
    background: var(--accent-gradient-soft);
    margin-bottom: 14px;
    transition: transform 0.3s ease;
}

.feature:hover .feature__icon {
    transform: scale(1.08) rotate(-4deg);
}

.feature__icon svg {
    width: 22px;
    height: 22px;
    fill: none;
    stroke: url(#icon-grad);
    stroke-width: 2.6;
    stroke-linecap: round;
    stroke-linejoin: round;
}

/* --- Bandeau CTA --- */

.cta-band__inner {
    text-align: center;
    background: var(--ink);
    background-image: var(--accent-gradient);
    border-radius: var(--radius-lg);
    padding: 60px 32px;
    color: #fff;
}

.cta-band__inner h2 {
    color: #fff;
}

.cta-band__inner p {
    color: rgba(255, 255, 255, 0.85);
    margin-bottom: 24px;
}

.cta-band__inner .btn--primary {
    background: #fff;
    color: var(--ink);
}

/* --- Services --- */

.service-block__header {
    display: flex;
    align-items: center;
    gap: 16px;
    margin-bottom: 12px;
}

.service-block__badge {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 44px;
    height: 44px;
    border-radius: 12px;
    background: var(--accent-gradient);
    color: #fff;
    font-weight: 800;
}

.service-block__intro {
    max-width: 700px;
    font-size: 1.02rem;
    margin-bottom: 24px;
}

/* --- Écosystème / marques --- */

.ecosystem__intro {
    max-width: 700px;
}

.brand-portfolio {
    display: grid;
    grid-template-columns: 1fr auto 1fr;
    gap: 24px;
    align-items: stretch;
    margin-top: 36px;
}

@media (max-width: 860px) {
    .brand-portfolio {
        grid-template-columns: 1fr;
    }
    .brand-connector {
        transform: rotate(90deg);
        margin: 4px auto;
    }
}

.brand-card {
    position: relative;
    display: flex;
    flex-direction: column;
    gap: 16px;
    height: 100%;
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    padding: 34px;
    box-shadow: var(--shadow-soft);
    transition: transform 0.28s ease, box-shadow 0.28s ease, border-color 0.28s ease;
}

.brand-card:hover {
    transform: translateY(-6px);
    box-shadow: var(--shadow-glow);
    border-color: rgba(99, 102, 241, 0.3);
}

.brand-card__logo-wrap {
    display: inline-flex;
    align-items: center;
}

.brand-card__logo {
    height: 38px;
    width: auto;
}

.brand-card--assurrebond .brand-card__logo {
    height: 44px;
}

.brand-card__badge {
    display: inline-flex;
    align-self: flex-start;
    align-items: center;
    gap: 6px;
    font-size: 0.76rem;
    font-weight: 700;
    letter-spacing: 0.04em;
    text-transform: uppercase;
    color: var(--accent-violet);
    background: rgba(99, 102, 241, 0.09);
    padding: 5px 13px;
    border-radius: 999px;
}

.brand-card__desc {
    margin-bottom: 0;
}

.brand-card__cta {
    margin-top: auto;
    padding-top: 4px;
}

.brand-connector {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 6px;
    color: var(--text-muted);
    font-size: 0.78rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.brand-connector svg {
    width: 26px;
    height: 26px;
    color: var(--accent-indigo);
    fill: none;
    stroke: currentColor;
    stroke-width: 2;
    stroke-linecap: round;
    stroke-linejoin: round;
}

/* --- À propos --- */

.prose p {
    font-size: 1.02rem;
}

.about-grid {
    margin: 32px 0;
}

.info-panel {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 28px 32px;
    margin-top: 32px;
}

.legal-list {
    list-style: none;
    padding: 0;
    margin: 0 0 16px;
}

.legal-list li {
    padding: 6px 0;
    border-bottom: 1px dashed var(--border);
    color: var(--text-muted);
}

.legal-list li:last-child {
    border-bottom: none;
}

/* --- Contact --- */

.contact-layout {
    display: grid;
    grid-template-columns: 1fr 1.4fr;
    gap: 40px;
    align-items: start;
}

@media (max-width: 860px) {
    .contact-layout {
        grid-template-columns: 1fr;
    }
}

.contact-info {
    background: var(--ink);
    color: #fff;
    border-radius: var(--radius);
    padding: 32px;
}

.contact-info h2 {
    color: #fff;
}

.contact-info p {
    color: #CBD5E1;
}

.contact-info a {
    color: #fff;
    font-weight: 600;
}

.contact-form {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 32px;
    box-shadow: var(--shadow-soft);
}

.form-field {
    margin-bottom: 18px;
}

.form-field label {
    display: block;
    font-weight: 600;
    font-size: 0.9rem;
    color: var(--ink);
    margin-bottom: 6px;
}

.form-field input,
.form-field textarea {
    width: 100%;
    padding: 11px 14px;
    border: 1px solid var(--border);
    border-radius: 8px;
    font-family: var(--font-system);
    font-size: 0.96rem;
    background: var(--bg);
    color: var(--text);
    transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.form-field input:focus,
.form-field textarea:focus {
    outline: none;
    border-color: var(--accent-violet);
    box-shadow: 0 0 0 3px rgba(99, 102, 241, 0.15);
}

.form-error {
    color: #B91C1C;
    font-size: 0.85rem;
    margin: 6px 0 0;
}

/* --- Confirmation --- */

.confirmation__inner {
    text-align: center;
}

.confirmation__icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 84px;
    height: 84px;
    border-radius: 999px;
    background: var(--accent-gradient);
    color: #fff;
    margin-bottom: 24px;
}

/* --- Pages légales --- */

.legal-page h2 {
    margin-top: 32px;
}

/* --- Footer --- */

.site-footer {
    background: var(--ink);
    color: #94A3B8;
    padding: 56px 0 24px;
    margin-top: 24px;
}

.site-footer__inner {
    display: grid;
    grid-template-columns: 1.3fr 0.8fr 0.9fr 1fr;
    gap: 36px;
    padding-bottom: 32px;
}

@media (max-width: 860px) {
    .site-footer__inner {
        grid-template-columns: 1fr;
    }
}

.site-footer__col h3 {
    color: #fff;
    font-size: 0.95rem;
    margin-bottom: 12px;
}

.site-footer__col a {
    display: block;
    color: #94A3B8;
    margin-bottom: 8px;
}

.site-footer__col a:hover {
    color: #fff;
}

.site-footer p {
    color: #94A3B8;
    font-size: 0.92rem;
}

.brand--footer {
    margin-bottom: 14px;
    display: inline-flex;
}

.site-footer__copy {
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    padding-top: 20px;
    font-size: 0.82rem;
}

/* --- Animation discrète au scroll --- */

.reveal {
    opacity: 0;
    transform: translateY(16px);
    transition: opacity 0.5s ease, transform 0.5s ease;
}

.reveal.is-visible {
    opacity: 1;
    transform: translateY(0);
}

/* --- Menu mobile --- */

@media (max-width: 780px) {
    .nav-toggle {
        display: flex;
    }

    .main-nav {
        position: absolute;
        top: 100%;
        left: 0;
        right: 0;
        background: var(--ink);
        flex-direction: column;
        align-items: flex-start;
        gap: 0;
        padding: 0 24px;
        max-height: 0;
        overflow: hidden;
        transition: max-height 0.25s ease;
    }

    .main-nav.is-open {
        max-height: 360px;
        padding: 12px 24px 20px;
    }

    .main-nav a {
        padding: 10px 0;
        width: 100%;
    }

    .main-nav__cta {
        display: inline-block;
        margin-top: 8px;
    }

    .hero__shapes {
        opacity: 0.6;
    }
}
