:root {
    --primary-500: hsl(212, 100%, 29%);
    --primary-400:   hsl(213, 84%, 39%);
    --primary-900: hsl(207, 100%, 10%);

    --secondary-500: hsl(11, 89%, 55%);

    --neutral-50: hsl(30, 13%, 94%);

    --font-size-h1:         3.5rem;
    --font-size-h2:         2rem;
    --font-size-h3:         1.5rem;
    --font-size-h4:         1.2rem;
    --font-size-label:      14px;
    --font-size-body:       16px;
   
    --title-font:           Verdana;
    --body-font:            futura-pt, sans-serif;
    
    --navbar-height:        calc( 4 * var(--font-size-h2) );

    /* Espacements */
    --spacing-xxl: 4rem;
    --spacing-xl : 3rem;
    --spacing-l : 2rem;
    --spacing-m : 1.5rem;
    --spacing-s : 1rem;
    --spacing-xs : 0.5rem;
    --spacing-xxs : 0.25rem;

    /* Largeurs Containers */
    --container-s: 640px;
    --container-m: 848px;
    --container-l: 1200px;
    --container-xl: 1500px;
}

*, ::after, ::before {
    box-sizing: border-box;
}

html {
    position: relative;
    scroll-behavior: smooth;
}

body {
    margin:           0;
    position:         relative;
    background-color: white;
    min-height:       100vh;
    font-size: var(--font-size-body);
}

h2 {
    color: var(--primary-500);
    font-family: var(--title-font);
    width: 100%;
    text-align: center;
    font-size: var(--font-size-h2);
    text-transform: uppercase;
}

h3 {
    display: flex;
    justify-content: center;
    color: var(--secondary-500);
    font-family: var(--title-font);
    font-size: var(--font-size-h3);
}

p {
    font-family: var(--body-font);
    line-height: 1.5;
}

a {
    color: #FFFFFF;
    
    &:hover {
        color: var(--secondary-500);
    }
}

section {
    display:        flex;
    flex-wrap:      wrap;
    gap: var(--spacing-xxl);
    padding: var(--spacing-l);
    width:          100%;
    min-height:     calc(100vh - var(--navbar-height));
    flex-direction: column;
    overflow:       hidden;
    position:       relative;

    li {
        font-family: var(--body-font);
        font-size: var(--font-size-body);
    }

    .section-anchor {
        position: absolute;
        height:   var(--navbar-height);
        width:    100%;
        display:  block;
        top:      calc( var(--navbar-height) * -1 );
        left:     0;
    }
}

.container, .container-s, .container-m, .container-xl {
    display: block;
    box-sizing: border-box; /* Le padding ne grossit pas la boîte */
    width: 100%;
    padding: 0 var(--spacing-s); /* Empêche le contenu de coller aux bords sur mobile */
    margin: 0 auto; /* Centrage horizontal */
}

.container {
    max-width: var(--container-l);
}

.container-s {
    max-width: var(--container-s);
}

.container-m {
    max-width: var(--container-m);
}

.container-xl {
    max-width: var(--container-xl);
}

/* Conteneur "plein écran" sans bords */
.container-fluid {
    width: 100%;
    padding: 0;
    margin: 0;
}

header {
    position: fixed;
    display: flex;
    align-items: center;
    background-color: var(--primary-900);
    width: 100%;
    height: var(--navbar-height);
    top: 0;
    z-index: 1;

    #logo {
        width: 150px;
        height: 3em;

        img {
            height: 100%;
        }
    }

    ul {
        list-style: none;
        display: flex;
        padding-left: 0;
        flex-grow: 1;
        justify-content: center;
        flex: 80%;

        li {
            padding: var(--spacing-s);
            font-size: var(--font-size-h4);
            font-family: var(--title-font);

            a {
                position:        relative;
                color:           white;
                text-decoration: none;

                &:hover {
                    color: var(--secondary-500);
                }

                &.current::after {
                    background: linear-gradient(90deg, transparent, var(--secondary-500), transparent);
                    width: 100%;
                    height: 2px;
                    content: "";
                    display: block;
                    margin-top: var(--spacing-xs);
                    position: absolute;
                    animation-duration: 0.5s;
                    animation-name:     intro-effect;
                }
            }
        }
    }
}

nav {
    width:       100%;
    display:     flex;
    align-items: center;
}

main {
    margin-top: var(--navbar-height);
}

