/* =========================================
   VARIABLES & RESET
========================================= */
@import url('https://fonts.googleapis.com/css2?family=Space+Grotesk:wght@400;700&display=swap');

:root {
    --bg-color: #f4f4f0; 
    --text-color: #111111; 
    --accent-color: #d90429; 
    --border-color: #111111;
    --border-width: 3px; 
    --radius: 12px; /* L'effet bloc Neal.fun */
    --font-heading: 'Space Grotesk', sans-serif;
    --font-body: Helvetica, Arial, sans-serif;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    background-color: var(--bg-color);
    color: var(--text-color);
    font-family: var(--font-body);
    line-height: 1.6;
    overflow-x: hidden;
}

/* =========================================
   HEADER FAÇON NEAL.FUN
========================================= */
.site-header {
    text-align: center;
    padding: 3rem 2rem 2rem;
    border-bottom: var(--border-width) solid var(--border-color);
    background-color: var(--bg-color);
    margin-bottom: 2rem;
}

.site-logo {
    font-family: var(--font-heading);
    font-weight: 700;
    font-size: clamp(3rem, 6vw, 4rem);
    letter-spacing: -2px;
    line-height: 1;
}

.site-logo span {
    color: var(--accent-color);
}

.site-subtitle {
    font-family: monospace;
    font-size: 0.9rem;
    opacity: 0.8;
    margin-top: 0.5rem;
    margin-bottom: 2rem;
}

.nav-links {
    display: flex;
    justify-content: center;
    gap: 2rem;
}

.nav-links a {
    text-decoration: none;
    color: var(--text-color);
    font-weight: bold;
    text-transform: uppercase;
    font-size: 0.95rem;
    transition: color 0.1s;
    font-family: var(--font-heading);
}

.nav-links a:hover, .nav-links a.active {
    color: var(--accent-color);
    text-decoration: underline;
    text-underline-offset: 4px;
    text-decoration-thickness: 2px;
}

/* =========================================
   LAYOUT PRINCIPAL & FILTRES
========================================= */
.page-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 2rem 4rem;
}

.filters-centered {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 1.5rem;
    margin-bottom: 3rem;
}

.filter-group {
    display: flex;
    gap: 1rem;
    flex-wrap: wrap;
    justify-content: center;
}

.filter-btn {
    background: #fff;
    border: var(--border-width) solid var(--border-color);
    border-radius: 30px; /* Boutons en pilule */
    padding: 0.5rem 1.5rem;
    font-family: var(--font-heading);
    font-weight: bold;
    cursor: pointer;
    text-transform: uppercase;
    box-shadow: 2px 2px 0 var(--border-color);
}

.filter-btn:hover, .filter-btn.active {
    background: var(--text-color);
    color: var(--bg-color);
    box-shadow: 0 0 0 transparent;
    transform: translate(2px, 2px);
}

.filter-select {
    padding: 0.5rem 1rem;
    font-family: var(--font-heading);
    font-size: 0.9rem;
    font-weight: bold;
    border: var(--border-width) solid var(--border-color);
    border-radius: 8px;
    background-color: #fff;
    color: var(--text-color);
    cursor: pointer;
    outline: none;
}

/* =========================================
   GRILLE NEAL.FUN (CARTES BLOCS)
========================================= */
.grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
    gap: 2.5rem;
}

.project-card {
    border: var(--border-width) solid var(--border-color);
    border-radius: var(--radius);
    display: flex;
    flex-direction: column;
    background: #fff;
    position: relative;
    /* OVERFLOW VISIBLE est essentiel pour que tes dessins débordent de la carte */
    overflow: visible; 
}

/* L'image prend la forme arrondie en haut, mais reste droite en bas */
.project-thumbnail {
    width: 100%;
    height: 200px;
    object-fit: cover;
    border-top-left-radius: calc(var(--radius) - 3px);
    border-top-right-radius: calc(var(--radius) - 3px);
    border-bottom: var(--border-width) solid var(--border-color);
}

.project-info {
    padding: 1.5rem;
    flex-grow: 1;
    display: flex;
    flex-direction: column;
}

.project-info h2 {
    font-size: 1.6rem;
    margin-bottom: 0.5rem;
    line-height: 1.1;
}

.project-info p {
    font-size: 0.9rem;
    opacity: 0.8;
    line-height: 1.5;
}

.tags {
    list-style: none;
    display: flex;
    gap: 0.5rem;
    margin: 1.2rem 0;
    flex-wrap: wrap;
}

.tags li {
    font-size: 0.75rem;
    background: var(--bg-color);
    border: 2px solid var(--border-color);
    border-radius: 4px;
    color: var(--text-color);
    padding: 0.2rem 0.5rem;
    font-family: monospace;
}

/* BOUTON GLOBAL */
.btn {
    display: inline-block;
    margin-top: auto;
    text-align: center;
    text-decoration: none;
    border: var(--border-width) solid var(--border-color);
    border-radius: 6px;
    background: #fff;
    color: var(--text-color);
    padding: 0.6rem;
    font-family: var(--font-heading);
    font-weight: bold;
    text-transform: uppercase;
    font-size: 0.85rem;
    cursor: pointer;
}

.btn:hover {
    background: var(--text-color);
    color: #fff;
}

/* =========================================
   DÉCORATIONS (TES DESSINS)
========================================= */
.decor-dessin {
    position: absolute;
    z-index: 10;
    pointer-events: none; /* Empêche le dessin de bloquer les clics */
}

/* Exemple 1 : Un personnage assis sur le bord en haut à droite */
.dessin-assis {
    top: -45px;
    right: 20px;
    height: 70px;
}

