/* ============================================================
   tsh.ai — Design System
   Warm, human, premium. Ambre + Crème + Violet doux.
   ============================================================ */

@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700;800&display=swap');

/* ── Variables ─────────────────────────────────────────────── */
:root {
    --color-cream:      #FAF7F2;
    --color-cream-dark: #F0EBE0;
    --color-amber:      #D4860B;
    --color-amber-light:#F0A830;
    --color-amber-pale: #FEF3DC;
    --color-violet:     #7C3AED;
    --color-violet-light:#A78BFA;
    --color-violet-pale: #EDE9FE;
    --color-text:       #1C1917;
    --color-text-muted: #78716C;
    --color-text-light: #A8A29E;
    --color-border:     #E7E2D9;
    --color-white:      #FFFFFF;

    --font-base: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;

    --radius-sm: 8px;
    --radius-md: 12px;
    --radius-lg: 20px;
    --radius-xl: 28px;

    --shadow-sm: 0 1px 3px rgba(28, 25, 23, 0.08);
    --shadow-md: 0 4px 16px rgba(28, 25, 23, 0.10);
    --shadow-lg: 0 8px 32px rgba(28, 25, 23, 0.12);

    --container-max: 1100px;
    --section-gap:   80px;
}

/* ── Reset & Base ───────────────────────────────────────────── */
*, *::before, *::after {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

html {
    scroll-behavior: smooth;
}

body {
    font-family: var(--font-base);
    background-color: var(--color-cream);
    color: var(--color-text);
    line-height: 1.6;
    font-size: 16px;
    -webkit-font-smoothing: antialiased;
}

img { max-width: 100%; display: block; }
a { color: inherit; text-decoration: none; }
ul { list-style: none; }

/* ── Container ──────────────────────────────────────────────── */
.container {
    max-width: var(--container-max);
    margin: 0 auto;
    padding: 0 24px;
}

/* ── Typography ─────────────────────────────────────────────── */
h1, h2, h3, h4, h5 {
    line-height: 1.2;
    font-weight: 700;
    letter-spacing: -0.02em;
}

h1 { font-size: clamp(2.4rem, 5vw, 3.8rem); }
h2 { font-size: clamp(1.8rem, 3.5vw, 2.6rem); }
h3 { font-size: clamp(1.2rem, 2.5vw, 1.5rem); }

.text-amber  { color: var(--color-amber); }
.text-violet { color: var(--color-violet); }
.text-muted  { color: var(--color-text-muted); }

/* ── Navigation ─────────────────────────────────────────────── */
.site-nav {
    position: sticky;
    top: 0;
    z-index: 100;
    background: rgba(250, 247, 242, 0.92);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border-bottom: 1px solid var(--color-border);
}

.nav-inner {
    max-width: var(--container-max);
    margin: 0 auto;
    padding: 0 24px;
    height: 64px;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.nav-logo {
    font-size: 1.3rem;
    font-weight: 800;
    letter-spacing: -0.03em;
    display: flex;
    align-items: center;
    gap: 6px;
    color: var(--color-text);
    transition: opacity 0.2s;
}
.nav-logo:hover { opacity: 0.8; }
.nav-logo .logo-dot { color: var(--color-amber); }

.nav-links {
    display: flex;
    align-items: center;
    gap: 8px;
}

.nav-link {
    padding: 6px 14px;
    border-radius: var(--radius-sm);
    font-size: 0.9rem;
    font-weight: 500;
    color: var(--color-text-muted);
    transition: color 0.2s, background 0.2s;
}
.nav-link:hover { color: var(--color-text); background: var(--color-cream-dark); }
.nav-link.active { color: var(--color-amber); font-weight: 600; }

.nav-cta {
    padding: 8px 18px;
    background: var(--color-amber);
    color: white;
    border-radius: var(--radius-sm);
    font-size: 0.9rem;
    font-weight: 600;
    transition: background 0.2s, transform 0.15s;
}
.nav-cta:hover { background: var(--color-amber-light); transform: translateY(-1px); }

/* ── Hero ───────────────────────────────────────────────────── */
.hero {
    padding: 48px 0 80px;
    text-align: center;
    position: relative;
    overflow: hidden;
    background:
        radial-gradient(ellipse 60% 40% at 50% 30%, rgba(212,134,11,0.08) 0%, transparent 70%),
        var(--color-cream);
}

/* ── Hero Decorative Floating Elements ──────────────────────── */
.hero-deco {
    position: absolute;
    pointer-events: none;
    user-select: none;
    z-index: 0;
    line-height: 1;
    display: none; /* hidden on mobile */
}

@media (min-width: 768px) {
    .hero-deco { display: block; }
    .hero-deco-accent { display: flex; }
}

.hero-deco-tea {
    left: 5%;
    top: 15%;
    font-size: 80px;
    opacity: 0.5;
    transform: rotate(-10deg);
    filter: drop-shadow(0 4px 8px rgba(212,134,11,0.15));
}

.hero-deco-cinnamon-tr {
    right: 8%;
    top: 10%;
    font-size: 64px;
    opacity: 0.45;
    transform: rotate(15deg);
    filter: drop-shadow(0 2px 4px rgba(139,69,19,0.12));
}

.hero-deco-star {
    right: 5%;
    bottom: 20%;
    font-size: 72px;
    opacity: 0.35;
    color: var(--color-amber);
    font-family: serif;
}

.hero-deco-accent {
    left: 8%;
    top: 8%;
    flex-direction: column;
    gap: 5px;
    opacity: 0.4;
    display: none;
}

.cinnamon-stick {
    width: 48px;
    height: 8px;
    background: linear-gradient(90deg, #7B3B1A 0%, #C1651A 40%, #D2691E 60%, #8B4513 100%);
    border-radius: 4px;
    transform: rotate(45deg);
    box-shadow: inset 0 2px 3px rgba(255,255,255,0.15), 0 1px 2px rgba(0,0,0,0.15);
}

.cinnamon-stick:nth-child(2) {
    transform: rotate(30deg);
    width: 36px;
    opacity: 0.75;
    margin-top: 2px;
}

.hero-badge {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 6px 14px;
    background: var(--color-amber-pale);
    color: var(--color-amber);
    border-radius: 99px;
    font-size: 0.82rem;
    font-weight: 600;
    letter-spacing: 0.02em;
    text-transform: uppercase;
    margin-bottom: 24px;
}

.hero-name {
    color: var(--color-text);
    margin-bottom: 16px;
}

.hero-tagline {
    font-size: clamp(1.1rem, 2.5vw, 1.35rem);
    color: var(--color-text-muted);
    font-weight: 400;
    max-width: 560px;
    margin: 0 auto 40px;
    line-height: 1.5;
}

.hero-tagline strong {
    color: var(--color-violet);
    font-weight: 600;
}

.hero-actions {
    display: flex;
    gap: 12px;
    justify-content: center;
    flex-wrap: wrap;
}

/* ── Buttons ────────────────────────────────────────────────── */
.btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 12px 24px;
    border-radius: var(--radius-sm);
    font-size: 0.95rem;
    font-weight: 600;
    cursor: pointer;
    border: none;
    transition: all 0.2s ease;
    text-decoration: none;
    line-height: 1;
}

.btn-primary {
    background: var(--color-amber);
    color: white;
}
.btn-primary:hover {
    background: var(--color-amber-light);
    transform: translateY(-2px);
    box-shadow: 0 4px 16px rgba(212, 134, 11, 0.35);
}

.btn-secondary {
    background: white;
    color: var(--color-text);
    border: 1.5px solid var(--color-border);
}
.btn-secondary:hover {
    border-color: var(--color-amber);
    color: var(--color-amber);
    transform: translateY(-2px);
}

.btn-violet {
    background: var(--color-violet);
    color: white;
}
.btn-violet:hover {
    background: #6D28D9;
    transform: translateY(-2px);
    box-shadow: 0 4px 16px rgba(124, 58, 237, 0.35);
}

.btn-lg {
    padding: 15px 32px;
    font-size: 1rem;
    border-radius: var(--radius-md);
}

/* ── Newsletter Box ─────────────────────────────────────────── */
.newsletter-section {
    padding: var(--section-gap) 0;
}

.newsletter-box {
    background: linear-gradient(135deg, #1C1917 0%, #292524 100%);
    border-radius: var(--radius-xl);
    padding: 56px 48px;
    text-align: center;
    position: relative;
    overflow: hidden;
}

.newsletter-box::before {
    content: '☕';
    position: absolute;
    font-size: 180px;
    opacity: 0.04;
    top: -20px;
    right: -20px;
    line-height: 1;
    pointer-events: none;
}

.newsletter-label {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 5px 14px;
    background: rgba(212, 134, 11, 0.2);
    color: var(--color-amber-light);
    border-radius: 99px;
    font-size: 0.8rem;
    font-weight: 600;
    letter-spacing: 0.04em;
    text-transform: uppercase;
    margin-bottom: 20px;
}

.newsletter-box h2 {
    color: white;
    margin-bottom: 12px;
}

.newsletter-box .tagline {
    color: rgba(255,255,255,0.65);
    font-size: 1.05rem;
    margin-bottom: 36px;
    font-weight: 300;
}

.newsletter-form {
    display: flex;
    gap: 10px;
    max-width: 480px;
    margin: 0 auto 20px;
}

.newsletter-form input[type="email"] {
    flex: 1;
    padding: 13px 18px;
    border-radius: var(--radius-sm);
    border: none;
    font-family: var(--font-base);
    font-size: 0.95rem;
    background: rgba(255,255,255,0.1);
    color: white;
    outline: none;
    transition: background 0.2s;
}

.newsletter-form input[type="email"]::placeholder { color: rgba(255,255,255,0.4); }
.newsletter-form input[type="email"]:focus { background: rgba(255,255,255,0.15); }

.newsletter-form button {
    padding: 13px 24px;
    background: var(--color-amber);
    color: white;
    border: none;
    border-radius: var(--radius-sm);
    font-family: var(--font-base);
    font-size: 0.95rem;
    font-weight: 600;
    cursor: pointer;
    white-space: nowrap;
    transition: background 0.2s, transform 0.15s;
}
.newsletter-form button:hover {
    background: var(--color-amber-light);
    transform: translateY(-1px);
}
.newsletter-form button:disabled { opacity: 0.7; cursor: not-allowed; transform: none; }

.newsletter-success {
    color: #86EFAC;
    font-size: 0.95rem;
    font-weight: 500;
    padding: 12px 24px;
    background: rgba(134, 239, 172, 0.1);
    border-radius: var(--radius-sm);
    display: inline-block;
}

.newsletter-note {
    color: rgba(255,255,255,0.35);
    font-size: 0.8rem;
}

/* ── "Ce que tu vas recevoir" ───────────────────────────────── */
.benefits-section {
    padding: var(--section-gap) 0;
}

.section-header {
    text-align: center;
    margin-bottom: 56px;
}

.section-label {
    display: inline-block;
    padding: 4px 12px;
    background: var(--color-violet-pale);
    color: var(--color-violet);
    border-radius: 99px;
    font-size: 0.78rem;
    font-weight: 600;
    letter-spacing: 0.05em;
    text-transform: uppercase;
    margin-bottom: 16px;
}

.section-label.amber {
    background: var(--color-amber-pale);
    color: var(--color-amber);
}

.benefits-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 24px;
}

.benefit-card {
    background: white;
    border-radius: var(--radius-lg);
    padding: 32px;
    border: 1px solid var(--color-border);
    transition: transform 0.2s, box-shadow 0.2s;
}
.benefit-card:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow-md);
}

