/* ============================================
   EB Génie Conseil - Elegant Minimal Design
   ============================================ */

/* --- Variables --- */
:root {
    --bg: #0a0a0f;
    --bg-alt: #0f0f16;
    --bg-card: #141420;
    --bg-hover: #1a1a28;

    --text: #e8e8ed;
    --text-muted: #8a9aaa;
    --text-dim: #6a7a8a;

    --accent: #0088cc;
    --accent-hover: #00a0e6;
    --accent-dim: rgba(0, 136, 204, 0.15);

    --silver: #7a8a9a;
    --silver-light: #9aacbc;
    --silver-dim: rgba(122, 138, 154, 0.15);

    --blue: #0088cc;
    --blue-dim: rgba(0, 136, 204, 0.1);

    --border: rgba(255, 255, 255, 0.06);
    --border-light: rgba(255, 255, 255, 0.1);

    --shadow-card: none;
    --bg-header: rgba(10, 10, 15, 0.8);

    --radius: 12px;
    --radius-sm: 8px;
    --radius-lg: 20px;

    --font: 'DM Sans', -apple-system, BlinkMacSystemFont, sans-serif;
    --font-mono: 'JetBrains Mono', monospace;

    --transition: 0.3s ease;
    --transition-fast: 0.15s ease;
}

[data-theme="light"] {
    --bg: #f1f5f9;
    --bg-alt: #e2e8f0;
    --bg-card: #ffffff;
    --bg-hover: #f8fafc;

    --text: #0f172a;
    --text-muted: #5a6a7a;
    --text-dim: #6a7a8a;

    --border: #cbd5e1;
    --border-light: #94a3b8;

    --shadow-card: 0 4px 12px -2px rgba(0, 0, 0, 0.08), 0 2px 6px -1px rgba(0, 0, 0, 0.05);
    --bg-header: rgba(241, 245, 249, 0.9);

    --accent: #006699;
    --accent-hover: #0077b3;
    --accent-dim: rgba(0, 102, 153, 0.15);

    --silver: #5a6a7a;
    --silver-light: #7a8a9a;
    --silver-dim: rgba(90, 106, 122, 0.15);

    --blue-dim: rgba(0, 102, 153, 0.1);
}

/* --- Reset --- */
*,
*::before,
*::after {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    font-family: var(--font);
    font-size: 16px;
    line-height: 1.7;
    color: var(--text);
    background: var(--bg);
    -webkit-font-smoothing: antialiased;
}

a {
    color: inherit;
    text-decoration: none;
}

img {
    max-width: 100%;
    display: block;
}

button {
    font-family: inherit;
    cursor: pointer;
    border: none;
    background: none;
}

/* --- Container --- */
.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 24px;
}

/* --- Typography --- */
h1,
h2,
h3 {
    color: var(--text);
    /* Fixed white text issue */
    font-weight: 600;
    line-height: 1.2;
}

