/* =========================================
   Bitzy.dev – Unified CSS for All Pages
   Sections: Global | Header | Hero | CTA | Features | PowerBI | ChatGPT | Tirage | Footer
========================================= */

/* === Variables & Base === */
:root {
    --blue: #5BCEFA;
    --dark: #2D2F36;
    --white: #ffffff;
    --font: 'Space Grotesk', sans-serif;
    --gray: #f9f9f9;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: var(--font);
    background-color: var(--white);
    color: var(--dark);
    line-height: 1.6;
    scroll-behavior: smooth;
}

/* === Header (All Pages) === */
header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 20px 40px;
    background-color: var(--white);
    position: sticky;
    top: 0;
    z-index: 1000;
    border-bottom: 1px solid #eee;
}

.logo {
    width: 140px;
}

nav ul {
    list-style: none;
    display: flex;
    gap: 20px;
}

nav a {
    text-decoration: none;
    color: var(--dark);
    font-weight: 500;
    transition: color 0.3s;
}

nav a:hover,
nav a.active {
    color: var(--blue);
    border-bottom: 2px solid var(--blue);
}

/* === Hero (Homepage, PowerBI) === */
.hero {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 60px 40px;
    flex-wrap: wrap;
    gap: 2em;
}

.hero-text {
    max-width: 600px;
}

.hero-text h1 {
    font-size: 3rem;
    margin-bottom: 20px;
}

.hero-text p {
    font-size: 1.2rem;
    margin-bottom: 20px;
}

.hero-img img {
    width: 400px;
    max-width: 90%;
}

/* === Buttons === */
.btn-primary,
.btn {
    background-color: var(--blue);
    color: var(--white);
    padding: 12px 24px;
    border: none;
    text-decoration: none;
    border-radius: 8px;
    font-weight: 500;
    display: inline-block;
    transition: background-color 0.3s;
}

.btn:hover,
.btn-primary:hover {
    background-color: #4ab7e8;
}

/* === Features (Homepage) === */
.features {
    display: flex;
    justify-content: space-around;
    text-align: center;
    padding: 60px 40px;
    flex-wrap: wrap;
}

.feature {
    flex: 1;
    margin: 20px;
    min-width: 250px;
}

.feature img {
    width: 60px;
    margin-bottom: 20px;
}

/* === CTA Section === */
.cta {
    padding: 60px 40px;
    text-align: center;
    background-color: var(--gray);
}

/* === Power BI Page === */
.powerbi-hero {
    background: linear-gradient(to right, #eef2ff, #f0f9ff);
    text-align: center;
    padding: 4rem 2rem;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
}

.powerbi-hero .hero-text {
    max-width: 700px;
    margin: 0 auto;
}

.video-section {
    padding: 3rem 2rem;
    text-align: center;
}

.video-grid {
    display: flex;
    flex-wrap: wrap;
    gap: 1.5rem;
    justify-content: center;
    margin-top: 1rem;
}

.video-item {
    background: white;
    padding: 1rem;
    border-radius: 12px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.05);
    width: 300px;
}

.video-item video {
    width: 100%;
    border-radius: 8px;
    height: 200px;
    object-fit: cover;
}

.downloads {
    text-align: center;
    padding: 3rem 2rem;
}

.file-list {
    list-style: none;
    padding: 0;
    max-width: 600px;
    margin: 0 auto;
}

.file-list li {
    padding: 0.6rem 0;
}

.file-list a {
    font-weight: 500;
    color: #2563eb;
}

.file-list a:hover {
    text-decoration: underline;
}

/* === ChatGPT Page === */
.chatgpt-section {
    max-width: 900px;
    margin: 0 auto;
    padding: 2em 1em;
}

.chatgpt-section h1 {
    text-align: center;
    margin-bottom: 1rem;
    color: #2563eb;
    font-size: 2rem;
}

.back-link {
    color: #2563eb;
    font-size: 14px;
    display: inline-block;
    margin: 1rem 0;
}

#chat-container {
    background-color: #f8f9fc;
    padding: 1rem;
    border-radius: 12px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05);
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

#chat-box {
    background: white;
    min-height: 200px;
    max-height: 400px;
    overflow-y: auto;
    padding: 1rem;
    border-radius: 10px;
    border: 1px solid #ddd;
}

#input-area {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

