:root {
    /* Palette cohérente avec la landing page */
    --terracotta: #E07A5F;
    --forest: #3D5A40;
    --cream: #F4F1DE;
    --clay: #81B29A;
    --deep-purple: #5D576B;
    --tangerine: #F2CC8F;
    --charcoal: #1A1A1D;
    --paper: #FDFBF7;
    
    /* Gradients */
    --grad-warm: linear-gradient(135deg, #E07A5F 0%, #F2CC8F 100%);
    --grad-earth: linear-gradient(135deg, #3D5A40 0%, #81B29A 100%);
    --grad-sunset: linear-gradient(135deg, #E07A5F 0%, #5D576B 100%);
    
    /* Shadows */
    --shadow-sm: 0 2px 8px rgba(29, 29, 31, 0.04);
    --shadow-md: 0 8px 24px rgba(29, 29, 31, 0.08);
    --shadow-lg: 0 16px 48px rgba(29, 29, 31, 0.12);
}

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

body {
    font-family: 'Bricolage Grotesque', -apple-system, BlinkMacSystemFont, sans-serif;
    background: var(--paper);
    color: var(--charcoal);
    min-height: 100vh;
    overflow-x: hidden;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

.logo {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    cursor: pointer;
}

.logo-text {
    font-size: 1.5rem;
    font-weight: 800;
    color: var(--forest);
    letter-spacing: -0.02em;
    text-decoration: none;
}

.logo-text i {
    color: var(--clay);
}

.ai-badge {
    background: var(--terracotta);
    color: white;
    padding: 0.25rem 0.6rem;
    border-radius: 6px;
    font-size: 0.7rem;
    font-weight: 700;
    font-family: 'JetBrains Mono', monospace;
    letter-spacing: 0.05em;
}

/* ========================================
   NAVIGATION
   ======================================== */
nav {
    position: fixed;
    width: 100%;
    top: 0;
    background: rgba(253, 251, 247, 0.85);
    backdrop-filter: blur(20px) saturate(180%);
    z-index: 1000;
    border-bottom: 1px solid rgba(61, 90, 64, 0.08);
    animation: slideDown 0.6s cubic-bezier(0.16, 1, 0.3, 1);
}

.nav-content {
    max-width: 1400px;
    margin: 0 auto;
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1.2rem 3rem;
}

.try-button {
    background: var(--forest);
    color: white;
    padding: 0.8rem 1.8rem;
    border-radius: 12px;
    text-decoration: none;
    font-weight: 600;
    font-size: 0.95rem;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow: var(--shadow-sm);
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
}

.try-button:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-md);
    background: var(--charcoal);
}

.navbar {
    position: fixed;
    top: 0;
    width: 100%;
    z-index: 1000;
    background: rgba(253, 251, 247, 0.85);
    backdrop-filter: blur(20px) saturate(180%);
    padding: 1.2rem 3rem;
    border-bottom: 1px solid rgba(61, 90, 64, 0.08);
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.navbar .logo {
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.navbar .logo a {
    font-size: 1.5rem;
    font-weight: 800;
    color: var(--forest);
    text-decoration: none;
    letter-spacing: -0.02em;
}

.navbar .logo a i {
    color: var(--clay);
}

.navbar .categories {
    display: flex;
    justify-content: center;
    flex-grow: 1;
    gap: 2.5rem;
    list-style: none;
}

.navbar .categories a {
    color: var(--charcoal);
    text-decoration: none;
    position: relative;
    padding: 0.5rem 0;
    font-size: 1rem;
    font-weight: 500;
    transition: color 0.3s ease;
}

.navbar .categories a::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 0;
    height: 2px;
    background: var(--terracotta);
    transition: width 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.navbar .categories a:hover::after,
.navbar .categories a.active::after {
    width: 100%;
}

.navbar .categories a.active {
    color: var(--terracotta);
    font-weight: 600;
}

.action_btn {
    background: var(--charcoal);
    color: white;
    padding: 0.8rem 1.8rem;
    border-radius: 12px;
    font-weight: 600;
    font-size: 0.95rem;
    text-decoration: none;
    border: none;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow: var(--shadow-sm);
}

.action_btn:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-md);
    background: var(--forest);
}

/* ========================================
   PAGE HEADER
   ======================================== */
.page-header {
    max-width: 900px;
    margin: 8rem auto 4rem;
    padding: 0 2rem;
    text-align: center;
}

.header-badge {
    display: inline-flex;
    align-items: center;
    gap: 0.75rem;
    background: rgba(224, 122, 95, 0.1);
    border: 1px solid rgba(224, 122, 95, 0.2);
    padding: 0.6rem 1.5rem;
    border-radius: 30px;
    font-size: 0.9rem;
    font-weight: 600;
    color: var(--terracotta);
    margin-bottom: 2rem;
    font-family: 'JetBrains Mono', monospace;
}

.page-header h1 {
    font-size: clamp(2.5rem, 5vw, 4rem);
    line-height: 1.2;
    font-weight: 800;
    color: var(--charcoal);
    margin-bottom: 1.5rem;
    letter-spacing: -0.03em;
}

.page-header h1 .highlight {
    color: var(--terracotta);
    position: relative;
    display: inline-block;
}

.page-header h1 .highlight::after {
    content: '';
    position: absolute;
    left: 0;
    bottom: 0;
    width: 100%;
    height: 12px;
    background: rgba(224, 122, 95, 0.2);
    z-index: -1;
    transform: skewY(-2deg);
}

.header-subtitle {
    font-size: 1.2rem;
    line-height: 1.6;
    color: var(--deep-purple);
    opacity: 0.9;
}

/* ========================================
   SCANNER SECTION
   ======================================== */
#model {
    max-width: 1200px;
    margin: 0 auto 6rem;
    padding: 0 2rem;
}

.scanner-container {
    display: grid;
    gap: 2rem;
}

.upload-zone {
    position: relative;
    background: white;
    border: 2px dashed var(--clay);
    border-radius: 24px;
    padding: 4rem 2rem;
    text-align: center;
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    cursor: pointer;
    overflow: hidden;
}

.upload-zone::before {
    content: '';
    position: absolute;
    inset: 0;
    background: var(--grad-earth);
    opacity: 0;
    transition: opacity 0.4s ease;
}

.upload-zone:hover {
    border-color: var(--forest);
    transform: translateY(-4px);
    box-shadow: var(--shadow-lg);
}

.upload-zone:hover::before {
    opacity: 0.05;
}

.upload-icon {
    margin-bottom: 1.5rem;
    color: var(--clay);
}

.upload-icon svg {
    width: 48px;
    height: 48px;
    stroke-width: 2;
}

#imageUpload {
    position: absolute;
    inset: 0;
    opacity: 0;
    cursor: pointer;
}