/* Exemple 2 : Un oiseau qui vole sur le coin en haut à gauche */
.dessin-oiseau {
    top: -30px;
    left: -25px;
    height: 60px;
    transform: rotate(-15deg);
}

/* Exemple 3 : Un objet collé sur le bord droit au milieu */
.dessin-cote {
    bottom: 30px;
    right: -25px;
    height: 50px;
}

/* =========================================
   ÉTAT VIDE
========================================= */
.empty-state {
    display: none;
    grid-column: 1 / -1;
    padding: 4rem 0;
    text-align: center;
    border: var(--border-width) dashed var(--border-color);
    border-radius: var(--radius);
}

.empty-state p {
    font-family: monospace;
    font-size: 1rem;
    opacity: 0.5;
}

/* =========================================
   FENÊTRE MODALE (DIALOG)
========================================= */
.brutalist-modal {
    margin: auto;
    width: 90%;
    max-width: 1000px;
    max-height: 90vh;
    background: var(--bg-color);
    border: var(--border-width) solid var(--border-color);
    border-radius: var(--radius);
    box-shadow: 12px 12px 0 var(--text-color); /* Ombre noire */
    padding: 0;
    outline: none;
}

.brutalist-modal::backdrop {
    background: rgba(17, 17, 17, 0.85);
    backdrop-filter: blur(4px);
}

.modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1.5rem;
    border-bottom: var(--border-width) solid var(--border-color);
    background: #fff;
    border-top-left-radius: calc(var(--radius) - 3px);
    border-top-right-radius: calc(var(--radius) - 3px);
}

.modal-header h2 {
    font-size: 2rem;
    margin: 0;
}

.modal-content {
    display: grid;
    grid-template-columns: 1fr 1.5fr;
    gap: 0;
}

.modal-left {
    padding: 2rem;
    border-right: var(--border-width) solid var(--border-color);
    display: flex;
    flex-direction: column;
}

.modal-links {
    margin-top: auto;
    display: flex;
    flex-direction: column;
    gap: 1rem;
    padding-top: 2rem;
}

.modal-right {
    padding: 2rem;
    background: #fff;
    overflow-y: auto;
    max-height: 65vh;
}

.modal-right img {
    width: 100%;
    height: auto;
    border: var(--border-width) solid var(--border-color);
    border-radius: 8px;
    margin-bottom: 1.5rem;
    display: block;
}

/* =========================================
   RESPONSIVE
========================================= */
@media (max-width: 900px) {
    .modal-content {
        grid-template-columns: 1fr;
    }
    .modal-left {
        border-right: none;
        border-bottom: var(--border-width) solid var(--border-color);
    }
    .modal-right {
        max-height: none;
    }
}

@media (max-width: 768px) {
    .site-header { padding: 2rem 1rem; }
    .nav-links { flex-wrap: wrap; gap: 1rem; }
}

/* =========================================
   PAGES ABOUT & CONTACT (STYLE NEAL.FUN)
========================================= */

/* Le bloc de base (remplace les anciennes divisions) */
.content-block {
    background: #fff;
    border: var(--border-width) solid var(--border-color);
    border-radius: var(--radius);
    padding: 2.5rem;
    position: relative;
    /* overflow visible pour que tes dessins puissent dépasser ! */
    overflow: visible; 
}

/* Grille pour la page À propos */
.about-grid {
    display: grid;
    grid-template-columns: 1.5fr 1fr;
    gap: 3rem;
    align-items: start;
}

.about-sidebar {
    position: sticky;
    top: 20px;
}

.about-image {
    width: 100%;
    height: auto;
    border-radius: calc(var(--radius) - 3px);
    display: block;
    border: 2px solid var(--border-color);
}

.skills-grid {
    display: flex;
    flex-wrap: wrap;
    gap: 0.8rem;
    margin-top: 1rem;
}

.skill-tag {
    font-family: monospace;
    font-size: 0.85rem;
    border: 2px solid var(--border-color);
    border-radius: 6px;
    padding: 0.4rem 0.8rem;
    background: var(--bg-color);
}

.stat-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1.5rem;
    margin-top: 2rem;
}

.stat-item {
    background: #fff;
    border: var(--border-width) solid var(--border-color);
    border-radius: var(--radius);
    padding: 1.5rem;
    text-align: center;
}

.stat-number {
    font-family: var(--font-heading);
    font-size: 3rem;
    font-weight: 700;
    color: var(--accent-color);
    display: block;
    line-height: 1;
}

.stat-label {
    font-family: monospace;
    font-size: 0.85rem;
    opacity: 0.7;
}

/* Grille pour la page Contact */
.contact-layout {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 3rem;
    align-items: start;
    margin-top: 2rem;
}

.contact-items-wrapper {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.contact-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    border: var(--border-width) solid var(--border-color);
    border-radius: var(--radius); /* Blocs arrondis Neal.fun */
    padding: 1.5rem;
    background: #fff;
    text-decoration: none;
    color: var(--text-color);
}

.contact-item-label {
    font-family: var(--font-heading);
    font-weight: 700;
    font-size: 1.2rem;
    text-transform: uppercase;
}

/* =========================================
   NOUVEAUX DESSINS
========================================= */
.dessin-profil {
    top: -30px;
    left: -30px;
    height: 70px;
    transform: rotate(-10deg);
}

.dessin-contact {
    top: -40px;
    right: 20px;
    height: 80px;
}

/* Responsive */
@media (max-width: 900px) {
    .about-grid, .contact-layout {
        grid-template-columns: 1fr;
    }
    .about-sidebar {
        position: static;
        order: -1;
    }
}