/* ==========================================================================
   SOLID PROJECT STYLE - Variables & Themes
   ========================================================================== */
/* Fonts */
@font-face {
    font-family: 'Lato';
    src: url('/assets/fonts/lato/Lato-Regular.woff2') format('woff2'),
         url('/assets/fonts/lato/Lato-Regular.ttf') format('truetype');
    font-weight: normal;
    font-style: normal;
    font-display: swap;
}
@font-face {
    font-family: 'Lato';
    src: url('/assets/fonts/lato/LatoLatin-Italic.woff2') format('woff2'),
         url('/assets/fonts/lato/LatoLatin-Italic.ttf') format('truetype');
    font-weight: normal;
    font-style: italic;
    font-display: swap;
}
@font-face {
    font-family: 'Lato';
    src: url('/assets/fonts/lato/LatoLatin-Semibold.woff2') format('woff2'),
         url('/assets/fonts/lato/LatoLatin-Semibold.ttf') format('truetype');
    font-weight: bold;
    font-style: normal;
    font-display: swap;
}
@font-face {
    font-family: 'Lato';
    src: url('/assets/fonts/lato/LatoLatin-Heavy.woff2') format('woff2'),
         url('/assets/fonts/lato/LatoLatin-Heavy.ttf') format('truetype');
    font-weight: 800;
    font-style: normal;
    font-display: swap;
}

/* Variables CSS */
:root {
    /* Couleurs principales */
    --primary-color: #202542;
    --primary-dark: #6d3dee;
    --bg-dark: #202542;
    --bg-light: #ffffff;
    --bg-secondary: #f8fafc;

    /* Couleurs de texte */
    --text-dark: #202542;
    --text-primary: #202542;
    --text-light: #ffffff;
    --text-muted: #adadad;

    /* Bordures */
    --border-color: #e2e8f0;
    --border-radius-sm: 8px;
    --border-radius-md: 12px;
    --border-radius-lg: 16px;

    /* Ombres */
    --shadow-sm: 0 2px 4px rgba(0, 0, 0, 0.06);
    --shadow-md: 0 4px 12px rgba(0, 0, 0, 0.08);
    --shadow-lg: 0 10px 30px rgba(0, 0, 0, 0.12);

    /* Espacements */
    --spacing-xs: 8px;
    --spacing-sm: 12px;
    --spacing-md: 20px;
    --spacing-lg: 32px;
    --spacing-xl: 48px;
}

/* Theme Dark */
[data-theme="dark"] {
    --bg-light: #0f172a;
    --bg-secondary: #1e293b;
    --text-dark: #f1f5f9;
    --text-primary: #f1f5f9;
    --text-muted: #94a3b8;
    --border-color: #334155;
    --shadow-sm: 0 2px 4px rgba(0, 0, 0, 0.3);
    --shadow-md: 0 4px 12px rgba(0, 0, 0, 0.4);
    --shadow-lg: 0 10px 30px rgba(0, 0, 0, 0.5);
}

/* ==========================================================================
   RESET & BASE
   ========================================================================== */
*, *::before, *::after {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

body {
    font-family: 'Lato', 'Helvetica Neue', Arial, sans-serif;
    background: var(--bg-light);
    color: var(--text-dark);
    line-height: 1.625;
    min-height: 100vh;
    transition: background 0.3s ease, color 0.3s ease;
}

/* ==========================================================================
   TOP BAR (HEADER)
   ========================================================================== */
.top-bar {
    position: sticky;
    top: 0;
    z-index: 100;
    background-color: var(--bg-dark);
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(20px);
    padding: var(--spacing-sm) 0;
    transition: all 0.3s ease;
}

.top-bar-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 1rem;
    max-width: 1280px;
    margin: 0 auto;
}

.top-bar .logo {
    font-size: 1.4rem;
    font-weight: 800;
    color: var(--text-light);
    text-decoration: none;
    transition: opacity 0.3s ease;
}

.top-bar .logo:hover {
    opacity: 0.9;
}

