/* ========================================
   VARIABLES + RESET
   ======================================== */
:root {
    --couleur-fond: #f5f5f0;
    --couleur-texte: #000000;
    --couleur-hover: #333333;
    --couleur-carte: #cccccc;
    --couleur-carte-hover: #b3b3b3;
    --font-principale: 'Doto', sans-serif;
}
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}
body {
    font-family: var(--font-principale);
    font-weight: 400;
    background-color: var(--couleur-fond);
    color: var(--couleur-texte);
    display: flex;
    flex-direction: column;
    min-height: 100vh;
}
main { flex: 1; }
/* ========================================
   HEADER
   ======================================== */
header {
    padding: 30px 30px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    position: fixed;
    top: 0; left: 0; right: 0;
    background-color: var(--couleur-fond);
    z-index: 100;
}
.titre { font-size: 24px; font-weight: 400; }
nav {
    display: flex;
    gap: 30px;
}
nav a {
    color: var(--couleur-texte);
    text-decoration: none;
    font-size: 16px;
    transition: font-weight 0.3s ease;
}
nav a:hover { font-weight: 900; }
/* ========================================
   FILTRES
   ======================================== */
.filtres-menu {
    display: flex;
    gap: 20px;
    align-items: center;
}
.filtre-btn {
    padding: 0;
    background: none;
    border: none;
    cursor: pointer;
    font-family: var(--font-principale);
    font-size: 12px;
    font-weight: 400;
    text-transform: lowercase;
    color: var(--couleur-texte);
    transition: font-weight 0.3s ease;
}
.filtre-btn:hover,
.filtre-btn.actif { font-weight: 900; }
.filtre-btn[data-filtre="tous"],
nav > a { font-size: 16px; }
/* ========================================
   GRILLE PROJETS
   ======================================== */
.projets-container {
    padding: 140px 40px 40px;
    max-width: 2000px;
    margin: 0 auto;
}
.projets-grille {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 2rem;
}
.projet-wrapper {
    position: relative;
    text-decoration: none;
    color: inherit;
    display: block;
}
.projet-wrapper.cache {
    display: none !important;
}
/* ========================================
   CARTE PROJET
   ======================================== */
.projet-carte {
    aspect-ratio: 1;
    background-color: transparent;
    cursor: pointer;
    position: relative;
    overflow: hidden;
    display: flex;
    align-items: flex-end;
    padding: 20px;
}
.projet-image {
    position: absolute;
    top: 0; left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    z-index: 1;
}
.projet-info {
    position: relative;
    color: #000;
    background: transparent;
    padding: 10px 15px;
    opacity: 0;
    z-index: 2;
    transition: opacity 0.2s ease;
}
.projet-wrapper:hover .projet-info { opacity: 1; }
.projet-titre {
    font-size: 14px;
    margin-bottom: 5px;
    font-weight: 700;
}

.projet-categorie {
    font-size: 12px;
    opacity: 0.8;
}
/* ========================================
   LIGNES GRILLE
   ======================================== */
.projet-wrapper::before {
    content: '';
    position: absolute;
    bottom: -1rem;
    left: 5%;
    width: 90%;
    height: 1px;
    background-color: var(--couleur-texte);
}
.projet-wrapper::after {
    content: '';
    position: absolute;
    right: -1rem; 
    top: 5%;
    height: 90%;
    width: 1px;
    background-color: var(--couleur-texte);
}
/* ========================================
   PAGE DÉTAIL PROJET
   ======================================== */

.btn-retour {
    display: inline-block;
    margin: 0px 0px 0;
    text-decoration: none;
    color: var(--couleur-texte);
    font-size: 16px;
    font-weight: 900;
    transition: opacity 0.3s ease;
}
.projet-detail {
    padding: 140px 4rem;
    max-width: 1400px;
    margin: auto;
    display: grid;
    grid-template-columns: 1fr 2fr;
    gap: 4rem;
}
.projet-texte {
    position: sticky;
    top: 140px;
}
.projet-description p {
    margin-bottom: 1.5rem;
    line-height: 1.8;
}
.projet-images {
    display: flex;
    flex-direction: column;
    gap: 2rem;
}
.projet-images img {
    width: 100%;
    height: auto;
    display: block;
    transition: transform 0.3s ease;
}
.projet-images img:hover {
    transform: scale(1.02);
}
.projet-meta {
    margin-top: 1rem;
    display: flex;
    gap: 0.5rem;
    font-size: 0.8rem;
    color: var(--couleur-texte);
    opacity: 0.8;
}
/* ========================================
   FOOTER
   ======================================== */
