/* ========================================
   CSS VARIABLES & RESET
   ======================================== */
:root {
    --blue-50: #eff6ff;
    --blue-100: #dbeafe;
    --blue-200: #bfdbfe;
    --blue-300: #93c5fd;
    --blue-400: #60a5fa;
    --blue-500: #3b82f6;
    --blue-600: #2563eb;
    --blue-700: #1d4ed8;
    --blue-800: #1e40af;
    --white: #ffffff;
    --gray-50: #f8fafc;
    --gray-100: #f1f5f9;
    --gray-200: #e2e8f0;
    --gray-300: #cbd5e1;
    --gray-400: #94a3b8;
    --gray-500: #64748b;
    --gray-600: #475569;
    --gray-700: #334155;
    --gray-800: #1e293b;
    --gray-900: #0f172a;
    --green-500: #22c55e;
    --green-100: #dcfce7;
    --orange-500: #f97316;
    --orange-100: #ffedd5;
    --radius-sm: 8px;
    --radius-md: 12px;
    --radius-lg: 16px;
    --radius-xl: 20px;
    --radius-2xl: 24px;
    --radius-full: 9999px;
    --shadow-sm: 0 1px 2px rgba(0,0,0,0.04);
    --shadow-md: 0 4px 16px rgba(0,0,0,0.06);
    --shadow-lg: 0 8px 32px rgba(0,0,0,0.08);
    --shadow-xl: 0 16px 48px rgba(0,0,0,0.1);
    --shadow-blue: 0 8px 32px rgba(59,130,246,0.18);
    --transition: 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    --transition-slow: 0.6s cubic-bezier(0.4, 0, 0.2, 1);
    /* Fond page unique (hero + suite de la landing) */
    --page-surface-bg:
        radial-gradient(120% 82% at 50% 16%, #ffffff 0%, #f7fbff 42%, #edf6ff 72%, #e7f1ff 100%),
        linear-gradient(180deg, #f3f9ff 0%, #f8fcff 44%, #ffffff 100%);
    --page-surface-fallback: #eef4ff;
    --hero-shared-bg: var(--page-surface-bg);
    /* Décalage lien ancre + hero sous la navbar fixe */
    --public-nav-offset: 120px;
}

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

html {
    scroll-behavior: smooth;
    scroll-padding-top: calc(var(--public-nav-offset) + 6px);
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    background: var(--page-surface-bg);
    background-color: var(--page-surface-fallback);
    background-attachment: fixed;
    min-height: 100%;
}

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
    color: var(--gray-800);
    background: transparent;
    line-height: 1.6;
    overflow-x: hidden;
    min-height: 100%;
}
body.nav-mobile-open {
    overflow: hidden;
    touch-action: none;
}

.nav-backdrop {
    position: fixed;
    inset: 0;
    z-index: 998;
    background: rgba(15, 23, 42, 0.14);
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
    transition: opacity 0.38s cubic-bezier(0.22, 1, 0.36, 1), visibility 0s linear 0.38s;
}
.nav-backdrop.is-visible {
    opacity: 1;
    visibility: visible;
    pointer-events: auto;
    transition: opacity 0.38s cubic-bezier(0.22, 1, 0.36, 1), visibility 0s;
}

main {
    background: transparent;
}

a { text-decoration: none; color: inherit; }
ul { list-style: none; }
img { max-width: 100%; display: block; }

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

/* ========================================
   ANIMATIONS
   ======================================== */
@keyframes fadeUp {
    from { opacity: 0; transform: translateY(30px); }
    to { opacity: 1; transform: translateY(0); }
}
@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}
@keyframes float {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(-12px); }
}
@keyframes floatSlow {
    0%, 100% { transform: translateY(0) rotate(0deg); }
    50% { transform: translateY(-8px) rotate(1deg); }
}
@keyframes pulse-soft {
    0%, 100% { opacity: 0.6; transform: scale(1); }
    50% { opacity: 1; transform: scale(1.05); }
}
@keyframes shimmer {
    0% { background-position: -200% 0; }
    100% { background-position: 200% 0; }
}
@keyframes slideInLeft {
    from { opacity: 0; transform: translateX(-40px); }
    to { opacity: 1; transform: translateX(0); }
}
@keyframes slideInRight {
    from { opacity: 0; transform: translateX(40px); }
    to { opacity: 1; transform: translateX(0); }
}
@keyframes scaleIn {
    from { opacity: 0; transform: scale(0.9); }
    to { opacity: 1; transform: scale(1); }
}
@keyframes navDrawerItemIn {
    from { opacity: 0; transform: translateY(8px); }
    to { opacity: 1; transform: translateY(0); }
}
@keyframes gradientMove {
    0% { background-position: 0% 50%; }
    50% { background-position: 100% 50%; }
    100% { background-position: 0% 50%; }
}

