/* ============================================================
   KNABIS.COM — Refonte 2025
   Design : sombre, botanique, éditorial
   ============================================================ */

@import url('https://fonts.googleapis.com/css2?family=Playfair+Display:wght@400;700;900&family=DM+Sans:wght@300;400;500;600&display=swap');

/* ── Variables ── */
:root {
    --vert-fonce:    #0d2012;
    --vert-moyen:    #1a3d22;
    --vert-vif:      #2d7a3a;
    --vert-accent:   #4caf63;
    --vert-clair:    #8dd99b;
    --or:            #c8a84b;
    --or-clair:      #e8cc80;
    --blanc:         #f4f0e8;
    --gris-clair:    #d6d0c4;
    --gris-mid:      #8a8278;
    --noir:          #0a0f0b;
    --texte:         #e8e4da;
    --texte-muted:   #a09890;
    --bordure:       rgba(77, 175, 99, 0.25);
    --ombre:         0 4px 24px rgba(0,0,0,0.4);
    --ombre-douce:   0 2px 12px rgba(0,0,0,0.2);
    --rayon:         8px;
    --rayon-lg:      16px;
    --transition:    0.25s ease;
    --max-width:     1200px;
    --sidebar-width: 240px;
}

/* ── Reset ── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { font-size: 16px; scroll-behavior: smooth; }

body {
    background-color: var(--vert-fonce);
    background-image:
        radial-gradient(ellipse at 20% 50%, rgba(29, 65, 38, 0.6) 0%, transparent 50%),
        radial-gradient(ellipse at 80% 10%, rgba(13, 42, 20, 0.8) 0%, transparent 40%);
    color: var(--texte);
    font-family: 'DM Sans', sans-serif;
    font-weight: 400;
    line-height: 1.7;
    min-height: 100vh;
}

/* ── Typographie ── */
h1, h2, h3, h4 {
    font-family: 'Playfair Display', serif;
    color: var(--blanc);
    line-height: 1.2;
}
h1 { font-size: clamp(1.8rem, 4vw, 3rem); font-weight: 900; }
h2 { font-size: clamp(1.4rem, 3vw, 2.2rem); font-weight: 700; }
h3 { font-size: clamp(1.1rem, 2vw, 1.5rem); font-weight: 700; }
h4 { font-size: 1.1rem; font-weight: 600; color: var(--vert-accent); }

p { margin-bottom: 1rem; color: var(--texte); }
a { color: var(--vert-accent); text-decoration: none; transition: color var(--transition); }
a:hover { color: var(--vert-clair); }
img { max-width: 100%; height: auto; display: block; }
ul, ol { padding-left: 1.5rem; }
li { margin-bottom: 0.4rem; }
hr { border: none; border-top: 1px solid var(--bordure); margin: 2rem 0; }

/* ── Header ── */
#site-header {
    background: linear-gradient(135deg, var(--noir) 0%, var(--vert-moyen) 100%);
    border-bottom: 2px solid var(--vert-vif);
    padding: 0;
    position: sticky;
    top: 0;
    z-index: 1000;
    box-shadow: 0 2px 20px rgba(0,0,0,0.6);
}

.header-inner {
    max-width: var(--max-width);
    margin: 0 auto;
    padding: 0 1.5rem;
    display: flex;
    align-items: center;
    justify-content: space-between;
    height: 70px;
    gap: 1rem;
}

.site-logo {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    text-decoration: none;
    flex-shrink: 0;
}
.site-logo img { height: 48px; width: auto; border-radius: 6px; }
.site-logo .logo-text {
    font-family: 'Playfair Display', serif;
    font-size: 1.6rem;
    font-weight: 900;
    color: var(--blanc);
    letter-spacing: -0.02em;
}
.site-logo .logo-text span { color: var(--vert-accent); }

/* ── Nav principale ── */
.main-nav { display: flex; align-items: center; gap: 0.25rem; }
.main-nav a {
    color: var(--gris-clair);
    font-size: 0.875rem;
    font-weight: 500;
    padding: 0.5rem 0.85rem;
    border-radius: var(--rayon);
    transition: all var(--transition);
    white-space: nowrap;
}
.main-nav a:hover,
.main-nav a.active {
    color: var(--blanc);
    background: rgba(77, 175, 99, 0.2);
}

