
:root {
    --cream:          #fff8dc;
    --blue-light: #2eabe0;
    --blue-dark: #1e66c4;
    --dur-short:      0.3s;
    --dur-med:        0.6s;
    --white:          #FFFFFF;
}

html {
    margin: 0;
    padding: 0;
    width: 100%;
    overflow-x: hidden;
    overflow-y: auto;
}
body {
    margin: 0;
    padding: 0;
    min-height: 100vh;
    font-family: 'Segoe UI', sans-serif;
    background: none;
}
*, *::before, *::after {
    box-sizing: border-box;
}


#bg-canvas {
    position: fixed;
    top: 0; left: 0;
    width: 100vw; height: 100vh;
    background-color: var(--cream);
    z-index: 0;
}
/*──────────────────────────────────────────────────────────*/
/* Responsive Header - à placer avant le CSS existant      */
/*──────────────────────────────────────────────────────────*/

/* 1) Structure Flex de base */
.site-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    position: fixed;
    top: 0; left: 0; right: 0;
    padding: 1rem 2rem;
    background: linear-gradient(135deg, var(--blue-light), var(--blue-dark));
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
    z-index: 1000;
    animation: gradientShift 8s ease infinite;
    height: 70px;
}

/* 2) Logo à gauche */
.site-header .logo {
    font-family: 'Montserrat', sans-serif;
    font-size: 1.75rem;
    font-weight: 900;
    color: #fff;
    text-decoration: none;
}

/* 3) Bouton menu mobile (caché desktop) */
.site-header .menu-toggle {
    display: none;
    font-size: 1.75rem;
    color: #fff;
    cursor: pointer;
}

/* 4) Nav coule sous forme de flex horizontal */
.site-header .nav {
    display: flex;
    align-items: center;
    justify-content: center;
    flex: 1;
}

/* 5) Liste des liens */
.site-header .nav-list {
    list-style: none;
    display: flex;
    gap: 1.5rem;
    margin: 0;
    padding: 0;
}

/* garde tes animations de hover inchangées */
.site-header .nav-list a {
    color: #fff;
    text-decoration: none;
    font-weight: 500;
    position: relative;
    padding: 0.5rem 0.75rem;
    transition: color var(--dur-short);
}
.site-header .nav-list a:hover {
    color: black;
}
.site-header .nav-list a:hover::after {
    width: 100%;
}
.site-header .nav-list a::before {
    content: '';
    position: absolute;
    top: -4px; left: -6px;
    width: calc(100% + 12px);
    height: calc(100% + 8px);
    background: transparent;
    transform: rotate(-2deg);
    transition: background var(--dur-short) ease-in-out;
    pointer-events: none;
    z-index: -1;
}
.site-header .nav-list a:hover::before {
    background: var(--cream);
    border-color: var(--cream);
    color: #111827;
}

/*──────────────────────────────────────────────────────────*/
/* Responsive sous 768px                                    */
/*──────────────────────────────────────────────────────────*/
@media (max-width: 768px) {
    .site-header {
        padding: 0.75rem 1rem;
    }
    .site-header .menu-toggle {
        display: block;
    }
    .site-header .nav {
        position: absolute;
        top: 100%; left: 0; right: 0;
        flex-direction: column;
        background: linear-gradient(135deg, var(--blue-light), var(--blue-dark));
        max-height: 0;
        overflow: hidden;
        transition: max-height 0.3s ease;
    }
    .site-header .nav.open {
        max-height: 400px; /* ajuste selon le nombre de liens */
    }
    .site-header .nav-list {
        flex-direction: column;
        width: 100%;
    }
    .site-header .nav-list a {
        display: block;
        padding: 0.75rem 1rem;
    }
}

/*──────────────────────────────────────────────────────────*/
/* Ajustements sous 480px                                   */
/*──────────────────────────────────────────────────────────*/
@media (max-width: 480px) {
    .site-header {
        padding: 0.5rem 0.75rem;
    }
    .site-header .logo {
        font-size: 1.5rem;
    }
    .site-header .nav-list a {
        font-size: 0.85rem;
    }
}



