/* ============================================
   L'ATELIER DES MERVEILLES — Design System
   Palette: bleu nuit profond, jaune soleil, corail
   Typographie: Baloo 2 (titres) + Nunito (corps)
   ============================================ */

:root {
    --bg: #fdfaf5;
    --surface: #ffffff;
    --ink: #1b2a4a;
    --ink-soft: #3d4d70;
    --muted: #7b869e;
    --accent: #f5c84c;
    --accent-deep: #e0a92a;
    --coral: #e86a92;
    --sky: #4aa8e0;
    --mint: #4fc9a8;
    --border: rgba(27, 42, 74, 0.08);
    --shadow-sm: 0 2px 10px rgba(27, 42, 74, 0.05);
    --shadow-md: 0 6px 24px rgba(27, 42, 74, 0.08);
    --shadow-lg: 0 14px 44px rgba(27, 42, 74, 0.13);
    --radius-sm: 14px;
    --radius-md: 22px;
    --radius-lg: 30px;
    --transition: 0.28s cubic-bezier(0.4, 0, 0.2, 1);
}

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

html {
    scroll-behavior: smooth;
}

body {
    font-family: 'Nunito', system-ui, sans-serif;
    background: var(--bg);
    color: var(--ink);
    line-height: 1.6;
    -webkit-font-smoothing: antialiased;
    min-height: 100vh;
}

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

/* ============================================
   HEADER & NAVIGATION
   ============================================ */

.header {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 100;
    background: rgba(253, 250, 245, 0.92);
    backdrop-filter: blur(14px);
    -webkit-backdrop-filter: blur(14px);
    border-bottom: 1px solid var(--border);
    transition: box-shadow var(--transition);
}

.nav {
    display: flex;
    align-items: center;
    justify-content: space-between;
    height: 74px;
}

.logo {
    display: flex;
    align-items: center;
    gap: 10px;
    text-decoration: none;
    flex-shrink: 0;
}

.logo-img {
    height: 42px;
    width: auto;
}

.nav-links {
    display: flex;
    align-items: center;
    gap: 34px;
    list-style: none;
}

.nav-link {
    text-decoration: none;
    color: var(--ink-soft);
    font-weight: 600;
    font-size: 0.98rem;
    transition: color var(--transition);
    position: relative;
}

.nav-link:hover {
    color: var(--coral);
}

.nav-toggle {
    display: none;
    flex-direction: column;
    gap: 5px;
    background: none;
    border: none;
    cursor: pointer;
    padding: 8px;
}

.nav-toggle span {
    display: block;
    width: 24px;
    height: 2.5px;
    background: var(--ink);
    border-radius: 2px;
    transition: var(--transition);
}

/* ============================================
   HERO
   ============================================ */

.hero {
    position: relative;
    padding: 168px 0 90px;
    overflow: hidden;
    background:
        radial-gradient(1100px 520px at 82% -12%, rgba(245, 200, 76, 0.30), transparent 62%),
        radial-gradient(900px 480px at 6% 108%, rgba(74, 168, 224, 0.22), transparent 60%),
        var(--bg);
}

.hero-shape {
    position: absolute;
    border-radius: 50%;
    opacity: 0.5;
    pointer-events: none;
}

.hero-shape-1 {
    width: 300px; height: 300px;
    background: rgba(232, 106, 146, 0.14);
    top: -110px; right: -70px;
}

.hero-shape-2 {
    width: 200px; height: 200px;
    background: rgba(74, 168, 224, 0.16);
    bottom: -60px; left: -50px;
}

.hero-shape-3 {
    width: 120px; height: 120px;
    background: rgba(245, 200, 76, 0.20);
    top: 40%; left: 46%;
}

.hero-content {
    position: relative;
    display: grid;
    grid-template-columns: 1.05fr 0.95fr;
    align-items: center;
    gap: 48px;
}

.hero-illustration {
    width: 100%;
    height: auto;
    max-width: 440px;
    display: block;
    margin: 0 auto;
}

.hero-title {
    font-family: 'Baloo 2', 'Nunito', sans-serif;
    font-size: 3.5rem;
    line-height: 1.06;
    font-weight: 800;
    color: var(--ink);
    letter-spacing: -0.02em;
    margin-bottom: 20px;
}

