/* ═══════════════════════════════════════════════════════════
   GRAINS DU COIN - STYLES PRINCIPAUX
   ═══════════════════════════════════════════════════════════ */

:root {
    --cream:  #F7F2E8;
    --paper:  #EDE6D4;
    --wheat:  #C9A96E;
    --grain:  #8B6535;
    --earth:  #3B2810;
    --forest: #3A4E2C;
    --sage:   #6B7F5A;
    --sky:    #5D8FAA;
    --rust:   #9E4B2A;
    --gold:   #B8881E;
    --ink:    #231608;
    --light:  #F0EAD8;
}

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

html {
    scroll-behavior: smooth;
}

body {
    background: var(--cream);
    color: var(--ink);
    font-family: 'DM Sans', sans-serif;
    font-size: 16px;
    line-height: 1.6;
    overflow-x: hidden;
}

/* ─── BOUTON RETOUR HUB ─── */
.back-to-hub {
    position: fixed;
    top: 20px;
    left: 20px;
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 10px 16px;
    background: rgba(59, 40, 16, 0.9);
    color: #F7F2E8;
    text-decoration: none;
    border-radius: 25px;
    font-size: 0.85rem;
    font-weight: 500;
    z-index: 9999;
    transition: all 0.3s ease;
    box-shadow: 0 2px 10px rgba(0,0,0,0.2);
}

.back-to-hub:hover {
    background: #B8881E;
    transform: translateY(-2px);
}

@media (max-width: 768px) {
    .back-to-hub span { display: none; }
    .back-to-hub { padding: 10px; }
}

/* ─── HERO ─── */
.hero {
    background: var(--earth);
    position: relative;
    overflow: hidden;
    padding: 70px 40px 60px;
}

.hero-grain {
    position: absolute;
    inset: 0;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='300' height='300'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.75' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='300' height='300' filter='url(%23n)' opacity='.04'/%3E%3C/svg%3E");
    opacity: 0.6;
}

.hero-stripe {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: linear-gradient(90deg, var(--gold), var(--wheat), var(--gold));
}

.hero-inner {
    position: relative;
    max-width: 1080px;
    margin: 0 auto;
    display: grid;
    grid-template-columns: 1fr auto;
    align-items: center;
    gap: 48px;
}

.brand-eyebrow {
    font-family: 'DM Mono', monospace;
    font-size: 10px;
    letter-spacing: 4px;
    text-transform: uppercase;
    color: var(--wheat);
    opacity: 0.8;
    margin-bottom: 14px;
}

.brand-name {
    font-family: 'Playfair Display', serif;
    font-size: clamp(42px, 6vw, 72px);
    font-weight: 700;
    color: #fff;
    line-height: 0.95;
    letter-spacing: -1px;
}

.brand-name em {
    color: var(--wheat);
    font-style: italic;
}

.brand-tagline {
    margin-top: 16px;
    color: rgba(255,255,255,0.5);
    font-size: 15px;
    font-weight: 300;
    letter-spacing: 0.5px;
}

.brand-tagline strong {
    color: rgba(255,255,255,0.75);
    font-weight: 400;
}

.mfg-note {
    margin-top: 22px;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 6px 14px;
    border: 1px solid rgba(201,169,110,0.2);
    font-family: 'DM Mono', monospace;
    font-size: 9px;
    letter-spacing: 2px;
    text-transform: uppercase;
    color: rgba(201,169,110,0.5);
}

.hero-icon-col {
    text-align: center;
}

.hero-emblem {
    width: 130px;
    height: 130px;
    border-radius: 50%;
    border: 2px solid rgba(201,169,110,0.25);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 58px;
    background: rgba(201,169,110,0.06);
}

.hero-series {
    margin-top: 12px;
    font-family: 'DM Mono', monospace;
    font-size: 9px;
    letter-spacing: 3px;
    text-transform: uppercase;
    color: var(--wheat);
    opacity: 0.6;
}

/* ─── GAMME STRIP (Navigation) ─── */
.gamme-strip {
    background: var(--paper);
    border-bottom: 2px solid rgba(139,101,53,0.15);
    padding: 0 40px;
    position: sticky;
    top: 0;
    z-index: 100;
    box-shadow: 0 3px 20px rgba(59,40,16,0.1);
}

.gamme-inner {
    max-width: 1080px;
    margin: 0 auto;
    display: flex;
    gap: 0;
    overflow-x: auto;
    scrollbar-width: none;
}