/* ── Hamburger ── */
.nav-toggle {
    display: none;
    background: none;
    border: 1px solid var(--bordure);
    border-radius: var(--rayon);
    color: var(--blanc);
    padding: 0.5rem;
    cursor: pointer;
    font-size: 1.2rem;
    line-height: 1;
}

/* ── Mobile nav ── */
.mobile-nav {
    display: none;
    background: var(--vert-moyen);
    border-top: 1px solid var(--bordure);
    padding: 1rem;
}
.mobile-nav.open { display: block; }
.mobile-nav a {
    display: block;
    color: var(--texte);
    padding: 0.6rem 0;
    border-bottom: 1px solid var(--bordure);
    font-size: 0.95rem;
}
.mobile-nav .nav-section { margin-top: 0.75rem; }
.mobile-nav .nav-section-title {
    font-size: 0.75rem;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    color: var(--vert-accent);
    font-weight: 600;
    padding: 0.5rem 0 0.25rem;
}

/* ── Layout principal ── */
.page-wrapper {
    max-width: var(--max-width);
    margin: 0 auto;
    padding: 0 1.5rem;
    display: grid;
    grid-template-columns: var(--sidebar-width) 1fr;
    gap: 2rem;
    padding-top: 2rem;
    padding-bottom: 3rem;
    align-items: start;
}

/* ── Sidebar ── */
.sidebar {
    position: sticky;
    top: 90px;
    max-height: calc(100vh - 110px);
    overflow-y: auto;
    scrollbar-width: thin;
    scrollbar-color: var(--vert-vif) transparent;
}

.sidebar-section {
    background: rgba(26, 61, 34, 0.5);
    border: 1px solid var(--bordure);
    border-radius: var(--rayon-lg);
    overflow: hidden;
    margin-bottom: 1rem;
}

.sidebar-title {
    background: linear-gradient(90deg, var(--vert-vif), var(--vert-moyen));
    color: var(--blanc);
    font-family: 'DM Sans', sans-serif;
    font-size: 0.8rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    padding: 0.6rem 0.9rem;
    display: block;
}

.sidebar-section ul { list-style: none; padding: 0.5rem 0; }
.sidebar-section ul li { padding: 0; }
.sidebar-section ul li a {
    display: block;
    color: var(--texte-muted);
    font-size: 0.85rem;
    padding: 0.4rem 0.9rem;
    transition: all var(--transition);
    border-left: 2px solid transparent;
}
.sidebar-section ul li a:hover {
    color: var(--vert-clair);
    background: rgba(77, 175, 99, 0.1);
    border-left-color: var(--vert-accent);
}

/* Zone pub sidebar */
.pub-sidebar {
    background: rgba(26, 61, 34, 0.3);
    border: 1px dashed var(--bordure);
    border-radius: var(--rayon);
    padding: 1rem;
    text-align: center;
    min-height: 120px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--texte-muted);
    font-size: 0.8rem;
    margin-bottom: 1rem;
}

/* ── Contenu principal ── */
.main-content { min-width: 0; }

/* ── Hero / Bandeau page ── */
.page-hero {
    background: linear-gradient(135deg, var(--vert-moyen) 0%, rgba(13, 32, 18, 0.8) 100%);
    border: 1px solid var(--bordure);
    border-radius: var(--rayon-lg);
    padding: 2.5rem 2rem;
    margin-bottom: 2rem;
    position: relative;
    overflow: hidden;
}
.page-hero::before {
    content: '';
    position: absolute;
    top: -30px; right: -30px;
    width: 200px; height: 200px;
    background: radial-gradient(circle, rgba(77, 175, 99, 0.15) 0%, transparent 70%);
    pointer-events: none;
}
.page-hero h1 { margin-bottom: 0.5rem; }
.page-hero .subtitle {
    color: var(--texte-muted);
    font-size: 1rem;
    margin: 0;
}
.breadcrumb {
    font-size: 0.8rem;
    color: var(--texte-muted);
    margin-bottom: 0.75rem;
}
.breadcrumb a { color: var(--vert-accent); }
.breadcrumb span { margin: 0 0.4rem; }

/* ── Cards ── */
.card {
    background: rgba(26, 61, 34, 0.4);
    border: 1px solid var(--bordure);
    border-radius: var(--rayon-lg);
    padding: 1.5rem;
    transition: border-color var(--transition), box-shadow var(--transition);
}
.card:hover {
    border-color: var(--vert-accent);
    box-shadow: var(--ombre-douce);
}