.hero {
    position: relative;
    z-index: 5;
    min-height: 100vh;
    display: flex;
    justify-content: center;
    align-items: center;
    text-align: center;
    background: transparent;
}
.hero h1 {
    font-family: 'Montserrat', sans-serif;
    font-size: 4.5rem;
    font-weight: 900;
    color: #fff;
    text-shadow: 0 2px 6px rgba(0,0,0,0.4);
    margin: 0;
    line-height: 1.1;
}
@media (max-width: 768px) {
    .hero h1 { font-size: 3rem; }
}

.about-page {
    position: relative;
    z-index: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    min-height: 100vh;
    padding: 4rem 2rem;
    background: transparent;
}

.about-section {
    width: 100%;
    max-width: 800px;
    margin-bottom: 4rem;
}


.slanted-box {
    background: var(--white);
    padding: 2rem;
    margin: 0 auto;
    transform: skew(-3deg);
    opacity: 0;
}
.slanted-box > * {
    transform: skew(3deg);
}

/* Animations d’entrée */
@keyframes slideInLeft {
    from { opacity: 0; transform: translateX(-100%) skew(-3deg); }
    to   { opacity: 1; transform: translateX(0)        skew(-3deg); }
}
@keyframes slideInRight {
    from { opacity: 0; transform: translateX(100%) skew(-3deg); }
    to   { opacity: 1; transform: translateX(0)       skew(-3deg); }
}

.slide-in-left {
    animation: slideInLeft var(--dur-med) ease-out forwards;
}
.slide-in-right {
    animation: slideInRight var(--dur-med) ease-out forwards;
}


.about-section:nth-of-type(1) .slanted-box { animation-delay: 0.2s; }
.about-section:nth-of-type(2) .slanted-box { animation-delay: 0.4s; }
.about-section:nth-of-type(3) .slanted-box { animation-delay: 0.6s; }
.about-section:nth-of-type(4) .slanted-box { animation-delay: 0.8s; }


.slanted-box h2 {
    font-family: 'Montserrat', sans-serif;
    font-size: 4.5rem;
    margin-bottom: 1rem;
    color: var(--blue-light);
    text-align: center;
    text-shadow: 0 2px 6px rgba(0,0,0,0.4);
}
.slanted-box p {
    font-size: 1.1rem;
    line-height: 1.6;
    color: #111827;
    margin: 0;
}


.about-photo {
    text-align: center;
    margin: 1.5rem 0;
}
.about-photo img {
    width: 150px;
    height: 150px;
    object-fit: cover;
    border-radius: 50%;
    border: 4px solid var(--blue-light);
    box-shadow: 0 4px 12px rgba(0,0,0,0.1);
    transform: scale(0.8);
    opacity: 0;
    transition: transform var(--dur-med) ease-out, opacity var(--dur-med) ease-out;
}
.slide-in-left .about-photo img,
.slide-in-right .about-photo img {
    animation: fadeInPhoto var(--dur-med) ease-out forwards;
    animation-delay: 0.2s;
}
@keyframes fadeInPhoto {
    to { opacity: 1; transform: scale(1); }
}


.ticker-wrapper {
    position: relative;
    z-index: 5;
    width: 100vw;
    margin-left: calc(50% - 50vw);
    margin-right: calc(50% - 50vw);
    background: var(--white);
    overflow-x: auto;
    white-space: nowrap;
    padding: 1rem 0;
    box-shadow: inset 0 1px 3px rgba(0,0,0,0.1);
    scrollbar-width: none;
    cursor: grab;
}
.ticker-wrapper::-webkit-scrollbar {
    display: none;
}
.ticker-wrapper .ticker-content {
    display: inline-flex;
    align-items: center;
}
.ticker-wrapper .ticker-content img {
    height: 80px;
    margin: 0 1.5rem;
    flex-shrink: 0;
    transition: transform var(--dur-short) ease;
}
.ticker-wrapper .ticker-content img:hover {
    transform: scale(1.2);
}

.site-footer {
    position: relative;
    z-index: 10;
    left: 50%;
    transform: translateX(-50%);
    width: 100vw;
    background: linear-gradient(135deg, var(--blue-light), var(--blue-dark));
    color: #eee;
    text-align: center;
    padding: 1.5rem 2rem;
}
.footer-content {
    max-width: 1350px;
    margin: 0 auto;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 1rem;
}
.footer-social a {
    display: inline-block;
}
.social-icon {
    width: 32px;
    height: 32px;
    fill: var(--white);
    transition: fill var(--dur-short) ease;
}
.social-icon:hover {
    fill: #0077B5;
}
.site-footer p {
    font-size: 0.9rem;
    color: var(--white);
    opacity: 0.8;
}

