/*
* Style.css - Portfolio MMI - Version Responsive
* Harmonisé avec about.css et projet.css
*/

@import url('https://fonts.googleapis.com/css2?family=League+Gothic&display=swap');
@import url('https://fonts.googleapis.com/css2?family=Glacial+Indifference&display=swap');

/* === VARIABLES === */
: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;
}

/* === 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 {
    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 identique à About */
.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;
}

.page-header p {
    font-size: 1.2rem;
    color: var(--cream-light);
    max-width: 600px;
    margin: 0 auto;
    position: relative;
    z-index: 1;
}

/*
* Style pour la navigation de filtre des projets par catégorie
* Utilisant les classes .project-filters et .filter-btn
*/

/* === PROJECT FILTER NAVIGATION CONTAINER === */
.project-filters {
    display: flex;
    justify-content: center;
    flex-wrap: wrap; /* Permet le passage à la ligne sur mobile */
    gap: 15px;
    margin-bottom: 3rem;
    padding: 10px 0;
    /* Optionnel: Vous pouvez retirer la bordure si vous préférez un look plus épuré */
    border-bottom: 1px solid var(--cream-dark);
}

/* === PROJECT FILTER BUTTONS === */
.filter-btn {
    /* Style de base d'un bouton de filtre */
    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; /* Assurer la police de texte */
}

.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 pour la catégorie actuellement sélectionnée */
    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 {
    /* Ajustement du hover pour l'état actif */
    background: var(--accent-secondary);
    transform: translateY(-2px);
}

/* === RESPONSIVE ADJUSTMENTS FOR FILTER NAV === */
@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) {
    .project-filters {
        justify-content: flex-start; /* Aligner à gauche sur très petit écran */
        margin-left: 5%;
        margin-right: 5%;
        border-bottom: none;
    }

    .filter-btn {
        flex-grow: 1;
        max-width: 48%;
        text-align: center;
        margin-bottom: 5px;
    }
}

/* === 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;
}

/* === CAROUSEL === */
.carousel-container {
    position: relative;
    overflow: hidden;
    width: 100%;
    height: 500px;
    margin-bottom: 3rem;
    border-radius: 15px;
    box-shadow: 0 10px 30px var(--shadow-medium);
}

.carousel {
    display: flex;
    transition: transform 0.5s ease-in-out;
    height: 100%;
}

.carousel-item {
    min-width: 100%;
    height: 100%;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    text-align: center;
    padding: 2rem;
    color: var(--white);
    background-size: cover;
    background-position: center;
    position: relative;
}

.carousel-item::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(rgba(0, 0, 0, 0.4), rgba(0, 0, 0, 0.5));
    z-index: 1;
}

.carousel-item h2,
.carousel-item p {
    position: relative;
    z-index: 2;
    color: var(--white);
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.7);
}

.carousel-item h2 {
    font-size: 3.5rem;
    margin-bottom: 1rem;
}

.carousel-item p {
    font-size: 1.3rem;
    max-width: 700px;
    line-height: 1.6;
}

.carousel-btn {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    background-color: rgba(255, 255, 255, 0.9);
    border: none;
    width: 50px;
    height: 50px;
    border-radius: 50%;
    font-size: 1.5rem;
    cursor: pointer;
    transition: var(--transition);
    z-index: 10;
    display: flex;
    align-items: center;
    justify-content: center;
}

.carousel-btn:hover {
    background-color: var(--accent-primary);
    color: var(--white);
}

.prev {
    left: 20px;
}

.next {
    right: 20px;
}

.carousel-nav {
    position: absolute;
    bottom: 20px;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    gap: 10px;
    z-index: 10;
}

.carousel-dot {
    width: 12px;
    height: 12px;
    border-radius: 50%;
    background-color: rgba(255, 255, 255, 0.5);
    cursor: pointer;
    transition: var(--transition);
}

.carousel-dot.active,
.carousel-dot:hover {
    background-color: var(--accent-primary);
    transform: scale(1.2);
}

/* === ABOUT SECTION === */
.about {
    display: grid;
    grid-template-columns: 1fr 2fr;
    gap: 3rem;
    align-items: center;
    margin-bottom: 3rem;
}

.about-img {
    overflow: hidden;
    border-radius: 15px;
    box-shadow: 0 10px 30px var(--shadow-light);
}

.about-img img {
    width: 100%;
    height: auto;
    display: block;
    transition: transform 0.5s ease;
}

.about-img:hover img {
    transform: scale(1.05);
}

.about-content {
    padding: 1rem 0;
}

.about-content h2 {
    color: var(--accent-secondary);
    margin-bottom: 1.5rem;
}

/* === PROJECTS === */
.projects {
    padding: 4rem 0;
    text-align: center;
}

.projects > p {
    max-width: 700px;
    margin: 0 auto 3rem;
    font-size: 1.1rem;
}

.projects-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 2.5rem;
    margin-top: 2rem;
}

.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%;
    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;
}

/* === BUTTONS === */
.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;
}

.center-button {
    text-align: center;
    margin-top: 3rem;
}

/* === 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;
    }

    .carousel-container {
        height: 400px;
    }

    .carousel-item h2 {
        font-size: 2.5rem;
    }

    .carousel-item p {
        font-size: 1.1rem;
    }

    .about {
        grid-template-columns: 1fr;
        gap: 2rem;
    }

    .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;
    }

    .carousel-container {
        height: 350px;
        border-radius: 10px;
    }

    .carousel-item {
        padding: 1.5rem;
    }

    .carousel-item h2 {
        font-size: 2rem;
    }

    .carousel-item p {
        font-size: 1rem;
        padding: 0 1rem;
    }

    .carousel-btn {
        width: 40px;
        height: 40px;
        font-size: 1.2rem;
    }

    .prev {
        left: 10px;
    }

    .next {
        right: 10px;
    }

    .about-img {
        max-width: 80%;
        margin: 0 auto;
    }

    .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;
    }

    .btn-large {
        padding: 0.9rem 2rem;
        font-size: 1rem;
    }
}

/* 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;
    }

    .carousel-container {
        height: 300px;
        border-radius: 8px;
        margin-bottom: 2rem;
    }

    .carousel-item h2 {
        font-size: 1.8rem;
        margin-bottom: 0.8rem;
    }

    .carousel-item p {
        font-size: 0.95rem;
        padding: 0 0.5rem;
    }

    .carousel-btn {
        width: 35px;
        height: 35px;
        font-size: 1rem;
    }

    .carousel-dot {
        width: 10px;
        height: 10px;
    }

    .about-img {
        max-width: 100%;
        border-radius: 10px;
    }

    .about-content h2 {
        font-size: 1.6rem;
    }

    .projects > p {
        font-size: 1rem;
        margin-bottom: 2rem;
    }

    .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;
    }

    .btn {
        padding: 0.6rem 1.2rem;
        font-size: 0.9rem;
    }

    .btn-large {
        padding: 0.8rem 1.8rem;
        font-size: 0.95rem;
    }
}

/* Très petits mobiles */
@media (max-width: 380px) {
    h1 {
        font-size: 1.8rem;
    }

    h2 {
        font-size: 1.5rem;
    }

    .carousel-container {
        height: 250px;
    }

    .carousel-item h2 {
        font-size: 1.5rem;
    }

    .carousel-item p {
        font-size: 0.9rem;
    }

    .carousel-btn {
        width: 30px;
        height: 30px;
        font-size: 0.9rem;
    }
}

/* === ACCESSIBILITÉ === */
.btn:focus,
.carousel-btn:focus,
.carousel-dot: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; }