/* Reset et styles de base */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html, body {
    height: 100%;
    width: 100%;
    overflow-x: hidden;
}

/* Header avec dégradé */
.sticky-header {
    position: sticky;
    top: 0;
    width: 100%;
    background-image: url('bandeau.jpg');
    background-size: cover;
    background-position: center;
    box-shadow: 0 2px 5px rgba(0,0,0,0.1);
    z-index: 100;
}

.main-header {
    display: flex;
    align-items: center;
    padding: 1rem;
    position: relative;
    width: 100%;
    min-height: 120px;
}

.logo {
    width: clamp(100px, 20vw, 200px);
    flex-shrink: 0;
    position: relative;
    z-index: 2;
}

.logo img {
    width: 100%;
    height: auto;
    display: block;
}

.title {
    flex: 1;
    text-align: center;
    font-size: clamp(2rem, 6vw, 6rem);
    font-weight: bold;
    color: #333;
    margin-left: clamp(-50px, -8vw, -130px);
    position: relative;
    z-index: 2;
}

.word-animation {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: 1;
    overflow: hidden;
}

.word-animation span {
    position: absolute;
    opacity: 0;
    transition: opacity 0.5s, transform 0.5s ease-out;
    font-size: clamp(1rem, 2.5vw, 1.6rem);
    color: #FFF;
    transform-origin: center;
    backface-visibility: hidden;
    will-change: transform, opacity;
    pointer-events: none;
    white-space: nowrap;
}

.contact-button-container {
    text-align: center;
    padding: 0.5rem 1rem;
    background: transparent;
    position: relative;
    z-index: 2;
}

.contact-button {
    padding: 0.5rem 1.5rem;
    background: #3D2245;
    color: white;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    transition: background-color 0.3s;
    font-size: clamp(0.875rem, 2vw, 1rem);
}

.contact-button:hover {
    background: #0056b3;
}

/* Contenu principal */
.page-content {
    min-height: calc(100vh - 120px);
    width: 100%;
    padding: clamp(1rem, 3vw, 2rem);
    background: #fff;
}

/* Galerie */
.gallery {
    max-width: 1600px;
    width: 100%;
    margin: 0 auto;
    padding: 0 clamp(0.5rem, 2vw, 1rem);
}

.first-row, .second-row, .third-row {
    display: grid;
    gap: clamp(0.75rem, 2vw, 1.5rem);
    margin-bottom: clamp(0.75rem, 2vw, 1.5rem);
    width: 100%;
}

.first-row {
    grid-template-columns: repeat(auto-fit, minmax(min(300px, 100%), 1fr));
}

.second-row {
    grid-template-columns: repeat(auto-fit, minmax(min(400px, 100%), 1fr));
}

.third-row {
    grid-template-columns: repeat(auto-fit, minmax(min(350px, 100%), 1fr));
}

.image-link {
    aspect-ratio: 16/9;
    width: 100%;
    display: block;
    overflow: hidden;
    border-radius: 8px;
}

.image-link img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.3s ease;
}

.image-link:hover img {
    transform: scale(1.05);
}

/*-----*/
.gallery {
    max-width: 1600px;
    width: 100%;
    margin: 0 auto;
    padding: 0 clamp(0.5rem, 2vw, 1rem);
}

.first-row, .second-row, .third-row {
    display: grid;
    gap: clamp(0.75rem, 2vw, 1.5rem);
    margin-bottom: clamp(0.75rem, 2vw, 1.5rem);
    width: 100%;
}

.first-row, .second-row, .third-row {
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
}

.image-link {
    width: 100%;
    display: block;
    overflow: hidden;
    border-radius: 8px;
    aspect-ratio: auto;
}

.image-link img {
    width: 100%;
    height: auto;
    object-fit: contain;
}

/* Lightbox */
.lightbox {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0,0,0,0.8);
    z-index: 1000;
    justify-content: center;
    align-items: center;
}

.lightbox.active {
    display: flex;
}

.contact-form {
    position: relative;
    background: white;
    width: min(500px, 95%);
    margin: clamp(1rem, 4vw, 2rem) auto;
    padding: clamp(1rem, 3vw, 2rem);
    border-radius: 8px;
    box-shadow: 0 4px 6px rgba(0,0,0,0.1);
}

.close {
    position: absolute;
    right: 1rem;
    top: 1rem;
    font-size: 1.5rem;
    cursor: pointer;
    color: #666;
    transition: color 0.3s;
    z-index: 1001;
}

.close:hover {
    color: #000;
}

.form-title {
    margin-bottom: 1.5rem;
    color: #333;
    text-align: center;
    font-size: clamp(1.25rem, 3vw, 1.5rem);
}

.form-group {
    margin-bottom: 1rem;
}

.form-group input,
.form-group textarea {
    width: 100%;
    padding: 0.75rem;
    border: 1px solid #ddd;
    border-radius: 4px;
    font-size: 1rem;
    transition: border-color 0.3s;
}

.form-group input:focus,
.form-group textarea:focus {
    outline: none;
    border-color: #3D2245;
}

.form-group textarea {
    height: 150px;
    resize: vertical;
}

/* Media Queries */
@media (max-width: 768px) {
    .main-header {
        min-height: 180px;
        padding: 0.5rem;
    }
    
    .logo {
        margin: 0.5rem auto;
        width: 120px;
    }
    
    .title {
        margin-left: 0;
        font-size: clamp(1.5rem, 5vw, 2rem);
        width: 100%;
        text-align: center;
    }
    
    .word-animation span {
        font-size: clamp(0.875rem, 4vw, 1.2rem);
    }
    
    .contact-form {
        margin: 1rem;
        max-height: 90vh;
        overflow-y: auto;
    }
    
    .form-group textarea {
        height: 120px;
    }
}

@media (max-width: 480px) {
    .contact-button {
        width: 100%;
        max-width: 300px;
    }
    
    .main-header {
        min-height: 150px;
    }
    
    .contact-form {
        padding: 1rem;
    }
    
    .close {
        right: 0.5rem;
        top: 0.5rem;
    }
}