/* ==========================================================================
   CBox - Site Vitrine
   Design: Flat, Neutre, Moderne
   Palette: Bleus inspirés du logo
   ========================================================================== */

:root {
    --cbox-blue-dark: #2B4AA0;
    --cbox-blue-primary: #3A5FBF;
    --cbox-blue-secondary: #4A7BD4;
    --cbox-blue-medium: #5A9FDB;
    --cbox-blue-light: #7DC3E8;
    --cbox-blue-pale: #E8F1FB;
    --cbox-blue-paler: #F5F9FE;
    --cbox-gray-dark: #1E2A3B;
    --cbox-gray-medium: #64748B;
    --cbox-gray-light: #F1F5F9;
    --cbox-white: #FFFFFF;
    --cbox-shadow: 0 4px 12px rgba(58, 95, 191, 0.12);
    --cbox-shadow-hover: 0 12px 32px rgba(58, 95, 191, 0.2);
    --cbox-shadow-blue: 0 8px 24px rgba(58, 95, 191, 0.25);
}

/* ============================= GLOBAL ============================= */

* {
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
    color: var(--cbox-gray-dark);
    line-height: 1.6;
    background-color: var(--cbox-white);
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    padding-top: 90px; /* offset for larger fixed navbar */
}

h1, h2, h3, h4, h5, h6 {
    font-weight: 700;
    color: var(--cbox-gray-dark);
    letter-spacing: -0.02em;
}

h1 { font-size: 3rem; }
h2 { font-size: 2.25rem; }
h3 { font-size: 1.5rem; }

a {
    color: var(--cbox-blue-primary);
    text-decoration: none;
    transition: color 0.2s ease;
}

a:hover {
    color: var(--cbox-blue-dark);
}

section {
    padding: 5rem 0;
}

.section-title {
    text-align: center;
    margin-bottom: 3rem;
}

.section-title h2 {
    margin-bottom: 1rem;
}

.section-title h2 .highlight,
.highlight {
    color: var(--cbox-blue-primary);
}

.section-title p {
    color: var(--cbox-gray-medium);
    font-size: 1.1rem;
    max-width: 700px;
    margin: 0 auto;
}

.section-eyebrow {
    display: inline-block;
    color: var(--cbox-blue-primary);
    font-weight: 600;
    font-size: 0.85rem;
    text-transform: uppercase;
    letter-spacing: 0.12em;
    margin-bottom: 0.75rem;
}

/* ============================= NAVBAR ============================= */

.navbar {
    background-color: rgba(255, 255, 255, 0.98);
    backdrop-filter: blur(10px);
    padding: 0.75rem 0;
    box-shadow: 0 1px 0 rgba(0, 0, 0, 0.05);
    transition: all 0.3s ease;
    border-bottom: 3px solid var(--cbox-blue-primary);
}

.navbar-brand {
    padding: 0;
    margin-right: 2rem;
}

.navbar-brand img {
    height: 64px;
    transition: height 0.3s ease;
}

.navbar.scrolled .navbar-brand img {
    height: 54px;
}

.navbar-nav .nav-link {
    color: var(--cbox-gray-dark);
    font-weight: 500;
    padding: 0.5rem 1rem !important;
    transition: color 0.2s ease;
    position: relative;
}

.navbar-nav .nav-link::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 50%;
    width: 0;
    height: 2px;
    background: var(--cbox-blue-primary);
    transition: all 0.3s ease;
    transform: translateX(-50%);
}

.navbar-nav .nav-link:hover,
.navbar-nav .nav-link.active {
    color: var(--cbox-blue-primary);
}

.navbar-nav .nav-link:hover::after {
    width: 60%;
}

.lang-switcher {
    background: var(--cbox-blue-pale);
    border-radius: 8px;
    padding: 4px;
    display: inline-flex;
}

.lang-switcher button {
    border: none;
    background: transparent;
    padding: 6px 14px;
    border-radius: 6px;
    font-weight: 600;
    color: var(--cbox-blue-primary);
    cursor: pointer;
    transition: all 0.2s ease;
    font-size: 0.875rem;
}

.lang-switcher button.active {
    background: var(--cbox-blue-primary);
    color: var(--cbox-white);
    box-shadow: 0 2px 6px rgba(58, 95, 191, 0.3);
}

/* ============================= BUTTONS ============================= */

.btn {
    border-radius: 8px;
    padding: 0.65rem 1.5rem;
    font-weight: 600;
    transition: all 0.2s ease;
    border: 2px solid transparent;
    font-size: 0.95rem;
}

.btn-primary {
    background-color: var(--cbox-blue-primary);
    border-color: var(--cbox-blue-primary);
    color: var(--cbox-white);
    box-shadow: 0 4px 12px rgba(58, 95, 191, 0.25);
}

