:root {
    /* Palette vivante LeKairos — couleurs prononcées et dynamiques */
    --bg-color: #FFFFFF;
    /* Blanc pur */
    --blue-ardoise: #2563EB;
    /* Bleu vif prononcé */
    --gray: #4B5563;
    /* Gris soutenu */
    --green-valid: #10B981;
    /* Vert émeraude vif */
    --orange-btn: #F59E0B;
    /* Orange boutons (inchangé) */
    --text-primary: #0F172A;
    /* Noir profond */
    --text-secondary: #374151;
    /* Gris foncé lisible */
    --font-serif: 'Cinzel', serif;
    --font-sans: 'Inter', sans-serif;
    /* Glassmorphism */
    --glass-bg: rgba(255, 255, 255, 0.12);
    --glass-border: rgba(255, 255, 255, 0.18);
}

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

body {
    background-color: var(--bg-color);
    color: var(--text-primary);
    font-family: var(--font-sans);
    line-height: 1.6;
    overflow-x: hidden;
    position: relative;
    min-height: 100vh;
}

/* ══════════════════════════════════════════════════════
   MESH GRADIENT CANVAS — Toile Vivante LeKairos
   ══════════════════════════════════════════════════════ */

.mesh-canvas {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    overflow: hidden;
    pointer-events: none;
    z-index: 0;
}

main,
footer {
    position: relative;
    z-index: 1;
}

/* ── Blobs (sphères de couleur diffuse) ── */
.mesh-blob {
    position: absolute;
    border-radius: 50%;
    will-change: transform;
}

.mesh-blob--1 {
    width: 60vmax;
    height: 60vmax;
    background: radial-gradient(circle at center, rgba(37, 99, 235, 0.55) 0%, rgba(37, 99, 235, 0) 70%);
    top: -8%;
    left: -18%;
    animation: meshDrift1 25s ease-in-out infinite;
}

.mesh-blob--2 {
    width: 50vmax;
    height: 50vmax;
    background: radial-gradient(circle at center, rgba(124, 58, 237, 0.5) 0%, rgba(124, 58, 237, 0) 70%);
    top: 8%;
    right: -12%;
    animation: meshDrift2 22s ease-in-out infinite;
}

.mesh-blob--3 {
    width: 65vmax;
    height: 65vmax;
    background: radial-gradient(circle at center, rgba(0, 151, 178, 0.45) 0%, rgba(0, 151, 178, 0) 70%);
    top: 38%;
    left: -10%;
    animation: meshDrift3 28s ease-in-out infinite;
}

.mesh-blob--4 {
    width: 55vmax;
    height: 55vmax;
    background: radial-gradient(circle at center, rgba(34, 211, 238, 0.45) 0%, rgba(34, 211, 238, 0) 70%);
    top: 62%;
    right: -8%;
    animation: meshDrift4 20s ease-in-out infinite;
}

/* ── Animations organiques des blobs ── */
@keyframes meshDrift1 {
    0%, 100% { transform: translate(0, 0) scale(1) rotate(0deg); }
    20% { transform: translate(60px, 30px) scale(1.05) rotate(3deg); }
    40% { transform: translate(-30px, 70px) scale(0.96) rotate(-2deg); }
    60% { transform: translate(80px, -20px) scale(1.04) rotate(5deg); }
    80% { transform: translate(-50px, -40px) scale(0.97) rotate(-3deg); }
}

@keyframes meshDrift2 {
    0%, 100% { transform: translate(0, 0) scale(1) rotate(0deg); }
    25% { transform: translate(-70px, 40px) scale(1.07) rotate(-4deg); }
    50% { transform: translate(40px, -60px) scale(0.94) rotate(3deg); }
    75% { transform: translate(-30px, 80px) scale(1.03) rotate(-2deg); }
}

@keyframes meshDrift3 {
    0%, 100% { transform: translate(0, 0) scale(1) rotate(0deg); }
    30% { transform: translate(50px, -50px) scale(1.06) rotate(4deg); }
    60% { transform: translate(-60px, 30px) scale(0.95) rotate(-3deg); }
    90% { transform: translate(30px, 60px) scale(1.02) rotate(2deg); }
}