.hero-title .accent {
    color: var(--coral);
    position: relative;
}

.hero-subtitle {
    font-size: 1.12rem;
    color: var(--muted);
    max-width: 46ch;
    margin-bottom: 34px;
}

.hero-stats {
    display: flex;
    gap: 40px;
    flex-wrap: wrap;
}

.stat {
    display: flex;
    flex-direction: column;
}

.stat-num {
    font-family: 'Baloo 2', sans-serif;
    font-size: 2.3rem;
    font-weight: 800;
    color: var(--ink);
    line-height: 1.1;
}

.stat-label {
    font-size: 0.86rem;
    font-weight: 600;
    color: var(--muted);
    text-transform: uppercase;
    letter-spacing: 0.06em;
}

.scroll-indicator {
    position: absolute;
    bottom: 26px;
    left: 50%;
    transform: translateX(-50%);
}

.scroll-line {
    display: block;
    width: 2px;
    height: 42px;
    background: linear-gradient(var(--coral), transparent);
    border-radius: 2px;
    animation: scrollPulse 2.2s ease-in-out infinite;
}

@keyframes scrollPulse {
    0%, 100% { opacity: 0.35; transform: scaleY(0.7); }
    50% { opacity: 1; transform: scaleY(1); }
}

/* Illustration animations */
.cloud { animation: drift 9s ease-in-out infinite; }
.cloud-2 { animation-delay: -4s; }
.stars { animation: twinkle 3.4s ease-in-out infinite; }
.rocket { animation: floaty 4.6s ease-in-out infinite; }
.ball { animation: bounce 2.4s ease-in-out infinite; }
.blocks { animation: floaty 5.4s ease-in-out infinite; }

@keyframes drift {
    0%, 100% { transform: translateX(0); }
    50% { transform: translateX(14px); }
}
@keyframes twinkle {
    0%, 100% { opacity: 0.45; }
    50% { opacity: 1; }
}
@keyframes floaty {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(-9px); }
}
@keyframes bounce {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(-12px); }
}

/* ============================================
   RECHERCHE
   ============================================ */

.search-section {
    padding: 34px 0 6px;
}

.search-box {
    display: flex;
    align-items: center;
    gap: 12px;
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: 999px;
    padding: 8px 8px 8px 24px;
    box-shadow: var(--shadow-sm);
    max-width: 640px;
    margin: 0 auto;
    transition: box-shadow var(--transition), border-color var(--transition);
}

.search-box:focus-within {
    border-color: var(--accent);
    box-shadow: var(--shadow-md);
}

.search-input {
    flex: 1;
    border: none;
    outline: none;
    background: transparent;
    font-family: inherit;
    font-size: 1rem;
    color: var(--ink);
    padding: 10px 0;
}

.search-input::placeholder {
    color: var(--muted);
}

.search-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 44px;
    height: 44px;
    border: none;
    border-radius: 50%;
    background: var(--accent);
    color: var(--ink);
    cursor: pointer;
    transition: background var(--transition), transform var(--transition);
    flex-shrink: 0;
}

.search-btn:hover {
    background: var(--accent-deep);
    transform: scale(1.05);
}

/* ============================================
   SECTIONS
   ============================================ */

.section-title {
    font-family: 'Baloo 2', sans-serif;
    font-size: 2.1rem;
    font-weight: 800;
    text-align: center;
    margin-bottom: 44px;
    color: var(--ink);
    letter-spacing: -0.01em;
}

.categories {
    padding: 70px 0 20px;
}

.categories-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 22px;
}

.category-card {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius-md);
    padding: 30px 22px;
    text-align: center;
    cursor: pointer;
    transition: transform var(--transition), box-shadow var(--transition), border-color var(--transition);
}

.category-card:hover {
    transform: translateY(-6px);
    box-shadow: var(--shadow-lg);
    border-color: var(--accent);
}

.category-icon {
    display: block;
    font-size: 2.1rem;
    margin-bottom: 14px;
    line-height: 1;
}

.category-name {
    font-family: 'Baloo 2', sans-serif;
    font-size: 1.06rem;
    font-weight: 700;
    color: var(--ink);
    margin-bottom: 6px;
}

.category-count {
    font-size: 0.86rem;
    color: var(--muted);
    font-weight: 600;
}