.reveal {
    opacity: 0;
    transform: translateY(30px);
    transition: opacity 0.7s var(--transition), transform 0.7s var(--transition);
}
.reveal.visible {
    opacity: 1;
    transform: translateY(0);
}

@media (max-width: 900px) {
    html { background-attachment: scroll; }
    /* Hauteur barre fixe mobile (safe area + ligne marque + padding) */
    :root {
        --public-nav-offset: calc(env(safe-area-inset-top, 0px) + 64px);
    }
}

@media (max-width: 768px) {
    :root {
        --public-nav-offset: calc(env(safe-area-inset-top, 0px) + 66px);
    }
    .container {
        padding: 0 clamp(16px, 4.5vw, 24px);
    }
    .section {
        padding: 76px 0;
    }
    .section__header {
        margin-bottom: 40px;
    }
    .section__title {
        font-size: clamp(1.65rem, 5.8vw, 2.35rem);
    }
    .section__subtitle {
        font-size: 1rem;
        line-height: 1.65;
        max-width: 34rem;
    }
    .section__title {
        line-height: 1.17;
        margin-bottom: 14px;
    }
    .card {
        padding: 22px 20px;
        border-radius: var(--radius-xl);
        box-shadow:
            0 1px 0 rgba(255, 255, 255, 0.9) inset,
            0 6px 28px rgba(15, 23, 42, 0.07);
    }
    .btn {
        min-height: 44px;
    }
    .btn--lg {
        min-height: 48px;
    }
}

@media (max-width: 480px) {
    :root {
        --public-nav-offset: calc(env(safe-area-inset-top, 0px) + 64px);
    }
    .section {
        padding: 58px 0;
    }
    .section__header {
        margin-bottom: 32px;
    }
}

@media (hover: none) {
    .card:hover {
        transform: none;
        box-shadow:
            0 1px 0 rgba(255, 255, 255, 0.9) inset,
            0 6px 28px rgba(15, 23, 42, 0.07);
        border-color: var(--gray-200);
    }
}

@media (prefers-reduced-motion: reduce) {
    html { scroll-behavior: auto; }
    *, *::before, *::after {
        animation-duration: 0.01ms !important;
        transition-duration: 0.01ms !important;
    }
    .reveal { opacity: 1; transform: none; }
    .navbar:not(.open) .navbar__panel .navbar__link,
    .navbar:not(.open) .navbar__panel .navbar__actions .btn,
    .navbar.open .navbar__panel .navbar__link,
    .navbar.open .navbar__panel .navbar__actions .btn {
        opacity: 1;
        transform: none;
        animation: none;
    }
}

/* ========================================
   NAVBAR
   ======================================== */