.benefit-icon {
    width: 52px;
    height: 52px;
    border-radius: var(--radius-md);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
    margin-bottom: 20px;
}

.benefit-icon.amber-bg { background: var(--color-amber-pale); }
.benefit-icon.violet-bg { background: var(--color-violet-pale); }
.benefit-icon.green-bg { background: #DCFCE7; }

.benefit-card h3 { margin-bottom: 10px; font-size: 1.05rem; }
.benefit-card p { color: var(--color-text-muted); font-size: 0.93rem; line-height: 1.6; }

/* ── Projects Section ───────────────────────────────────────── */
.projects-section {
    padding: var(--section-gap) 0;
    background: var(--color-cream-dark);
    border-radius: var(--radius-xl);
    margin: 0 24px;
}

@media (max-width: 600px) {
    .projects-section { margin: 0 12px; }
}

.projects-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
    gap: 20px;
}

.project-card {
    background: white;
    border-radius: var(--radius-md);
    padding: 28px;
    border: 1px solid var(--color-border);
    display: flex;
    flex-direction: column;
    gap: 12px;
    transition: transform 0.2s, box-shadow 0.2s, border-color 0.2s;
    text-decoration: none;
    color: inherit;
}

.project-card:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow-lg);
    border-color: var(--color-amber);
}