#input-area input[type="text"] {
    flex: 1;
    padding: 10px;
    border-radius: 8px;
    border: 1px solid #ccc;
    font-size: 1rem;
}

.file-btn {
    background-color: #2563eb;
    color: white;
    padding: 0.55rem 0.8rem;
    border-radius: 8px;
    cursor: pointer;
    font-size: 1rem;
    line-height: 1;
}

.file-btn:hover {
    background-color: #1e40af;
}

/* === Tirage Page === */
.tirage-section {
    max-width: 900px;
    margin: 0 auto;
    padding: 2em 1em;
    text-align: center;
}

.tirage-section h1 {
    font-size: 2rem;
    margin-bottom: 1.5rem;
    color: #1e3a8a;
}

.inputs {
    display: flex;
    flex-direction: column;
    gap: 1rem;
    align-items: center;
    margin-bottom: 2rem;
}

.inputs label {
    font-weight: 500;
}

.inputs input {
    padding: 0.5rem;
    font-size: 1rem;
    border-radius: 8px;
    border: 1px solid #ccc;
    margin-left: 0.5rem;
    width: 100px;
    text-align: center;
}

.centered {
    margin: 1rem 0;
}

.summary {
    margin: 1rem 0;
    font-weight: bold;
    font-size: 1.1rem;
}

.clock {
    font-size: 1.2rem;
    color: #555;
    margin: 1rem 0;
}

.tirage-table {
    margin-top: 2rem;
}

.tirage-table table {
    width: 100%;
    border-collapse: collapse;
    margin-top: 1rem;
}

.tirage-table th,
.tirage-table td {
    padding: 0.8rem;
    border: 1px solid #ccc;
    font-size: 1rem;
}

.tirage-table th {
    background-color: #eef2ff;
    color: #1e3a8a;
}

.tirage-table tbody tr:nth-child(even) {
    background-color: #f9f9f9;
}

/* === Footer === */
footer {
    background-color: var(--dark);
    color: var(--white);
    text-align: center;
    padding: 20px;
    font-size: 0.9rem;
}

/* === Utilities === */
#scrollToTopBtn {
    position: fixed;
    bottom: 40px;
    right: 40px;
    display: none;
    background-color: var(--blue);
    color: var(--white);
    border: none;
    padding: 12px 16px;
    border-radius: 50%;
    font-size: 20px;
    cursor: pointer;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.2);
    transition: opacity 0.3s, visibility 0.3s;
    z-index: 1000;
}

#scrollToTopBtn:hover {
    background-color: #4ab7e8;
}

.fade-in {
    opacity: 0;
    transform: translateY(20px);
    transition: opacity 0.8s ease-out, transform 0.8s ease-out;
}

.fade-in.visible {
    opacity: 1;
    transform: translateY(0);
}


/* === Responsive Design === */
@media (max-width: 768px) {
    header {
        flex-direction: column;
        align-items: flex-start;
    }

    nav ul {
        flex-direction: column;
        gap: 10px;
        padding-top: 10px;
    }

    .hero {
        flex-direction: column;
        text-align: center;
    }

    .hero-img img {
        margin-top: 20px;
    }

    .features {
        flex-direction: column;
        gap: 2rem;
    }

    .video-grid {
        flex-direction: column;
        align-items: center;
    }

    .video-item {
        width: 100%;
        max-width: 95%;
    }

    .inputs {
        flex-direction: column;
    }

    .inputs label {
        display: flex;
        flex-direction: column;
        align-items: center;
    }

    .tirage-table table,
    .tirage-table th,
    .tirage-table td {
        font-size: 0.9rem;
    }

    .chatgpt-section {
        padding: 1rem;
    }

    #input-area {
        flex-direction: column;
        align-items: stretch;
    }

    #input-area input[type="text"],
    .file-btn,
    .btn-primary {
        width: 100%;
        box-sizing: border-box;
    }
}

.mobile-nav-toggle {
    display: none;
    font-size: 1.5rem;
    cursor: pointer;
    margin-left: auto;
}

@media (max-width: 768px) {
    .mobile-nav-toggle {
        display: block;
    }

    #main-nav {
        width: 100%;
        background: var(--white);
        transform: translateY(-200%);
        transition: transform 0.3s ease;
        position: absolute;
        top: 60px;
        left: 0;
        z-index: 1000;
        padding: 1rem 2rem;
    }

    #main-nav.open {
        transform: translateY(0);
    }
}