#home {
    color:       white;
    background:  linear-gradient(0deg, var(--primary-500) 0%, var(--primary-900) 100%);
    font-family: var(--title-font);
    text-align:  center;

    .bird-top {
        width:      150px;
        height:     150px;
        background: url(images/oiseau-haut.svg) no-repeat;
        position:   absolute;
        bottom:     20%;
        left:       30%;
    }

    .bird-bottom {
        width:      150px;
        height:     150px;
        background: url(images/oiseau-bas.svg) no-repeat;
        position:   absolute;
        bottom:     30%;
        right:      25%;
    }
    
    .hero-heading {
        display: flex;
        flex-direction: column;
        justify-content: center;

        h1 {
            font-size:          var(--font-size-h1);
            animation-duration: 0.5s;
            animation-name:     intro-effect;
        }

        h2 {
            font-family: var(--body-font);
            font-size: var(--font-size-h2);
            font-weight: 500;
            color: white;
            margin: 0;
            align-self: center;
            animation-duration: 3s;
            animation-name: intro-effect;
            animation-delay: -0.5s;
        }
    }

    h3 {
        font-family: var(--body-font);
        font-size: var(--font-size-h3);
        font-weight: 300;
        color: white;
    }

    #screens {
        display: flex;
        flex-direction: row;

        div {
            flex: 30%;
            align-self: center;
            padding: var(--spacing-xxl);
            filter: drop-shadow(0px 4px 10px rgba(0,0,0,0.5));
            animation-duration: 6s;
            animation-name: float;
            animation-iteration-count: infinite;

            img {
                width: 200px;
                height: auto;
            }

            &:nth-child(2) {
                animation-delay: -4s;
            }
        }
    }
}

@keyframes intro-effect {
    from { opacity: 0; }
    to   { opacity: 1; }
}

@keyframes float {
    from { transform: translateY(-5px); }
    50%  { transform: translateY(5px); }
    to   { transform: translateY(-5px); }
}

#about {
    background-color: var(--neutral-50);

    p {
        font-size: 18px;
    }

    #gallery {
        display: flex;
        flex-direction: column;
        gap: var(--spacing-s);

        img {
            flex: 1 1 0;
            min-width: 0;
            max-height: 360px;
            object-fit: cover;
            object-position: center;
            border-radius: 8px;
        }
    }

    .app-cta {
        margin-top: var(--spacing-xxl);
    }

    .box {
        align-items: start;
    }
}

#team {
    background-color: #FFFFFF;

    ul {
        border: 1px var(--primary-900) solid;
        border-radius: 8px;
        background-color: var(--neutral-50);
    }

    .team-container {
        flex: 1;
        align-content: center;
        margin-top: calc(-1 * var(--spacing-xxl));

        img {
            margin: 0 auto;
        }
    }
}

#contact {
    background-color: var(--neutral-50);
}

.box {
    display:         flex;
    gap: var(--spacing-xxl);
    width:           100%;
    justify-content: center;
    align-items:     center;
    font-weight:     400;
}

#form {
    margin: 0 auto;
}

.columns {
    flex: 1;
}

.pro-photo {
    display: block;
    height: auto;
    width: 100%;
}

.round-photo {
    border-radius: 50%; 
    height: 10em;
    display: block;
    filter: drop-shadow(rgba(0, 0, 0, 0.25) 0px 2px 4px);
}

.pro-photo.app-icon {
    justify-self: center;
    width: 80px;
    transition: 0.4s cubic-bezier(.47,1.64,.41,.8);

    &:hover {
        transform: scale(1.15);
        filter: drop-shadow(0 8px 10px rgba(0, 0, 0, 0.39)) brightness(1.2);
    }
}

.button {
    background: var(--primary-500);
    text-align: center;
    text-decoration: none;
    padding: var(--spacing-xs) var(--spacing-s);
    border-radius: 3em;
    transition: 0.15s ease-in-out;
    color: white;
    font-weight: 700;
    border: 2px solid transparent;
    font-family: var(--body-font);

    &:hover {
        background:  var(--primary-900);
        color: white;
        border: 2px solid var(--primary-400);
        transform: scale(1.02);
    }
}

#links {
    display: flex;
    justify-content: center;
    flex: 20%;
}

.list-center {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: var(--spacing-s);
    padding: 0.75em 0;
}

.flex-container-contact {
    display: flex;
    justify-content: center;
}

input[type=text], select, textarea {
    width: 100%;
    padding: 0.75em;
    border: 1px solid #ccc;
    border-radius: 0.25em;
    box-sizing: border-box;
    margin-top: var(--spacing-s);
    margin-bottom: var(--spacing-s);
    resize: vertical;
}
  
input[type=submit] {
    cursor: pointer;
}

label {
    font-family: var(--title-font);
}

input, textarea {
    font-family: var(--body-font);
    letter-spacing: 0.1em;
    font-size: var(--font-size-body);
}

/* ========================================================================== */
/* = Media Queries
/* ========================================================================== */

/* Wide Desktop */
@media (min-width: 1921px) { 

}

/* Desktop */
@media (max-width: 1920px) { 
    
}

/* Small laptops */
@media (max-width: 1280px) {     

}

/* Landscape tablets and small laptops (up to 1024px) */
@media (max-width: 1024px) { 

}

