:root {
    --ink: #0f172a;
    --ink-soft: #334155;
    --muted: #64748b;
    --line: #e2e8f0;
    --surface: #ffffff;
    --surface-soft: #f8fafc;
    --brand: #0f6b8f;
    --brand-dark: #0f172a;
    --teal: #0f766e;
    --cyan: #06b6d4;
    --green: #16a34a;
    --amber: #f59e0b;
    --danger: #dc2626;
    --shadow: 0 16px 40px rgba(15, 23, 42, 0.12);
    --radius: 8px;
    --bottom-nav-height: 76px;
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
}

* {
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    margin: 0;
    min-height: 100vh;
    background: #dbeafe;
    color: var(--ink);
    font-family: var(--font-family, 'Inter', sans-serif);
}

a {
    color: inherit;
}

button,
a {
    -webkit-tap-highlight-color: transparent;
}

.app-shell {
    width: min(100%, 480px);
    min-height: 100vh;
    margin: 0 auto;
    background: var(--surface-soft);
    box-shadow: 0 0 0 1px rgba(15, 23, 42, 0.08);
    position: relative;
    display: flex;
    flex-direction: column;
    overflow-x: hidden;
    padding-bottom: calc(var(--bottom-nav-height) + env(safe-area-inset-bottom));
}

.app-header {
    position: sticky;
    top: 0;
    z-index: 20;
    height: 68px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
    padding: 10px 18px;
    background: rgba(255, 255, 255, 0.92);
    border-bottom: 1px solid rgba(226, 232, 240, 0.9);
    -webkit-backdrop-filter: blur(16px);
    backdrop-filter: blur(16px);
}

.brand-lockup {
    display: flex;
    align-items: center;
    text-decoration: none;
}

.brand-lockup img {
    width: 154px;
    height: auto;
    display: block;
}

.header-action {
    width: 42px;
    height: 42px;
    border-radius: var(--radius);
    display: grid;
    place-items: center;
    color: #ffffff;
    background: var(--green);
    text-decoration: none;
    box-shadow: 0 10px 22px rgba(22, 163, 74, 0.28);
}

.app-main,
main {
    flex: 1;
    display: grid;
    grid-template-columns: minmax(0, 1fr);
    gap: 14px;
    align-content: start;
}

.screen {
    width: 100%;
    min-width: 0;
    padding: 22px 18px;
    scroll-margin-top: 78px;
}

.app-page {
    min-height: 100%;
}

.hero-screen {
    min-height: 620px;
    display: flex;
    flex-direction: column;
    justify-content: center;
    color: #ffffff;
    background:
        linear-gradient(145deg, rgba(15, 23, 42, 0.96), rgba(15, 107, 143, 0.9)),
        repeating-linear-gradient(90deg, rgba(255, 255, 255, 0.08) 0 1px, transparent 1px 68px),
        repeating-linear-gradient(0deg, rgba(255, 255, 255, 0.06) 0 1px, transparent 1px 68px);
}

.hero-kicker {
    width: fit-content;
    margin-bottom: 18px;
    padding: 8px 10px;
    border: 1px solid rgba(255, 255, 255, 0.18);
    border-radius: var(--radius);
    background: rgba(255, 255, 255, 0.1);
    color: rgba(255, 255, 255, 0.86);
    font-size: 0.78rem;
    font-weight: 700;
    letter-spacing: 0;
}

.hero-screen h1 {
    margin: 0;
    max-width: 420px;
    font-size: clamp(2rem, 9vw, 2.9rem);
    line-height: 1.02;
    letter-spacing: 0;
    font-weight: 800;
}

.hero-screen p {
    margin: 18px 0 0;
    color: rgba(255, 255, 255, 0.82);
    font-size: 1rem;
    line-height: 1.7;
}

.primary-actions {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 10px;
    margin-top: 24px;
}