.navbar {
    position: fixed;
    top: 16px;
    left: 50%;
    transform: translateX(-50%);
    width: calc(100% - 48px);
    max-width: 1200px;
    z-index: 1000;
    background: rgba(255,255,255,0.82);
    backdrop-filter: blur(20px) saturate(1.8);
    -webkit-backdrop-filter: blur(20px) saturate(1.8);
    border: 1px solid rgba(255,255,255,0.6);
    border-radius: var(--radius-full);
    padding: 12px 28px;
    box-shadow: 0 4px 24px rgba(0,0,0,0.06);
    display: flex;
    align-items: center;
    justify-content: space-between;
    transition:
        background 0.35s cubic-bezier(0.4, 0, 0.2, 1),
        box-shadow 0.35s cubic-bezier(0.4, 0, 0.2, 1),
        border-color 0.3s ease,
        top 0.35s cubic-bezier(0.4, 0, 0.2, 1);
    animation: fadeIn 0.8s ease-out;
}
.navbar.scrolled {
    background: rgba(255,255,255,0.95);
    box-shadow: 0 4px 32px rgba(0,0,0,0.1);
    top: 8px;
}
.navbar__brand {
    display: flex;
    align-items: center;
    gap: 10px;
    font-weight: 700;
    font-size: 1.25rem;
    color: var(--blue-600);
    text-decoration: none;
}
.navbar__brand:hover {
    text-decoration: none;
    opacity: 0.92;
}
.navbar__brand-icon {
    width: 44px;
    height: 44px;
    min-width: 44px;
    min-height: 44px;
    background: transparent;
    border-radius: 0;
    overflow: visible;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 1rem;
    flex-shrink: 0;
}
.navbar__links {
    display: flex;
    align-items: center;
    gap: 4px;
}
.navbar__link {
    padding: 8px 14px;
    font-size: 0.9rem;
    font-weight: 500;
    color: var(--gray-600);
    border-radius: var(--radius-full);
    transition: color 0.25s ease, background 0.25s ease, box-shadow 0.25s ease;
    position: relative;
}
.navbar__link:hover {
    color: var(--blue-600);
    background: var(--blue-50);
}
.navbar__link--active {
    color: var(--blue-600);
    background: var(--blue-50);
    font-weight: 600;
    box-shadow: 0 0 0 1px rgba(59, 130, 246, 0.12);
}
.navbar__actions {
    display: flex;
    align-items: center;
    gap: 10px;
}
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 10px 22px;
    font-size: 0.9rem;
    font-weight: 600;
    border-radius: var(--radius-full);
    border: none;
    cursor: pointer;
    transition: var(--transition);
    font-family: inherit;
    white-space: nowrap;
}
.btn--ghost {
    background: transparent;
    color: var(--gray-700);
}
.btn--ghost:hover { background: var(--gray-100); }
.btn--primary {
    background: linear-gradient(135deg, var(--blue-500), var(--blue-700));
    color: white;
    box-shadow: var(--shadow-blue);
}
.btn--primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 12px 40px rgba(59,130,246,0.3);
}
.btn--outline {
    background: white;
    color: var(--blue-600);
    border: 1.5px solid var(--blue-200);
}
.btn--outline:hover {
    background: var(--blue-50);
    border-color: var(--blue-400);
    transform: translateY(-2px);
}
.btn--lg {
    padding: 14px 32px;
    font-size: 1rem;
}
.btn--xl {
    padding: 18px 40px;
    font-size: 1.05rem;
}

/* Mobile menu — drawer, CSS burger, desktop: flat row via display:contents */
.navbar__top {
    display: contents;
}
.navbar__panel {
    display: contents;
}
.navbar__toggle {
    display: none;
    background: none;
    border: none;
    cursor: pointer;
    padding: 8px;
    color: var(--gray-700);
    align-items: center;
    justify-content: center;
    -webkit-tap-highlight-color: transparent;
}
.navbar__burger {
    display: block;
    width: 22px;
    height: 14px;
    position: relative;
}
.navbar__burger-line {
    display: block;
    position: absolute;
    left: 0;
    right: 0;
    height: 2px;
    border-radius: 2px;
    background: var(--gray-700);
    transition: transform 0.38s cubic-bezier(0.22, 1, 0.36, 1), opacity 0.28s ease, top 0.38s cubic-bezier(0.22, 1, 0.36, 1);
}
.navbar__burger-line:nth-child(1) { top: 0; }
.navbar__burger-line:nth-child(2) { top: 6px; }
.navbar__burger-line:nth-child(3) { top: 12px; }
.navbar.open .navbar__burger-line:nth-child(1) {
    top: 6px;
    transform: rotate(45deg);
}
.navbar.open .navbar__burger-line:nth-child(2) {
    opacity: 0;
    transform: scaleX(0.2);
}
.navbar.open .navbar__burger-line:nth-child(3) {
    top: 6px;
    transform: rotate(-45deg);
}

@media (min-width: 901px) {
    .navbar__toggle { display: none !important; }
}

