﻿/* ─── Design tokens ─────────────────────────────── */
:root {
    --td-bg: #ffffff;
    --td-surface: #ffffff;
    --td-border: #e8e3dc;
    --td-ink: #1a1a1a;
    --td-ink-muted: #6b7280;
    --td-accent: #111111;
    --td-accent-h: #333333;
    --td-gold: #c9a96e;
    --td-gold-soft: #fdf5e8;
    --td-topbar-bg: #111111;
    --td-topbar-ink: #f3f3f3;
    --td-radius: 10px;
    --td-shadow: 0 4px 24px rgba(0,0,0,.07);
    --td-shadow-md: 0 8px 40px rgba(0,0,0,.11);
    --td-topbar-h: 60px;
    font-size: 15px;
}

/* ─── Reset ─────────────────────────────────────── */
*, *::before, *::after {
    box-sizing: border-box;
}

html, body {
    margin: 0; padding: 0;
    font-family: "Urbanist", "Inter", "Segoe UI", sans-serif;
    background: var(--td-bg);
    color: var(--td-ink);
    min-height: 100%;
}

a {
    color: var(--td-accent);
}

/* ─── Shell layout ───────────────────────────────── */
.td-shell {
    display: flex;
    flex-direction: column;
    min-height: 100vh;
}

/* ─── Top bar ────────────────────────────────────── */
.td-topbar {
    position: sticky;
    top: 0;
    z-index: 200;
    background: var(--td-topbar-bg);
    border-bottom: 1px solid rgba(255,255,255,.08);
    box-shadow: 0 2px 12px rgba(0,0,0,.18);
}

.td-topbar-inner {
    display: flex;
    align-items: center;
    gap: 0;
    height: var(--td-topbar-h);
    max-width: 1300px;
    margin: 0 auto;
    padding: 0 1.5rem;
}

/* ─── Brand ──────────────────────────────────────── */
.td-brand {
    display: flex;
    align-items: center;
    gap: 10px;
    text-decoration: none;
    flex-shrink: 0;
    margin-right: 2rem;
}

.td-logo-small {
    width: 34px;
    height: 34px;
    object-fit: contain;
    border-radius: 7px;
}

.td-brand-name {
    font-size: 1rem;
    font-weight: 700;
    color: #ffffff;
    letter-spacing: .03em;
    white-space: nowrap;
}

/* ─── Desktop nav ────────────────────────────────── */
.td-nav-desktop {
    display: flex;
    align-items: center;
    gap: 2px;
    flex: 1;
}

    .td-nav-desktop .td-nav-link {
        display: flex;
        align-items: center;
        gap: 6px;
        padding: 6px 14px;
        color: rgba(255,255,255,.72);
        text-decoration: none;
        font-size: 0.88rem;
        font-weight: 500;
        border-radius: 6px;
        border-bottom: 2px solid transparent;
        transition: background .15s, color .15s, border-color .15s;
        white-space: nowrap;
    }

        .td-nav-desktop .td-nav-link:hover,
        .td-nav-desktop .td-nav-link.active {
            background: rgba(255,255,255,.09);
            color: #ffffff;
            border-bottom-color: var(--td-gold);
        }

/* ─── Top-bar right (cart + hamburger) ───────────── */
.td-topbar-right {
    display: flex;
    align-items: center;
    gap: 4px;
    margin-left: auto;
    flex-shrink: 0;
}

.td-cart-btn {
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    color: rgba(255,255,255,.82);
    text-decoration: none;
    font-size: 1.3rem;
    padding: 6px 8px;
    border-radius: 6px;
    transition: background .15s, color .15s;
}

    .td-cart-btn:hover {
        background: rgba(255,255,255,.09);
        color: #fff;
    }

.td-cart-badge {
    position: absolute;
    top: 2px;
    right: 2px;
    background: #e74c3c;
    color: white;
    border-radius: 999px;
    min-width: 17px;
    height: 17px;
    font-size: 0.62rem;
    font-weight: 700;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0 3px;
    pointer-events: none;
}

/* ─── Hamburger (hidden on desktop) ─────────────── */
.td-hamburger-label {
    display: none;
    align-items: center;
    justify-content: center;
    color: rgba(255,255,255,.85);
    font-size: 1.6rem;
    padding: 4px 6px;
    cursor: pointer;
    border-radius: 6px;
    transition: background .15s, color .15s;
}

    .td-hamburger-label:hover {
        background: rgba(255,255,255,.09);
        color: #fff;
    }

.navbar-toggler {
    display: none !important;
}