.app-button {
    min-height: 50px;
    border-radius: var(--radius);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    font-weight: 800;
    text-decoration: none;
    border: 1px solid rgba(255, 255, 255, 0.18);
}

.app-button-primary {
    background: var(--green);
    color: #ffffff;
}

.app-button-secondary {
    background: rgba(255, 255, 255, 0.12);
    color: #ffffff;
}

.metric-strip {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 8px;
    margin-top: 24px;
}

.metric-strip div {
    min-height: 74px;
    padding: 12px 8px;
    border-radius: var(--radius);
    background: rgba(255, 255, 255, 0.12);
    border: 1px solid rgba(255, 255, 255, 0.14);
}

.metric-strip strong,
.metric-strip span {
    display: block;
    text-align: center;
}

.metric-strip strong {
    font-size: 1.15rem;
}

.metric-strip span {
    margin-top: 2px;
    color: rgba(255, 255, 255, 0.72);
    font-size: 0.76rem;
}

.mobile-trust-row {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 8px;
    margin-top: 10px;
}

.mobile-trust-row span {
    min-height: 38px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    border-radius: var(--radius);
    color: rgba(255, 255, 255, 0.86);
    background: rgba(255, 255, 255, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.12);
    font-size: 0.75rem;
    font-weight: 800;
}

.home-route-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 10px;
    margin-top: 14px;
}

.home-route-card {
    min-height: 68px;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 12px;
    border-radius: var(--radius);
    color: #ffffff;
    background: rgba(255, 255, 255, 0.12);
    border: 1px solid rgba(255, 255, 255, 0.16);
    text-decoration: none;
    font-size: 0.88rem;
    font-weight: 800;
}

.compact-screen {
    background: var(--surface-soft);
}

.surface-screen {
    background: #eef6f8;
}

.section-heading {
    margin-bottom: 16px;
}

.section-heading span {
    display: block;
    margin-bottom: 5px;
    color: var(--teal);
    font-size: 0.76rem;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 0;
}

.section-heading h1,
.section-heading h2 {
    margin: 0;
    font-size: 1.46rem;
    line-height: 1.15;
    letter-spacing: 0;
}

.section-heading h1 {
    font-size: 1.72rem;
}

.section-heading p {
    margin: 9px 0 0;
    color: var(--muted);
    font-size: 0.94rem;
    line-height: 1.55;
}

.page-subsection-title {
    margin-top: 24px;
}

.row-heading {
    display: flex;
    align-items: end;
    justify-content: space-between;
    gap: 12px;
}

.row-heading a {
    color: var(--brand);
    font-size: 0.88rem;
    font-weight: 800;
    text-decoration: none;
}

.service-list,
.project-stack,
.contact-list {
    display: grid;
    gap: 10px;
}

.service-tile,
.project-tile,
.contact-row {
    display: flex;
    gap: 12px;
    align-items: flex-start;
    padding: 14px;
    border-radius: var(--radius);
    background: var(--surface);
    border: 1px solid var(--line);
    box-shadow: 0 8px 22px rgba(15, 23, 42, 0.05);
}

.service-tile i {
    flex: 0 0 auto;
    width: 42px;
    height: 42px;
    display: grid;
    place-items: center;
    border-radius: var(--radius);
    color: #ffffff;
    background: var(--brand);
}

.service-tile h2,
.service-tile h3,
.project-tile h2,
.project-tile h3 {
    margin: 0 0 4px;
    font-size: 1rem;
}

.service-tile p,
.project-tile p {
    margin: 0;
    color: var(--muted);
    font-size: 0.9rem;
    line-height: 1.5;
}

.project-icon {
    width: 42px;
    height: 42px;
    flex: 0 0 auto;
    display: grid;
    place-items: center;
    border-radius: var(--radius);
    color: #ffffff;
}

.project-icon.security {
    background: var(--brand-dark);
}

.project-icon.ai {
    background: var(--teal);
}

.project-icon.web {
    background: var(--amber);
}