.text-accent {
    background: linear-gradient(135deg, var(--accent) 0%, var(--silver-light) 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.section-label {
    font-family: var(--font-mono);
    font-size: 0.8rem;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    color: var(--accent);
    margin-bottom: 12px;
}

.section-title {
    font-size: clamp(2rem, 5vw, 2.8rem);
    margin-bottom: 16px;
}

.section-subtitle {
    color: var(--text-muted);
    font-size: 1.1rem;
    max-width: 500px;
}

.section-header {
    text-align: center;
    margin-bottom: 60px;
}

.section-header .section-subtitle {
    margin: 0 auto;
}

/* --- Buttons --- */
.btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 12px 24px;
    font-size: 0.95rem;
    font-weight: 500;
    border-radius: var(--radius-sm);
    transition: var(--transition);
}

.btn-primary {
    background: linear-gradient(135deg, var(--accent) 0%, #006699 100%);
    color: #ffffff;
}

.btn-primary:hover {
    background: linear-gradient(135deg, var(--accent-hover) 0%, #0088cc 100%);
    transform: translateY(-2px);
}

.btn-outline {
    border: 1px solid var(--border-light);
    color: var(--text);
}

.btn-outline:hover {
    border-color: var(--accent);
    color: var(--accent);
}

.btn-lg {
    padding: 16px 32px;
    font-size: 1rem;
}

/* --- Header --- */
.header {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 100;
    padding: 20px 0;
    background: var(--bg-header);
    backdrop-filter: blur(20px);
    border-bottom: 1px solid var(--border);
    transition: background 0.3s ease;
}

.header-inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.logo {
    display: flex;
    align-items: center;
}

.logo-img {
    height: 40px;
    width: auto;
}

.nav {
    display: flex;
    align-items: center;
    gap: 32px;
}

.nav-link {
    color: var(--text-muted);
    font-size: 0.95rem;
    transition: var(--transition-fast);
}

.nav-link:hover {
    color: var(--accent);
}

.nav-toggle {
    display: none;
    flex-direction: column;
    gap: 6px;
    padding: 8px;
}

.theme-toggle {
    background: var(--bg-card);
    border: 1px solid var(--border);
    color: var(--text);
    width: 40px;
    height: 40px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: var(--transition);
    margin-right: 16px;
}

.theme-toggle:hover {
    background: var(--bg-hover);
    color: var(--accent);
    border-color: var(--accent);
}

.theme-toggle i {
    font-size: 1.1rem;
}

.nav-toggle span {
    width: 24px;
    height: 2px;
    background: var(--text);
    transition: var(--transition);
}

/* --- Hero --- */
.hero {
    min-height: 100vh;
    display: flex;
    align-items: center;
    padding: 140px 0 100px;
}

.hero-badge {
    display: inline-block;
    font-family: var(--font-mono);
    font-size: 0.85rem;
    color: var(--accent);
    background: var(--accent-dim);
    padding: 8px 16px;
    border-radius: 100px;
    margin-bottom: 32px;
}

.hero-title {
    font-size: clamp(2.5rem, 7vw, 4.5rem);
    font-weight: 700;
    margin-bottom: 24px;
    letter-spacing: -0.02em;
}

.hero-text {
    font-size: 1.25rem;
    color: var(--text-muted);
    max-width: 540px;
    margin-bottom: 40px;
}

.hero-actions {
    display: flex;
    gap: 16px;
    flex-wrap: wrap;
}

/* --- Section --- */
.section {
    padding: 100px 0;
}

.section-alt {
    background: var(--bg-alt);
}

/* --- About --- */
.about-grid {
    display: grid;
    grid-template-columns: 1fr;
    max-width: 800px;
}

.about-text {
    color: var(--text-muted);
    margin-bottom: 20px;
}

.credentials {
    list-style: none;
    margin-top: 32px;
}

.credentials li {
    display: flex;
    align-items: center;
    gap: 16px;
    padding: 12px 0;
    border-bottom: 1px solid var(--border);
}

.credentials li:last-child {
    border-bottom: none;
}

.credential-icon {
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--accent-dim);
    color: var(--accent);
    border-radius: var(--radius-sm);
    font-size: 1rem;
}

/* --- Project Types --- */
.types-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 24px;
}

.type-card {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 32px 24px;
    text-align: center;
    transition: var(--transition);
    box-shadow: var(--shadow-card);
}

.type-card:hover {
    border-color: var(--border-light);
    transform: translateY(-4px);
}

.type-icon {
    width: 64px;
    height: 64px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--accent-dim);
    color: var(--accent);
    border-radius: 50%;
    font-size: 1.5rem;
    margin: 0 auto 20px;
}

.type-title {
    font-size: 1.1rem;
    margin-bottom: 12px;
}

.type-desc {
    color: var(--text-muted);
    font-size: 0.9rem;
    line-height: 1.6;
}

/* --- Services --- */
.services-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
    gap: 24px;
}

.service-card {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 32px;
    cursor: pointer;
    transition: var(--transition);
    box-shadow: var(--shadow-card);
}

.service-card:hover {
    border-color: var(--border-light);
    transform: translateY(-4px);
}

/* .service-card.featured removed - all cards now identical */

.service-icon {
    width: 56px;
    height: 56px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--accent-dim);
    color: var(--accent);
    border-radius: var(--radius-sm);
    font-size: 1.4rem;
    margin-bottom: 24px;
}

.service-title {
    font-size: 1.25rem;
    margin-bottom: 12px;
}

.service-brief {
    color: var(--text-muted);
    font-size: 0.95rem;
    margin-bottom: 20px;
}

.service-more {
    font-size: 0.9rem;
    color: var(--accent);
    opacity: 0;
    transition: var(--transition);
}

.service-card:hover .service-more {
    opacity: 1;
}

/* --- Projects --- */
.projects-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(340px, 1fr));
    gap: 32px;
}

