@import url('https://fonts.cdnfonts.com/css/glacial-indifference-2');

@font-face {
    font-family: 'Bimbo';
    src: url('../fonts/Bimbo.ttf') format('truetype');
}

@font-face {
    font-family: 'ArbutusSlab';
    src: url('../fonts/ArbutusSlab.ttf') format('truetype');
}

html {
    scroll-behavior: smooth;
}

:root {
    --accent: #ed3964;
    --accent-darken: #b81f44;
    --light: #f9f9f9;
    --divider: #e2e2e2;
    --flash: #117c79;
}

body {
    margin: 0;
    font-family: 'Glacial Indifference', sans-serif;
    display: flex;
    flex-direction: column;
    align-items: center;
    font-size: 1.1em;
}

h1, h2 {
    font-family: 'ArbutusSlab', cursive;
}
h3, h5 {
    font-family: 'Bimbo', cursive;
    color: var(--accent);
}
h4 {
    font-family: 'ArbutusSlab', cursive;
    color: var(--accent);
}
header {
    width: 100%;
    background-color: var(--accent);
    padding: 1em 0;
    line-height: 1;
    position: sticky;
    top: 0;
    z-index: 1000;
    margin-bottom: 3em;
}

nav {
    display: flex;
    justify-content: center;
    flex-wrap: wrap;
    gap: 5em;
}

nav a {
    color: white;
    text-decoration: none;
}

nav a:hover {
    text-decoration: underline;
}

.separator  {
    max-width: 100%;
    width: 700px;
}

section {
    width: 100%;
    max-width: 1400px;
    padding: 0 2em;
    box-sizing: border-box;
    scroll-margin-top: 4em;
}

section::after {
    content: "";
    display: block;
    width: 700px;
    max-width: 100%;
    height: 60px;
    background-image: url('../images/separator.png');
    background-size: contain;
    background-repeat: no-repeat;
    background-position: center;
    margin: 5em auto 5em auto;
}

h2 {
    text-align: center;
    margin-bottom: 2em;
    font-size: 2.2em;
    color: var(--accent);
}

.description {
    max-width: 700px;
    margin: 0 auto 3em;
    text-align: justify;
    line-height: 1.4;
}

#ecole {
    text-align: center;
    border-top: none;
}

#ecole img.logo {
    width: 400px;
    max-width: 100%;
    margin-bottom: 2em;
}

#flash {
    background: var(--flash);
    color: var(--light);
    padding: 10px 20px;
    text-align: center;
    margin-bottom: 2em;
    & > * {
        margin: 10px 0;
    }
    h4 {
        color: var(--light);
        font-size: 1.3em;
    }
}

#ecole img.photo {
    width: 100%;
    max-width: 1400px;
}

#projet .item {
    display: flex;
    align-items: flex-start;
    flex-wrap: wrap;
    margin: 0 auto 4em auto;
    justify-content: center;
    max-width: 100%;
    width: 700px;
}

#projet .item--body {
    text-align: left;
    width: 70%;
    box-sizing: border-box;
    padding-left: 4em;
}

#projet img {
    width: 30%;
    height: 30%;
    object-fit: cover;
    border-radius: 8px;
    text-align: right;
}

#projet h3 {
    font-size: 2.2em;
    line-height: 1;
    margin: 0;
    padding: 0 0 0.8em 0;
}

#projet h3 span {
    font-size: 0.6em;
}

#projet ul {
    margin: 0;
    padding: 0;
    list-style-position: inside;
    line-height: 1.4;
}

#logos {
    display: flex;
    align-items: flex-start;
    gap: 2em;
    flex-wrap: wrap;
    justify-content: center;
    padding: 0 0 2em 0;
}

#logos img {
    max-height: 150px;
}

#contact ul {
    list-style: none;
    padding: 0;
    text-align: center;
}

#contact li {
    margin-bottom: 1em;
}

footer {
    width: 100%;
    background: #f1f1f1;
    padding: 2em;
    text-align: center;
    box-sizing: border-box;
}
footer p {
    font-size: 0.9em;
    margin: 0;
}
footer .copyright {
    margin-top: 1em;
    font-size:0.7em;
}

footer a {
    margin: 0 1em;
    color: var(--accent);
    text-decoration: none;
}

footer a:hover {
    text-decoration: underline;
}

.icon-grid {
    display: grid;
    gap: 2em;
    justify-items: center;
    text-align: center;
    grid-template-columns: 1fr 1fr 1fr 1fr 1fr;
    width: 70%;
    margin: 4em auto 0 auto;
}

.icon-grid .item {
    color: var(--accent);
}
.icon-grid .item p {
    text-align: center;
}