@keyframes gradientShift {
    0%,100% { background-position: 0% 50%; }
    50%     { background-position: 100% 50%; }
}

.projects-section .slanted-box {
    opacity: 1 !important;
    transform: skew(-3deg);
    background: var(--white);
    width: 280px;
    margin: 1rem;
    overflow: hidden;
    cursor: pointer;
    transition: transform var(--dur-short), box-shadow var(--dur-short);
}

.projects-section .slanted-box > * {
    transform: skew(3deg);
}

.project-list {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 2rem;
}

.project-item:hover {
    transform: skew(-3deg) translateY(-5px);
    box-shadow: 0 8px 20px rgba(0,0,0,0.1);
}

.projects-section img {
    width: 100%;
    height: 160px;
    object-fit: cover;
    display: block;
    border-bottom: 2px solid var(--blue-light);
}
.projects-section .project-item p {
    margin: 1rem;
    font-size: 1rem;
    color: #333;
    text-align: center;
}


.hero {
    margin-top: 100px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: flex-start;
    padding-top: 4rem;
    padding-bottom: 2rem;
    overflow-x: hidden;
    overflow-y: visible;
}

.projects-section {
    position: relative;
    z-index: 2;
    margin-top: 100px;
}
.projects-section h1 {

    font-family: 'Montserrat', sans-serif;
    font-size: 4.5rem;
    font-weight: 900;
    color: var(--blue-light);
    text-shadow: 0 2px 6px rgba(0,0,0,0.4);
    margin: 0;
    line-height: 1.1;

}


/*──────────────────────────────────────────────────────────*/
/* Modale responsive                                      */
/*──────────────────────────────────────────────────────────*/
.custom-alert {
    display: none;
    position: fixed;
    inset: 0;
    background: rgba(0,0,0,0.6);
    align-items: center;
    justify-content: center;
    z-index: 999;
    padding-top: 90px;
}

body.modal-open {
    overflow: hidden;
}

.custom-alert-content {
    position: relative;
    background: #fff;
    border-radius: 8px;
    /* Largeur adaptative : max 600px ou 90% de la fenêtre */
    width: 90vw;
    max-width: 600px;
    /* Hauteur adaptative : max 90% de la fenêtre */
    max-height: 90vh;
    display: flex;
    flex-direction: column;
    overflow: hidden;
}

/* Fermer */
.modal-close {
    position: absolute;
    top: 0.75rem; right: 0.5rem;
    font-size: 1.5rem;
    cursor: pointer;
    color: #333;
    z-index: 1;
}

/* Zone media */
.modal-media {
    width: 100%;
    /* Ratio 16/9 pour tous les types */
    aspect-ratio: 16 / 9;
    flex-shrink: 0;
    overflow: hidden;
}
.modal-media img,
.modal-media iframe {
    width: 100%;
    height: 100%;
    object-fit: contain;
    border-radius: 4px;
    margin-right: 0.1rem;
    margin-left: 0.1rem;

}

/* Zone texte : défile si trop long */
.modal-text {
    padding: 1.5rem;
    background: rgba(255,255,255,0.95);
    overflow-y: auto;
    flex: 1 1 auto;
}
.modal-text p {
    margin: 0 0 1rem;
    color: #222;
    font-family: 'Segoe UI', sans-serif;
    font-size: 1rem;
    line-height: 1.6;
}

/*──────────────────────────────────────────────────────────*/
/* Ajustements pour très petit écran (<480px)             */
/*──────────────────────────────────────────────────────────*/
@media (max-width: 480px) {
    .custom-alert-content {
        width: 95vw;
        max-width: none;
        max-height: 95vh;
    }
    .modal-text {
        padding: 1rem;
    }
    .modal-close {
        top: 0.5rem; right: 0.5rem;
        font-size: 1.25rem;
    }
}

.contact-page {
    position: relative;
    z-index: 1;
    min-height: 100vh;
    padding: 4rem 2rem;
    display: flex;
    justify-content: center;
    align-items: flex-start;
    background: transparent;
}