.btn-primary:hover {
    background-color: var(--cbox-blue-dark);
    border-color: var(--cbox-blue-dark);
    transform: translateY(-2px);
    box-shadow: var(--cbox-shadow-blue);
    color: var(--cbox-white);
}

.btn-outline-primary {
    background-color: transparent;
    border-color: var(--cbox-blue-primary);
    color: var(--cbox-blue-primary);
}

.btn-outline-primary:hover {
    background-color: var(--cbox-blue-primary);
    color: var(--cbox-white);
    transform: translateY(-2px);
    box-shadow: var(--cbox-shadow-blue);
}

.btn-connect {
    background-color: var(--cbox-blue-primary);
    color: var(--cbox-white);
    padding: 0.6rem 1.35rem;
    border-radius: 8px;
    font-weight: 600;
    font-size: 0.9rem;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    transition: all 0.2s ease;
    box-shadow: 0 4px 12px rgba(58, 95, 191, 0.3);
}

.btn-connect:hover {
    background-color: var(--cbox-blue-dark);
    color: var(--cbox-white);
    transform: translateY(-2px);
    box-shadow: var(--cbox-shadow-blue);
}

.btn-lg {
    padding: 0.9rem 2rem;
    font-size: 1rem;
}

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

.hero {
    background: linear-gradient(135deg, var(--cbox-blue-primary) 0%, var(--cbox-blue-dark) 100%);
    padding: 5rem 0 5rem;
    position: relative;
    overflow: hidden;
    color: var(--cbox-white);
}

.hero::before {
    content: '';
    position: absolute;
    top: -40%;
    right: -10%;
    width: 700px;
    height: 700px;
    background: radial-gradient(circle, rgba(125, 195, 232, 0.25) 0%, transparent 70%);
    border-radius: 50%;
    pointer-events: none;
}

.hero::after {
    content: '';
    position: absolute;
    bottom: -30%;
    left: -10%;
    width: 500px;
    height: 500px;
    background: radial-gradient(circle, rgba(90, 159, 219, 0.2) 0%, transparent 70%);
    border-radius: 50%;
    pointer-events: none;
}

.hero-content {
    position: relative;
    z-index: 2;
}

.hero h1 {
    font-size: 3.5rem;
    margin-bottom: 1.5rem;
    line-height: 1.1;
    color: var(--cbox-white);
}

.hero h1 .highlight {
    color: var(--cbox-blue-light);
    position: relative;
    display: inline-block;
}

.hero-subtitle {
    font-size: 1.2rem;
    color: rgba(255, 255, 255, 0.9);
    margin-bottom: 2rem;
    max-width: 600px;
}

.hero-buttons {
    display: flex;
    gap: 1rem;
    flex-wrap: wrap;
}

.hero .btn-primary {
    background-color: var(--cbox-white);
    border-color: var(--cbox-white);
    color: var(--cbox-blue-primary);
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.15);
}

.hero .btn-primary:hover {
    background-color: var(--cbox-blue-light);
    border-color: var(--cbox-blue-light);
    color: var(--cbox-blue-dark);
}

.hero .btn-outline-primary {
    background-color: transparent;
    border-color: rgba(255, 255, 255, 0.8);
    color: var(--cbox-white);
}

.hero .btn-outline-primary:hover {
    background-color: var(--cbox-white);
    border-color: var(--cbox-white);
    color: var(--cbox-blue-primary);
}

.hero-visual {
    position: relative;
    z-index: 2;
    text-align: center;
}

.hero-image-frame {
    position: relative;
    border-radius: 20px;
    overflow: hidden;
    box-shadow: 0 24px 48px rgba(0, 0, 0, 0.25);
    border: 4px solid rgba(255, 255, 255, 0.15);
}

.hero-image-frame img {
    width: 100%;
    height: auto;
    display: block;
    aspect-ratio: 4 / 3;
    object-fit: cover;
}

.hero-image-frame::after {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(180deg, transparent 40%, rgba(43, 74, 160, 0.3) 100%);
    pointer-events: none;
}

.hero-badge {
    position: absolute;
    bottom: -18px;
    left: 50%;
    transform: translateX(-50%);
    background: var(--cbox-white);
    color: var(--cbox-blue-primary);
    padding: 0.75rem 1.5rem;
    border-radius: 30px;
    font-weight: 600;
    font-size: 0.9rem;
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.2);
    display: inline-flex;
    align-items: center;
    gap: 8px;
    white-space: nowrap;
    z-index: 3;
}

.hero-badge i {
    color: var(--cbox-blue-primary);
    font-size: 1.1rem;
}

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

.features {
    background: var(--cbox-blue-paler);
    position: relative;
}