.gamme-inner::-webkit-scrollbar {
    display: none;
}

.phase-btn {
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 14px 28px;
    border: none;
    background: none;
    cursor: pointer;
    border-bottom: 3px solid transparent;
    transition: all 0.2s;
    white-space: nowrap;
    gap: 3px;
}

.phase-btn:hover {
    background: rgba(139,101,53,0.06);
}

.phase-btn.active {
    border-bottom-color: var(--gold);
}

.phase-num {
    font-family: 'DM Mono', monospace;
    font-size: 9px;
    letter-spacing: 2px;
    text-transform: uppercase;
    color: var(--grain);
    opacity: 0.6;
}

.phase-name {
    font-family: 'Playfair Display', serif;
    font-size: 14px;
    font-weight: 600;
    color: var(--earth);
}

.phase-btn.active .phase-name {
    color: var(--gold);
}

.phase-weeks {
    font-family: 'DM Mono', monospace;
    font-size: 9px;
    color: var(--grain);
    opacity: 0.5;
}

/* ─── TIMELINE BAR ─── */
.timeline-wrap {
    background: white;
    border-bottom: 1px solid rgba(139,101,53,0.1);
    padding: 16px 40px;
}

.timeline-inner {
    max-width: 1080px;
    margin: 0 auto;
}

.timeline-label {
    font-family: 'DM Mono', monospace;
    font-size: 9px;
    letter-spacing: 2px;
    text-transform: uppercase;
    color: var(--grain);
    opacity: 0.6;
    margin-bottom: 10px;
}

.timeline {
    display: flex;
    gap: 3px;
    height: 28px;
}

.tl-seg {
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 3px;
    font-family: 'DM Mono', monospace;
    font-size: 8px;
    letter-spacing: 0.5px;
    color: white;
    font-weight: 500;
    transition: opacity 0.2s;
    cursor: pointer;
    overflow: hidden;
    white-space: nowrap;
    padding: 0 6px;
}

.tl-seg:not(.tl-active) {
    opacity: 0.35;
}

.tl-seg.tl-active {
    opacity: 1;
    box-shadow: 0 2px 8px rgba(0,0,0,0.25);
}

/* ─── MAIN ─── */
main {
    max-width: 1080px;
    margin: 0 auto;
    padding: 48px 40px 80px;
}

.product-panel {
    display: none;
    animation: fadeUp 0.3s ease;
}

.product-panel.active {
    display: block;
}

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

/* ─── PRODUCT HERO ─── */
.product-hero {
    display: grid;
    grid-template-columns: 1fr auto;
    gap: 40px;
    align-items: start;
    margin-bottom: 40px;
    padding-bottom: 36px;
    border-bottom: 1px solid rgba(139,101,53,0.15);
}

.product-phase-label {
    font-family: 'DM Mono', monospace;
    font-size: 10px;
    letter-spacing: 3px;
    text-transform: uppercase;
    color: var(--grain);
    margin-bottom: 10px;
}

.product-name {
    font-family: 'Playfair Display', serif;
    font-size: clamp(26px, 3.5vw, 42px);
    font-weight: 700;
    color: var(--earth);
    line-height: 1.1;
}

.product-desc {
    margin-top: 10px;
    color: var(--grain);
    font-size: 15px;
    font-weight: 300;
    max-width: 520px;
    line-height: 1.7;
}

.product-badge {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    margin-top: 18px;
    padding: 8px 18px;
    border-radius: 2px;
    color: white;
    font-family: 'DM Mono', monospace;
    font-size: 11px;
    letter-spacing: 1px;
    text-transform: uppercase;
}

.kpi-col {
    display: flex;
    flex-direction: column;
    gap: 10px;
    min-width: 148px;
}

.kpi {
    background: var(--earth);
    padding: 16px 20px;
    text-align: center;
}

.kpi-val {
    font-family: 'Playfair Display', serif;
    font-size: 30px;
    font-weight: 700;
    color: var(--wheat);
    line-height: 1;
}

.kpi-label {
    font-family: 'DM Mono', monospace;
    font-size: 8px;
    letter-spacing: 1.5px;
    text-transform: uppercase;
    color: rgba(255,255,255,0.5);
    margin-top: 4px;
}

/* ─── COMPOSITION GRID ─── */
.compo-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 32px;
    margin-bottom: 40px;
}

.compo-card {
    background: white;
    border: 1px solid rgba(139,101,53,0.1);
    padding: 28px;
}