@keyframes meshDrift4 {
    0%, 100% { transform: translate(0, 0) scale(1) rotate(0deg); }
    35% { transform: translate(-50px, -40px) scale(1.08) rotate(-5deg); }
    65% { transform: translate(70px, 50px) scale(0.93) rotate(4deg); }
}

/* ── Particules scintillantes ── */
.mesh-particle {
    position: absolute;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.7);
    will-change: transform, opacity;
}

.mesh-particle--1 { width: 4px; height: 4px; top: 10%; left: 22%; animation: sparkle1 7s ease-in-out infinite; }
.mesh-particle--2 { width: 3px; height: 3px; top: 20%; right: 18%; animation: sparkle2 9s ease-in-out infinite 1s; }
.mesh-particle--3 { width: 5px; height: 5px; top: 32%; left: 58%; animation: sparkle3 8s ease-in-out infinite 2s; }
.mesh-particle--4 { width: 3px; height: 3px; top: 45%; left: 12%; animation: sparkle1 10s ease-in-out infinite 0.5s; }
.mesh-particle--5 { width: 4px; height: 4px; top: 55%; right: 22%; animation: sparkle2 7.5s ease-in-out infinite 3s; }
.mesh-particle--6 { width: 3px; height: 3px; top: 68%; left: 38%; animation: sparkle3 8.5s ease-in-out infinite 1.5s; }
.mesh-particle--7 { width: 5px; height: 5px; top: 75%; right: 32%; animation: sparkle1 9.5s ease-in-out infinite 2.5s; }
.mesh-particle--8 { width: 3px; height: 3px; top: 85%; left: 52%; animation: sparkle2 6.5s ease-in-out infinite 4s; }

@keyframes sparkle1 {
    0%, 100% { transform: translate(0, 0) scale(1); opacity: 0.2; }
    25% { transform: translate(12px, -18px) scale(1.4); opacity: 0.7; }
    50% { transform: translate(-8px, 10px) scale(0.8); opacity: 0.15; }
    75% { transform: translate(18px, 8px) scale(1.6); opacity: 0.8; }
}

@keyframes sparkle2 {
    0%, 100% { transform: translate(0, 0) scale(1); opacity: 0.15; }
    30% { transform: translate(-15px, 12px) scale(1.5); opacity: 0.75; }
    60% { transform: translate(10px, -14px) scale(0.7); opacity: 0.1; }
    90% { transform: translate(-8px, 20px) scale(1.3); opacity: 0.65; }
}

@keyframes sparkle3 {
    0%, 100% { transform: translate(0, 0) scale(1); opacity: 0.25; }
    20% { transform: translate(16px, 10px) scale(1.3); opacity: 0.8; }
    40% { transform: translate(-12px, -16px) scale(0.9); opacity: 0.2; }
    60% { transform: translate(8px, 18px) scale(1.5); opacity: 0.7; }
    80% { transform: translate(-14px, -8px) scale(0.85); opacity: 0.15; }
}

/* ── Shimmer lumineux itinérant ── */
.mesh-canvas::after {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 50%;
    height: 100%;
    background: linear-gradient(90deg, transparent 0%, rgba(255, 255, 255, 0.03) 50%, transparent 100%);
    animation: meshShimmer 15s linear infinite;
    pointer-events: none;
}

@keyframes meshShimmer {
    0% { left: -50%; }
    100% { left: 150%; }
}

/* ── Accessibilité : mouvement réduit ── */
@media (prefers-reduced-motion: reduce) {
    .mesh-blob,
    .mesh-particle,
    .mesh-canvas::after {
        animation: none !important;
    }
}

/* Header */
.stark-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 2rem 5%;
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    z-index: 2;
}

.logo {
    height: 60px;
}

.stark-nav a {
    text-decoration: none;
    color: var(--text-primary);
    margin-left: 2rem;
    font-size: 0.9rem;
    text-transform: uppercase;
    letter-spacing: 1px;
    transition: opacity 0.3s;
}

.stark-nav a:hover {
    opacity: 0.6;
}

.stark-nav .btn-primary {
    background-color: var(--orange-btn);
    color: var(--bg-color);
    border: none;
    padding: 0.8rem 1.5rem;
    transition: all 0.3s;
}