@media (max-width: 900px) {
    .navbar {
        padding: 10px 18px;
        border-radius: var(--radius-xl);
        backdrop-filter: blur(14px) saturate(1.4);
        -webkit-backdrop-filter: blur(14px) saturate(1.4);
        background: rgba(255, 255, 255, 0.92);
        flex-direction: column;
        align-items: stretch;
        gap: 0;
        position: relative;
    }
    .navbar__top {
        display: flex;
        align-items: center;
        justify-content: space-between;
        width: 100%;
        gap: 12px;
    }
    .navbar__panel {
        display: block;
        position: absolute;
        left: 0;
        right: 0;
        top: calc(100% + 10px);
        padding: 12px 14px 18px;
        background: rgba(255, 255, 255, 0.98);
        border: 1px solid rgba(226, 232, 240, 0.95);
        border-radius: var(--radius-xl);
        box-shadow:
            0 22px 56px rgba(15, 23, 42, 0.12),
            0 8px 24px rgba(15, 23, 42, 0.06);
        opacity: 0;
        visibility: hidden;
        pointer-events: none;
        transform: translateY(-12px) scale(0.98);
        transform-origin: 50% 0;
        transition:
            opacity 0.42s cubic-bezier(0.22, 1, 0.36, 1),
            transform 0.45s cubic-bezier(0.22, 1, 0.36, 1),
            visibility 0s linear 0.42s;
    }
    .navbar.open .navbar__panel {
        opacity: 1;
        visibility: visible;
        pointer-events: auto;
        transform: translateY(0) scale(1);
        transition:
            opacity 0.42s cubic-bezier(0.22, 1, 0.36, 1),
            transform 0.45s cubic-bezier(0.22, 1, 0.36, 1),
            visibility 0s;
    }
    .navbar__toggle {
        display: inline-flex;
        flex-shrink: 0;
        margin-left: auto;
    }
    .navbar__links {
        display: flex;
        flex-direction: column;
        gap: 4px;
    }
    .navbar__actions {
        display: flex;
        flex-direction: column;
        gap: 10px;
        align-items: stretch;
        margin-top: 8px;
        padding-top: 14px;
        border-top: 1px solid var(--gray-100);
    }
    .navbar__link {
        padding: 12px 14px;
        font-size: 1rem;
        text-align: center;
        border-radius: var(--radius-lg);
    }
    .navbar__actions .btn {
        width: 100%;
        justify-content: center;
        min-height: 48px;
    }
    .navbar:not(.open) .navbar__panel .navbar__link,
    .navbar:not(.open) .navbar__panel .navbar__actions .btn {
        opacity: 0;
        transform: translateY(8px);
        animation: none;
    }
    .navbar.open .navbar__panel .navbar__link {
        animation: navDrawerItemIn 0.44s cubic-bezier(0.22, 1, 0.36, 1) both;
    }
    .navbar.open .navbar__panel .navbar__link:nth-child(1) { animation-delay: 0.06s; }
    .navbar.open .navbar__panel .navbar__link:nth-child(2) { animation-delay: 0.11s; }
    .navbar.open .navbar__panel .navbar__link:nth-child(3) { animation-delay: 0.16s; }
    .navbar.open .navbar__panel .navbar__link:nth-child(4) { animation-delay: 0.21s; }
    .navbar.open .navbar__panel .navbar__actions .btn {
        animation: navDrawerItemIn 0.44s cubic-bezier(0.22, 1, 0.36, 1) both;
    }
    .navbar.open .navbar__panel .navbar__actions .btn:nth-child(1) { animation-delay: 0.29s; }
    .navbar.open .navbar__panel .navbar__actions .btn:nth-child(2) { animation-delay: 0.35s; }
}

@media (max-width: 768px) {
    .navbar {
        width: calc(100% - 32px);
        top: max(12px, env(safe-area-inset-top, 0px));
        padding: 10px 16px;
        background: rgba(255, 255, 255, 0.94);
        backdrop-filter: blur(12px) saturate(1.35);
        -webkit-backdrop-filter: blur(12px) saturate(1.35);
        box-shadow: 0 4px 20px rgba(15, 23, 42, 0.07);
    }
    .navbar.scrolled {
        top: max(8px, env(safe-area-inset-top, 0px));
        background: rgba(255, 255, 255, 0.98);
    }
    .navbar__brand {
        font-size: 1.12rem;
        gap: 8px;
        flex-shrink: 0;
        min-width: 0;
    }
    .navbar__brand span {
        overflow: hidden;
        text-overflow: ellipsis;
        white-space: nowrap;
    }
    .navbar__brand-icon {
        width: 40px;
        height: 40px;
        min-width: 40px;
        min-height: 40px;
        font-size: 0.95rem;
    }
    .navbar__toggle {
        min-width: 44px;
        min-height: 44px;
        border-radius: var(--radius-md);
    }
}

