/* Styles de base et hérités */
#logo {
    width: 64px;
    height: 64px;
}

body {
    width: 100%;
    margin: 0;
    font-family: 'Consolas', sans-serif;
    line-height: 1.6;
    background-size: cover;
    background-attachment: fixed;
}

* {
    margin: 0;
    padding: 0;
}

.full {
    background: linear-gradient(rgba(0, 0, 0, 0.5), rgba(0, 0, 0, 0.25)), url(../images/bg.jpg);
    background-size: cover;
    background-attachment: fixed;
    height: 460px;
}

.entete {
    position: relative;
    width: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    height: 128px;
    transition: height 0.8s ease, background-color 0.4s ease;
}

.menu {
    border-bottom: 2px solid #8dc6ff;
    width: 50%;
    display: flex;
    justify-content: space-between;
    text-align: center;
    align-items: center;
    color: #8dc6ff;
    font-family: Consolas;
    font-size: 16px;
    margin-left: 28%;
    height: 64px;
}

.menu_b {
    margin-right: 20px;
    cursor: pointer;
    height: 40%;
    flex: 1;
    padding: 1%;
    font-size: 120%;
    transition: all 0.3s ease;
}

.menu_b.active {
    color: #ffffff;
}

.menu_b:hover {
    cursor: pointer;
    transition: .3s;
    color: #ffffff;
    transform: scale(1.4);
}

header {
    width: 100%;
    padding-top: 5%;
    padding-bottom: 2%;
    display: flex;
    flex-direction: column;
    align-items: center;
}

header h1 {
    font-family: 'IM Fell English', serif;
    font-size: 3em;
    color: #8dc6ff;
    text-align: center;
    text-shadow: 3px 3px 10px rgba(0, 0, 0, 0.6);
    letter-spacing: 2px;
    animation: fadeIn 1s ease-in-out;
    transition: transform 0.3s ease, color 0.3s ease;
    margin-bottom: 0;
}

header p {
    margin-top: 5px;
    width: 5%;
    border-bottom: 2px solid #8dc6ff;
}

/* Nouvelle section introduction */
.intro-text {
    color: white;
    text-align: center;
    max-width: 800px;
    margin: 0 auto;
    padding: 0 20px 30px 20px;
    font-size: 1.1rem;
    line-height: 1.6;
    animation: fadeIn 1.5s ease-in-out;
}

/* Nouvelle section catégories de projets */
.project-categories {
    display: flex;
    justify-content: center;
    margin-bottom: 30px;
    padding: 15px;
    background-color: #fff;
    border-radius: 8px;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
    width: 80%;
    margin: 0 auto 30px auto;
    position: sticky;
    top: 0;
    z-index: 100;

}

.category-button {
    padding: 10px 20px;
    margin: 0 10px;
    background: none;
    border: none;
    color: #0d2844;
    font-size: 1rem;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.3s ease;
    position: relative;
}

.category-button::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 0;
    height: 2px;
    background-color: #8dc6ff;
    transition: width 0.3s ease;
}

.category-button:hover::after,
.category-button.active::after {
    width: 100%;
}

.category-button.active {
    color: #0d2844;
    font-weight: bold;
}

/* Refonte des projets */
.projects-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 20px;
    min-height: 500px;
    /* Évite le redimensionnement brusque du conteneur */
    position: relative;
    /* Pour le positionnement des éléments enfants */
}

.projects {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(340px, 1fr));
    gap: 30px;
    margin-top: 20px;
}

.project {
    background-color: white;
    border-radius: 10px;
    overflow: hidden;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    width: 100%;
    height: auto;
    cursor: pointer;
    position: relative;
    will-change: opacity, transform;
}

/* Classes d'animation pour le filtrage */
.project.fade-in {
    animation: fadeInEffect 0.5s ease forwards;
    will-change: opacity, transform;
}

.project.fade-out {
    animation: fadeOutEffect 0.4s ease forwards;
    will-change: opacity, transform;
}