.project-card {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    overflow: hidden;
    cursor: pointer;
    transition: var(--transition);
    box-shadow: var(--shadow-card);
}

.project-card:hover {
    border-color: var(--border-light);
    transform: translateY(-4px);
}

.project-image {
    position: relative;
    height: 220px;
    overflow: hidden;
}

.project-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: var(--transition);
}

.project-card:hover .project-image img {
    transform: scale(1.05);
}

.project-tag {
    position: absolute;
    top: 16px;
    right: 16px;
    background: linear-gradient(135deg, var(--accent) 0%, var(--silver) 100%);
    color: #ffffff;
    font-family: var(--font-mono);
    font-size: 0.8rem;
    font-weight: 600;
    padding: 6px 12px;
    border-radius: 6px;
}

.project-content {
    padding: 28px;
}

.project-type {
    font-family: var(--font-mono);
    font-size: 0.75rem;
    letter-spacing: 0.05em;
    text-transform: uppercase;
    color: var(--blue);
    margin-bottom: 8px;
    display: block;
}

.project-title {
    font-size: 1.35rem;
    margin-bottom: 8px;
}

.project-desc {
    color: var(--text-muted);
    font-size: 0.95rem;
    margin-bottom: 16px;
}

.project-link {
    font-size: 0.9rem;
    color: var(--accent);
}

/* --- Contact --- */
.contact-wrapper {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 60px;
    align-items: center;
}

.contact-text {
    color: var(--text-muted);
    font-size: 1.1rem;
}

.contact-card {
    background: var(--bg-card);
    border: 1px solid var(--accent);
    border-radius: var(--radius);
    padding: 40px;
    box-shadow: var(--shadow-card);
}

.contact-name {
    font-size: 1.4rem;
    font-weight: 600;
    color: var(--text);
    /* Fixed fixed white text issue */
    margin-bottom: 24px;
}

.contact-link {
    display: flex;
    align-items: center;
    gap: 12px;
    color: var(--accent);
    font-size: 1.1rem;
    margin-bottom: 12px;
    transition: var(--transition-fast);
}

.contact-link:hover {
    color: var(--accent-hover);
}

.contact-link i {
    width: 20px;
}

.oiq-badge {
    margin-top: 28px;
    padding-top: 24px;
    border-top: 1px solid var(--border);
    text-align: center;
}

.oiq-label {
    display: block;
    font-size: 0.85rem;
    color: var(--text-muted);
    margin-bottom: 4px;
}

.oiq-number {
    font-family: var(--font-mono);
    font-size: 1.1rem;
    color: var(--text);
    letter-spacing: 0.05em;
}

/* --- Footer --- */
.footer {
    padding: 40px 0;
    text-align: center;
    border-top: 1px solid var(--border);
    color: var(--text-dim);
    font-size: 0.9rem;
}

/* --- Modal --- */
.modal {
    display: none;
    position: fixed;
    inset: 0;
    z-index: 200;
    background: rgba(0, 0, 0, 0.85);
    backdrop-filter: blur(8px);
    overflow-y: auto;
    padding: 40px 20px;
}

.modal-content {
    background: var(--bg-alt);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    max-width: 600px;
    margin: 0 auto;
    position: relative;
    animation: modalIn 0.3s ease;
}

.modal-large {
    max-width: 800px;
}