.contact-section {
    width: 100%;
    max-width: 600px;
}
.contact-section .slanted-box {
    background: var(--white);
    padding: 2rem;
    margin: 2rem auto;
    transform: skew(-3deg);
    opacity: 0;
}
.contact-section .slanted-box > * {
    transform: skew(3deg);
}

@keyframes slideInContact {
    from { opacity: 0; transform: translateY(50px) skew(-3deg); }
    to   { opacity: 1; transform: translateY(0)    skew(-3deg); }
}
.contact-section .slanted-box {
    animation: slideInContact var(--dur-med) ease-out forwards;
    animation-delay: 0.3s;
}

.contact-section h2 {
    font-family: 'Montserrat', sans-serif;
    font-size: 2.5rem;
    color: var(--blue-dark);
    text-align: center;
    margin-bottom: 1.5rem;
}
.contact-section p {
    font-size: 1rem;
    line-height: 1.6;
    color: #111827;
    text-align: center;
    margin-bottom: 2rem;
}

.form-group {
    margin-bottom: 1.5rem;
}
.form-group label {
    display: block;
    font-weight: 600;
    margin-bottom: 0.5rem;
    color: #333;
}
.form-group input,
.form-group textarea {
    width: 100%;
    padding: 0.75rem;
    border: 1px solid #ccc;
    border-radius: 6px;
    transition: border-color var(--dur-short);
}
.form-group input:focus,
.form-group textarea:focus {
    border-color: var(--blue-light);
    outline: none;
}

button[type="submit"] {
    display: block;
    margin: 1rem auto 0;
    padding: 0.75rem 2rem;
    background: linear-gradient(135deg, var(--blue-light), var(--blue-dark));
    color: var(--white);
    border: none;
    border-radius: 6px;
    font-weight: 600;
    cursor: pointer;
    transition: transform var(--dur-short), box-shadow var(--dur-short);
}
button[type="submit"]:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 18px rgba(0,0,0,0.1);
}

#form-status {
    text-align: center;
    margin-top: 1rem;
    color: var(--blue-dark);
    font-style: italic;
}

@media (max-width: 768px) {
    .contact-section .slanted-box {
        padding: 1.5rem;
        margin: 1.5rem auto;
    }
    .contact-section h2 {
        font-size: 2rem;
    }
}

/* Scoped styles for the “Réalisations” page */
.realisations-page {
    position: relative;
    z-index: 1;
    padding: 4rem 2rem;
    background: transparent;
}
.realisations-page .container {
    position: relative;
    z-index: 1;
}

/* Page title */
.realisations-page > h1 {
    text-align: center;
    font-family: 'Montserrat', sans-serif;
    font-size: 3rem;
    color: var(--blue-light);
    margin-bottom: 3rem;
}

/* Each genre section */
.realisations-page .genre {
    margin-bottom: 4rem;
}
.realisations-page .genre > h2 {
    font-family: 'Montserrat', sans-serif;
    font-size: 2.5rem;
    color: var(--blue-dark);
    text-align: center;
    margin-bottom: 2rem;
}

/* Project list layout */
.realisations-page .project-list {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 2rem;
}

/* Slanted boxes */
.realisations-page .project-list .slanted-box {
    background: var(--white);
    padding: 1rem;
    width: 260px;
    transform: skew(-3deg);
    transition: transform var(--dur-short), box-shadow var(--dur-short);
    box-shadow: 0 4px 12px rgba(0,0,0,0.1);
    position: relative;
    z-index: 4;
}
.realisations-page .project-list .slanted-box > * {
    transform: skew(3deg);
}

/* Hover effect */
.realisations-page .project-list .slanted-box:hover {
    transform: skew(-3deg) translateY(-5px);
    box-shadow: 0 8px 20px rgba(0,0,0,0.15);
}

/* Images and captions */
.realisations-page .project-list .slanted-box img {
    width: 100%;
    height: 160px;
    object-fit: cover;
    border-radius: 8px;
    margin-bottom: 1rem;
}
.realisations-page .project-list .slanted-box p {
    margin: 0;
    font-size: 1rem;
    text-align: center;
    color: #333;
    font-family: 'Segoe UI', sans-serif;
}

.realisations-page,
.realisations-page .realisations-container,
.realisations-page .genre,
.realisations-page .project-list {
    position: relative;
    z-index: 1;
}

.realisations-page .slanted-box {
    position: relative;
    z-index: 2;
}