/* Portrait tablets */
@media (max-width: 768px) { 

    #home {
        
        .hero-heading h2 {
            font-size: var(--font-size-h3);
        }

        #screens div {
            padding: var(--spacing-s);
        }
    }

    #about {
        .box {
            flex-direction: column;
            align-items: center;
        }
    }

    #team .team-container {
        margin: 0;
    }
}

@media (max-width: 500px) {         /*Smartphones*/
    nav {
        flex-wrap: wrap;
        font-size: 0.6em;
        margin-top: var(--spacing-l);
    }

    header {
        #logo {
            flex: 1;
            display: flex;
            justify-content: center;
        }

        ul {
            font-size: var(--font-size-body);
            justify-content: space-between;

            li {
                padding: var(--spacing-xs);
            }
        }
    }

    
    section {
        padding: var(--spacing-s) 0;
    }

    #home {
        h1 {
            font-size: 3em;
        }

        #screens {
            flex-direction: column;
        }

        .bird-top {
            width: 100px;
            height: 100px;
            top: 85%;
            left: 80%;
        }

        .bird-bottom {
            width: 100px;
            height: 100px;
            top: 43%;
            right: 35%;
        }
    }

    .pro-photo {
        width: 100%;
        height: auto;
        display: block;
        margin: auto;
        padding: var(--spacing-xxs);
    }

    .columns {
        width: 100%;
    }

    .box {
        flex-direction: column;
    }

    #form {
        width: 100%;
    }
}

@media only screen and (orientation: landscape) and (max-width: 824px) { /*Smartphones en paysage*/
    :root {
        --navbar-height: 6em;
    }

    body {
        font-size: 0.7em;
    }
    
    header {
        #logo {
            flex: 20%;
        }

        ul {
            flex: 80%;
            justify-content: space-evenly;

            li {
                font-size: var(--font-size-body);
                padding: var(--spacing-xs);
            }
        }

        div {
            font-size: var(--font-size-body);
        }
    }

    #home {
        h1 {
            font-size: 3em;
        }

        #screens {
            flex-direction: column;
        }

        .bird-top {
            width: 100px;
            height: 100px;
            top: 85%;
            left: 80%;
        }

        .bird-bottom {
            width: 100px;
            height: 100px;
            top: 43%;
            right: 35%;
        }
    }

    .pro-photo {
        width: 100%;
        height: auto;
        display: block;
        margin: auto;
        padding: var(--spacing-xxs);
    }

    .columns {
        width: 100%;
    }

    .box {
        flex-direction: column;
    }

    #about {
        #gallery {
            flex-direction: column;
        }
    }

    #form {
        width: 100%;
    }
}    

@media only screen and (device-width: 812px) and (device-height: 375px) and (orientation: landscape) and (-webkit-min-device-pixel-ratio: 3) { /*iPhone X en paysage*/
    :root {
        --navbar-height: 6em;
    }

    body {
        font-size: 0.7em;
    }
    
    header {
        ul {
            justify-content: space-evenly;

            li {
                font-size: var(--font-size-body);
            }
        }

        div {
            font-size: var(--font-size-body);
        }
    }

    #home {
        .bird-bottom {
            top: 37%;
        }
    }
}

@media only screen and (min-device-width: 768px) and (max-device-width: 1024px) and (orientation: portrait) and (-webkit-min-device-pixel-ratio: 2) { /*Pour iPad*/
    :root {
        --navbar-height: 8em;
    }

    nav {
        flex-wrap: wrap;

        img {
            margin-top: var(--spacing-s);
        } 
    }

    header {
        #logo {
            flex: 100%;
            text-align: center;
        }

        ul {
            font-size: var(--font-size-body);
            flex: 70%;
            justify-content: space-evenly;

            li {
                padding: var(--spacing-xs);
            }
        }
    }

    #home {
        h1 {
            font-size: 3em;
        }

        #screens {
            flex-direction: column;
        }

        .bird-top {
            width: 100px;
            height: 100px;
            top: 85%;
            left: 80%;
        }

        .bird-bottom {
            width: 100px;
            height: 100px;
            top: 43%;
            right: 35%;
        }
    }

    .pro-photo {
        width: 100%;
        height: auto;
        display: block;
        margin: auto;
        padding: var(--spacing-xxs);
    }

    .columns {
        width: 100%;
    }

    .box {
        flex-direction: column;
    }

    #about {
        #gallery {
            flex-direction: column;
        }
    }

    #form {
        width: 100%;
    }
}

@media only screen and (device-width: 1024px) and (device-height: 768px) and (orientation: landscape) and (-webkit-min-device-pixel-ratio: 2) { /*iPad en paysage*/
    header {
        ul {
            justify-content: space-evenly;
        }
    }
}

@media (min-width: 3840px) { /*UHD*/
    :root {
        --navbar-height: 4em;
    }

    #home {
        #screens {
            div {
                img {
                    width: 500px;
                    height: auto;
                }
            }
        }

        .bird-top {
            width: 300px;
            height: 300px;
        }

        .bird-bottom {
            width: 300px;
            height: 300px;
        }
    }
}