.mobile-page-links {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 10px;
    margin-top: 12px;
}

.mobile-page-links a {
    min-height: 58px;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 10px;
    border-radius: var(--radius);
    color: #ffffff;
    background: var(--brand-dark);
    text-decoration: none;
    font-size: 0.82rem;
    font-weight: 800;
    text-align: center;
}

.method-mobile-screen {
    background: #eef6f8;
}

.mobile-steps {
    display: grid;
    gap: 10px;
}

.mobile-steps article {
    display: flex;
    gap: 12px;
    padding: 14px;
    border-radius: var(--radius);
    background: var(--surface);
    border: 1px solid var(--line);
    box-shadow: 0 8px 22px rgba(15, 23, 42, 0.05);
}

.mobile-steps strong {
    width: 40px;
    height: 40px;
    flex: 0 0 auto;
    display: grid;
    place-items: center;
    border-radius: var(--radius);
    color: #ffffff;
    background: var(--brand);
    font-size: 0.86rem;
}

.mobile-steps h2,
.mobile-steps h3 {
    margin: 0 0 4px;
    font-size: 1rem;
}

.mobile-steps p {
    margin: 0;
    color: var(--muted);
    font-size: 0.9rem;
    line-height: 1.5;
}

.sectors-mobile-screen {
    background: var(--surface-soft);
}

.mobile-sector-list {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 10px;
}

.mobile-sector-list span {
    min-height: 58px;
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 10px;
    border-radius: var(--radius);
    background: var(--surface);
    border: 1px solid var(--line);
    color: var(--ink-soft);
    font-size: 0.82rem;
    font-weight: 800;
}

.mobile-sector-list i {
    color: var(--brand);
}

.partner-rail {
    display: grid;
    grid-auto-flow: column;
    grid-auto-columns: 136px;
    gap: 10px;
    overflow-x: auto;
    padding-bottom: 6px;
    scroll-snap-type: x mandatory;
}

.partner-rail::-webkit-scrollbar {
    display: none;
}

.partner-chip {
    min-height: 156px;
    padding: 12px;
    border-radius: var(--radius);
    background: var(--surface);
    border: 1px solid var(--line);
    display: grid;
    align-content: center;
    gap: 8px;
    text-align: center;
    scroll-snap-align: start;
}

.partner-chip img {
    width: 92px;
    height: 76px;
    margin: 0 auto;
    object-fit: contain;
}

.partner-chip span {
    font-size: 0.82rem;
    font-weight: 800;
    color: var(--ink-soft);
}

.testimonial-screen {
    background: var(--brand-dark);
    color: #ffffff;
    text-align: center;
}

.testimonial-screen img {
    width: 74px;
    height: 74px;
    object-fit: cover;
    border-radius: var(--radius);
    border: 2px solid rgba(255, 255, 255, 0.24);
}

.testimonial-screen blockquote {
    margin: 16px auto 8px;
    max-width: 360px;
    font-size: 1rem;
    line-height: 1.65;
}

.testimonial-screen p {
    margin: 0;
    color: rgba(255, 255, 255, 0.74);
    font-weight: 700;
}

.stars {
    margin-top: 6px;
    color: var(--amber);
}

.contact-screen {
    background: var(--surface-soft);
}

.mobile-promise {
    margin-bottom: 12px;
    padding: 14px;
    border-radius: var(--radius);
    color: #ffffff;
    background: var(--brand-dark);
}

.mobile-promise strong {
    display: block;
    margin-bottom: 4px;
}

.mobile-promise p {
    margin: 0;
    color: rgba(255, 255, 255, 0.78);
    font-size: 0.9rem;
    line-height: 1.5;
}

.method-promise {
    margin: 12px 0 0;
}

.testimonial-card {
    margin-top: 14px;
    display: flex;
    gap: 12px;
    align-items: center;
    padding: 14px;
    border-radius: var(--radius);
    color: #ffffff;
    background: var(--brand-dark);
}