.upload-zone h3 {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--charcoal);
    margin-bottom: 0.75rem;
}

.upload-hint {
    font-size: 1rem;
    color: var(--deep-purple);
    margin-bottom: 1rem;
}

.upload-formats {
    font-size: 0.85rem;
    color: var(--clay);
    font-family: 'JetBrains Mono', monospace;
}

.preview-zone {
    position: relative;
    background: white;
    border-radius: 24px;
    padding: 2rem;
    box-shadow: var(--shadow-md);
    min-height: 400px;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
}

#selectedImage {
    max-width: 100%;
    max-height: 500px;
    border-radius: 16px;
    box-shadow: var(--shadow-sm);
}

#preview-overlay {
    position: absolute;
    inset: 0;
    background: rgba(26, 26, 29, 0.8);
    backdrop-filter: blur(4px);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    color: white;
}

.scan-line {
    width: 100%;
    height: 3px;
    background: linear-gradient(90deg, transparent, var(--terracotta), transparent);
    position: absolute;
    animation: scanMove 2s ease-in-out infinite;
    box-shadow: 0 0 20px rgba(224, 122, 95, 0.6);
}

.scan-status {
    margin-top: 3rem;
    font-size: 1.2rem;
    font-weight: 600;
    font-family: 'JetBrains Mono', monospace;
}

.results-zone {
    background: white;
    border-radius: 24px;
    padding: 3rem;
    box-shadow: var(--shadow-md);
    animation: fadeUp 0.6s cubic-bezier(0.4, 0, 0.2, 1);
}

.results-zone > div {
    display: flex;
    flex-direction: column;
    gap: 2rem;
    margin-bottom: 2rem;
}

.results-zone > div:last-child {
    margin-bottom: 0;
}

/* Styles pour chaque barre de résultat */
#graph-wrapper > div {
    display: grid;
    grid-template-columns: 180px 1fr 80px;
    align-items: center;
    gap: 1.5rem;
    padding: 1.5rem;
    background: var(--paper);
    border-radius: 16px;
    border: 1px solid rgba(61, 90, 64, 0.08);
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

