/* RESET & VARIABLES */
:root {
    --bg-dark: #0a0a0a;       /* Fond quasi noir */
    --bg-panel: #161616;      /* Fond des cartes légèrement plus clair */
    --text-main: #e0e0e0;
    --text-muted: #949494;
    --accent: #00ff9d;        /* Vert Cyber */
    --accent-hover: #00cc7d;
    --border: #333;
    --font-code: 'JetBrains Mono', monospace;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    background-color: #050505;
    color: var(--text-main);
    font-family: var(--font-code);
    display: flex;
    justify-content: center;
    align-items: center; /* Centre verticalement aussi */
    min-height: 100vh;
    padding: 40px 20px; /* Un peu plus d'espace sur les bords */
}

/* FENÊTRE TERMINAL */
.terminal-window {
    width: 100%;
    max-width: 1100px; /* Agrandit pour laisser de la place aux 3 cartes */
    background-color: var(--bg-dark);
    border: 1px solid var(--border);
    border-radius: 12px; /* Coins un peu plus arrondis */
    box-shadow: 0 0 40px rgba(0, 255, 157, 0.05); /* Lueur verte subtile */
    display: flex;
    flex-direction: column;
    overflow: hidden; /* Pour que rien ne dépasse */
}

/* BARRE DU HAUT (STYLE MAC/LINUX) */
.terminal-header {
    background-color: #1f1f1f;
    padding: 12px 20px;
    border-bottom: 1px solid var(--border);
    display: flex;
    align-items: center;
}

.buttons { display: flex; gap: 8px; }
.dot { width: 12px; height: 12px; border-radius: 50%; }
.red { background: #ff5f56; }
.yellow { background: #ffbd2e; }
.green { background: #27c93f; }

.title {
    margin-left: 20px;
    font-size: 0.85rem;
    color: var(--text-muted);
    font-weight: bold;
    opacity: 0.8;
}

/* CONTENU PRINCIPAL */
.container {
    padding: 50px;
    flex: 1;
}

header { 
    margin-bottom: 70px; 
    border-bottom: 1px solid #222; /* Ligne de séparation subtile */
    padding-bottom: 40px;
}

h1 {
    font-size: 3rem; /* Titre plus gros */
    margin-bottom: 10px;
    color: #fff;
    letter-spacing: -1px;
}

.subtitle {
    color: var(--text-muted);
    font-size: 1.1rem;
    margin-bottom: 25px;
}

/* EFFET TYPING */
.typing-container {
    background: #111;
    padding: 10px 15px;
    border-radius: 6px;
    border: 1px solid #333;
    display: inline-block;
    font-size: 0.95rem;
}
.prompt { color: var(--accent); margin-right: 10px; font-weight: bold; }
.cursor { animation: blink 1s infinite; color: var(--accent); }

@keyframes blink { 0%, 100% { opacity: 1; } 50% { opacity: 0; } }

/* SECTIONS */
.section-title {
    color: var(--accent);
    margin-bottom: 30px;
    font-size: 1.4rem;
    font-weight: 700;
    display: inline-block;
}

/* GRILLE PROJETS OPTIMISÉE */
.grid {
    display: grid;
    /* Créé des colonnes qui font minimum 300px, sinon elles passent à la ligne */
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 25px;
}

.card {
    background: var(--bg-panel);
    padding: 25px;
    border: 1px solid var(--border);
    border-radius: 8px;
    transition: all 0.25s ease;
    
    /* MAGIE FLEXBOX : Garde le bouton en bas */
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    height: 100%; 
}

.card:hover {
    border-color: var(--accent);
    transform: translateY(-5px);
    box-shadow: 0 5px 15px rgba(0,0,0,0.3);
}

.card-header {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 15px;
    color: #fff;
}

.card-header i {
    font-size: 1.2rem;
    color: var(--accent);
}

.card h3 {
    font-size: 1.2rem;
    font-weight: 700;
}

.card p {
    font-size: 0.95rem;
    color: var(--text-muted);
    margin-bottom: 20px;
    line-height: 1.6;
    flex-grow: 1; /* C'est ça qui pousse le bouton vers le bas */
}

.tags {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-bottom: 25px;
}

.tags span {
    font-size: 0.75rem;
    background: rgba(255, 255, 255, 0.05);
    padding: 5px 10px;
    border-radius: 4px;
    color: var(--text-main);
    border: 1px solid #333;
}

/* BOUTONS */
.btn {
    display: inline-flex;
    justify-content: center;
    align-items: center;
    gap: 10px;
    text-decoration: none;
    color: #000; /* Texte noir sur fond vert pour contraste */
    background-color: var(--accent);
    font-size: 0.9rem;
    font-weight: bold;
    padding: 10px 15px;
    border-radius: 4px;
    transition: 0.2s;
    text-align: center;
}

.btn:hover {
    background-color: var(--accent-hover);
    transform: scale(1.02);
}

/* CONTACT */
.socials {
    display: flex;
    gap: 20px;
    flex-wrap: wrap;
}

.socials a {
    color: var(--text-muted);
    text-decoration: none;
    font-size: 1rem;
    transition: 0.2s;
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 10px 20px;
    border: 1px solid var(--border);
    border-radius: 4px;
}

.socials a:hover {
    color: var(--accent);
    border-color: var(--accent);
    background: rgba(0, 255, 157, 0.05);
}

/* FOOTER */
footer {
    text-align: center;
    padding: 20px;
    border-top: 1px solid var(--border);
    font-size: 0.8rem;
    color: #555;
    background-color: #111;
}

/* MOBILE */
@media (max-width: 768px) {
    h1 { font-size: 2rem; }
    .container { padding: 25px; }
    .terminal-window { max-width: 100%; border-radius: 0; }
    body { padding: 0; }
    .socials { flex-direction: column; }
    .socials a { justify-content: center; }
}