.project-card-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.project-icon { font-size: 1.6rem; }

.project-stars {
    display: flex;
    align-items: center;
    gap: 4px;
    font-size: 0.8rem;
    color: var(--color-text-muted);
    font-weight: 500;
}

.project-card h3 {
    font-size: 1rem;
    font-weight: 700;
    color: var(--color-text);
}

.project-card p {
    font-size: 0.88rem;
    color: var(--color-text-muted);
    line-height: 1.55;
    flex: 1;
}

.project-tags {
    display: flex;
    gap: 6px;
    flex-wrap: wrap;
}

.tag {
    padding: 3px 10px;
    background: var(--color-cream);
    color: var(--color-text-muted);
    border-radius: 99px;
    font-size: 0.75rem;
    font-weight: 500;
    border: 1px solid var(--color-border);
}

.tag.amber {
    background: var(--color-amber-pale);
    color: var(--color-amber);
    border-color: transparent;
}

.tag.violet {
    background: var(--color-violet-pale);
    color: var(--color-violet);
    border-color: transparent;
}

.project-link {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 0.85rem;
    font-weight: 600;
    color: var(--color-amber);
    margin-top: 4px;
}

/* ── About strip ────────────────────────────────────────────── */
.about-strip {
    padding: var(--section-gap) 0;
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 64px;
    align-items: center;
}

