/*
* Style.css - Portfolio MMI - Version Complète et Harmonisée
* Inclut tous les styles nécessaires pour la page portfolio.php
*/

@import url('https://fonts.googleapis.com/css2?family=League+Gothic&display=swap');
@import url('https://fonts.googleapis.com/css2?family=Glacial+Indifference&display=swap');




:root {
    --cream-light: #FFF8F0;
    --cream-medium: #F5EBE0;
    --cream-dark: #E8D7C3;
    --accent-primary: #a20b1d;
    --accent-secondary: #8a0916;
    --accent-light: #c94d5a;
    --text-dark: #2C2416;
    --text-medium: #5C4F3D;
    --text-light: #8B7E6A;
    --white: #FFFFFF;
    --shadow-light: rgba(0, 0, 0, 0.08);
    --shadow-medium: rgba(0, 0, 0, 0.12);
    --shadow-strong: rgba(0, 0, 0, 0.15);
    --transition: all 0.3s ease;
}
/* === PAGE HEADER (Reprise de about.css) === */
.page-header {
    text-align: center;
    padding: 5rem 2rem 3rem;
    background: linear-gradient(135deg, var(--accent-primary) 0%, var(--accent-secondary) 100%);
    border-bottom: 3px solid var(--accent-primary);
    position: relative;
    overflow: hidden; /* Important pour l'effet grain */
}

/* Effet grain du header (Identique à about.css) */
.page-header::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    /* Remplacement de l'URL par l'URL de données de about.css pour l'effet grain */
    background: url('data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 100 100"><defs><pattern id="grain" patternUnits="userSpaceOnUse" width="100" height="100"><circle cx="25" cy="25" r="1" fill="%23ffffff" opacity="0.1"/><circle cx="75" cy="75" r="1" fill="%23ffffff" opacity="0.1"/></pattern></defs><rect width="100" height="100" fill="url(%23grain)"/></svg>');
    pointer-events: none;
    z-index: 0;
}

.page-header h1 {
    font-size: 3rem;
    font-weight: 700;
    color: var(--white);
    margin-bottom: 1rem;
    letter-spacing: -1px;
    position: relative;
    z-index: 1;
}

/* Style spécifique pour la balise <p1> du header dans portfolio.php */
.page-header p1 {
    font-size: 1.2rem;
    color: var(--cream-light);
    max-width: 600px;
    margin: 0 auto;
    display: block; /* Permet le centrage et le max-width */
    position: relative;
    z-index: 1;
}

/* === FILTRES DE PROJETS (.project-filters) === */
.project-filters {
    display: flex;
    justify-content: center;
    flex-wrap: wrap;
    gap: 15px;
    margin-bottom: 3rem;
    padding: 10px 0;
    /* Ligne de séparation légère reprenant une couleur du thème */
    border-bottom: 1px solid var(--cream-dark);
}

.filter-btn {
    /* Style de base harmonisé avec les couleurs crème et le style bouton */
    display: inline-block;
    padding: 0.5rem 1.2rem;
    background-color: var(--cream-medium);
    color: var(--text-dark);
    border: 1px solid var(--cream-dark);
    border-radius: 50px;
    font-size: 1rem;
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    cursor: pointer;
    transition: var(--transition);
    box-shadow: 0 2px 5px var(--shadow-light);
    font-family: 'Glacial Indifference', sans-serif;
}

.filter-btn:hover {
    background-color: var(--cream-dark);
    color: var(--accent-primary);
    transform: translateY(-2px);
    box-shadow: 0 4px 10px var(--shadow-medium);
}

.filter-btn.active {
    /* Style actif utilisant le dégradé primaire du about.css */
    background: linear-gradient(135deg, var(--accent-primary), var(--accent-secondary));
    color: var(--white);
    border-color: var(--accent-secondary);
    font-weight: 600;
    /* Utilisation de la variable d'ombre bordeaux si elle existe dans :root de about.css */
    box-shadow: 0 5px 15px var(--shadow-bordeaux, rgba(162, 11, 29, 0.3));
}