.top-bar nav {
    display: flex;
    gap: 20px;
    align-items: center;
    flex-wrap: wrap;
}

.top-bar nav a {
    color: var(--text-light) !important;
    text-decoration: none;
    font-weight: 600;
    padding: 0.5rem 1rem;
    border-radius: 6px;
    transition: background 0.3s ease;
    white-space: nowrap;
}

.top-bar nav a:hover {
    background: rgba(255, 255, 255, 0.1);
}

/* Language Selector */
.language-selector {
    display: flex;
    gap: 0.5rem;
    align-items: center;
}

.lang-button {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    background: transparent;
    border: 1px solid rgba(255, 255, 255, 0.2);
    color: var(--text-light);
    padding: 0.5rem 0.9rem;
    border-radius: 6px;
    cursor: pointer;
    transition: all 0.3s ease;
    text-decoration: none;
}

.lang-button:hover,
.lang-button.active {
    border-color: var(--bg-secondary);
    background: rgba(255, 255, 255, 0.1);
}

.lang-flag {
    width: 20px;
    height: 15px;
    object-fit: cover;
    display: block;
}

.lang-code {
    font-size: 0.85rem;
    font-weight: 600;
    font-family: 'Lato', sans-serif;
}

[data-theme="dark"] .lang-button {
    border-color: rgba(255, 255, 255, 0.2);
}

:not([data-theme="dark"]) .lang-button {
    border-color: rgba(0, 0, 0, 0.1);
    color: var(--text-dark);
}

:not([data-theme="dark"]) .lang-button:hover {
    background: rgba(0, 0, 0, 0.05);
}

/* Theme Toggle */
.theme-toggle {
    background: transparent;
    border: 1px solid rgba(255, 255, 255, 0.2);
    color: var(--text-light);
    padding: 0.5rem 1rem;
    border-radius: 6px;
    cursor: pointer;
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    transition: all 0.3s ease;
    font-size: 0.85rem;
    font-family: 'Lato', sans-serif;
    white-space: nowrap;
}

.theme-toggle:hover {
    border-color: var(--bg-secondary);
}

.theme-icon {
    font-size: 1rem;
    transition: transform 0.3s ease;
}

.theme-toggle:hover .theme-icon {
    transform: rotate(20deg);
}

/* ==========================================================================
   HERO SECTION
   ========================================================================== */
.hero-section {
    background: linear-gradient(135deg, var(--primary-color) 0%, var(--primary-dark) 100%);
    box-shadow: var(--shadow-lg);
    color: white;
    padding: 3.5rem 2rem;
    text-align: center;
    position: relative;
    overflow: hidden;
}

.hero-section::before {
    content: '';
    position: absolute;
    inset: 0;
    background: radial-gradient(circle at 20% 50%, rgba(255,255,255,0.1) 0%, transparent 50%),
                radial-gradient(circle at 80% 80%, rgba(255,255,255,0.1) 0%, transparent 50%);
}

.hero-content {
    position: relative;
    z-index: 1;
    max-width: 800px;
    margin: 0 auto;
}

.hero-title {
    font-size: clamp(1.75rem, 5vw, 2.5rem);
    font-weight: 800;
    margin-bottom: 1rem;
    line-height: 1.2;
}

.hero-subtitle {
    font-size: clamp(1rem, 2.5vw, 1.2rem);
    opacity: 0.95;
    max-width: 700px;
    margin: 0 auto;
}

/* ==========================================================================
   MAIN CONTAINER
   ========================================================================== */
.container {
    background-color: var(--bg-light);
    padding: 2.5rem 1.5rem;
    max-width: 1280px;
    margin: 0 auto;
}

/* ==========================================================================
   PRODUCTS GRID
   ========================================================================== */
.products-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 2rem;
    margin-bottom: 3rem;
}