.compo-title {
    font-family: 'DM Mono', monospace;
    font-size: 9px;
    letter-spacing: 2px;
    text-transform: uppercase;
    color: var(--grain);
    margin-bottom: 18px;
    opacity: 0.7;
}

.donut-wrap {
    display: flex;
    align-items: center;
    gap: 24px;
}

.donut-svg {
    width: 140px;
    height: 140px;
    flex-shrink: 0;
}

.legend {
    flex: 1;
}

.legend-row {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 4px 0;
    border-bottom: 1px solid rgba(139,101,53,0.06);
}

.legend-dot {
    width: 10px;
    height: 10px;
    border-radius: 2px;
    flex-shrink: 0;
}

.legend-name {
    flex: 1;
    font-size: 12px;
    color: var(--earth);
}

.legend-pct {
    font-family: 'DM Mono', monospace;
    font-size: 11px;
    color: var(--grain);
}

/* ─── INGREDIENTS CARD ─── */
.ingr-card {
    background: white;
    border: 1px solid rgba(139,101,53,0.1);
}

.ingr-header {
    background: var(--earth);
    padding: 14px 20px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.ingr-title {
    font-family: 'DM Mono', monospace;
    font-size: 9px;
    letter-spacing: 2px;
    text-transform: uppercase;
    color: var(--wheat);
}

.ingr-badge {
    font-family: 'DM Mono', monospace;
    font-size: 8px;
    letter-spacing: 1px;
    text-transform: uppercase;
    color: rgba(255,255,255,0.5);
}

.ingr-list {
    padding: 20px;
    font-size: 13px;
    color: var(--grain);
    line-height: 1.8;
}

.ingr-footer {
    background: var(--light);
    padding: 10px 20px;
    font-family: 'DM Mono', monospace;
    font-size: 8px;
    letter-spacing: 1.5px;
    text-transform: uppercase;
    color: var(--grain);
    opacity: 0.6;
    text-align: center;
}

/* ─── AGRO INSIGHT ─── */
.agro-box {
    margin-top: 40px;
    background: linear-gradient(135deg, var(--forest) 0%, #2D3D22 100%);
    padding: 32px;
    display: grid;
    grid-template-columns: auto 1fr;
    gap: 24px;
    align-items: start;
}

.agro-icon {
    width: 56px;
    height: 56px;
    background: rgba(255,255,255,0.08);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 26px;
}

.agro-label {
    font-family: 'DM Mono', monospace;
    font-size: 9px;
    letter-spacing: 2px;
    text-transform: uppercase;
    color: var(--sage);
    margin-bottom: 8px;
}

.agro-title {
    font-family: 'Playfair Display', serif;
    font-size: 20px;
    font-weight: 600;
    color: white;
    margin-bottom: 12px;
}

.agro-body {
    color: rgba(255,255,255,0.7);
    font-size: 14px;
    line-height: 1.7;
}

/* ─── FOOTER ─── */
footer {
    background: var(--earth);
    padding: 40px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.footer-brand {
    font-family: 'Playfair Display', serif;
    font-size: 22px;
    font-weight: 600;
    color: white;
}

.footer-sub {
    font-family: 'DM Mono', monospace;
    font-size: 9px;
    letter-spacing: 2px;
    text-transform: uppercase;
    color: var(--wheat);
    opacity: 0.5;
    margin-top: 6px;
}

.footer-mfg {
    font-family: 'DM Mono', monospace;
    font-size: 9px;
    letter-spacing: 1px;
    text-transform: uppercase;
    color: rgba(255,255,255,0.3);
    text-align: right;
    line-height: 1.6;
}

/* ─── RESPONSIVE ─── */
@media (max-width: 800px) {
    .hero-inner {
        grid-template-columns: 1fr;
        text-align: center;
    }
    
    .hero-icon-col {
        order: -1;
    }
    
    .product-hero {
        grid-template-columns: 1fr;
    }
    
    .kpi-col {
        flex-direction: row;
        flex-wrap: wrap;
        justify-content: center;
    }
    
    .compo-grid {
        grid-template-columns: 1fr;
    }
    
    .donut-wrap {
        flex-direction: column;
        text-align: center;
    }
    
    .agro-box {
        grid-template-columns: 1fr;
        text-align: center;
    }
    
    .agro-icon {
        margin: 0 auto;
    }
    
    footer {
        flex-direction: column;
        gap: 20px;
        text-align: center;
    }
    
    .footer-mfg {
        text-align: center;
    }
}
