@font-face {
    font-family: 'Beaufort';
    src: url('../fonts/BeaufortForLoL-Bold.ttf') format('truetype');
    font-weight: 700;
    font-style: normal;
}

/* --- GRILLE --- */
#liste-projets {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(190px, 1fr));
    gap: 20px;
}

/* --- CARTE PROJET --- */
.project-card { 
    position: relative;
    border: 1px solid #1e2328;
    background: #010a13;
    overflow: hidden;
    cursor: pointer;
    aspect-ratio: 1 / 1;
    transition: border-color 0.3s ease;
}

.project-card::before {
    content: "";
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    border: 1.5px solid var(--hex-gold);
    box-shadow: inset 0 0 10px rgba(196, 176, 123, 0.3);
    opacity: 0;
    z-index: 3;
    transition: opacity 0.3s ease;
    pointer-events: none;
}

.project-card:hover::before {
    opacity: 1;
}

/* --- IMAGE --- */
.image-wrapper {
    width: 100%;
    height: 100%;
    position: relative;
}

.project-image {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.6s cubic-bezier(0.25, 1, 0.5, 1);
}

.project-card:hover .project-image {
    transform: scale(1.08);
    filter: brightness(0.4);
}

/* --- INFOS --- */
.project-info {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    padding: 14px 7px 10px 7px;
    background: linear-gradient(to top, rgba(1, 10, 19, 0.95) 20%, transparent 100%);
    text-align: center;
    z-index: 2;
    transition: opacity 0.3s ease;
}

.project-title {
    font-family: 'Beaufort', serif;
    color: #f0e6d2;
    font-size: 0.95rem;
    margin: 0 0 4px 0;
    font-weight: bold;
}

.project-footer {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 4px;
    color: var(--hex-gold);
}

.rp-icon {
    width: 12px;
    height: 12px;
    object-fit: contain;
}

.year-text {
    font-family: 'Beaufort', serif;
    font-size: 0.7rem;
    font-weight: bold;
}

/* --- BOUTON CENTRAL --- */
.view-button {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%) scale(0.8);
    opacity: 0;
    z-index: 5;
    text-decoration: none;
    transition: all 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
    display: flex;
    flex-direction: column;
    align-items: center;
}

.project-card:hover .view-button {
    opacity: 1;
    transform: translate(-50%, -50%) scale(1);
}

.lock-diamond {
    width: 44px;
    height: 44px;
    background: rgba(1, 10, 19, 0.85);
    border: 1.5px solid var(--hex-gold);
    transform: rotate(45deg);
    display: flex;
    justify-content: center;
    align-items: center;
}

.lock-img {
    width: 24px;
    height: 24px;
    object-fit: contain;
    transform: rotate(-45deg);
}

.modal-overlay {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.85);
    z-index: 1000;
    backdrop-filter: blur(1px);
    justify-content: center;
    align-items: center;
}

.modal-content {
    position: relative;
    width: 90%;
    max-width: 550px;
    border: 2px solid var(--hex-gold);
    background: #010a13;
    padding: 0;
    box-shadow: 0 0 30px rgba(0, 0, 0, 1);
    animation: modalFadeIn 0.3s ease;
}

@keyframes modalFadeIn {
    from {
        opacity: 0;
        transform: scale(0.9);
    }

    to {
        opacity: 1;
        transform: scale(1);
    }
}

.modal-body {
    padding: 0;
    text-align: center;
}

.modal-splash {
    width: 100%;
    height: auto;
    display: block;
    border-bottom: 2px solid var(--hex-gold);
    margin: 0;
}

.modal-close-container {
    position: absolute;
    top: 10px;
    right: 10px;
    z-index: 10;
    cursor: pointer;
    padding: 5px;
}

.modal-close-circle {
    width: 26px;
    height: 26px;
    background-color: #010a13;
    border-radius: 50%;
    display: flex;
    justify-content: center;
    align-items: center;
    transition: border-color 0.2s;
}

.modal-close-x {
    color: #f0e6d2;
    font-family: Arial, sans-serif;
    font-size: 20px;
    line-height: 1;
    margin-top: -2px;
    transition: color 0.2s, text-shadow 0.2s;
}

.modal-close-container:hover .modal-close-x {
    color: #ffffff;
    text-shadow: 0 0 8px rgba(255, 255, 255, 0.8);
}

.modal-close-container:hover .modal-close-circle {
    border-color: var(--hex-gold);
}

#modal-title, 
#modal-description, 
.techno-container, 
.modal-footer {
    padding-left: 20px;
    padding-right: 20px;
}

#modal-title {
    margin-top: 20px;
    font-family: 'Beaufort', serif;
    margin-bottom: 15px;
}

.techno-container {
    margin: 15px 0;
    display: flex;
    justify-content: center;
    gap: 10px;
    flex-wrap: wrap;
}

.modal-footer {
    border-top: 1px solid rgba(196, 176, 123, 0.2);
    padding-top: 20px;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 10px;
    margin-bottom: 10px;
}

@keyframes glowingBorder {
    0% {
        box-shadow: 0 0 10px rgba(10, 200, 185, 0.4), 0 0 0 rgba(10, 200, 185, 0.0);
    }

    50% {
        box-shadow: 0 0 25px rgba(10, 200, 185, 0.7), 0 0 5px rgba(10, 200, 185, 0.5);
    }

    100% {
        box-shadow: 0 0 10px rgba(10, 200, 185, 0.4), 0 0 0 rgba(10, 200, 185, 0.0);
    }
}

.modal-content.animated-border {
    animation: glowingBorder 2s infinite alternate ease-in-out;
}