.stark-nav .btn-primary:hover {
    filter: brightness(1.1);
    color: var(--bg-color);
}

.stark-nav .btn-logout {
    color: var(--text-secondary);
    font-size: 0.8rem;
    border: 1px solid var(--gray);
    padding: 0.5rem 1rem;
    border-radius: 4px;
    transition: all 0.3s;
}

.stark-nav .btn-logout:hover {
    background-color: var(--gray);
    color: var(--bg-color);
}

.stark-nav .btn-admin {
    color: var(--blue-ardoise);
    font-size: 0.8rem;
    border: 1px solid var(--blue-ardoise);
    padding: 0.5rem 1rem;
    border-radius: 4px;
    transition: all 0.3s;
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
}

.stark-nav .btn-admin:hover {
    background-color: var(--blue-ardoise);
    color: var(--bg-color);
}
.stark-nav .btn-admin:hover svg {
    stroke: var(--bg-color);
}

.stark-nav .btn-edit-page {
    color: var(--text-secondary);
    padding: 0.5rem;
    border-radius: 4px;
    transition: all 0.3s;
    display: inline-flex;
    align-items: center;
}

.stark-nav .btn-edit-page:hover {
    color: var(--orange-btn);
    background-color: rgba(245, 158, 11, 0.1);
}

/* Hero */
.hero {
    height: 90vh;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    text-align: center;
    padding: 0 1rem;
}

.overline {
    font-size: 0.8rem;
    text-transform: uppercase;
    letter-spacing: 4px;
    margin-bottom: 1.5rem;
    color: var(--green-valid);
}

h1 {
    font-family: var(--font-serif);
    font-size: 4.5rem;
    line-height: 1.1;
    margin-bottom: 2rem;
    font-weight: 400;
    text-shadow: 0 2px 40px rgba(255, 255, 255, 0.6);
}

.subtitle {
    font-size: 1.2rem;
    color: var(--text-secondary);
    max-width: 600px;
    margin-bottom: 3rem;
    font-weight: 300;
}

.btn-outline {
    display: inline-block;
    text-decoration: none;
    background-color: var(--orange-btn);
    color: var(--bg-color);
    padding: 0.75rem 1.5rem;
    font-size: 1rem;
    transition: all 0.3s;
}

.btn-outline:hover {
    filter: brightness(1.1);
}

/* Quote */
.quote-section {
    padding: 8rem 2rem;
    text-align: center;
    background: rgba(219, 234, 254, 0.35);
    backdrop-filter: blur(24px);
    -webkit-backdrop-filter: blur(24px);
    border-top: 1px solid rgba(255, 255, 255, 0.2);
    border-bottom: 1px solid rgba(255, 255, 255, 0.2);
}

blockquote {
    font-family: var(--font-serif);
    font-size: 2rem;
    max-width: 800px;
    margin: 0 auto;
    color: var(--text-primary);
}

cite {
    display: block;
    margin-top: 1.5rem;
    font-family: var(--font-sans);
    font-size: 1rem;
    font-style: normal;
    text-transform: uppercase;
    letter-spacing: 2px;
}

/* Features */
.features {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 4rem;
    padding: 8rem 5%;
}

.feature-card {
    padding: 2rem;
    background: var(--glass-bg);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border: 1px solid var(--glass-border);
    border-radius: 16px;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.feature-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 12px 40px rgba(37, 99, 235, 0.15);
    background: rgba(255, 255, 255, 0.18);
}

.feature-card h2 {
    font-family: var(--font-serif);
    font-size: 1.8rem;
    margin-bottom: 1rem;
    border-bottom: 2px solid var(--green-valid);
    padding-bottom: 1rem;
    display: inline-block;
}

.feature-card p {
    color: var(--text-secondary);
}

footer {
    text-align: center;
    padding: 2rem;
    font-size: 0.8rem;
    color: var(--gray);
    border-top: 1px solid rgba(255, 255, 255, 0.2);
    background: rgba(255, 255, 255, 0.08);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
}

/* ─── Hamburger button ─── */
.menu-toggle {
    display: none;
    flex-direction: column;
    justify-content: center;
    gap: 5px;
    background: none;
    border: none;
    cursor: pointer;
    padding: 8px;
    z-index: 1001;
}