.filter-btn.active:hover {
    background: var(--accent-secondary);
    transform: translateY(-2px);
}

/* === RESPONSIVE (Ajustements) === */

@media (max-width: 768px) {
    .project-filters {
        gap: 10px;
        margin-bottom: 2rem;
    }

    .filter-btn {
        padding: 0.4rem 1rem;
        font-size: 0.9rem;
    }
}

@media (max-width: 576px) {
    .page-header h1 {
        font-size: 2rem;
    }

    .page-header p1 {
        font-size: 1rem;
    }

    .project-filters {
        justify-content: flex-start;
        margin-left: 5%;
        margin-right: 5%;
        border-bottom: none;
    }

    .filter-btn {
        flex-grow: 1;
        max-width: 48%;
        text-align: center;
        margin-bottom: 5px;
    }
}

/* === RESET & BASE === */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    background-color: var(--cream-light);
    color: var(--text-dark);
    line-height: 1.7;
    font-family: 'Glacial Indifference', sans-serif;
}

/* === TYPOGRAPHY === */
h1, h2, h3, h4, h5, h6 {
    font-family: 'League Gothic', sans-serif;
    font-weight: 400;
    line-height: 1.2;
    margin-bottom: 1rem;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    color: var(--accent-secondary);
}

h1 {
    font-size: 3rem;
    margin-bottom: 1.5rem;
}

h2 {
    font-size: 2.5rem;
    margin-bottom: 1.2rem;
    position: relative;
    display: inline-block;
}

h2::after {
    content: '';
    position: absolute;
    left: 0;
    bottom: -10px;
    width: 40px;
    height: 3px;
    background-color: var(--accent-primary);
    transition: var(--transition);
}

h2:hover::after {
    width: 100%;
}

h3 {
    font-size: 1.8rem;
}

p {
    margin-bottom: 1rem;
    color: var(--text-medium);
    font-family: 'Glacial Indifference', sans-serif;
}

a {
    color: var(--text-dark);
    text-decoration: none;
    transition: var(--transition);
    font-family: 'Glacial Indifference', sans-serif;
}

a:hover {
    color: var(--accent-primary);
}

/* === PAGE HEADER === */
.page-header {
    text-align: center;
    padding: 5rem 2rem 3rem;
    background: linear-gradient(135deg, var(--accent-primary) 0%, var(--accent-secondary) 100%);
    border-bottom: 3px solid var(--accent-primary);
    position: relative;
    overflow: hidden;
}

/* Effet grain du header */
.page-header::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: url('data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 100 100"><defs><pattern id="grain" patternUnits="userSpaceOnUse" width="100" height="100"><circle cx="25" cy="25" r="1" fill="%23ffffff" opacity="0.1"/><circle cx="75" cy="75" r="1" fill="%23ffffff" opacity="0.1"/></pattern></defs><rect width="100" height="100" fill="url(%23grain)"/></svg>');
    pointer-events: none;
    z-index: 0;
}

.page-header h1 {
    font-size: 3rem;
    font-weight: 700;
    color: var(--white);
    margin-bottom: 1rem;
    letter-spacing: -1px;
    position: relative;
    z-index: 1;
}

/* Style pour la balise p1 du header de page (élément dans portfolio.php) */
.page-header p1 {
    font-size: 1.2rem;
    color: var(--cream-light);
    max-width: 600px;
    margin: 0 auto;
    display: block;
    position: relative;
    z-index: 1;
}

/* === LAYOUT === */
.container {
    width: 80%;
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 30px;
}

section {
    padding: 4rem 5%;
    max-width: 1400px;
    margin: 0 auto;
}

main {
    min-height: 70vh;
    padding: 2rem 0;
}