/* ─── Mobile drawer ──────────────────────────────── */
.td-mobile-drawer {
    display: none;
    flex-direction: column;
    background: #111111;
    border-top: 1px solid rgba(255,255,255,.08);
    padding: 8px 0 12px;
    /* hidden by default via max-height transition */
    max-height: 0;
    overflow: hidden;
    transition: max-height .25s ease;
}

#td-nav-toggle:checked ~ .td-mobile-drawer {
    max-height: 600px;
}

.td-drawer-link {
    display: flex;
    align-items: center;
    gap: 9px;
    padding: 10px 20px;
    color: rgba(255,255,255,.8);
    text-decoration: none;
    font-size: 0.92rem;
    border-left: 3px solid transparent;
    transition: background .15s, color .15s, border-color .15s;
}

    .td-drawer-link:hover,
    .td-drawer-link.active {
        background: rgba(255,255,255,.07);
        color: #fff;
        border-left-color: var(--td-gold);
    }

/* ─── Main content ───────────────────────────────── */
.td-main {
    flex: 1;
    display: flex;
    flex-direction: column;
}

.td-content {
    flex: 1;
    padding: 2rem 2.5rem;
    max-width: 1200px;
    width: 100%;
    margin: 0 auto;
}

/* ─── Footer ─────────────────────────────────────── */
.td-footer {
    padding: 1rem 2.5rem;
    font-size: 0.8rem;
    color: var(--td-ink-muted);
    border-top: 1px solid var(--td-border);
    text-align: center;
}

.td-footer-sep {
    margin: 0 .4rem;
    color: var(--td-border);
}

/* ─── Hero ───────────────────────────────────────── */
.hero-panel {
    background: linear-gradient(135deg, #111111 0%, #2a2a2a 100%);
    border-radius: 16px;
    padding: 2.5rem;
    color: white;
    display: flex;
    align-items: center;
    gap: 2rem;
    margin-bottom: 2rem;
    box-shadow: var(--td-shadow-md);
}

    .hero-panel img {
        border-radius: 12px;
    }

    .hero-panel h1 {
        margin: 0 0 .6rem;
        font-size: clamp(1.5rem, 2.8vw, 2.4rem);
        font-weight: 800;
        line-height: 1.1;
        color: white;
    }

.hero-kicker {
    font-size: 0.75rem;
    text-transform: uppercase;
    letter-spacing: .1em;
    color: var(--td-gold);
    font-weight: 700;
    margin: 0 0 .5rem;
}

.hero-copy {
    margin: 0;
    color: rgba(255,255,255,.8);
    font-size: .95rem;
    max-width: 60ch;
}

/* ─── Influencer grid ────────────────────────────── */
.influencer-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0,1fr));
    gap: 1.25rem;
}

.influencer-card {
    background: var(--td-surface);
    border: 1px solid var(--td-border);
    border-radius: 16px;
    padding: 1.25rem;
    box-shadow: var(--td-shadow);
    transition: box-shadow .2s;
}

    .influencer-card:hover {
        box-shadow: var(--td-shadow-md);
    }

.influencer-header {
    display: flex;
    align-items: center;
    gap: .9rem;
    padding-bottom: .9rem;
    border-bottom: 1px solid var(--td-border);
    margin-bottom: .9rem;
}

    .influencer-header img {
        width: 64px;
        height: 64px;
        border-radius: 12px;
        object-fit: cover;
    }

    .influencer-header h2 {
        margin: 0;
        font-size: 1.05rem;
        font-weight: 700;
    }

    .influencer-header p {
        margin: .2rem 0 0;
        color: var(--td-ink-muted);
        font-size: .85rem;
    }

/* ─── Item list ──────────────────────────────────── */
.item-list {
    list-style: none;
    margin: 0;
    padding: 0;
    display: flex;
    flex-direction: column;
    gap: .5rem;
}

    .item-list li {
        border-radius: 8px;
        transition: background .15s;
    }

        .item-list li:hover {
            background: #f5f3ef;
        }

        .item-list li strong {
            color: var(--td-accent);
            font-weight: 600;
            font-size: .9rem;
            white-space: nowrap;
        }

/* ─── Badges ─────────────────────────────────────── */
.td-badge {
    background: #e74c3c;
    color: white;
    border-radius: 999px;
    min-width: 18px;
    height: 18px;
    font-size: 0.68rem;
    font-weight: 700;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0 4px;
}

/* ─── Buttons ────────────────────────────────────── */
.btn-primary, .btn.btn-primary {
    background: var(--td-accent);
    border-color: var(--td-accent);
    color: white;
    border-radius: 8px;
    font-weight: 600;
    transition: background .15s;
}

    .btn-primary:hover {
        background: var(--td-accent-h);
        border-color: var(--td-accent-h);
    }