.menu-toggle span {
    display: block;
    width: 24px;
    height: 2px;
    background-color: var(--text-primary);
    transition: all 0.3s ease;
    border-radius: 2px;
}

/* Animation hamburger → croix */
.menu-toggle.active span:nth-child(1) {
    transform: rotate(45deg) translate(5px, 5px);
}
.menu-toggle.active span:nth-child(2) {
    opacity: 0;
}
.menu-toggle.active span:nth-child(3) {
    transform: rotate(-45deg) translate(5px, -5px);
}

/* ─── Overlay mobile ─── */
.nav-overlay {
    display: none;
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.4);
    z-index: 998;
    opacity: 0;
    transition: opacity 0.3s ease;
}
.nav-overlay.active {
    display: block;
    opacity: 1;
}

/* ─── Desktop: nav inline (inchangé) ─── */
.nav-links,
.nav-actions {
    display: contents;
}

/* ─── Bottom nav mobile ─── */
.mobile-bottom-nav {
    display: none;
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    z-index: 900;
    background: rgba(255, 255, 255, 0.25);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border-top: 1px solid rgba(255, 255, 255, 0.2);
    box-shadow: 0 -2px 12px rgba(0, 0, 0, 0.06);
    justify-content: space-around;
    align-items: stretch;
    padding: 0;
    padding-bottom: env(safe-area-inset-bottom, 0px);
}

.mobile-nav-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    flex: 1;
    padding: 0.55rem 0.25rem 0.45rem;
    text-decoration: none;
    color: var(--text-secondary);
    font-size: 0.65rem;
    letter-spacing: 0.3px;
    text-transform: uppercase;
    font-weight: 500;
    transition: color 0.2s, background-color 0.2s;
    -webkit-tap-highlight-color: transparent;
    gap: 0.2rem;
}

.mobile-nav-item:hover,
.mobile-nav-item:active {
    color: var(--blue-ardoise);
    background-color: rgba(37, 99, 235, 0.04);
}

.mobile-nav-item.mobile-nav-account {
    color: var(--orange-btn);
}
.mobile-nav-item.mobile-nav-account:hover,
.mobile-nav-item.mobile-nav-account:active {
    color: #d97706;
    background-color: rgba(245, 158, 11, 0.06);
}

.mobile-nav-icon {
    width: 22px;
    height: 22px;
}