@media (max-width: 720px) {
    .about-strip { grid-template-columns: 1fr; gap: 36px; }
}

.about-avatar {
    width: 80px;
    height: 80px;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--color-amber) 0%, var(--color-violet) 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 2rem;
    margin-bottom: 24px;
}

.about-text h2 { margin-bottom: 16px; }
.about-text p { color: var(--color-text-muted); line-height: 1.7; margin-bottom: 24px; }

.about-links {
    display: flex;
    gap: 12px;
    flex-wrap: wrap;
}

.social-link {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 9px 16px;
    border: 1.5px solid var(--color-border);
    border-radius: var(--radius-sm);
    font-size: 0.88rem;
    font-weight: 500;
    color: var(--color-text-muted);
    transition: all 0.2s;
}
.social-link:hover {
    border-color: var(--color-amber);
    color: var(--color-amber);
    background: var(--color-amber-pale);
}

.about-stats {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 16px;
}

.stat-box {
    background: white;
    border: 1px solid var(--color-border);
    border-radius: var(--radius-md);
    padding: 24px;
    text-align: center;
}

.stat-num {
    font-size: 2rem;
    font-weight: 800;
    color: var(--color-amber);
    letter-spacing: -0.03em;
    display: block;
    margin-bottom: 4px;
}

.stat-label {
    font-size: 0.82rem;
    color: var(--color-text-muted);
    font-weight: 500;
}

/* ── Newsletter Archive page ─────────────────────────────────── */
.page-header {
    padding: 64px 0 48px;
    text-align: center;
}

.page-header h1 { margin-bottom: 16px; }
.page-header p { color: var(--color-text-muted); font-size: 1.05rem; max-width: 500px; margin: 0 auto; }

.empty-state {
    text-align: center;
    padding: 80px 24px;
    background: white;
    border-radius: var(--radius-xl);
    border: 2px dashed var(--color-border);
    margin: 0 0 80px;
}

.empty-state .empty-icon { font-size: 3.5rem; margin-bottom: 20px; }
.empty-state h3 { margin-bottom: 12px; color: var(--color-text); }
.empty-state p { color: var(--color-text-muted); font-size: 0.95rem; max-width: 400px; margin: 0 auto 28px; }

/* ── Projets page ────────────────────────────────────────────── */
.projects-page-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 20px;
    margin-bottom: 80px;
}