.btn-outline-primary {
    border-color: var(--td-accent);
    color: var(--td-accent);
    border-radius: 8px;
    font-weight: 600;
}

    .btn-outline-primary:hover {
        background: var(--td-accent);
        color: white;
    }

/* ─── Cards / surfaces ───────────────────────────── */
.td-card {
    background: var(--td-surface);
    border: 1px solid var(--td-border);
    border-radius: var(--td-radius);
    box-shadow: var(--td-shadow);
    padding: 1.25rem;
}

/* ─── Form controls ──────────────────────────────── */
.form-control, .form-select {
    border: 1px solid var(--td-border);
    border-radius: 8px;
    font-size: .9rem;
    padding: 8px 12px;
    transition: border-color .15s, box-shadow .15s;
}

    .form-control:focus {
        border-color: var(--td-accent);
        box-shadow: 0 0 0 3px rgba(17,17,17,.12);
        outline: none;
    }

/* ─── Blazor error UI ────────────────────────────── */
#blazor-error-ui {
    background: #fff3cd;
    border-top: 1px solid #ffc107;
    padding: 8px 16px;
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    display: none;
    z-index: 1000;
    font-size: .85rem;
}

    #blazor-error-ui .dismiss {
        cursor: pointer;
        float: right;
    }

/* ─── Policy pages ───────────────────────────────── */
.td-policy {
    max-width: 820px;
    margin: 0 auto;
    padding-bottom: 3rem;
}

    .td-policy h1 {
        font-size: 1.8rem;
        font-weight: 800;
        color: var(--td-accent);
        margin-bottom: .25rem;
    }

.td-policy-date {
    font-size: .82rem;
    color: var(--td-ink-muted);
    margin-bottom: 2rem;
}

.td-policy h2 {
    font-size: 1.05rem;
    font-weight: 700;
    color: var(--td-accent);
    margin: 2rem 0 .5rem;
    border-left: 3px solid var(--td-gold);
    padding-left: .6rem;
}

.td-policy p, .td-policy li, .td-policy address {
    line-height: 1.75;
    color: var(--td-ink);
    font-size: .92rem;
}

.td-policy ul {
    padding-left: 1.4rem;
}

    .td-policy ul li {
        margin-bottom: .35rem;
    }

.td-policy address {
    font-style: normal;
    line-height: 1.9;
}

.td-policy-divider {
    border: none;
    border-top: 2px solid var(--td-gold);
    margin: 3rem 0;
    opacity: .5;
}

.td-policy-table {
    width: 100%;
    border-collapse: collapse;
    font-size: .88rem;
    margin-top: .75rem;
}

    .td-policy-table th {
        background: var(--td-accent);
        color: white;
        padding: 8px 12px;
        text-align: left;
        font-weight: 600;
    }

    .td-policy-table td {
        padding: 8px 12px;
        border-bottom: 1px solid var(--td-border);
        vertical-align: top;
    }

    .td-policy-table tr:nth-child(even) td {
        background: var(--td-gold-soft);
    }

.td-policy-warning {
    background: #fff8e1;
    border: 1.5px solid var(--td-gold);
    border-left: 5px solid #e67e22;
    border-radius: var(--td-radius);
    padding: 1rem 1.25rem;
    margin-top: .5rem;
}

    .td-policy-warning p {
        margin: 0 0 .75rem;
    }

    .td-policy-warning ul {
        padding-left: 1.4rem;
    }

        .td-policy-warning ul li {
            margin-bottom: .4rem;
        }

/* ─── Animations ─────────────────────────────────── */
@keyframes rise-in {
    from {
        transform: translateY(12px);
        opacity: 0;
    }

    to {
        transform: translateY(0);
        opacity: 1;
    }
}

.rise-in {
    animation: rise-in .4s ease-out;
}

/* ─── Responsive ─────────────────────────────────── */
@media (max-width: 860px) {
    .td-content {
        padding: 1.2rem;
    }

    .hero-logo {
        display: none;
    }

    .hero-panel {
        flex-direction: column;
        padding: 1.5rem;
        gap: 1rem;
    }

    .influencer-grid {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 700px) {
    :root {
        --td-topbar-h: 46px;
    }

    .td-logo-small {
        width: 26px;
        height: 26px;
    }

    .td-brand-name {
        font-size: 0.88rem;
    }

    /* Masquer les liens desktop, afficher hamburger */
    .td-nav-desktop {
        display: none;
    }

    .td-hamburger-label {
        display: flex;
    }

    /* Afficher le drawer sous la topbar */
    .td-mobile-drawer {
        display: flex;
    }

    #td-nav-toggle:checked ~ .td-mobile-drawer {
        max-height: 600px;
    }
}