/* ============================================
   PRODUITS
   ============================================ */

.products {
    padding: 70px 0 40px;
}

.filters {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 10px;
    margin-bottom: 40px;
}

.filter-btn {
    display: inline-flex;
    align-items: center;
    gap: 7px;
    padding: 10px 20px;
    border: 1px solid var(--border);
    border-radius: 999px;
    background: var(--surface);
    color: var(--ink-soft);
    font-family: inherit;
    font-size: 0.92rem;
    font-weight: 600;
    cursor: pointer;
    transition: all var(--transition);
}

.filter-btn:hover {
    border-color: var(--accent);
    color: var(--ink);
}

.filter-btn.active {
    background: var(--ink);
    border-color: var(--ink);
    color: #fff;
}

.products-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 26px;
}

.product-card {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius-md);
    overflow: hidden;
    display: flex;
    flex-direction: column;
    transition: transform var(--transition), box-shadow var(--transition);
}

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

.product-image {
    width: 100%;
    height: 210px;
    object-fit: contain;
    background: #fff;
    padding: 18px;
    border-bottom: 1px solid var(--border);
}

.product-info {
    padding: 18px 18px 20px;
    display: flex;
    flex-direction: column;
    gap: 8px;
    flex: 1;
}

.product-category {
    font-size: 0.74rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.07em;
    color: var(--coral);
}

.product-name {
    font-family: 'Baloo 2', sans-serif;
    font-size: 1rem;
    font-weight: 700;
    line-height: 1.32;
    color: var(--ink);
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
    min-height: 2.6em;
}

.product-rating {
    display: flex;
    align-items: center;
    gap: 7px;
    font-size: 0.88rem;
}

.stars {
    color: var(--accent-deep);
    letter-spacing: 1px;
}

.rating-value {
    color: var(--muted);
    font-weight: 600;
}

.product-price {
    font-family: 'Baloo 2', sans-serif;
    font-size: 1.34rem;
    font-weight: 800;
    color: var(--ink);
    margin-top: auto;
    padding-top: 6px;
}

.product-link {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    margin-top: 10px;
    padding: 11px 16px;
    border-radius: 999px;
    background: var(--accent);
    color: var(--ink);
    text-decoration: none;
    font-weight: 700;
    font-size: 0.92rem;
    transition: background var(--transition), transform var(--transition);
}

.product-link:hover {
    background: var(--accent-deep);
    transform: translateY(-2px);
}

/* État vide */
.empty-state {
    grid-column: 1 / -1;
    text-align: center;
    padding: 70px 20px;
    background: var(--surface);
    border: 1px dashed var(--border);
    border-radius: var(--radius-md);
}

.empty-state-icon {
    font-size: 2.6rem;
    margin-bottom: 14px;
}

.empty-state h3 {
    font-family: 'Baloo 2', sans-serif;
    font-size: 1.3rem;
    margin-bottom: 8px;
}

.empty-state p {
    color: var(--muted);
    margin-bottom: 20px;
}

.empty-state .btn {
    display: inline-block;
    padding: 12px 26px;
    border-radius: 999px;
    background: var(--ink);
    color: #fff;
    text-decoration: none;
    font-weight: 700;
    border: none;
    cursor: pointer;
    font-family: inherit;
    font-size: 0.95rem;
}

/* ============================================
   PAGINATION
   ============================================ */

.pagination {
    display: flex;
    justify-content: center;
    gap: 8px;
    margin-top: 48px;
    flex-wrap: wrap;
}

.page-btn {
    min-width: 44px;
    height: 44px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 12px;
    border: 1px solid var(--border);
    background: var(--surface);
    color: var(--ink-soft);
    font-family: inherit;
    font-size: 0.98rem;
    font-weight: 700;
    cursor: pointer;
    transition: all var(--transition);
}

.page-btn:hover:not(:disabled) {
    border-color: var(--accent);
    color: var(--ink);
}

.page-btn.active {
    background: var(--ink);
    border-color: var(--ink);
    color: #fff;
}

.page-btn:disabled {
    opacity: 0.4;
    cursor: not-allowed;
}

/* ============================================
   À PROPOS
   ============================================ */

.about {
    padding: 80px 0 60px;
}