.project-page-card {
    background: white;
    border: 1px solid var(--color-border);
    border-radius: var(--radius-lg);
    padding: 28px;
    display: flex;
    flex-direction: column;
    gap: 14px;
    transition: transform 0.2s, box-shadow 0.2s, border-color 0.2s;
}
.project-page-card:hover {
    transform: translateY(-3px);
    box-shadow: var(--shadow-md);
    border-color: var(--color-amber);
}

.project-page-card .project-header {
    display: flex;
    align-items: center;
    gap: 14px;
}

.project-page-card .project-header .icon-circle {
    width: 44px;
    height: 44px;
    border-radius: var(--radius-sm);
    background: var(--color-amber-pale);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.3rem;
    flex-shrink: 0;
}

.project-page-card h3 { font-size: 1rem; margin-bottom: 2px; }
.project-page-card .repo-name { font-size: 0.8rem; color: var(--color-text-muted); font-family: monospace; }
.project-page-card p { color: var(--color-text-muted); font-size: 0.9rem; line-height: 1.6; flex: 1; }

.project-page-card .card-footer {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding-top: 12px;
    border-top: 1px solid var(--color-border);
}

.github-link {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    font-size: 0.85rem;
    font-weight: 600;
    color: var(--color-amber);
    transition: color 0.2s;
}
.github-link:hover { color: var(--color-amber-light); }

/* ── Footer ──────────────────────────────────────────────────── */
.site-footer {
    background: var(--color-text);
    color: rgba(255,255,255,0.7);
    padding: 48px 0 32px;
    margin-top: auto;
}

.footer-inner {
    max-width: var(--container-max);
    margin: 0 auto;
    padding: 0 24px;
}

.footer-top {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 40px;
    flex-wrap: wrap;
    padding-bottom: 32px;
    border-bottom: 1px solid rgba(255,255,255,0.08);
    margin-bottom: 24px;
}

.footer-brand .logo {
    font-size: 1.3rem;
    font-weight: 800;
    color: white;
    letter-spacing: -0.03em;
    margin-bottom: 8px;
}

.footer-brand .logo span { color: var(--color-amber); }
.footer-brand p { font-size: 0.85rem; max-width: 260px; }

.footer-links-col h4 {
    font-size: 0.78rem;
    font-weight: 600;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: rgba(255,255,255,0.4);
    margin-bottom: 14px;
}

.footer-links-col ul { display: flex; flex-direction: column; gap: 8px; }

.footer-links-col a {
    font-size: 0.88rem;
    color: rgba(255,255,255,0.65);
    transition: color 0.2s;
}
.footer-links-col a:hover { color: var(--color-amber-light); }

.footer-bottom {
    display: flex;
    align-items: center;
    justify-content: space-between;
    font-size: 0.8rem;
    flex-wrap: wrap;
    gap: 8px;
}

.footer-bottom a { color: rgba(255,255,255,0.4); transition: color 0.2s; }
.footer-bottom a:hover { color: var(--color-amber-light); }

/* ── Divider ─────────────────────────────────────────────────── */
.divider {
    height: 1px;
    background: var(--color-border);
    margin: 0;
}

/* ── Responsive ──────────────────────────────────────────────── */
@media (max-width: 768px) {
    :root { --section-gap: 56px; }

    .newsletter-box { padding: 36px 24px; }
    .newsletter-form { flex-direction: column; }
    .newsletter-form input[type="email"],
    .newsletter-form button { width: 100%; }

    .nav-links .nav-link { display: none; }

    .about-stats { grid-template-columns: 1fr 1fr; }
}

@media (max-width: 480px) {
    .container { padding: 0 16px; }
    .hero { padding: 40px 0 48px; }
    .nav-inner { padding: 0 16px; }
}

/* ── Animations ──────────────────────────────────────────────── */
@keyframes fadeUp {
    from { opacity: 0; transform: translateY(24px); }
    to   { opacity: 1; transform: translateY(0); }
}

.fade-up {
    animation: fadeUp 0.5s ease forwards;
}

.fade-up-delay-1 { animation-delay: 0.1s; opacity: 0; }
.fade-up-delay-2 { animation-delay: 0.2s; opacity: 0; }
.fade-up-delay-3 { animation-delay: 0.3s; opacity: 0; }