/* === BOUTONS === */
.btn {
    display: inline-block;
    padding: 0.8rem 1.8rem;
    background: linear-gradient(135deg, var(--accent-primary), var(--accent-secondary));
    color: var(--white);
    border-radius: 50px;
    font-weight: 600;
    text-align: center;
    transition: var(--transition);
    border: 2px solid transparent;
    cursor: pointer;
    box-shadow: 0 5px 15px rgba(162, 11, 29, 0.3);
}

.btn:hover {
    background: transparent;
    color: var(--accent-secondary);
    border-color: var(--accent-secondary);
    transform: translateY(-3px);
}

.btn-large {
    padding: 1rem 2.5rem;
    font-size: 1.1rem;
    margin-top: 2rem;
}

/* === FILTRES DE PROJETS (project-filters) === */
.project-filters {
    display: flex;
    justify-content: center;
    flex-wrap: wrap;
    gap: 15px;
    margin-bottom: 3rem;
    padding: 10px 0;
    border-bottom: 1px solid var(--cream-dark);
}

.filter-btn {
    display: inline-block;
    padding: 0.5rem 1.2rem;
    background-color: var(--cream-medium);
    color: var(--text-dark);
    border: 1px solid var(--cream-dark);
    border-radius: 50px;
    font-size: 1rem;
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    cursor: pointer;
    transition: var(--transition);
    box-shadow: 0 2px 5px var(--shadow-light);
    font-family: 'Glacial Indifference', sans-serif;
}

.filter-btn:hover {
    background-color: var(--cream-dark);
    color: var(--accent-primary);
    transform: translateY(-2px);
    box-shadow: 0 4px 10px var(--shadow-medium);
}

.filter-btn.active {
    background: linear-gradient(135deg, var(--accent-primary), var(--accent-secondary));
    color: var(--white);
    border-color: var(--accent-secondary);
    font-weight: 600;
    box-shadow: 0 5px 15px rgba(162, 11, 29, 0.3);
}

.filter-btn.active:hover {
    background: var(--accent-secondary);
    transform: translateY(-2px);
}

/* === SECTIONS DE PROJETS PAR CATÉGORIE === */
.category-section {
    padding-top: 2rem;
    padding-bottom: 2rem;
}

.category-title {
    text-align: center;
    margin-bottom: 3rem;
    font-size: 2.5rem;
    color: var(--accent-secondary);
    display: block;
    width: fit-content;
    margin-left: auto;
    margin-right: auto;
}

/* Réutilisation de l'effet de soulignement sur le titre de catégorie (h2) */
.category-title::after {
    /* Le style est déjà géré par la règle h2 générale,
       mais on s'assure qu'il est centré dans ce contexte */
    left: 50%;
    transform: translateX(-50%);
}

.category-title:hover::after {
    width: 100%;
    left: 0;
    transform: translateX(0);
}

/* === GRILLE DE PROJETS (projects-grid) === */
.projects-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 2.5rem;
    margin-top: 2rem;
}

/* === CARTE DE PROJET (project-card) === */
.project-card {
    background-color: var(--white);
    border-radius: 15px;
    overflow: hidden;
    box-shadow: 0 5px 20px var(--shadow-light);
    transition: var(--transition);
    cursor: pointer;
}

.project-card:hover {
    transform: translateY(-8px);
    box-shadow: 0 15px 40px var(--shadow-medium);
}

.project-img {
    position: relative;
    padding-top: 66.67%; /* Ratio 3:2 */
    overflow: hidden;
    background-color: var(--cream-medium);
}

.project-img img {
    position: absolute;
    top: 50%;
    left: 50%;
    width: 100%;
    height: 100%;
    object-fit: cover;
    transform: translate(-50%, -50%);
    transition: transform 0.5s ease;
}

.project-card:hover .project-img img {
    transform: translate(-50%, -50%) scale(1.1);
}

.project-info {
    padding: 1.5rem;
}

.project-info h3 {
    margin-bottom: 0.8rem;
    font-size: 1.5rem;
    color: var(--accent-secondary);
}

.project-info p {
    font-size: 1rem;
    line-height: 1.6;
    margin-bottom: 1.2rem;
}