@keyframes fadeInEffect {
    0% {
        opacity: 0;
        transform: translateY(30px);
    }

    100% {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes fadeOutEffect {
    0% {
        opacity: 1;
        transform: translateY(0);
    }

    100% {
        opacity: 0;
        transform: translateY(30px);
        visibility: hidden;
    }
}

/* Délais d'animation pour l'effet cascade */
.project:nth-child(1).fade-in {
    animation-delay: 0.05s;
}

.project:nth-child(2).fade-in {
    animation-delay: 0.1s;
}

.project:nth-child(3).fade-in {
    animation-delay: 0.15s;
}

.project:nth-child(4).fade-in {
    animation-delay: 0.2s;
}

.project:nth-child(5).fade-in {
    animation-delay: 0.25s;
}

.project:hover {
    transform: translateY(-10px);
    box-shadow: 0 15px 30px rgba(0, 0, 0, 0.2);
}

.image-container {
    position: relative;
    overflow: hidden;
    height: 200px;
}

.image-container img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.5s ease;
}

.project:hover .image-container img {
    transform: scale(1.1);
}

.image-container .hover-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(13, 40, 68, 0.8);
    display: flex;
    justify-content: center;
    align-items: center;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.image-container .hover-overlay span {
    font-size: 2rem;
    color: #fff;
    font-weight: bold;
}

.project:hover .hover-overlay {
    opacity: 1;
}

.project-info {
    padding: 20px;
}

.title {
    font-size: 1.2rem;
    font-weight: 500;
    color: #0d2844;
    margin-bottom: 10px;
    font-family: 'Roboto', sans-serif;
}

.project-description {
    font-size: 0.9rem;
    color: #666;
    margin-bottom: 15px;
    line-height: 1.5;
}

.tech-stack {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-bottom: 15px;
}

.tech-tag {
    background-color: #f0f7ff;
    color: #0d2844;
    padding: 4px 10px;
    border-radius: 20px;
    font-size: 0.8rem;
    font-weight: 500;
}

.project-footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-top: 1px solid #eee;
    padding-top: 15px;
    margin-top: 10px;
}

.project-date {
    font-size: 0.8rem;
    color: #999;
}

.view-project {
    display: flex;
    align-items: center;
    color: #8dc6ff;
    font-size: 0.9rem;
    font-weight: 500;
    transition: color 0.3s ease;
}

.view-project i {
    margin-left: 5px;
    transition: transform 0.3s ease;
}

.view-project:hover {
    color: #0d2844;
}

.view-project:hover i {
    transform: translateX(3px);
}