.testimonial-card img {
    width: 72px;
    height: 72px;
    flex: 0 0 72px;
    object-fit: cover;
    border-radius: var(--radius);
    border: 2px solid rgba(255, 255, 255, 0.2);
}

.testimonial-card blockquote {
    margin: 0 0 6px;
    font-size: 0.92rem;
    line-height: 1.5;
}

.testimonial-card p {
    margin: 0;
    color: rgba(255, 255, 255, 0.74);
    font-size: 0.84rem;
    font-weight: 700;
}

.app-footer {
    margin-top: auto;
    padding: 16px 18px 18px;
    background: var(--surface);
    border-top: 1px solid var(--line);
}

.app-footer strong,
.app-footer span {
    display: block;
}

.app-footer strong {
    color: var(--ink);
    font-size: 0.94rem;
}

.app-footer span {
    margin-top: 3px;
    color: var(--muted);
    font-size: 0.78rem;
    line-height: 1.4;
}

.app-footer-links {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-top: 10px;
}

.app-footer-links a {
    min-height: 34px;
    display: inline-flex;
    align-items: center;
    padding: 0 10px;
    border-radius: var(--radius);
    color: var(--brand);
    background: #e0f2fe;
    text-decoration: none;
    font-size: 0.78rem;
    font-weight: 800;
}

.app-footer-links a.desktop-switch {
    color: var(--muted);
    background: #f1f5f9;
}

.app-footer-links a.desktop-switch i {
    margin-right: 5px;
}

.contact-row {
    align-items: center;
    color: inherit;
    text-decoration: none;
}

.contact-row i {
    width: 42px;
    height: 42px;
    flex: 0 0 auto;
    display: grid;
    place-items: center;
    border-radius: var(--radius);
    color: #ffffff;
    background: var(--brand);
}

.contact-row:nth-child(1) i {
    background: var(--green);
}

.contact-row:nth-child(4) i {
    background: var(--ink);
}

.contact-row strong,
.contact-row span {
    display: block;
}

.contact-row strong {
    font-size: 0.98rem;
}

.contact-row span {
    margin-top: 2px;
    color: var(--muted);
    font-size: 0.84rem;
}

.bottom-nav {
    position: fixed;
    left: 50%;
    bottom: 0;
    z-index: 30;
    width: min(100%, 480px);
    min-height: var(--bottom-nav-height);
    transform: translateX(-50%);
    display: grid;
    grid-template-columns: repeat(5, 1fr);
    padding: 8px 8px calc(8px + env(safe-area-inset-bottom));
    background: rgba(255, 255, 255, 0.95);
    border-top: 1px solid rgba(226, 232, 240, 0.95);
    -webkit-backdrop-filter: blur(18px);
    backdrop-filter: blur(18px);
}

.bottom-nav-link {
    min-width: 0;
    min-height: 58px;
    border-radius: var(--radius);
    display: grid;
    place-items: center;
    gap: 3px;
    color: var(--muted);
    text-decoration: none;
    font-size: 0.68rem;
    font-weight: 800;
}

.bottom-nav-link i {
    font-size: 1rem;
}

.bottom-nav-link.active {
    color: var(--brand);
    background: #e0f2fe;
}

/* ---- About preview (accueil) ---- */
.about-preview {
    margin-top: 24px;
    background: #fff;
    border-radius: var(--radius);
    padding: 20px;
    box-shadow: var(--shadow);
}

.about-quote {
    font-size: 1.12rem;
    font-weight: 700;
    color: var(--brand-dark);
    font-style: italic;
    margin: 0 0 14px;
    padding: 0;
    border: none;
}

.about-preview-img {
    width: 100%;
    border-radius: calc(var(--radius) - 4px);
    object-fit: cover;
    aspect-ratio: 16 / 9;
    margin-bottom: 14px;
    display: block;
}

.about-preview-text p {
    font-size: 0.87rem;
    color: var(--muted);
    line-height: 1.6;
    margin: 0 0 8px;
}