.product-card {
    background: var(--bg-light);
    border: 1px solid var(--border-color);
    border-radius: var(--border-radius-md);
    padding: 1.5rem;
    transition: all 0.3s ease;
    box-shadow: var(--shadow-sm);
    position: relative;
    overflow: hidden;
    display: flex;
    flex-direction: column;
}

.product-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: var(--primary-color);
    transition: height 0.3s ease;
}

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

.product-card:hover::before {
    height: 6px;
}

.product-header {
    display: flex;
    flex-direction: row;
    align-items: flex-start;
    justify-content: space-between;
    gap: 1rem;
}

.product-header-left {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 0.45rem;
}

.product-image {
    width: 60px;
    height: 60px;
    background: linear-gradient(135deg, var(--primary-color) 0%, var(--primary-dark) 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: var(--border-radius-sm);
    font-size: 2rem;
    color: white;
    box-shadow: var(--shadow-sm);
    flex-shrink: 0;
    transition: transform 0.3s ease;
}

.product-header-right {
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    gap: 0.45rem;
}

.product-card:hover .product-image {
    transform: scale(1.05);
}

.price-badge {
    background: var(--primary-color);
    color: white;
    padding: 0.3rem 0.9rem;
    border-radius: 20px;
    font-size: 0.75rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    align-self: flex-start;
    margin-bottom: 10px;
}

.price-badge.subscription {
    background: linear-gradient(135deg, var(--primary-color) 0%, var(--primary-dark) 100%);
}

.product-title {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--text-dark);
    line-height: 1.3;
    align-self: flex-start;
}

.product-content {
    flex: 1;
    margin-bottom: 1rem;
    min-height: 0;
}

.product-description {
    color: var(--text-dark);
    opacity: 0.8;
    line-height: 1.6;
    max-height: 120px;
    overflow-y: auto;
    padding-right: 0.5rem;
    margin-bottom: 0.75rem;
}

.product-description::-webkit-scrollbar {
    width: 6px;
}

.product-description::-webkit-scrollbar-track {
    background: var(--bg-secondary);
    border-radius: 10px;
}

.product-description::-webkit-scrollbar-thumb {
    background: var(--border-color);
    border-radius: 10px;
}

.product-description::-webkit-scrollbar-thumb:hover {
    background: var(--text-muted);
}

.product-description {
    scrollbar-width: thin;
    scrollbar-color: var(--border-color) var(--bg-secondary);
}

.product-requirements {
    margin-top: 0.5rem;
    padding: 0.75rem;
    background: rgba(0, 0, 0, 0.03);
    border-radius: 0.4rem;
    border-left: 3px solid var(--bg-dark);
}

.product-requirements strong {
    display: block;
    margin-bottom: 0.4rem;
    color: var(--text-dark);
    font-size: 0.85rem;
    font-weight: 700;
}

.requirements-list {
    margin: 0;
    padding-left: 1.2rem;
    color: var(--text-muted);
    font-size: 0.85rem;
}

.requirements-list li {
    margin: 0.15rem 0;
    line-height: 1.5;
}

[data-theme="dark"] .product-requirements {
    background: rgba(255, 255, 255, 0.05);
    border-left-color: var(--primary-color);
}

[data-theme="dark"] .product-requirements strong {
    color: var(--text-light);
}

[data-theme="dark"] .requirements-list {
    color: var(--text-muted);
}

.product-footer {
    margin-top: auto;
}

.product-price-container {
    margin-bottom: 1rem;
}

.product-price {
    font-size: 2rem;
    font-weight: 800;
    color: var(--text-primary);
    letter-spacing: -0.02em;
    display: inline;
}

.price-period {
    font-size: 1rem;
    color: var(--text-muted);
    font-weight: 600;
    display: inline;
    margin-left: 0.3rem;
}

.trial-badge {
    background: #4caf50;
    color: white;
    padding: 0.3rem 0.9rem;
    border-radius: 15px;
    font-size: 0.75rem;
    font-weight: 700;
    display: inline-block;
    margin-top: 0.5rem;
}

/* ==========================================================================
   BUTTONS
   ========================================================================== */