/* ── Grille de liens rapides ── */
.quick-links {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
    gap: 1rem;
    margin: 1.5rem 0;
}
.quick-link-card {
    background: rgba(26, 61, 34, 0.5);
    border: 1px solid var(--bordure);
    border-radius: var(--rayon-lg);
    padding: 1.25rem;
    text-align: center;
    transition: all var(--transition);
    text-decoration: none;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.5rem;
}
.quick-link-card:hover {
    background: rgba(45, 122, 58, 0.4);
    border-color: var(--vert-accent);
    transform: translateY(-2px);
    box-shadow: var(--ombre-douce);
}
.quick-link-card .icon { font-size: 1.8rem; }
.quick-link-card .label {
    color: var(--blanc);
    font-size: 0.9rem;
    font-weight: 600;
}

/* ── Texte article ── */
.article-body {
    font-size: 1rem;
    line-height: 1.8;
    color: var(--texte);
}
.article-body h2 {
    margin: 2rem 0 1rem;
    padding-bottom: 0.5rem;
    border-bottom: 1px solid var(--bordure);
    color: var(--vert-clair);
}
.article-body h3 { margin: 1.5rem 0 0.75rem; }
.article-body p { margin-bottom: 1.2rem; text-align: justify; }
.article-body ul, .article-body ol { margin-bottom: 1rem; }
.article-body img {
    border-radius: var(--rayon);
    border: 1px solid var(--bordure);
    margin: 1rem 0;
}
.article-body img.float-left {
    float: left;
    margin: 0 1.5rem 1rem 0;
    max-width: 200px;
}
.article-body img.float-right {
    float: right;
    margin: 0 0 1rem 1.5rem;
    max-width: 200px;
}
.clearfix::after { content: ''; display: table; clear: both; }

.source {
    font-size: 0.85rem;
    color: var(--texte-muted);
    margin-top: 1.5rem;
    padding-top: 0.75rem;
    border-top: 1px solid var(--bordure);
}

/* ── Grille photos ── */
.photo-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(130px, 1fr));
    gap: 0.75rem;
    margin: 1.5rem 0;
}
.photo-item {
    position: relative;
    border-radius: var(--rayon);
    overflow: hidden;
    border: 1px solid var(--bordure);
    aspect-ratio: 1;
    cursor: pointer;
    transition: transform var(--transition), border-color var(--transition);
}
.photo-item:hover {
    transform: scale(1.04);
    border-color: var(--vert-accent);
}
.photo-item img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    margin: 0;
}
.photo-item .caption {
    position: absolute;
    bottom: 0; left: 0; right: 0;
    background: linear-gradient(transparent, rgba(0,0,0,0.7));
    color: var(--blanc);
    font-size: 0.7rem;
    padding: 0.4rem 0.4rem 0.3rem;
    text-align: center;
    opacity: 0;
    transition: opacity var(--transition);
}
.photo-item:hover .caption { opacity: 1; }

/* ── Galerie fonds d'écran ── */
.wallpaper-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(160px, 1fr));
    gap: 1rem;
    margin: 1.5rem 0;
}
.wallpaper-item {
    border-radius: var(--rayon);
    overflow: hidden;
    border: 1px solid var(--bordure);
    transition: all var(--transition);
}
.wallpaper-item:hover { border-color: var(--vert-accent); box-shadow: var(--ombre-douce); }
.wallpaper-item a { text-decoration: none; }
.wallpaper-item img { width: 100%; aspect-ratio: 4/3; object-fit: cover; }
.wallpaper-item .dl-label {
    display: block;
    text-align: center;
    padding: 0.4rem;
    font-size: 0.8rem;
    color: var(--vert-accent);
    font-weight: 600;
    background: rgba(13, 32, 18, 0.8);
}