@keyframes modalIn {
    from {
        opacity: 0;
        transform: translateY(20px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.modal-close {
    position: absolute;
    top: 20px;
    right: 20px;
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.8rem;
    color: var(--text-muted);
    background: var(--bg-card);
    border-radius: 50%;
    z-index: 10;
    transition: var(--transition-fast);
}

.modal-close:hover {
    color: #fff;
    background: var(--bg-hover);
}

.modal-header {
    padding: 40px 40px 24px;
    border-bottom: 1px solid var(--border);
}

.modal-header h2 {
    font-size: 1.8rem;
    margin-bottom: 0;
}

.modal-icon {
    width: 56px;
    height: 56px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--accent-dim);
    color: var(--accent);
    border-radius: var(--radius-sm);
    font-size: 1.4rem;
    margin-bottom: 20px;
}

.modal-tag {
    display: inline-block;
    font-family: var(--font-mono);
    font-size: 0.75rem;
    letter-spacing: 0.05em;
    text-transform: uppercase;
    color: var(--blue);
    background: var(--blue-dim);
    padding: 6px 12px;
    border-radius: 6px;
    margin-bottom: 16px;
}

.modal-subtitle {
    color: var(--text-muted);
    font-size: 1rem;
    margin-top: 8px;
}

.modal-body {
    padding: 32px 40px 40px;
}

.modal-body p {
    color: var(--text-muted);
    margin-bottom: 20px;
}

.modal-body h3 {
    font-size: 1.15rem;
    margin: 28px 0 16px;
}

.modal-body h3:first-of-type {
    margin-top: 0;
}

.modal-features {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 12px;
    margin-top: 24px;
}

.feature {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 16px;
    background: var(--bg-card);
    border-radius: var(--radius-sm);
    font-size: 0.9rem;
}

.feature i {
    color: var(--accent);
}

.modal-image {
    margin-bottom: 24px;
    border-radius: var(--radius);
    overflow: hidden;
}

.modal-image img {
    width: 100%;
}

/* Gallery */
.gallery {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 12px;
    margin-bottom: 32px;
}

.gallery img {
    width: 100%;
    height: 180px;
    object-fit: cover;
    border-radius: var(--radius-sm);
}

.gallery-1 {
    grid-template-columns: 1fr;
}

.gallery-1 img {
    height: 280px;
}

.gallery-2 {
    grid-template-columns: 1fr 1fr;
}

.gallery-2 img {
    height: 200px;
}

/* Specs Grid */
.specs-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 16px;
    margin-bottom: 32px;
}

.spec {
    background: var(--bg-card);
    border-radius: var(--radius-sm);
    padding: 20px;
    text-align: center;
}

.spec-label {
    display: block;
    font-size: 0.75rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: var(--text-muted);
    margin-bottom: 8px;
}

.spec-value {
    font-family: var(--font-mono);
    font-size: 1.2rem;
    font-weight: 600;
    color: #fff;
}

/* Check List */
.check-list {
    list-style: none;
}

.check-list li {
    position: relative;
    padding-left: 28px;
    margin-bottom: 12px;
    color: var(--text-muted);
}

.check-list li::before {
    content: '✓';
    position: absolute;
    left: 0;
    color: var(--accent);
    font-weight: 600;
}

/* Alert Box */
.alert-box {
    background: var(--accent-dim);
    border-left: 3px solid var(--accent);
    padding: 20px 24px;
    border-radius: 0 var(--radius-sm) var(--radius-sm) 0;
    margin-top: 24px;
}

.alert-box strong {
    display: block;
    color: var(--accent);
    margin-bottom: 8px;
}

.alert-box p {
    margin: 0;
    font-size: 0.95rem;
}

/* --- Animations --- */
.fade-in {
    opacity: 0;
    transform: translateY(20px);
    transition: opacity 0.6s ease, transform 0.6s ease;
}

.fade-in.visible {
    opacity: 1;
    transform: translateY(0);
}

/* --- Responsive --- */
@media (max-width: 1024px) {

    .about-grid,
    .contact-wrapper {
        grid-template-columns: 1fr;
        gap: 48px;
    }

    .specs-grid {
        grid-template-columns: repeat(2, 1fr);
    }

    .types-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 768px) {
    .nav {
        display: none;
        position: absolute;
        top: 100%;
        left: 0;
        right: 0;
        flex-direction: column;
        background: var(--bg-alt);
        padding: 24px;
        gap: 16px;
        border-bottom: 1px solid var(--border);
    }

    .nav.active {
        display: flex;
    }

    .nav-toggle {
        display: flex;
    }

    .hero {
        padding: 120px 0 80px;
        min-height: auto;
    }

    .hero-title {
        font-size: 2.5rem;
    }

    .hero-actions {
        flex-direction: column;
    }

    .hero-actions .btn {
        width: 100%;
        justify-content: center;
    }

    .section {
        padding: 60px 0;
    }

    .projects-grid {
        grid-template-columns: 1fr;
    }

    .modal-features {
        grid-template-columns: 1fr;
    }

    .modal-header,
    .modal-body {
        padding-left: 24px;
        padding-right: 24px;
    }

    .specs-grid {
        grid-template-columns: 1fr 1fr;
    }
}

@media (max-width: 480px) {
    .services-grid,
    .types-grid {
        grid-template-columns: 1fr;
    }

    .gallery {
        grid-template-columns: 1fr;
    }

    .gallery img,
    .gallery-2 img {
        height: 200px;
    }
}