.button-group {
    display: flex;
    flex-direction: column;
    gap: 0.8rem;
}

.buy-button,
.demo-button {
    padding: 0.9rem 1.8rem;
    border-radius: var(--border-radius-sm);
    font-weight: 700;
    text-align: center;
    text-decoration: none;
    transition: all 0.3s ease;
    cursor: pointer;
    border: none;
    font-size: 1rem;
    font-family: 'Lato', sans-serif;
    letter-spacing: 0.3px;
    position: relative;
    overflow: hidden;
    display: block;
}

.buy-button {
    background: #202542;
    color: white;
    box-shadow: 0 4px 12px rgba(32, 37, 66, 0.3);
}

.buy-button::before {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.2), transparent);
    transform: translateX(-100%);
    transition: transform 0.6s;
}

.buy-button:hover::before {
    transform: translateX(100%);
}

.buy-button:hover {
    background: #2d3454;
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(32, 37, 66, 0.4);
}

.buy-button:disabled {
    background: var(--text-muted);
    cursor: not-allowed;
    transform: none;
    box-shadow: none;
    opacity: 0.6;
}

.demo-button {
    background: transparent;
    color: var(--text-dark);
    border: 2px solid var(--border-color);
    box-shadow: none;
}

.demo-button:hover {
    background: var(--bg-secondary);
    border-color: #202542;
    color: #202542;
}

[data-theme="dark"] .demo-button:hover {
    background: rgba(255, 255, 255, 0.1);
    border-color: rgba(255, 255, 255, 0.5);
    color: white;
}

/* ==========================================================================
   CARTE CONTAINER (FEATURES)
   ========================================================================== */
.carte-container {
    background: var(--bg-secondary);
    border: 1px solid var(--border-color);
    border-radius: var(--border-radius-md);
    padding: 3rem 2rem;
    margin-bottom: 3rem;
}

.carte-container h2 {
    text-align: center;
    font-size: 2rem;
    font-weight: 800;
    margin-bottom: 2.5rem;
    color: var(--text-dark);
    letter-spacing: -0.02em;
}

.carte-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 2rem;
}

.carte {
    text-align: center;
    padding: 1.5rem;
    background: var(--bg-light);
    border-radius: var(--border-radius-sm);
    transition: all 0.3s ease;
}

.carte:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow-md);
}

.carte-icon {
    font-size: 3rem;
    margin-bottom: 1rem;
}

.carte h3 {
    font-size: 1.3rem;
    font-weight: 700;
    margin-bottom: 0.5rem;
    color: var(--text-dark);
}

.carte p {
    color: var(--text-muted);
    line-height: 1.6;
}

/* ==========================================================================
   FOOTER
   ========================================================================== */
.footer {
    background-color: var(--bg-dark);
    color: var(--text-light);
    padding: 3rem 2rem 1.5rem;
    margin-top: 3rem;
}

.footer-container {
    max-width: 1280px;
    margin: 0 auto;
}

.footer-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 2rem;
    margin-bottom: 2rem;
}

.footer-section h3,
.footer-title {
    font-size: 1.2rem;
    font-weight: 700;
    margin-bottom: 1rem;
    color: var(--text-light);
}

.footer-description {
    color: rgba(255, 255, 255, 0.8);
    line-height: 1.6;
    margin-bottom: 1rem;
}

.footer-links {
    list-style: none;
}

.footer-links li {
    margin-bottom: 0.6rem;
}

.footer-links a {
    color: rgba(255, 255, 255, 0.8);
    text-decoration: none;
    transition: color 0.3s ease;
}

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

.social-links {
    display: flex;
    gap: 0.8rem;
    margin-top: 1rem;
}

.social-link {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.849);
    color: var(--text-light);
    transition: all 0.3s ease;
}

.social-link:hover {
    background: var(--primary-color);
    transform: translateY(-2px);
}

.social-icon {
    width: 30px;
    height: 30px;
}