/* ── Recettes — liste ── */
.recipe-section { margin-bottom: 2rem; }
.recipe-section h3 {
    color: var(--or);
    font-family: 'DM Sans', sans-serif;
    font-size: 0.85rem;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    padding: 0.5rem 0;
    border-bottom: 1px solid var(--bordure);
    margin-bottom: 0.75rem;
}
.recipe-list { list-style: none; padding: 0; }
.recipe-list li { padding: 0; }
.recipe-list li a {
    display: flex;
    align-items: center;
    gap: 0.6rem;
    color: var(--texte);
    padding: 0.5rem 0.75rem;
    border-radius: var(--rayon);
    font-size: 0.95rem;
    transition: all var(--transition);
    border-left: 2px solid transparent;
}
.recipe-list li a::before { content: '🍃'; font-size: 0.85rem; }
.recipe-list li a:hover {
    background: rgba(77, 175, 99, 0.1);
    color: var(--vert-clair);
    border-left-color: var(--vert-accent);
}

/* ── Recette détail ── */
.recipe-detail {
    background: rgba(26, 61, 34, 0.3);
    border: 1px solid var(--bordure);
    border-radius: var(--rayon-lg);
    padding: 2rem;
}
.recipe-detail h1 {
    color: var(--or);
    margin-bottom: 0.25rem;
}
.recipe-ingredients {
    background: rgba(13, 32, 18, 0.5);
    border-radius: var(--rayon);
    padding: 1rem 1.25rem;
    margin: 1.5rem 0;
    border-left: 3px solid var(--vert-accent);
}
.recipe-ingredients h3 { color: var(--vert-clair); margin-bottom: 0.75rem; font-size: 1rem; }
.recipe-ingredients li { color: var(--texte); font-size: 0.95rem; }
.recipe-steps { margin-top: 1.5rem; }
.recipe-steps p { margin-bottom: 0.8rem; color: var(--texte); }
.back-link {
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    margin-top: 1.5rem;
    padding: 0.6rem 1.2rem;
    background: rgba(77, 175, 99, 0.15);
    border: 1px solid var(--bordure);
    border-radius: var(--rayon);
    color: var(--vert-accent);
    font-size: 0.9rem;
    font-weight: 600;
    transition: all var(--transition);
}
.back-link:hover {
    background: rgba(77, 175, 99, 0.25);
    color: var(--vert-clair);
}

/* ── Roulage — section ── */
.rolling-section {
    background: rgba(26, 61, 34, 0.3);
    border: 1px solid var(--bordure);
    border-radius: var(--rayon-lg);
    padding: 1.5rem;
    margin-bottom: 1.5rem;
}
.rolling-section h3 {
    color: var(--or-clair);
    border-bottom: 1px solid var(--bordure);
    padding-bottom: 0.5rem;
    margin-bottom: 1rem;
}
.rolling-item {
    display: grid;
    grid-template-columns: auto 1fr;
    gap: 1.25rem;
    align-items: start;
    padding: 1rem 0;
    border-bottom: 1px solid var(--bordure);
}
.rolling-item:last-child { border-bottom: none; }
.rolling-item img {
    border-radius: var(--rayon);
    border: 1px solid var(--bordure);
    max-width: 180px;
	background-color:#fff;
}
.rolling-item h4 { color: var(--vert-accent); margin-bottom: 0.5rem; }

/* ── Fabriquer shit — étapes ── */
.steps-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 1.25rem;
    margin: 1.5rem 0;
}
.step-card {
    background: rgba(26, 61, 34, 0.4);
    border: 1px solid var(--bordure);
    border-radius: var(--rayon-lg);
    overflow: hidden;
    transition: all var(--transition);
}
.step-card:hover { border-color: var(--vert-accent); }
.step-card img { width: 100%; aspect-ratio: 4/3; object-fit: cover; }
.step-card .step-body { padding: 0.85rem; }
.step-card .step-num {
    font-size: 0.75rem;
    font-weight: 700;
    color: var(--or);
    text-transform: uppercase;
    letter-spacing: 0.1em;
    margin-bottom: 0.25rem;
}

/* ── Vidéos ── */
.video-embed {
    position: relative;
    width: 100%;
    padding-bottom: 56.25%;
    border-radius: var(--rayon-lg);
    overflow: hidden;
    border: 1px solid var(--bordure);
    margin: 1.5rem 0;
    background: var(--noir);
}
.video-embed iframe {
    position: absolute;
    top: 0; left: 0;
    width: 100%; height: 100%;
    border: none;
}
.video-list { list-style: none; padding: 0; }
.video-list li { padding: 0; }
.video-list li a {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.6rem 0.75rem;
    border-radius: var(--rayon);
    color: var(--texte);
    font-size: 0.95rem;
    transition: all var(--transition);
}
.video-list li a::before { content: '▶'; color: var(--vert-accent); font-size: 0.8rem; }
.video-list li a:hover { background: rgba(77, 175, 99, 0.1); color: var(--vert-clair); }