footer {
    text-align: center;
    padding: 2rem;
    margin-top: auto;
}
footer a {
    color: var(--couleur-texte);
    text-decoration: underline;
    transition: opacity 0.2s;
}
footer a:hover { opacity: 0.6; }
/* ========================================
   RESPONSIVE
   ======================================== */
@media (max-width: 1200px) {
    header {
        flex-direction: column;
        align-items: flex-start;
        padding: 15px 4rem;
        gap: 5px;
    }
    nav {
        flex-wrap: wrap;
        gap: 10px;
        row-gap: 2px;
        width: 100%;
    }
    .filtres-menu { display: contents; }
}
@media (max-width: 1024px) {
    header { padding: 30px; }
    .titre { font-size: 24px; }
    .projet-detail {
        grid-template-columns: 1fr;
        padding: 120px 2rem;
        gap: 2rem;
    }
    .projet-texte { position: static; }
}
@media (max-width: 1000px) {
    header { padding: 30px; }
    .titre { font-size: 24px; }
    .projets-grille { grid-template-columns: repeat(3, 1fr); }
    
}
@media (max-width: 768px) {
    header { padding: 30px; }
    .titre { font-size: 24px; }
    .projets-container {
        padding: 120px 15px 40px;
        max-width: 95%;
    }
    .projets-grille {
        grid-template-columns: repeat(2, 1fr);
        gap: 1rem;
    }
}
@media (max-width: 480px) {
    .projets-container {
        padding: px 10px 10px;
        max-width: 95%;
    }
    .projets-grille {
        grid-template-columns: repeat(1, 1fr);
        gap: 0.8rem;
    }
}
/* ========================================
   SECTIONS GLOBALES (CV / Contact / Mentions)
   ======================================== */
.cv-container,
.contact-container,
.mentions-container {
    max-width: 900px;
    margin: 0 auto;
    padding: 140px 40px 40px;
}
@media (max-width: 768px) {
    .cv-container,
    .contact-container,
    .mentions-container {
        padding: 120px 20px 20px;
    }
}
/* ========================================
   STRUCTURE GLOBALE DES PAGES
   (CV – CONTACT – MENTIONS)
   ======================================== */
.cv-container,
.contact-container,
.mentions-container {
    max-width: 800px;
    margin: 0 auto;
    padding: 140px 40px 40px;
}
.mentions-container { max-width: 900px; } /* exception */
/* ========================================
   PAGE CV
   ======================================== */
nav a.active {
    font-weight: 900;
}
.cv-section {
    margin-bottom: 3rem;
}
.cv-section h3 {
    font-size: 1.5rem;
    margin-bottom: 1.5rem;
    padding-bottom: 0.5rem;
    border-bottom: 1px solid var(--couleur-texte);
}
.cv-item {
    margin-bottom: 2rem;
}
.cv-item h4 {
    font-size: 1.1rem;
    margin-bottom: 0.3rem;
}
.cv-item .date {
    font-size: 0.9rem;
    opacity: 0.7;
    margin-bottom: 0.5rem;
}
.cv-item p {
    line-height: 1.6;
    margin-bottom: 0.5rem;
}
.competences-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 2rem;
}
.competence-categorie h4 {
    font-size: 1rem;
    margin-bottom: 0.8rem;
}
.competence-categorie ul {
    list-style: none;
}
.competence-categorie li {
    margin-bottom: 0.5rem;
}
/* ========================================
   PAGE CONTACT
   ======================================== */
nav a.active {
    font-weight: 900;
}
.contact-info {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}
.contact-info p,
.mentions-container p {
    line-height: 1.8;
}
.contact-info a {
    color: var(--couleur-texte);
    text-decoration: none;
    transition: opacity 0.3s;
}
.contact-info a:hover {
    opacity: 0.6;
}
/* ========================================
   PAGE MENTIONS LÉGALES
   ======================================== */
.mentions-container h3 {
    font-size: 1.3rem;
    margin: 2rem 0 1rem;
}
.mentions-container ul {
    margin: 0 0 1rem 2rem;
}
.mentions-container li {
    line-height: 1.8;
    margin-bottom: 0.5rem;
}