.footer-copyright {
    text-align: center;
    padding-top: 2rem;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    color: rgba(255, 255, 255, 0.6);
    font-size: 0.9rem;
}

/* ==========================================================================
   LOADING OVERLAY
   ========================================================================== */
.loading {
    display: none;
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.85);
    backdrop-filter: blur(8px);
    z-index: 1000;
    justify-content: center;
    align-items: center;
    color: white;
}

.loading-spinner {
    width: 48px;
    height: 48px;
    border: 4px solid rgba(255, 255, 255, 0.2);
    border-top-color: var(--primary-color);
    border-radius: 50%;
    animation: spin 1s linear infinite;
    margin: 0 auto 1rem;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

/* ==========================================================================
   ANIMATIONS
   ========================================================================== */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.product-card,
.carte {
    animation: fadeInUp 0.6s ease forwards;
    opacity: 0;
}

.product-card:nth-child(1) { animation-delay: 0.1s; }
.product-card:nth-child(2) { animation-delay: 0.2s; }
.product-card:nth-child(3) { animation-delay: 0.3s; }
.product-card:nth-child(4) { animation-delay: 0.4s; }
.product-card:nth-child(5) { animation-delay: 0.5s; }
.product-card:nth-child(6) { animation-delay: 0.6s; }
.carte:nth-child(1) { animation-delay: 0.1s; }
.carte:nth-child(2) { animation-delay: 0.2s; }
.carte:nth-child(3) { animation-delay: 0.3s; }
.carte:nth-child(4) { animation-delay: 0.4s; }

/* ==========================================================================
   RESPONSIVE
   ========================================================================== */
/* Mobile */
@media (max-width: 599px) {
    .top-bar {
        padding: 1rem 1.5rem;
    }

    .top-bar-content {
        flex-direction: column;
        gap: 1rem;
    }

    .top-bar nav {
        width: 100%;
        flex-direction: column;
        gap: 0.8rem;
    }

    .top-bar nav a {
        width: 100%;
        text-align: center;
    }

    .language-selector,
    .theme-toggle {
        width: 100%;
        justify-content: center;
    }

    .container {
        padding: 1.5rem 1rem;
    }

    .hero-section {
        padding: 2.5rem 1.5rem;
    }

    .carte-container h2 {
        font-size: 1.5rem;
    }

    .product-card {
        padding: 1.2rem;
    }

    .product-image {
        height: 120px;
        font-size: 2.5rem;
    }

    .product-title {
        font-size: 1.25rem;
    }

    .product-price {
        font-size: 1.75rem;
    }

    .carte-container {
        padding: 2rem 1.5rem;
    }

    .footer {
        padding: 2rem 1.5rem 1rem;
    }
}

/* Tablet */
@media (min-width: 600px) {
    .products-grid {
        grid-template-columns: repeat(2, 1fr);
    }

    .carte-grid {
        grid-template-columns: repeat(2, 1fr);
    }

    .button-group {
        flex-direction: row;
    }

    .footer-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

/* Desktop */
@media (min-width: 1024px) {
    .top-bar-content {
        padding: 0 1rem;
    }

    .container {
        padding: 3rem 2rem;
    }

    .hero-section {
        padding: 4rem 3rem;
    }

    .products-grid {
        grid-template-columns: repeat(3, 1fr);
        gap: 2.5rem;
    }

    .carte-grid {
        grid-template-columns: repeat(4, 1fr);
    }

    .carte-container {
        padding: 4rem 3rem;
    }

    .footer-grid {
        grid-template-columns: repeat(4, 1fr);
    }

    .product-card {
        padding: 2rem;
    }
}

/* Print */
@media print {
    .top-bar,
    .footer,
    .theme-toggle,
    .language-selector,
    .button-group,
    .loading {
        display: none !important;
    }

    .product-card {
        page-break-inside: avoid;
        box-shadow: none;
        border: 1px solid #ddd;
    }

    body {
        background: white;
        color: black;
    }
}
