/* Variables communes */
:root {
    --container-max-width: 1200px;
    --border-radius: 8px;
    --spacing-unit: 1rem;
    --container-padding: 2rem;
    --error-bg: #f8d7da;
    --error-border: #f5c6cb;
    --title-bg: rgba(245, 245, 245, 0.9);
}

/* Messages d'erreur */
.error-message {
    background: var(--error-bg);
    padding: var(--container-padding);
    margin: var(--container-padding);
    border-radius: var(--border-radius);
    border: 1px solid var(--error-border);
}

.error-message h3 {
    color: #721c24;
    margin-bottom: 1rem;
}

.error-message p {
    color: #721c24;
    margin-bottom: 0.5rem;
}

.error-message a {
    color: #721c24;
    text-decoration: underline;
}

.error-message a:hover {
    color: #491217;
}

/* Conteneurs principaux */
main {
    max-width: var(--container-max-width);
    margin: 0 auto;
    padding: 0 var(--container-padding);
}

/* Images */
.project-image-container {
    position: relative;
    width: 100%;
    overflow: hidden;
    display: block;
    cursor: pointer;
    transition: transform 0.3s ease;
}

.project-image-container:hover {
    transform: scale(1.02);
}

.project-image {
    width: 100%;
    height: auto;
    display: block;
    transition: filter 0.3s ease;
}

.project-image-container:hover .project-image {
    filter: brightness(1.05);
}

/* Titre */
.project-title-container {
    position: fixed;
    top: 80px;
    left: 0;
    width: 100%;
    background: var(--title-bg);
    padding: var(--container-padding);
    z-index: 99;
    text-align: center;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

.project-title-container h1 {
    font-size: 1.5rem;
    color: #333;
    margin: 0 0 1rem 0;
    max-width: var(--container-max-width);
    margin: 0 auto 1rem auto;
}

/* Contenu principal */
.project-description-container {
    display: flex;
    gap: 1.5rem;
    margin: 2rem 0;
}

.project-description {
    flex: 2;
    background: rgba(255, 255, 255, 0.65);
    padding: var(--container-padding);
    border-radius: var(--border-radius);
    box-shadow: 0 4px 6px rgba(0,0,0,0.1);
}

.project-details {
    flex: 1;
    background: rgba(255, 255, 255, 0.65);
    padding: var(--container-padding);
    border-radius: var(--border-radius);
    box-shadow: 0 4px 6px rgba(0,0,0,0.1);
}

.project-content {
    margin-top: 220px; /* Ajout d'une marge en haut pour compenser le titre fixe */
}

.project-description h2,
.project-details h2 {
    font-size: 1.5rem;
    color: #333;
    margin-bottom: 1rem;
}

.project-description p {
    line-height: 1.6;
    color: #666;
}

/* Détails du projet */
.project-details ul {
    list-style: none;
    padding: 0;
}

.project-details li {
    display: flex;
    justify-content: space-between;
    padding: 0.5rem 0;
    border-bottom: 1px solid #eee;
}

.detail-label {
    color: #333;
    font-weight: 500;
}

.detail-value {
    color: #666;
}

/* Navigation */
.project-navigation {
    display: flex;
    justify-content: center;
    gap: 2rem;
    font-size: 0.9rem;
}

.project-navigation a {
    color: #666;
    text-decoration: none;
    transition: color 0.2s ease;
}

.project-navigation a:hover {
    color: #333;
}

/* Media Queries */
@media (max-width: 768px) {
    :root {
        --container-padding: 1rem;
    }

    .project-content {
        margin-top: 0;
    }

    .project-title-container {
        position: static;
        width: auto;
        background: var(--title-bg);
        padding: var(--container-padding);
        margin-top: 80px;
        margin-bottom: 1rem;
    }

    .project-title-container h1 {
        font-size: 1.2rem;
    }

    .project-navigation {
        display: none;
    }

    .project-description {
        width: auto;
    }

    .project-description-container {
        flex-direction: column;
    }
    
    .project-description,
    .project-details {
        width: auto;
    }

    .project-description h2 {
        font-size: 1rem;
    }

    .project-description p {
        font-size: 0.9rem;
        line-height: 1.4;
    }

    .project-details h2 {
        font-size: 1rem;
    }

    .detail-label,
    .detail-value {
        font-size: 0.9rem;
    }
}

/* Styles pour la galerie de projet */
.project-gallery {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    grid-auto-rows: 300px;
    gap: 20px;
    padding: 20px 0;
    width: 100%;
    margin-bottom: 40px;
}

.gallery-item {
    position: relative;
    overflow: hidden;
    border-radius: 8px;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
    transition: transform 0.3s ease;
    display: block;
    text-decoration: none;
    color: inherit;
}

.gallery-item:hover {
    transform: scale(1.02);
}

.gallery-item img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

/* Ajustements spécifiques pour les images portrait et paysage */
.gallery-item.portrait {
    grid-row: span 2;
    height: 620px;
    background: rgba(255, 255, 255, 0.65);
}

.gallery-item.landscape {
    height: 300px;
    background: rgba(255, 255, 255, 0.65);
}

/* Media queries pour la responsivité */
@media (min-width: 1200px) {
    .project-gallery {
        grid-template-columns: repeat(3, 1fr);
    }
}

/* Ajustement des hauteurs pour maintenir les proportions */
.gallery-item.portrait img {
    height: 100%;
}

.gallery-item.landscape img {
    height: 100%;
}

/* Styles pour la galerie modale */
.modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    background-color: rgba(255, 255, 255, 0.75);
    backdrop-filter: blur(12px);
    z-index: 99999;
    overflow: hidden;
}

.modal-content {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 100000;
    overflow: hidden;
}

.modal-image-container {
    position: relative;
    width: 100%;
    height: 100%;
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 100001;
    padding: 20px;
}

#modalImage {
    width: auto;
    height: auto;
    max-width: 95vw;
    max-height: 95vh;
    object-fit: contain;
    z-index: 100002;
    display: block;
    margin: auto;
}

.close-modal {
    position: fixed;
    top: 15px;
    right: 35px;
    color: rgba(0, 0, 0, 0.4);
    font-size: 40px;
    font-weight: bold;
    cursor: pointer;
    z-index: 100003;
    text-shadow: 0 0 5px rgba(0, 0, 0, 0.5);
    transition: color 0.3s ease;
}

.close-modal:hover {
    color: rgba(0, 0, 0, 0.8);
}

.nav-button {
    position: fixed;
    top: 50%;
    transform: translateY(-50%);
    background: rgba(0, 0, 0, 0.5);
    color: white;
    border: none;
    padding: 15px 20px;
    cursor: pointer;
    font-size: 24px;
    border-radius: 5px;
    z-index: 100003;
    transition: background-color 0.3s ease;
}

.prev-button {
    left: 20px;
}

.next-button {
    right: 20px;
}

.nav-button:hover {
    background: rgba(0, 0, 0, 0.8);
}

/* Animation pour la modale */
.modal.fade-in {
    animation: fadeIn 0.3s ease-in-out;
}

@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
} 