.project-card .btn {
    /* S'assurer que le bouton est correctement aligné et stylisé */
    margin-top: 0.5rem;
    width: 100%; /* Le bouton prend toute la largeur pour une meilleure lisibilité */
    box-sizing: border-box;
}

/* === TAGS DE PROJET (project-tags) === */
.project-tags {
    margin-bottom: 1rem;
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.project-tag {
    display: inline-block;
    padding: 0.3rem 0.7rem;
    background-color: var(--cream-dark);
    color: var(--text-dark);
    font-size: 0.85rem;
    font-weight: 500;
    border-radius: 5px;
    text-transform: capitalize;
    transition: background-color 0.3s ease;
}

.project-tag:hover {
    background-color: var(--accent-light);
    color: var(--white);
}

/* === RESPONSIVE === */

/* Tablettes et petits desktops */
@media (max-width: 992px) {
    .container {
        width: 85%;
        padding: 0 20px;
    }

    section {
        padding: 3rem 4%;
    }

    h1 {
        font-size: 2.5rem;
    }

    h2 {
        font-size: 2rem;
    }

    h3 {
        font-size: 1.5rem;
    }

    .projects-grid {
        grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
        gap: 2rem;
    }
}

/* Tablettes */
@media (max-width: 768px) {
    .container {
        width: 90%;
        padding: 0 15px;
    }

    section {
        padding: 2.5rem 3%;
    }

    h1 {
        font-size: 2.2rem;
    }

    h2 {
        font-size: 1.8rem;
    }

    /* Filtres */
    .project-filters {
        gap: 10px;
        margin-bottom: 2rem;
    }

    .filter-btn {
        padding: 0.4rem 1rem;
        font-size: 0.9rem;
    }

    .projects-grid {
        grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
        gap: 1.5rem;
    }

    .project-info {
        padding: 1.2rem;
    }

    .btn {
        padding: 0.7rem 1.5rem;
        font-size: 0.95rem;
    }
}

/* Mobiles */
@media (max-width: 576px) {
    .container {
        width: 95%;
        padding: 0 10px;
    }

    section {
        padding: 2rem 2%;
    }

    h1 {
        font-size: 2rem;
    }

    h2 {
        font-size: 1.6rem;
    }

    h3 {
        font-size: 1.3rem;
    }

    .category-title {
        font-size: 1.8rem;
        margin-bottom: 2rem;
    }

    /* Filtres */
    .project-filters {
        justify-content: flex-start;
        margin-left: 5%;
        margin-right: 5%;
        border-bottom: none;
    }

    .filter-btn {
        flex-grow: 1;
        max-width: 48%;
        text-align: center;
        margin-bottom: 5px;
    }

    .projects-grid {
        grid-template-columns: 1fr;
        gap: 1.5rem;
    }

    .project-card {
        border-radius: 12px;
    }

    .project-info h3 {
        font-size: 1.3rem;
    }

    .project-info p {
        font-size: 0.95rem;
    }

    .project-tags {
        gap: 5px;
        margin-bottom: 0.8rem;
    }

    .project-tag {
        font-size: 0.8rem;
        padding: 0.2rem 0.5rem;
    }

    .btn {
        padding: 0.6rem 1.2rem;
        font-size: 0.9rem;
    }
}

/* Très petits mobiles */
@media (max-width: 380px) {
    h1 {
        font-size: 1.8rem;
    }

    h2 {
        font-size: 1.5rem;
    }
}

/* === ACCESSIBILITÉ === */
.btn:focus,
.filter-btn:focus {
    outline: 2px solid var(--accent-primary);
    outline-offset: 2px;
}

/* === ANIMATIONS === */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.project-card {
    animation: fadeInUp 0.6s ease-out;
}

.project-card:nth-child(1) { animation-delay: 0.1s; }
.project-card:nth-child(2) { animation-delay: 0.2s; }
.project-card:nth-child(3) { animation-delay: 0.3s; }