.about-preview-text p:last-child {
    margin-bottom: 0;
}

.about-signature {
    display: flex;
    align-items: center;
    gap: 12px;
    border-top: 1px solid #f0f0f0;
    margin-top: 16px;
    padding-top: 14px;
}

.about-sig-img {
    width: 64px;
    height: auto;
    flex-shrink: 0;
}

.about-signature strong {
    display: block;
    font-size: 0.93rem;
    color: var(--ink);
}

.about-signature span {
    font-size: 0.78rem;
    color: var(--muted);
}

/* ---- Partner cards (partenaires.html) ---- */
.partner-cards {
    display: flex;
    flex-direction: column;
    gap: 10px;
    margin-bottom: 20px;
}

.partner-card-full {
    display: flex;
    align-items: center;
    gap: 14px;
    background: #fff;
    border-radius: var(--radius);
    padding: 14px;
    box-shadow: 0 2px 8px rgba(15,23,42,0.07);
}

.partner-card-logo {
    flex: 0 0 52px;
    width: 52px;
    height: 52px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--surface-soft);
    border-radius: calc(var(--radius) - 2px);
    overflow: hidden;
}

.partner-card-logo img {
    width: 100%;
    height: 100%;
    object-fit: contain;
}

.partner-text-logo {
    font-size: 1.1rem;
    font-weight: 800;
    color: var(--brand);
}

.partner-card-body {
    flex: 1;
    min-width: 0;
}

.partner-card-body span {
    font-size: 0.72rem;
    font-weight: 700;
    color: var(--brand);
    text-transform: uppercase;
    letter-spacing: 0.04em;
}

.partner-card-body h3 {
    font-size: 0.93rem;
    font-weight: 700;
    color: var(--ink);
    margin: 2px 0 4px;
}

.partner-card-body p {
    font-size: 0.80rem;
    color: var(--muted);
    margin: 0;
    line-height: 1.4;
}

/* ---- Mobile CTA card ---- */
.mobile-cta-card {
    background: var(--brand-dark);
    color: #fff;
    border-radius: var(--radius);
    padding: 20px;
    margin-top: 20px;
    margin-bottom: 4px;
}

.mobile-cta-card h3 {
    font-size: 1.05rem;
    font-weight: 800;
    margin: 0 0 6px;
}

.mobile-cta-card p {
    font-size: 0.84rem;
    opacity: 0.80;
    margin: 0;
    line-height: 1.5;
}

/* ---- Method steps compact (portfolio.html) ---- */
.method-steps-compact {
    display: flex;
    flex-direction: column;
    gap: 10px;
    margin-bottom: 20px;
}

.method-step-item {
    display: flex;
    align-items: flex-start;
    gap: 14px;
    background: #fff;
    border-radius: var(--radius);
    padding: 14px;
    box-shadow: 0 2px 8px rgba(15,23,42,0.07);
}

.method-step-item > span {
    flex: 0 0 36px;
    width: 36px;
    height: 36px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--brand);
    color: #fff;
    border-radius: 50%;
    font-size: 0.78rem;
    font-weight: 800;
}

.method-step-item strong {
    display: block;
    font-size: 0.93rem;
    color: var(--ink);
    margin-bottom: 2px;
}

.method-step-item p {
    font-size: 0.80rem;
    color: var(--muted);
    margin: 0;
    line-height: 1.4;
}