/* Animation de chargement des projets */
@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(-20px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Footer styles - Version corrigée sans !important */
.footer {
    background-color: #181f35;
    color: white;
    font-family: 'Consolas', sans-serif;
    padding-top: 60px;
}

.footer-content {
    display: flex;
    flex-wrap: wrap;
    justify-content: space-between;
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

.footer-logo {
    display: flex;
    flex-direction: column;
    align-items: center;
    margin-bottom: 30px;
}

.footer-logo img {
    width: 80px;
    height: 80px;
    margin-bottom: 15px;
}

/* Correction pour le paragraphe du logo */
.footer .footer-logo p {
    font-size: 1.2rem;
    color: white;
    font-family: 'Consolas', sans-serif;
    margin-bottom: 0;
}

.footer-links,
.footer-social,
.footer-legal {
    margin-bottom: 30px;
}

.footer h3 {
    font-size: 1.2rem;
    margin-bottom: 20px;
    position: relative;
    padding-bottom: 10px;
}

.footer h3::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 40px;
    height: 2px;
    background-color: #8dc6ff;
}

.footer-links ul,
.footer-legal ul {
    list-style-type: none;
    padding: 0;
}

.footer-links li,
.footer-legal li {
    font-family: 'Consolas', sans-serif;
    margin-bottom: 12px;
}

.footer-links a,
.footer-legal a {
    color: #bbb;
    text-decoration: none;
    transition: all 0.3s ease;
}

.footer-links a:hover,
.footer-legal a:hover {
    color: #8dc6ff;
}

.social-icons {
    display: flex;
    gap: 15px;
}

.social-icons a {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    background-color: rgba(255, 255, 255, 0.1);
    border-radius: 50%;
    transition: all 0.3s ease;
}

.social-icons a:hover {
    background-color: #8dc6ff;
}

.social-icons svg {
    width: 20px;
    height: 20px;
    color: white;
}

.footer-bottom {
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    padding: 20px 0;
    text-align: center;
}

/* Correction pour les paragraphes du footer-bottom */
.footer .footer-bottom p {
    font-size: 0.9rem;
    color: #bbb;
    text-align: center;
    font-family: 'Consolas', sans-serif;
}

/* Correction pour la notice RGPD */
.footer .rgpd-notice {
    margin-top: 15px;
    font-size: 0.8rem;
    color: #999;
    text-align: center;
    max-width: 800px;
    margin-left: auto;
    margin-right: auto;
    font-family: 'Consolas', sans-serif;
}

.footer .rgpd-notice a {
    color: #8dc6ff;
    text-decoration: none;
}

.footer .rgpd-notice a:hover {
    text-decoration: underline;
}

/* Hamburger Menu pour responsive */
.hamburger-menu {
    display: none;
    flex-direction: column;
    justify-content: space-between;
    width: 30px;
    height: 21px;
    cursor: pointer;
    position: absolute;
    top: 25px;
    right: 25px;
    z-index: 200;
}

.hamburger-menu span {
    display: block;
    height: 2px;
    width: 100%;
    background-color: #8dc6ff;
    transition: all 0.3s ease;
}

.hamburger-menu.active span {
    background-color: #ffffff;
}

.hamburger-menu.active span:nth-child(1) {
    transform: translateY(9px) rotate(45deg);
}

.hamburger-menu.active span:nth-child(2) {
    opacity: 0;
}

.hamburger-menu.active span:nth-child(3) {
    transform: translateY(-9px) rotate(-45deg);
}

/* Pour bloquer le scroll quand le menu mobile est ouvert */
body.no-scroll {
    overflow: hidden;
    position: fixed;
    width: 100%;
    height: 100%;
}

/* Responsive Design */
@media (max-width: 1200px) {
    .menu {
        width: 60%;
        margin-left: 20%;
    }
}

@media (max-width: 992px) {
    .menu {
        width: 70%;
        margin-left: 15%;
    }

    .project-categories {
        width: 90%;
    }
}

@media (max-width: 768px) {

    /* Footer responsive */
    .footer-content {
        justify-content: center;
        text-align: center;
    }

    .footer h3::after {
        left: 50%;
        transform: translateX(-50%);
    }

    .footer-logo,
    .footer-links,
    .footer-social,
    .footer-legal {
        margin: 0 20px 30px;
    }

    /* Style pour la barre de navigation mobile */
    .entete {
        height: 80px;
        position: fixed;
        top: 0;
        left: 0;
        width: 100%;
        z-index: 1000;
        background-color: rgba(24, 31, 53, 0.95);
    }

    .project-categories {
        position: sticky;
        top: 80px;
        z-index: 100;
    }

    .entete #logo {
        position: absolute;
        left: 25px;
        top: 8px;
    }

    .hamburger-menu {
        display: flex;
        z-index: 1001;
    }

    /* Ajuster l'espacement pour tenir compte de l'entête fixe */
    .full {
        padding-top: 80px;
    }

    header {
        padding-top: 40px;
    }

    /* Menu plein écran */
    .menu {
        position: fixed;
        top: 0;
        left: 0;
        width: 100%;
        height: 100vh;
        margin: 0;
        background-color: rgba(0, 0, 0, 0.85);
        flex-direction: column;
        justify-content: center;
        align-items: center;
        padding: 0;
        opacity: 0;
        visibility: hidden;
        transition: opacity 0.3s ease, visibility 0.3s ease;
        z-index: 150;
        border-bottom: none;
    }

    .menu.active {
        opacity: 1;
        visibility: visible;
    }

    .menu_b {
        width: auto;
        padding: 8px 0;
        margin: 5px 0;
        border-bottom: none;
        text-align: center;
        font-size: 1.2rem;
        letter-spacing: 2px;
        transform: translateY(20px);
        opacity: 0;
        transition: transform 0.4s ease, opacity 0.4s ease;
    }

    .menu.active .menu_b {
        transform: translateY(0);
        opacity: 1;
    }

    .menu.active .menu_b:nth-child(1) {
        transition-delay: 0.1s;
    }

    .menu.active .menu_b:nth-child(2) {
        transition-delay: 0.2s;
    }

    .menu.active .menu_b:nth-child(3) {
        transition-delay: 0.3s;
    }

    .menu.active .menu_b:nth-child(4) {
        transition-delay: 0.4s;
    }

    .menu.active .menu_b:nth-child(5) {
        transition-delay: 0.5s;
    }

    .menu_b:hover {
        transform: translateY(-5px);
        background-color: transparent;
    }

    /* Ajustements pour la grille de projets */
    .projects {
        grid-template-columns: 1fr;
    }

    .project {
        max-width: 100%;
    }

    /* Ajustements pour les filtres de catégories */
    .project-categories {
        flex-wrap: wrap;
        justify-content: center;
    }

    .category-button {
        margin: 5px;
    }
}

@media (max-width: 576px) {
    .project-categories {
        width: 90%;
        padding: 10px;
    }

    .category-button {
        padding: 8px 15px;
        font-size: 0.9rem;
    }

    .intro-text {
        font-size: 0.95rem;
        padding: 0 15px 20px 15px;
    }

    header h1 {
        font-size: 2.2em;
    }

    .full {
        height: 400px;
    }

    .footer {
        padding-top: 40px;
    }
}