#graph-wrapper > div:hover {
    transform: translateX(8px);
    box-shadow: var(--shadow-sm);
}

/* Label du résultat */
#graph-wrapper > div > span:first-child {
    font-size: 1.1rem;
    font-weight: 700;
    color: var(--color);
    letter-spacing: -0.01em;
}

/* Barre de progression */
#graph-wrapper progress {
    -webkit-appearance: none;
    appearance: none;
    width: 100%;
    height: 16px;
    border-radius: 20px;
    border: none;
    overflow: hidden;
    background: var(--color-light);
}

#graph-wrapper progress::-webkit-progress-bar {
    background: var(--color-light);
    border-radius: 20px;
}

#graph-wrapper progress::-webkit-progress-value {
    background: var(--color);
    border-radius: 20px;
    transition: width 0.6s cubic-bezier(0.4, 0, 0.2, 1);
}

#graph-wrapper progress::-moz-progress-bar {
    background: var(--color);
    border-radius: 20px;
    transition: width 0.6s cubic-bezier(0.4, 0, 0.2, 1);
}

/* Pourcentage */
#graph-wrapper > div > span:last-child {
    font-size: 1.3rem;
    font-weight: 800;
    color: var(--color);
    font-family: 'JetBrains Mono', monospace;
    text-align: right;
    min-width: 60px;
}

/* ========================================
   INFO SECTION
   ======================================== */
#info {
    max-width: 1400px;
    margin: 6rem auto;
    padding: 0 2rem;
}

.info-header {
    text-align: center;
    margin-bottom: 4rem;
}

.info-header h2 {
    font-size: clamp(2rem, 4vw, 3rem);
    font-weight: 800;
    color: var(--charcoal);
    margin-bottom: 1rem;
    letter-spacing: -0.02em;
}

.info-header h2 i {
    color: var(--tangerine);
    margin-right: 1rem;
}

.info-subtitle {
    font-size: 1.2rem;
    color: var(--deep-purple);
    opacity: 0.8;
}

/* Features Grid */
.features-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 2.5rem;
}

.feature-card {
    background: white;
    padding: 3rem;
    border-radius: 24px;
    box-shadow: var(--shadow-md);
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    border: 1px solid rgba(61, 90, 64, 0.08);
}

.feature-card:hover {
    transform: translateY(-8px);
    box-shadow: var(--shadow-lg);
}

.feature-icon {
    width: 64px;
    height: 64px;
    border-radius: 16px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 2rem;
}

.feature-icon i {
    font-size: 2rem;
}

.feature-card h3 {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--charcoal);
    margin-bottom: 1rem;
}

.feature-card p {
    font-size: 1rem;
    line-height: 1.7;
    color: var(--deep-purple);
    opacity: 0.8;
    margin-bottom: 2rem;
}

.feature-metric {
    display: flex;
    align-items: baseline;
    gap: 1rem;
    padding-top: 2rem;
    border-top: 1px solid rgba(61, 90, 64, 0.1);
}

.metric-value {
    font-size: 2.5rem;
    font-weight: 800;
    color: var(--forest);
    font-family: 'JetBrains Mono', monospace;
}