/* ---- Portfolio Pinterest masonry ---- */
.portfolio-filters {
    display: flex;
    gap: 8px;
    overflow-x: auto;
    padding-bottom: 4px;
    margin-bottom: 16px;
    scrollbar-width: none;
}
.portfolio-filters::-webkit-scrollbar { display: none; }
.filter-chip {
    flex: 0 0 auto;
    height: 34px;
    padding: 0 14px;
    border: 1.5px solid var(--line);
    border-radius: 100px;
    background: #fff;
    color: var(--ink-soft);
    font-size: 0.82rem;
    font-weight: 700;
    cursor: pointer;
    white-space: nowrap;
    font-family: inherit;
    transition: background 0.2s, color 0.2s, border-color 0.2s;
}
.filter-chip.active { background: var(--brand); color: #fff; border-color: var(--brand); }
.portfolio-masonry { column-count: 2; column-gap: 10px; margin-bottom: 20px; }
.portfolio-pin {
    break-inside: avoid;
    margin-bottom: 10px;
    border-radius: var(--radius);
    overflow: hidden;
    background: #fff;
    box-shadow: 0 2px 10px rgba(15,23,42,0.08);
    cursor: pointer;
    animation: pinFadeIn 0.3s ease;
}
@keyframes pinFadeIn {
    from { opacity: 0; transform: scale(0.96); }
    to   { opacity: 1; transform: scale(1); }
}
.portfolio-pin.pin-hidden { display: none; }
.pin-media { position: relative; width: 100%; overflow: hidden; }
.pin-media img { width: 100%; height: auto; object-fit: cover; display: block; }
.pin-badge {
    position: absolute;
    top: 8px;
    right: 8px;
    background: rgba(255,255,255,0.92);
    color: var(--ink);
    font-size: 0.62rem;
    font-weight: 800;
    padding: 3px 7px;
    border-radius: 100px;
    backdrop-filter: blur(4px);
    display: flex;
    align-items: center;
    gap: 3px;
}
.pin-badge.delivered { background: rgba(22,163,74,0.92); color: #fff; }
.pin-caption { padding: 8px 10px 10px; }
.pin-cat-label {
    font-size: 0.62rem;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    display: block;
    margin-bottom: 3px;
}
.cyber-label     { color: #0f6b8f; }
.identite-label  { color: #0f766e; }
.ia-label        { color: #7c3aed; }
.mobile-label    { color: #0369a1; }
.expansion-label { color: #b45309; }
.pin-title { font-size: 0.80rem; font-weight: 700; color: var(--ink); margin: 0; line-height: 1.3; }
.pin-gradient {
    aspect-ratio: 4/3;
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
}
.cyber-grad     { background: linear-gradient(135deg, #0f172a 0%, #0f6b8f 100%); }
.brand-grad     { background: linear-gradient(135deg, #0f766e 0%, #06b6d4 100%); }
.ia-grad        { background: linear-gradient(135deg, #4c1d95 0%, #7c3aed 100%); }
.mobile-grad    { background: linear-gradient(135deg, #075985 0%, #0369a1 100%); }
.expansion-grad { background: linear-gradient(135deg, #78350f 0%, #d97706 100%); }
.pin-grad-content { display: flex; flex-direction: column; align-items: center; gap: 8px; color: rgba(255,255,255,0.9); }
.pin-grad-content i { font-size: 1.8rem; }
.pin-grad-content p { font-size: 0.72rem; font-weight: 700; margin: 0; text-align: center; }
.pin-count { font-size: 0.75rem; color: var(--muted); margin: 0 0 12px; }

@media (min-width: 481px) {
    body {
        padding: 20px 0;
    }

    .app-shell {
        min-height: calc(100vh - 40px);
        border-radius: var(--radius);
    }

    .bottom-nav {
        bottom: 20px;
        border-radius: 0 0 var(--radius) var(--radius);
    }
}

@media (max-width: 360px) {
    .brand-lockup img {
        width: 118px;
    }

    .hero-screen h1 {
        font-size: 1.9rem;
    }

    .primary-actions {
        grid-template-columns: 1fr;
    }

    .bottom-nav-link span {
        font-size: 0.62rem;
    }

    .mobile-sector-list,
    .mobile-trust-row,
    .mobile-page-links,
    .home-route-grid {
        grid-template-columns: 1fr;
    }

    .testimonial-card {
        align-items: flex-start;
    }
}