/* ============================================================
   Hacktopie — site vitrine
   Charte : Matrix (noir, vert neon, monospace)
   ============================================================ */

/* --- Variables --- */
:root {
    --bg:           #0d0d0d;
    --bg-card:      #111;
    --bg-alt:       #0a1a0a;
    --green:        #00ff41;
    --green-dim:    #00cc33;
    --green-dark:   #003b00;
    --green-glow:   0 0 8px rgba(0, 255, 65, .4);
    --text:         #c0c0c0;
    --text-light:   #e0e0e0;
    --text-dim:     #777;
    --border:       #1a3a1a;
    --font-mono:    'Source Code Pro', 'Fira Code', 'Courier New', monospace;
    --font-body:    'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    --max-w:        1100px;
    --gap:          2rem;
}

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

html { scroll-behavior: smooth; }

body {
    font-family: var(--font-body);
    background: var(--bg);
    color: var(--text);
    line-height: 1.7;
    font-size: 1rem;
    -webkit-font-smoothing: antialiased;
}

a { color: var(--green); text-decoration: none; transition: text-shadow .2s; }
a:hover { text-shadow: var(--green-glow); }

h1, h2, h3, h4 {
    font-family: var(--font-mono);
    color: var(--green);
    font-weight: 600;
    line-height: 1.3;
}
h1 { font-size: clamp(1.8rem, 5vw, 2.8rem); }
h2 { font-size: clamp(1.4rem, 3.5vw, 2rem); margin-bottom: 1rem; }
h3 { font-size: 1.15rem; margin-bottom: .5rem; }

img { max-width: 100%; height: auto; }

/* --- Layout --- */
.container { max-width: var(--max-w); margin: 0 auto; padding: 0 1.5rem; }

section { padding: 4rem 0; }
section + section { border-top: 1px solid var(--border); }

/* --- Header / Nav --- */
.site-header {
    position: sticky;
    top: 0;
    z-index: 100;
    background: rgba(13, 13, 13, .92);
    backdrop-filter: blur(8px);
    border-bottom: 1px solid var(--border);
}

.site-header .container {
    display: flex;
    align-items: center;
    justify-content: space-between;
    height: 60px;
}

.logo {
    font-family: var(--font-mono);
    font-size: 1.3rem;
    font-weight: 700;
    color: var(--green);
    letter-spacing: 1px;
    text-shadow: var(--green-glow);
}
.logo span { color: var(--text-dim); font-weight: 400; }

nav { display: flex; gap: 1.5rem; }
nav a {
    font-family: var(--font-mono);
    font-size: .85rem;
    color: var(--text);
    text-transform: uppercase;
    letter-spacing: .5px;
    padding: .25rem 0;
    border-bottom: 2px solid transparent;
    transition: color .2s, border-color .2s;
}
nav a:hover, nav a.active {
    color: var(--green);
    border-bottom-color: var(--green);
    text-shadow: none;
}

/* Mobile nav toggle */
.nav-toggle { display: none; background: none; border: none; color: var(--green); font-size: 1.5rem; cursor: pointer; }

@media (max-width: 700px) {
    .nav-toggle { display: block; }
    nav {
        display: none;
        flex-direction: column;
        position: absolute;
        top: 60px;
        left: 0;
        right: 0;
        background: var(--bg);
        border-bottom: 1px solid var(--border);
        padding: 1rem 1.5rem;
        gap: .75rem;
    }
    nav.open { display: flex; }
}

/* --- Hero --- */
.hero {
    position: relative;
    overflow: hidden;
    padding: 6rem 0 4rem;
    text-align: center;
}

.hero canvas {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    opacity: .15;
    pointer-events: none;
}

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

.hero h1 { margin-bottom: 1rem; }

.hero .tagline {
    font-family: var(--font-mono);
    font-size: clamp(.95rem, 2.5vw, 1.2rem);
    color: var(--text-dim);
    max-width: 600px;
    margin: 0 auto 2rem;
}

/* --- Buttons --- */
.btn {
    display: inline-block;
    font-family: var(--font-mono);
    font-size: .9rem;
    padding: .7rem 1.8rem;
    border: 1px solid var(--green);
    color: var(--green);
    border-radius: 4px;
    transition: background .2s, box-shadow .2s, color .2s;
    cursor: pointer;
    text-transform: uppercase;
    letter-spacing: .5px;
}
.btn:hover {
    background: var(--green);
    color: var(--bg);
    box-shadow: var(--green-glow);
    text-shadow: none;
}

/* --- Cards grid --- */
.cards {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: var(--gap);
}

.card {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: 6px;
    padding: 1.5rem;
    transition: border-color .2s, box-shadow .2s;
}
.card:hover {
    border-color: var(--green-dim);
    box-shadow: 0 0 12px rgba(0, 255, 65, .08);
}

.card .icon {
    font-size: 1.6rem;
    margin-bottom: .75rem;
    display: block;
}

.card p { font-size: .9rem; color: var(--text-dim); }

/* --- Services detail --- */
.service-block { margin-bottom: 3rem; }
.service-block:last-child { margin-bottom: 0; }

.service-block h3 {
    font-size: 1.25rem;
    padding-bottom: .5rem;
    border-bottom: 1px solid var(--border);
    margin-bottom: 1rem;
}

.tech-tags {
    display: flex;
    flex-wrap: wrap;
    gap: .5rem;
    margin-top: 1rem;
}

.tech-tag {
    font-family: var(--font-mono);
    font-size: .75rem;
    padding: .2rem .6rem;
    border: 1px solid var(--green-dark);
    border-radius: 3px;
    color: var(--green-dim);
    background: rgba(0, 59, 0, .2);
}

/* --- About --- */
.values {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: var(--gap);
    margin-top: 2rem;
}

.value h3 { font-size: 1rem; }
.value p { font-size: .9rem; color: var(--text-dim); }

/* --- Contact --- */
.contact-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: var(--gap);
}
@media (max-width: 700px) {
    .contact-grid { grid-template-columns: 1fr; }
}

.contact-info p {
    margin-bottom: 1rem;
    font-size: .95rem;
}

.contact-form label {
    display: block;
    font-family: var(--font-mono);
    font-size: .8rem;
    color: var(--text-dim);
    margin-bottom: .3rem;
    text-transform: uppercase;
}

.contact-form input,
.contact-form textarea {
    width: 100%;
    padding: .6rem .8rem;
    margin-bottom: 1rem;
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: 4px;
    color: var(--text-light);
    font-family: var(--font-body);
    font-size: .9rem;
    transition: border-color .2s;
}
.contact-form input:focus,
.contact-form textarea:focus {
    outline: none;
    border-color: var(--green);
}
.contact-form textarea { resize: vertical; min-height: 120px; }

/* --- Footer --- */
.site-footer {
    border-top: 1px solid var(--border);
    padding: 2rem 0;
    text-align: center;
    font-size: .8rem;
    color: var(--text-dim);
}
.site-footer a { color: var(--green-dim); }

/* --- Utilities --- */
.text-center { text-align: center; }
.mb-2 { margin-bottom: 2rem; }
.mt-2 { margin-top: 2rem; }