.metric-label {
    font-size: 0.85rem;
    color: var(--clay);
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

/* ========================================
   BUTTONS
   ======================================== */
.links-container {
    display: flex;
    gap: 1.5rem;
    justify-content: center;
    margin: 4rem auto;
    padding: 0 2rem;
}

.button {
    display: inline-flex;
    align-items: center;
    gap: 0.75rem;
    padding: 1.2rem 2.5rem;
    border-radius: 14px;
    text-decoration: none;
    font-weight: 600;
    font-size: 1.05rem;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow: var(--shadow-sm);
}

.button.primary {
    background: var(--charcoal);
    color: white;
}

.button.primary:hover {
    transform: translateY(-3px);
    box-shadow: var(--shadow-lg);
    background: var(--forest);
}

.button.secondary {
    background: white;
    color: var(--charcoal);
    border: 2px solid var(--charcoal);
}

.button.secondary:hover {
    background: var(--charcoal);
    color: white;
}

/* ========================================
   FOOTER
   ======================================== */
footer {
    background: var(--charcoal);
    color: white;
    padding: 4rem 3rem 2rem;
}

.footer-content {
    max-width: 1400px;
    margin: 0 auto;
    display: grid;
    grid-template-columns: 1fr 2fr 1fr;
    gap: 3rem;
    align-items: start;
}

.footer-brand .logo {
    margin-bottom: 1rem;
}

.footer-brand .logo-text {
    color: white;
}

.footer-tagline {
    color: rgba(255, 255, 255, 0.6);
    font-size: 0.9rem;
}

.footer-links {
    display: flex;
    gap: 2rem;
    justify-content: center;
}

.footer-links a {
    color: rgba(255, 255, 255, 0.7);
    text-decoration: none;
    font-weight: 500;
    transition: color 0.3s ease;
}

.footer-links a:hover {
    color: var(--terracotta);
}

.footer-legal {
    text-align: right;
}

.footer-legal p {
    color: rgba(255, 255, 255, 0.5);
    font-size: 0.85rem;
}

/* ========================================
   ANIMATIONS
   ======================================== */
@keyframes slideDown {
    from {
        transform: translateY(-100%);
        opacity: 0;
    }
    to {
        transform: translateY(0);
        opacity: 1;
    }
}

@keyframes fadeUp {
    from {
        transform: translateY(30px);
        opacity: 0;
    }
    to {
        transform: translateY(0);
        opacity: 1;
    }
}

@keyframes scanMove {
    0% {
        top: 0;
        opacity: 0;
    }
    10% {
        opacity: 1;
    }
    90% {
        opacity: 1;
    }
    100% {
        top: 100%;
        opacity: 0;
    }
}

@keyframes pulse {
    0%, 100% {
        opacity: 0.6;
    }
    50% {
        opacity: 1;
    }
}

/* ========================================
   RESPONSIVE
   ======================================== */
@media (max-width: 1024px) {
    .scanner-container {
        gap: 1.5rem;
    }
    
    #graph-wrapper > div {
        grid-template-columns: 150px 1fr 70px;
        gap: 1rem;
        padding: 1.2rem;
    }
}

@media (max-width: 768px) {
    nav, .navbar {
        padding: 1rem;
    }

    .nav-content {
        padding: 0;
    }
    
    .logo-text {
        font-size: 1.25rem;
    }
    
    .try-button {
        padding: 0.6rem 1.2rem;
        font-size: 0.85rem;
    }

    .page-header {
        margin-top: 8rem;
        padding: 0 1.5rem;
    }
    
    .page-header h1 {
        font-size: 2rem;
    }
    
    .header-subtitle {
        font-size: 1rem;
    }
    
    #model {
        padding: 0 1.5rem;
    }
    
    .upload-zone {
        padding: 3rem 1.5rem;
    }
    
    .upload-zone h3 {
        font-size: 1.25rem;
    }
    
    .preview-zone,
    .results-zone {
        padding: 1.5rem;
    }
    
    #graph-wrapper > div {
        grid-template-columns: 1fr;
        gap: 1rem;
        text-align: center;
    }
    
    #graph-wrapper > div > span:last-child {
        text-align: center;
    }
    
    #info {
        padding: 0 1.5rem;
    }
    
    .info-header h2 {
        font-size: 2rem;
    }
    
    .info-subtitle {
        font-size: 1rem;
    }

    .features-grid {
        grid-template-columns: 1fr;
        gap: 1.5rem;
    }
    
    .feature-card {
        padding: 2rem;
    }

    .links-container {
        flex-direction: column;
        align-items: center;
        padding: 0 1.5rem;
    }
    
    .button {
        width: 100%;
        justify-content: center;
    }

    .footer-content {
        grid-template-columns: 1fr;
        text-align: center;
        gap: 2rem;
        padding: 0 1rem;
    }

    .footer-links {
        flex-wrap: wrap;
        justify-content: center;
        gap: 1rem;
    }

    .footer-legal {
        text-align: center;
    }
}

@media (max-width: 480px) {
    .page-header h1 {
        font-size: 1.75rem;
    }
    
    .upload-zone {
        padding: 2rem 1rem;
    }
    
    .upload-icon svg {
        width: 36px;
        height: 36px;
    }
    
    .upload-zone h3 {
        font-size: 1.1rem;
    }
    
    .feature-card {
        padding: 1.5rem;
    }
    
    .feature-icon {
        width: 48px;
        height: 48px;
    }
    
    .feature-icon i {
        font-size: 1.5rem;
    }
    
    .feature-card h3 {
        font-size: 1.25rem;
    }
    
    .metric-value {
        font-size: 2rem;
    }
    
    .button {
        padding: 1rem 1.5rem;
        font-size: 0.95rem;
    }
}