.feature-card {
    background: var(--cbox-white);
    border: 1px solid var(--cbox-gray-light);
    border-radius: 16px;
    padding: 2rem;
    height: 100%;
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
}

.feature-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 3px;
    background: linear-gradient(90deg, var(--cbox-blue-primary), var(--cbox-blue-light));
    transform: scaleX(0);
    transform-origin: left;
    transition: transform 0.3s ease;
}

.feature-card:hover {
    transform: translateY(-6px);
    box-shadow: var(--cbox-shadow-hover);
    border-color: var(--cbox-blue-light);
}

.feature-card:hover::before {
    transform: scaleX(1);
}

.feature-icon {
    width: 64px;
    height: 64px;
    background: linear-gradient(135deg, var(--cbox-blue-primary), var(--cbox-blue-medium));
    border-radius: 14px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 1.5rem;
    font-size: 1.85rem;
    color: var(--cbox-white);
    box-shadow: 0 6px 16px rgba(58, 95, 191, 0.25);
}

.feature-card h3 {
    font-size: 1.25rem;
    margin-bottom: 0.75rem;
}

.feature-card p {
    color: var(--cbox-gray-medium);
    margin-bottom: 0;
}

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

.products {
    background-color: var(--cbox-white);
    position: relative;
}

.product-card {
    background: var(--cbox-white);
    border: 2px solid var(--cbox-gray-light);
    border-radius: 20px;
    padding: 2.5rem;
    height: 100%;
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
}

.product-card.featured {
    border-color: var(--cbox-blue-primary);
    background: linear-gradient(180deg, var(--cbox-blue-paler) 0%, var(--cbox-white) 30%);
    box-shadow: var(--cbox-shadow);
}

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

.product-badge {
    display: inline-block;
    background: var(--cbox-blue-pale);
    color: var(--cbox-blue-primary);
    padding: 0.35rem 0.9rem;
    border-radius: 20px;
    font-size: 0.8rem;
    font-weight: 600;
    margin-bottom: 1rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.product-badge.pro {
    background: var(--cbox-blue-primary);
    color: var(--cbox-white);
    box-shadow: 0 4px 12px rgba(58, 95, 191, 0.25);
}

.product-card h3 {
    font-size: 1.85rem;
    margin-bottom: 0.75rem;
    color: var(--cbox-blue-primary);
}

.product-description {
    color: var(--cbox-gray-medium);
    margin-bottom: 1.5rem;
    min-height: 50px;
}

.product-features {
    list-style: none;
    padding: 0;
    margin: 0 0 2rem 0;
}

.product-features li {
    padding: 0.5rem 0;
    color: var(--cbox-gray-dark);
    display: flex;
    align-items: flex-start;
    gap: 0.75rem;
}

.product-features li i {
    color: var(--cbox-blue-primary);
    font-size: 1.1rem;
    margin-top: 3px;
    flex-shrink: 0;
}

/* ============================= ABOUT ============================= */

.about {
    background: var(--cbox-blue-paler);
    position: relative;
    overflow: hidden;
}

.about-image-wrapper {
    position: relative;
    border-radius: 20px;
    overflow: hidden;
    box-shadow: var(--cbox-shadow-hover);
    aspect-ratio: 16 / 10;
}

.about-image-wrapper img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    transition: transform 0.6s ease;
}

.about-image-wrapper:hover img {
    transform: scale(1.05);
}

.about-image-wrapper::after {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(135deg, rgba(58, 95, 191, 0.35) 0%, rgba(90, 159, 219, 0.15) 100%);
    mix-blend-mode: multiply;
    pointer-events: none;
}

.about-image-decor {
    position: absolute;
    background: var(--cbox-blue-primary);
    border-radius: 20px;
    z-index: -1;
}

.about-image-decor.top-right {
    top: -20px;
    right: -20px;
    width: 120px;
    height: 120px;
    opacity: 0.15;
}

.about-image-decor.bottom-left {
    bottom: -20px;
    left: -20px;
    width: 180px;
    height: 180px;
    background: var(--cbox-blue-light);
    opacity: 0.2;
}

.about-stat {
    text-align: center;
    padding: 1.5rem 1rem;
    background: var(--cbox-white);
    border-radius: 16px;
    height: 100%;
    border: 1px solid var(--cbox-blue-pale);
    transition: all 0.3s ease;
}

.about-stat:hover {
    transform: translateY(-4px);
    box-shadow: var(--cbox-shadow);
    border-color: var(--cbox-blue-light);
}

.about-stat h3 {
    font-size: 2.5rem;
    color: var(--cbox-blue-primary);
    margin-bottom: 0.5rem;
    font-weight: 800;
}

.about-stat p {
    color: var(--cbox-gray-medium);
    margin-bottom: 0;
    font-weight: 500;
    font-size: 0.95rem;
}