.icon-grid img {
    width: 80px;
    height: 80px;
    object-fit: cover;
    border-radius: 8px;
    margin-bottom: 0.5em;
}

.icon-grid i {
    font-size: 2.5em;
    color: var(--accent);
    margin-bottom: 0.5em;
}
form {
    max-width: 700px;
    width: 100%;
    margin: 0 auto;
}

label {
    display: block;
    margin: 0 auto 0.5em auto;
}

input[type="text"],
select,
textarea {
    background-color: white;
    font-family: 'Glacial Indifference', sans-serif;
    width: 100%;
    padding: 10px;
    margin-bottom: 1.5em;
    border: 1px solid var(--divider);
    border-radius: 6px;
    font-size: 16px;
    box-sizing: border-box;
    position: relative;
}

label.required::after {
     content: ' *';
     color: var(--accent);
     margin-left: 4px;
     font-weight: bold;
 }

textarea {
    resize: vertical;
    min-height: 120px;
}

form button {
    padding: 12px 20px;
    font-size: 0.9em;
    background-color: var(--accent);
    border: 3px solid var(--accent);
    color: var(--light);
    border-radius: 6px;
    cursor: pointer;
    transition: background-color 0.3s ease;
    margin: 0 auto;
    display: block;
}

form button:hover {
    border-color: var(--accent-darken);
    color: white;
    text-shadow: -1px -1px 3px var(--accent-darken);
}

.modal {
    position: fixed;
    top: 1em;
    right: 1em;
    background-color: #4caf50; /* Vert notification */
    color: white;
    padding: 1em 2em;
    border-radius: 8px;
    box-shadow: 0 5px 15px rgba(0,0,0,0.2);
    opacity: 0;
    transform: translateY(-20px);
    transition: opacity 0.4s ease, transform 0.4s ease;
    z-index: 9999;
    max-width: 320px;
    pointer-events: none;
}
.modal-error {
    background-color: darkred;
}

/* Affichage */
.modal.show {
    opacity: 1;
    transform: translateY(0);
    pointer-events: auto;
}

/* Disparition en fondu */
.modal.hide {
    opacity: 0;
    transform: translateY(-20px);
    pointer-events: none;
}

/* Contenu de la modale */
.modal-content {
    position: relative;
}

#burger-menu-open, #burger-menu-close {
    display: none;
}
/* Croix de fermeture */
.close-button {
    position: absolute;
    top: -20px;
    right: -20px;
    font-size: 3em;
    line-height: 0;
    cursor: pointer;
}

@media (max-width: 1000px) {
    header {
        background: transparent;
        margin-bottom: 0;
        padding-top: 0.5em;
    }
    nav {
        flex-direction: column;
        gap: 1em;
    }
    nav a {
        padding: 0 0 1.3em 0;
        text-align: center;
        border-bottom: 1px solid var(--accent-darken);
    }
    nav a:last-child {
        border-bottom: none;
    }
    #projet .item {
        flex-direction: column;
        align-items: center;
    }
    #projet .item--body {
        padding-left: 0;
        width: 90%;
    }
    #projet h3 {
        padding-top: 1em;
        padding-bottom: 0;
        text-align: center;
        line-height: 2;
    }
    #projet h3 span {
        display: block;
    }
    #projet ul {
        text-align: center;
        list-style-type: none;
    }
    .icon-grid {
         display: grid;
         gap: 2em;
         justify-items: center;
         text-align: center;
         grid-template-columns: 1fr 1fr 1fr;
         width: 70%;
         margin: 4em auto 0 auto;
    }
    section {
        scroll-margin-top: 0;
    }
    section:after {
        margin: 2em auto;
    }
    #burger-menu-open, #burger-menu-close {
        background-color: transparent;
        cursor: pointer;
        border: none;
        padding: 0;
        font-size: 2.5em;
    }
    #burger-menu-open {
        display: block;
        padding: 0 0.1em;
        margin: 0 0 0 0.3em;
        background-color: white;
    }
    #burger-menu-close {
        display: block;
        top: 0.3em;
        right: 0.5em;
        position: absolute;
        color: white;
    }
    nav {
        position: fixed;
        top: 0;
        left: 0;
        width: 100vw;
        height: 100vh;
        display: flex;
        font-size: 1.5em;
        flex-direction: column;
        justify-content: center;
        transform: translateY(-100%);
        transition: transform 0.4s ease;
        z-index: 999;
        background: var(--accent);
    }
    nav.show {
        transform: translateY(0);
    }
}
@media (max-width: 500px) {
    .icon-grid {
        grid-template-columns: 1fr;
    }
}