/* ─── Mobile ─── */
@media (max-width: 768px) {
    h1 {
        font-size: 2.2rem;
        margin-bottom: 1.25rem;
    }

    body {
        padding-bottom: 68px; /* espace pour la bottom nav */
    }

    /* ── Header mobile : sticky avec fond ── */
    .stark-header {
        position: fixed;
        top: 0;
        left: 0;
        width: 100%;
        padding: 0.5rem 5%;
        background: rgba(255, 255, 255, 0.4);
        backdrop-filter: blur(20px);
        -webkit-backdrop-filter: blur(20px);
        box-shadow: 0 1px 12px rgba(37, 99, 235, 0.1);
        border-bottom: 1px solid rgba(255, 255, 255, 0.15);
        z-index: 997;
        transition: box-shadow 0.3s ease;
    }

    /* ── Logo mobile : visible, coloré, bien plus grand ── */
    .logo {
        height: 90px;
        filter: none; /* On retire le grayscale pour que le logo soit bien visible */
        transition: height 0.3s ease;
    }

    /* ── Hero mobile : adapté au header fixe ── */
    .hero {
        height: auto;
        min-height: calc(100vh - 68px); /* 68px = bottom nav */
        min-height: calc(100svh - 68px); /* svh pour iOS */
        padding-top: 110px; /* espace pour le header fixe + logo agrandi */
        padding-bottom: 2rem;
        padding-left: 1.25rem;
        padding-right: 1.25rem;
    }

    .hero-content {
        max-width: 100%;
    }

    /* Afficher le hamburger */
    .menu-toggle {
        display: flex;
    }

    /* Afficher la bottom nav */
    .mobile-bottom-nav {
        display: flex;
    }

    /* Cacher les nav-links du hamburger (doublons avec la bottom nav) */
    .nav-links {
        display: none;
    }

    /* Menu slide-in depuis la droite (uniquement actions : compte, admin, logout) */
    .stark-nav {
        position: fixed;
        top: 0;
        right: 0;
        width: 280px;
        height: 100vh;
        height: 100dvh;
        background: rgba(255, 255, 255, 0.3);
        backdrop-filter: blur(24px);
        -webkit-backdrop-filter: blur(24px);
        box-shadow: -4px 0 20px rgba(0, 0, 0, 0.15);
        z-index: 999;
        display: flex;
        flex-direction: column;
        padding: 5rem 2rem 2rem;
        transform: translateX(100%);
        transition: transform 0.3s ease;
        overflow-y: auto;
    }

    .stark-nav.open {
        transform: translateX(0);
    }

    .nav-actions {
        display: flex;
        flex-direction: column;
    }

    .stark-nav a {
        margin-left: 0;
        font-size: 1rem;
        padding: 0.85rem 0.75rem;
        border-radius: 8px;
        transition: background-color 0.2s;
    }

    .stark-nav a:hover {
        opacity: 1;
        background-color: rgba(37, 99, 235, 0.06);
    }

    .nav-actions {
        gap: 0.75rem;
    }

    .stark-nav .btn-primary {
        text-align: center;
        border-radius: 8px;
        font-size: 1rem;
        padding: 1rem 1.5rem;
    }

    .stark-nav .btn-logout {
        text-align: center;
        font-size: 0.9rem;
        padding: 0.85rem 1rem;
    }

    .stark-nav .btn-admin {
        font-size: 0.9rem;
        justify-content: center;
        padding: 0.85rem 1rem;
    }

    .stark-nav .btn-edit-page {
        justify-content: center;
    }

    /* ── Typographie mobile ── */
    .subtitle {
        font-size: 1rem;
        margin-bottom: 2rem;
        line-height: 1.5;
    }

    .overline {
        font-size: 0.7rem;
        letter-spacing: 3px;
        margin-bottom: 1rem;
    }

    /* ── Bouton CTA mobile ── */
    .actions {
        width: 100%;
    }

    .btn-outline {
        display: block;
        width: 100%;
        text-align: center;
        padding: 1rem 1.5rem;
        font-size: 1rem;
        border-radius: 8px;
    }

    /* ── Quote section mobile ── */
    .quote-section {
        padding: 3rem 1.25rem;
    }

    blockquote {
        font-size: 1.3rem;
        line-height: 1.5;
    }

    cite {
        font-size: 0.85rem;
        margin-top: 1.25rem;
    }

    /* ── Features mobile ── */
    .features {
        padding: 3rem 1.25rem;
        gap: 2rem;
        grid-template-columns: 1fr; /* une seule colonne sur mobile */
    }

    .feature-card {
        padding: 1.5rem;
        background: rgba(255, 255, 255, 0.15);
        border-radius: 12px;
        box-shadow: 0 2px 12px rgba(37, 99, 235, 0.06);
        border: 1px solid rgba(255, 255, 255, 0.2);
    }

    .feature-card h2 {
        font-size: 1.4rem;
    }

    .feature-card p {
        font-size: 0.95rem;
        line-height: 1.6;
    }

    /* ── Footer mobile ── */
    footer {
        padding: 2rem 1.25rem;
        padding-bottom: 80px; /* espace pour la bottom nav */
    }
}

/* ── Bottom nav mobile : meilleurs touch targets ── */
@media (max-width: 768px) {
    .mobile-bottom-nav {
        padding-top: 2px;
    }

    .mobile-nav-item {
        padding: 0.6rem 0.25rem 0.5rem;
        min-height: 52px; /* touch target minimum recommandé */
        font-size: 0.6rem;
        gap: 0.25rem;
    }

    .mobile-nav-icon {
        width: 24px;
        height: 24px;
    }
}

/* ── Petit écran (< 375px) ── */
@media (max-width: 375px) {
    h1 {
        font-size: 1.85rem;
    }

    .logo {
        height: 75px;
    }

    .stark-header {
        padding: 0.6rem 4%;
    }

    .hero {
        padding-top: 70px;
    }

    blockquote {
        font-size: 1.15rem;
    }
}