.about-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 22px;
    margin-bottom: 30px;
}

.about-card {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius-md);
    padding: 28px 22px;
    transition: transform var(--transition), box-shadow var(--transition);
}

.about-card:hover {
    transform: translateY(-5px);
    box-shadow: var(--shadow-md);
}

.about-icon {
    font-size: 1.9rem;
    margin-bottom: 12px;
}

.about-card h3 {
    font-family: 'Baloo 2', sans-serif;
    font-size: 1.06rem;
    margin-bottom: 8px;
    color: var(--ink);
}

.about-card p {
    font-size: 0.92rem;
    color: var(--muted);
}

.about-note {
    background: rgba(245, 200, 76, 0.16);
    border: 1px solid rgba(245, 200, 76, 0.4);
    border-radius: var(--radius-sm);
    padding: 18px 22px;
    text-align: center;
    font-size: 0.9rem;
    color: var(--ink-soft);
}

/* ============================================
   FOOTER
   ============================================ */

.footer {
    background: var(--ink);
    color: #cdd6e6;
    padding: 60px 0 30px;
    margin-top: 40px;
}

.footer-content {
    display: grid;
    grid-template-columns: 1.6fr 1fr 1fr;
    gap: 44px;
    padding-bottom: 36px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    margin-bottom: 26px;
}

.footer-brand .footer-logo {
    height: 40px;
    margin-bottom: 16px;
}

.footer-brand p {
    font-size: 0.94rem;
    max-width: 38ch;
    color: #9aa7bf;
}

.footer-links h4 {
    font-family: 'Baloo 2', sans-serif;
    font-size: 1rem;
    color: #fff;
    margin-bottom: 16px;
}

.footer-links ul {
    list-style: none;
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.footer-links a {
    color: #9aa7bf;
    text-decoration: none;
    font-size: 0.92rem;
    transition: color var(--transition);
}

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

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

.disclosure {
    font-size: 0.84rem;
    color: #8b98b0;
    max-width: 76ch;
    margin: 0 auto 14px;
}

.copyright {
    font-size: 0.84rem;
    color: #7b869e;
}

/* ============================================
   RESPONSIVE
   ============================================ */

@media (max-width: 1024px) {
    .hero-content {
        grid-template-columns: 1fr;
        gap: 34px;
        text-align: center;
    }
    .hero-subtitle { margin: 0 auto 30px; }
    .hero-stats { justify-content: center; }
    .hero-illustration { max-width: 360px; }
    .products-grid { grid-template-columns: repeat(3, 1fr); }
    .categories-grid { grid-template-columns: repeat(2, 1fr); }
    .about-grid { grid-template-columns: repeat(2, 1fr); }
    .footer-content { grid-template-columns: 1fr 1fr; }
}

@media (max-width: 768px) {
    .nav-toggle { display: flex; }
    .nav-links {
        position: absolute;
        top: 74px;
        left: 0;
        right: 0;
        flex-direction: column;
        gap: 0;
        background: var(--surface);
        border-bottom: 1px solid var(--border);
        max-height: 0;
        overflow: hidden;
        transition: max-height 0.32s ease;
    }
    .nav-links.active { max-height: 260px; }
    .nav-links li { width: 100%; }
    .nav-link {
        display: block;
        padding: 16px 24px;
        border-top: 1px solid var(--border);
    }
    .hero { padding: 132px 0 70px; }
    .hero-title { font-size: 2.5rem; }
    .products-grid { grid-template-columns: repeat(2, 1fr); gap: 18px; }
    .product-image { height: 170px; padding: 14px; }
    .section-title { font-size: 1.7rem; margin-bottom: 32px; }
}

@media (max-width: 480px) {
    .container { padding: 0 16px; }
    .hero-title { font-size: 2.05rem; }
    .hero-stats { gap: 24px; }
    .stat-num { font-size: 1.8rem; }
    .products-grid { grid-template-columns: 1fr; }
    .categories-grid { grid-template-columns: 1fr 1fr; gap: 14px; }
    .about-grid { grid-template-columns: 1fr; }
    .footer-content { grid-template-columns: 1fr; gap: 28px; }
    .filters { gap: 7px; }
    .filter-btn { padding: 8px 14px; font-size: 0.85rem; }
}