/* ========================================
   SECTION TITLES
   ======================================== */
.section {
    padding: 100px 0;
    background: transparent;
}
.section--alt {
    background: transparent;
}
.section__badge {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 6px 16px;
    border-radius: var(--radius-full);
    font-size: 0.82rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    margin-bottom: 20px;
}
.section__badge--blue {
    background: var(--blue-50);
    color: var(--blue-600);
    border: 1px solid var(--blue-100);
}
.section__title {
    font-size: clamp(2rem, 4vw, 2.8rem);
    font-weight: 800;
    color: var(--gray-900);
    line-height: 1.2;
    margin-bottom: 16px;
}
.section__subtitle {
    font-size: 1.1rem;
    color: var(--gray-500);
    max-width: 640px;
    line-height: 1.7;
}
.section__header {
    text-align: center;
    margin-bottom: 64px;
}
.section__header .section__subtitle {
    margin: 0 auto;
}

/* ========================================
   CARDS
   ======================================== */
.card {
    background: var(--white);
    border: 1px solid var(--gray-200);
    border-radius: var(--radius-lg);
    padding: 32px;
    transition: var(--transition);
}
.card:hover {
    transform: translateY(-6px);
    box-shadow: var(--shadow-lg);
    border-color: var(--blue-200);
}
.card__icon {
    width: 52px; height: 52px;
    border-radius: var(--radius-md);
    display: flex; align-items: center; justify-content: center;
    font-size: 1.3rem;
    margin-bottom: 20px;
}
.card__icon--blue { background: var(--blue-50); color: var(--blue-600); }
.card__icon--green { background: var(--green-100); color: var(--green-500); }
.card__icon--orange { background: var(--orange-100); color: var(--orange-500); }
.card__title {
    font-size: 1.15rem;
    font-weight: 700;
    color: var(--gray-900);
    margin-bottom: 10px;
}
.card__text {
    font-size: 0.95rem;
    color: var(--gray-500);
    line-height: 1.7;
}

/* ========================================
   FOOTER
   ======================================== */
.footer {
    background: transparent;
    color: var(--gray-600);
    padding: 64px 0 32px;
    border-top: 1px solid rgba(148, 163, 184, 0.22);
}
.footer__grid {
    display: grid;
    grid-template-columns: 2fr repeat(3, 1fr);
    gap: 48px;
    margin-bottom: 48px;
}
.footer__brand {
    display: flex; align-items: center; gap: 10px;
    font-weight: 700; font-size: 1.2rem; color: var(--gray-900);
    margin-bottom: 16px;
}
.footer__brand-icon {
    width: 44px;
    height: 44px;
    min-width: 44px;
    min-height: 44px;
    background: transparent;
    border-radius: 0;
    overflow: visible;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 1rem;
    flex-shrink: 0;
}
.footer__desc {
    font-size: 0.9rem; line-height: 1.7; margin-bottom: 24px;
}
.footer__social {
    display: flex; gap: 12px;
}
.footer__social a {
    width: 38px; height: 38px;
    border-radius: var(--radius-full);
    background: rgba(255,255,255,0.08);
    display: flex; align-items: center; justify-content: center;
    color: var(--gray-400);
    transition: var(--transition);
}
.footer__social a:hover {
    background: var(--blue-600); color: white;
}
.footer__heading {
    font-size: 0.85rem; font-weight: 700;
    text-transform: uppercase; letter-spacing: 0.08em;
    color: white; margin-bottom: 20px;
}
.footer__links a {
    display: block;
    padding: 5px 0;
    font-size: 0.9rem;
    color: var(--gray-400);
    transition: var(--transition);
}
.footer__links a:hover { color: var(--blue-600); padding-left: 4px; }
.footer__bottom {
    border-top: 1px solid rgba(148, 163, 184, 0.2);
    padding-top: 24px;
    display: flex; justify-content: space-between; align-items: center;
    font-size: 0.85rem;
    flex-wrap: wrap; gap: 16px;
}
@media (max-width: 768px) {
    .footer__grid { grid-template-columns: 1fr 1fr; gap: 32px; }
}
@media (max-width: 500px) {
    .footer__grid { grid-template-columns: 1fr; }
}