/* ============================= CTA Banner ============================= */

.cta-banner {
    background: linear-gradient(135deg, var(--cbox-blue-primary) 0%, var(--cbox-blue-dark) 100%);
    color: var(--cbox-white);
    padding: 4rem 0;
    position: relative;
    overflow: hidden;
}

.cta-banner::before {
    content: '';
    position: absolute;
    top: 50%;
    right: -5%;
    width: 400px;
    height: 400px;
    background: radial-gradient(circle, rgba(125, 195, 232, 0.25) 0%, transparent 70%);
    border-radius: 50%;
    transform: translateY(-50%);
    pointer-events: none;
}

.cta-banner h2 {
    color: var(--cbox-white);
    margin-bottom: 1rem;
}

.cta-banner p {
    color: rgba(255, 255, 255, 0.9);
    font-size: 1.1rem;
    margin-bottom: 0;
}

.cta-banner .btn-primary {
    background: var(--cbox-white);
    border-color: var(--cbox-white);
    color: var(--cbox-blue-primary);
}

.cta-banner .btn-primary:hover {
    background: var(--cbox-blue-light);
    border-color: var(--cbox-blue-light);
    color: var(--cbox-blue-dark);
}

/* ============================= CONTACT ============================= */

.contact {
    background: var(--cbox-white);
}

.contact-card {
    background: var(--cbox-white);
    border: 2px solid var(--cbox-blue-pale);
    border-radius: 16px;
    padding: 2rem;
    height: 100%;
    text-align: center;
    transition: all 0.3s ease;
}

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

.contact-icon {
    width: 72px;
    height: 72px;
    background: linear-gradient(135deg, var(--cbox-blue-primary), var(--cbox-blue-medium));
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 1.5rem;
    font-size: 1.85rem;
    color: var(--cbox-white);
    box-shadow: 0 8px 20px rgba(58, 95, 191, 0.3);
}

.contact-card h4 {
    font-size: 1.1rem;
    margin-bottom: 0.75rem;
    color: var(--cbox-gray-medium);
    font-weight: 600;
}

.contact-card a {
    font-size: 1.15rem;
    font-weight: 600;
    color: var(--cbox-gray-dark);
    word-break: break-word;
}

.contact-card a:hover {
    color: var(--cbox-blue-primary);
}

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

.footer {
    background: linear-gradient(180deg, var(--cbox-gray-dark) 0%, #151e2d 100%);
    color: #CBD5E1;
    padding: 4rem 0 1.5rem;
    border-top: 4px solid var(--cbox-blue-primary);
}

.footer h5 {
    color: var(--cbox-white);
    margin-bottom: 1rem;
    font-size: 1rem;
    font-weight: 600;
}

.footer a {
    color: #CBD5E1;
    transition: color 0.2s ease;
}

.footer a:hover {
    color: var(--cbox-blue-light);
}

.footer-brand img {
    height: 72px;
    margin-bottom: 1.25rem;
    filter: brightness(0) invert(1);
    opacity: 0.95;
}

.footer-tagline {
    font-size: 0.95rem;
    opacity: 0.85;
    margin-bottom: 0;
    max-width: 320px;
}

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

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

.footer-links li i {
    color: var(--cbox-blue-light);
}

.footer-bottom {
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    padding-top: 1.5rem;
    margin-top: 2.5rem;
    font-size: 0.85rem;
    opacity: 0.7;
}

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

@media (max-width: 991.98px) {
    body { padding-top: 80px; }
    h1 { font-size: 2.5rem; }
    h2 { font-size: 1.85rem; }
    .hero h1 { font-size: 2.3rem; }
    .hero { padding: 4rem 0 5rem; }
    section { padding: 3.5rem 0; }
    .hero-visual { margin-top: 3rem; }
    .navbar-brand img { height: 52px; }
    .about-image-wrapper { margin-bottom: 2.5rem; }
}

@media (max-width: 575.98px) {
    .hero h1 { font-size: 1.9rem; }
    .hero-subtitle { font-size: 1rem; }
    .hero-buttons { flex-direction: column; }
    .hero-buttons .btn { width: 100%; }
    .product-card { padding: 1.75rem; }
    .navbar-brand img { height: 46px; }
    .hero-badge { font-size: 0.8rem; padding: 0.6rem 1.1rem; }
}

/* ============================= UTILITIES ============================= */

.text-primary-cbox {
    color: var(--cbox-blue-primary) !important;
}

.bg-primary-cbox {
    background-color: var(--cbox-blue-primary) !important;
}

/* Language toggle visibility */
[data-lang="en"] { display: none; }
body.lang-en [data-lang="fr"] { display: none; }
body.lang-en [data-lang="en"] { display: inline; }
body.lang-en [data-lang="en"].d-block-en { display: block; }