/* ── Zone pub (emplacement vide) ── */
.pub-zone {
    background: rgba(26, 61, 34, 0.2);
    border: 1px dashed rgba(77, 175, 99, 0.3);
    border-radius: var(--rayon);
    padding: 1.5rem;
    text-align: center;
    color: var(--texte-muted);
    font-size: 0.8rem;
    margin: 1.5rem 0;
    min-height: 90px;
    display: flex;
    align-items: center;
    justify-content: center;
}
.pub-zone-large { min-height: 130px; }

/* ── Mention légale ── */
.legal-notice {
    background: rgba(200, 168, 75, 0.1);
    border: 1px solid rgba(200, 168, 75, 0.3);
    border-radius: var(--rayon);
    padding: 1rem 1.25rem;
    font-size: 0.85rem;
    color: var(--or-clair);
    margin-bottom: 2rem;
}
.legal-notice a { color: var(--or-clair); text-decoration: underline; }

/* ── Footer ── */
#site-footer {
    background: var(--noir);
    border-top: 1px solid var(--bordure);
    padding: 2.5rem 1.5rem 1.5rem;
    margin-top: 4rem;
}
.footer-inner {
    max-width: var(--max-width);
    margin: 0 auto;
}
.footer-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
    gap: 2rem;
    margin-bottom: 2rem;
}
.footer-col h4 {
    font-family: 'DM Sans', sans-serif;
    font-size: 0.8rem;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    color: var(--vert-accent);
    margin-bottom: 0.75rem;
}
.footer-col ul { list-style: none; padding: 0; }
.footer-col ul li { margin-bottom: 0.35rem; }
.footer-col ul li a {
    color: var(--texte-muted);
    font-size: 0.85rem;
    transition: color var(--transition);
}
.footer-col ul li a:hover { color: var(--vert-clair); }
.footer-bottom {
    border-top: 1px solid var(--bordure);
    padding-top: 1.25rem;
    text-align: center;
    color: var(--texte-muted);
    font-size: 0.8rem;
}

/* ── Index — Accueil ── */
.welcome-box {
    background: linear-gradient(135deg, rgba(29, 65, 38, 0.7), rgba(13, 32, 18, 0.5));
    border: 1px solid var(--bordure);
    border-radius: var(--rayon-lg);
    padding: 2rem;
    margin-bottom: 2rem;
    position: relative;
    overflow: hidden;
}
.welcome-box h2 { color: var(--vert-clair); margin-bottom: 0.75rem; }

/* ── Responsive ── */
@media (max-width: 900px) {
    .page-wrapper {
        grid-template-columns: 1fr;
    }
    .sidebar {
        position: static;
        max-height: none;
        display: none; /* cachée sur mobile, nav via hamburger */
    }
    .main-nav { display: none; }
    .nav-toggle { display: flex; align-items: center; }
}

@media (max-width: 600px) {
    .header-inner { height: 60px; }
    .site-logo .logo-text { font-size: 1.3rem; }
    .quick-links { grid-template-columns: repeat(2, 1fr); }
    .photo-grid { grid-template-columns: repeat(auto-fill, minmax(100px, 1fr)); }
    .rolling-item { grid-template-columns: 1fr; }
    .rolling-item img { max-width: 100%; }
    .steps-grid { grid-template-columns: 1fr; }
    .article-body img.float-left,
    .article-body img.float-right {
        float: none;
        margin: 1rem auto;
        max-width: 100%;
    }
}

/* ── Utilitaires ── */
.text-center { text-align: center; }
.text-muted { color: var(--texte-muted); }
.mb-1 { margin-bottom: 0.5rem; }
.mb-2 { margin-bottom: 1rem; }
.mb-3 { margin-bottom: 1.5rem; }
.mt-2 { margin-top: 1rem; }
.tag {
    display: inline-block;
    background: rgba(77, 175, 99, 0.2);
    color: var(--vert-clair);
    font-size: 0.75rem;
    font-weight: 600;
    padding: 0.2rem 0.6rem;
    border-radius: 20px;
    border: 1px solid var(--bordure);
}
