/* Reset */
@font-face {
    font-family: "StyleScript";
    src: url("assets/font/StyleScript-Regular.ttf");
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-padding-top: 100px;
}

body {
    font-family: "Poppins", sans-serif;
}

section {
    scroll-margin-top: 100px;
}

/* header */

header {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100px;
    background-color: #457b9d;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 40px;
    gap: 40px;
    z-index: 1000;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.3);
}

/* logo */
header img {
    height: 75px;
    width: auto;
    object-fit: contain;
    flex-shrink: 0;
}

/* nav */
header nav {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 40px;
    flex: 1;
    font-weight: 600;
}

header nav ul {
    display: flex;
    align-items: center;
    justify-content: space-evenly;
    flex: 1;
    list-style: none;
}

header nav ul a {
    color: #ffffff;
    text-decoration: none;
    font-size: 1.7rem;
    transition: color 0.2s ease;
}

header nav ul a:hover {
    color: #a8c8f0;
}

/* cta-group */
.cta-group {
    display: flex;
    align-items: center;
    flex-direction: column;
    gap: 4px;
}

.cta {
    color: #ffffff;
    text-decoration: none;
    font-size: 1.2rem;
    transition: color 0.2s ease;
}

.cta:hover {
    color: #a8c8f0;
}

.cta i {
    margin-right: 6px;
    font-size: 1rem;
}

body {
    padding-top: 100px;
}

#hero {
    display: flex;
    flex-flow: column-reverse nowrap;
    height: calc(100dvh - 100px);
    position: relative;
    align-items: center;
}

#hero img {
    display: block;
    position: absolute;
    inset: 0;
    object-fit: cover;
    height: 100%;
    width: 100%;
    z-index: -1;
    object-position: bottom;
}

.hero-title {
    display: flex;
    flex-flow: column nowrap;
    padding: 0 0.5rem 2rem 0.5rem;
    color: white;
}

.hero-title h1 {
    font-size: 3.5rem;
    background-color: #bea98b;
    margin: 0;
    padding: 0 0.5rem;
}

.hero-title h1 span {
    font-family: StyleScript;
}

.hero-title p {
    font-size: 1.5rem;
    font-style: italic;
    margin: 0;
    text-align: right;
}

/* services */

#services {
    padding: 0 3rem;
}

#services div {
    display: flex;
    flex-flow: row nowrap;
    gap: 3rem;
    align-items: center;
    padding: 2rem 0;
    justify-content: center;
}

#services img {
    width: 250px;
    height: 200px;
    object-fit: cover;
    display: block;
    object-position: bottom;
}

#services div p {
    flex-shrink: 1;
    flex-grow: 1;
    text-align: center;
    font-size: 1.7rem;
    max-width: 900px;
}

#services h2 {
    margin: 0 auto;
    background-color: #457b9d;
    color: white;
    width: max-content;
    padding: 0 1rem;
    font-size: 2rem;
    margin-bottom: 1rem;
}

#services ul {
    margin: 0 auto;
    padding: 0 8rem;
    display: flex;
    flex-flow: row wrap;
    gap: 4rem;
    justify-content: space-evenly;
    list-style: none;
    max-width: 1600px;
}

#services li {
    flex: 1 1 300px;
    text-align: center;
}

#services li h3 {
    color: #457b9d;
}

#services li h3::before,
#services li h3::after {
    content: "•";
}

#services li p {
    font-size: 1rem;
}

/* Appartments */
#appartments-commons {
    padding: 2rem 0;
}

#appartments-commons nav {
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex: 1;
    font-weight: 600;
}

#appartments-commons nav ul {
    list-style: none;
    padding: 0;
    margin: 0 auto;
    display: flex;
    align-items: center;
}

#appartments-commons nav ul li a {
    display: block;
    padding: 10px 30px;
    text-decoration: none;
    color: #457b9d;
    border-color: #457b9d;
    border: 1px solid;
    background-color: white;
    border-radius: 8px 8px 0 0;
    transition:
        background-color 0.2s ease,
        color 0.2s ease;
    font-weight: 800;
}

#appartments-commons nav ul li a.active {
    background-color: #457b9d;
    color: white;
}

#appartments-commons nav ul li a:hover:not(.active) {
    background-color: #457b9d;
    color: white;
}

.tab-section {
    display: none;
}

.tab-section.active {
    display: flex;
    flex-direction: row;
    margin: 2rem 0;
    align-items: flex-start;
}

.tab-section .desc {
    flex: 1;
    padding: 1rem;
    flex-direction: column;
    justify-content: space-between;
    gap: 10px;
}

.tab-section .desc h3 {
    color: white;
    background-color: #457b9d;
    max-width: max-content;
    padding: 0.5rem 0.8rem;
    border-radius: 8px;
    font-size: 24px;
    margin-bottom: 10px;
}

.tab-section .desc h4 {
    font-size: 1rem;
    color: #457b9d;
    font-weight: 800;
    font-size: 18px;
}

.tab-section .desc ul {
    list-style: "- ";
    margin-left: 12px;
}

.tab-section .desc ul li span {
    font-weight: 600;
}

/* Carrousel */
.carrousel {
    flex: 1;
    width: 100%;
    max-width: 100%;
    margin: 0 25px;
    display: flex;
    flex-direction: column;
    margin-top: 16px;
}

/* Partie principale */
.slide {
    position: relative;
    width: 100%;
    max-height: 600px;
    background-color: #f0f0f0;
    overflow: hidden;
    border-radius: 8px;
}

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

/* Titre en haut à droite */
.slide-title {
    position: absolute;
    top: 15px;
    right: 15px;
    background: rgba(0, 0, 0, 0.6);
    color: white;
    padding: 8px 15px;
    border-radius: 4px;
    font-weight: bold;
    z-index: 10;
}

/* Flèches de navigation */
.nav-btn {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    background: rgba(255, 255, 255, 0.7);
    border: none;
    padding: 15px;
    cursor: pointer;
    font-size: 20px;
    transition: 0.3s;
    z-index: 10;
}

.nav-btn:hover {
    background: white;
}
.prev {
    left: 0;
    border-radius: 0 5px 5px 0;
}
.next {
    right: 0;
    border-radius: 5px 0 0 5px;
}

/* Miniatures */
.thumbnails {
    display: flex;
    gap: 10px;
    margin-top: 15px;
    overflow-x: auto; /* Scroll horizontal si trop d'images */
    padding-bottom: 10px;
    scrollbar-width: thin; /* Pour Firefox */
}

.thumb {
    width: 120px;
    height: 80px;
    object-fit: cover;
    flex-shrink: 0;
    cursor: pointer;
    opacity: 0.6;
    transition: 0.2s;
    border-radius: 4px;
    border: 2px solid transparent;
}

.thumbnails::-webkit-scrollbar {
    height: 6px;
}
.thumbnails::-webkit-scrollbar-thumb {
    background: #457b9d;
    border-radius: 10px;
}

.thumb:hover,
.thumb.active {
    opacity: 1;
    border-color: #457b9d;
    transform: scale(1.05);
}

/* Location */
#location {
    margin: 25px;
    display: flex;
    flex-direction: row;
    align-items: center;
}

.location-desc {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    max-width: 50%;
    margin: 0 15px;
}

.location-desc p {
    margin: 5px 0;
}

.location-desc p.location-btn {
    margin: auto;
}

.location-desc h2 {
    margin-bottom: 10px;
}

.location-desc h2,
.location-desc p a {
    text-decoration: none;
    background-color: #457b9d;
    color: white;
    padding: 8px 15px;
    border-radius: 4px;
    font-weight: bold;
    display: inline-block;
}

.location-desc h3,
.location-desc h4 {
    color: #457b9d;
}

.location-desc p span {
    font-weight: bold;
}

.map {
    width: 50%;
}

/* Form */
#contact {
    background-color: #457b9d;
    color: white;
    height: 500px;
    padding: 25px 0;
}

#contact h2 {
    text-align: center;
    margin-bottom: 25px;
}

#contact form {
    display: grid;
    grid-template-columns: 1.5fr 3fr;
    grid-template-rows: auto auto;
    justify-content: center;
    font-weight: 800;
    gap: 8px 50px;
    max-width: 1400px;
    margin: 0 auto;
}

#contact-infos {
    display: flex;
    flex-direction: column;
    gap: 8px;
    margin-top: 25px;
    grid-column: 1;
    grid-row: 1;
}

.btn-desktop {
    grid-column: 1;
    grid-row: 2;
    align-self: start;
    margin-top: 15px;
    background-color: #457b9d;
    color: #ffffff;
    border: 2px solid #ffffff;
    border-radius: 8px;
    padding: 12px 30px;
    font-size: 1rem;
    font-weight: bold;
    cursor: pointer;
}

.btn-responsive {
    display: none;
    background-color: #457b9d;
    color: #ffffff;
    border: 2px solid #ffffff;
    border-radius: 8px;
    padding: 12px 30px;
    font-size: 1rem;
    font-weight: bold;
    cursor: pointer;
    margin: 25px auto 0;
}

#message {
    display: flex;
    flex-direction: column;
    align-items: stretch;
    grid-column: 2;
    grid-row: 1 / 3;
}

.form-row {
    display: flex;
    align-items: center;
    gap: 15px;
}

.form-row label {
    flex-shrink: 0;
    min-width: 100px;
}

.form-row input {
    flex: 1;
    width: 100%;
}

#message textarea {
    flex: 1;
    height: 100%;
    min-height: 0;
    border: none;
    border-radius: 6px;
    padding: 10px 15px;
    font-size: 0.95rem;
    background-color: white;
    resize: none;
}

#contact-infos input {
    border: none;
    border-radius: 6px;
    padding: 10px 15px;
    font-size: 0.95rem;
    background-color: white;
}

#contact-infos input::placeholder,
#message textarea::placeholder {
    color: rgba(255, 255, 255, 0.6);
}

/* Footer */
footer {
    display: flex;
    flex-direction: row;
    justify-content: center;
    align-items: stretch;
    padding: 40px;
    gap: 40px;
}

footer > div {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 15px;
    padding: 0 40px;
    border-right: 2px solid rgba(69, 123, 157, 0.3);
    flex: 1;
    color: #457b9d;
}

footer > div:first-child {
    display: flex;
    align-items: center;
    justify-content: flex-start;
}

footer > div:first-child img {
    max-height: 200px;
    width: auto;
    object-fit: contain;
}

footer > div:nth-child(2),
footer > div:last-child {
    justify-content: center;
}

footer > div:last-child {
    border-right: none;
}

footer ul {
    list-style: none;
}

footer ul li {
    margin-bottom: 5px;
}

footer ul li a {
    text-decoration: none;
    color: #457b9d;
    font-size: 1.2rem;
    font-weight: 600;
    transition: color 0.2s ease;
}

footer ul li a:hover {
    opacity: 0.8;
}

footer h2 {
    font-size: 1.2rem;
    color: #457b9d;
}

footer ul li a i {
    margin-right: 8px;
}

footer nav ul {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

/* Responsive */

/* Hamburger */
.hamburger {
    display: none;
    flex-direction: column;
    gap: 5px;
    background: none;
    border: none;
    cursor: pointer;
    padding: 5px;
    z-index: 1001;
}

.hamburger span {
    display: block;
    width: 25px;
    height: 3px;
    background-color: white;
    border-radius: 2px;
    transition:
        transform 0.3s ease,
        opacity 0.3s ease;
}

.hamburger.active span:nth-child(1) {
    transform: translateY(8px) rotate(45deg);
}

.hamburger.active span:nth-child(2) {
    opacity: 0;
}

.hamburger.active span:nth-child(3) {
    transform: translateY(-8px) rotate(-45deg);
}

/* Tablet */
@media (max-width: 1024px) {
    header {
        padding: 0 20px;
        gap: 20px;
    }

    header nav ul a {
        font-size: 1.3rem;
    }

    .cta {
        font-size: 1rem;
    }

    #services ul {
        padding: 0 2rem;
        gap: 2rem;
    }

    .tab-section.active {
        flex-direction: column;
    }

    .carrousel {
        margin: 0 0 25px;
    }

    #location {
        flex-direction: column;
        margin: 25px 15px;
    }

    .location-desc {
        max-width: 100%;
        margin: 0 0 25px;
    }

    .map {
        width: 100%;
    }

    .btn-desktop {
        display: none;
    }

    .btn-responsive {
        display: block;
    }

    #contact form {
        display: flex;
        flex-direction: column;
        gap: 25px;
    }

    #contact-infos {
        flex: 1;
    }

    #message {
        flex: 1;
    }

    footer {
        padding: 30px 20px;
        gap: 30px;
    }

    footer > div {
        padding: 0 20px;
    }
}

/* Mobile */
@media (max-width: 768px) {
    header {
        position: fixed;
        top: 0;
        left: 0;
        width: 100%;
        height: 70px;
        padding: 10px 15px;
        z-index: 1000;
    }

    header img {
        height: 50px;
    }

    .hamburger {
        display: flex;
    }

    header nav {
        position: fixed;
        top: 0;
        left: 0;
        width: 100vw;
        height: 100vh;
        display: flex;
        flex-direction: column;
        justify-content: center;
        align-items: center;
        gap: 30px;
        background-color: #457b9d;
        z-index: 999;
        transform: translateX(100%);
        transition: transform 0.3s ease;
    }

    header nav.active {
        transform: translateX(0);
    }

    header nav ul {
        flex-direction: column;
        gap: 20px;
        list-style: none;
    }

    header nav ul a {
        font-size: 1.5rem;
    }

    .cta-group {
        display: none;
    }

    body {
        padding-top: 70px;
    }

    .hero-title h1 {
        font-size: 2rem;
    }

    .hero-title p {
        font-size: 1rem;
    }

    #services div {
        flex-direction: column;
        gap: 1rem;
    }

    #services ul {
        padding: 0 1rem;
        flex-direction: column;
    }

    #services li {
        flex: 1 1 auto;
    }

    #services div p {
        font-size: 1.2rem;
    }

    #services h2 {
        font-size: 1.5rem;
    }

    #appartments-commons nav ul {
        flex-direction: column;
    }

    #appartments-commons nav ul li a {
        border-radius: 8px;
    }

    .thumbnails {
        display: none;
    }

    .form-row {
        flex-direction: column;
        gap: 5px;
    }

    .form-row label {
        min-width: unset;
    }

    footer {
        flex-direction: column;
        align-items: center;
        padding: 30px 15px;
    }

    footer > div {
        border-right: none;
        border-bottom: 2px solid rgba(69, 123, 157, 0.3);
        padding: 20px 0;
        align-items: center;
        text-align: center;
    }

    footer > div:last-child {
        border-bottom: none;
    }

    footer > div:first-child {
        align-items: center;
    }
}

/* Small mobile */
@media (max-width: 480px) {
    .hero-title h1 {
        font-size: 1.5rem;
    }

    .hero-title p {
        font-size: 0.9rem;
    }

    #hero {
        height: 60dvh;
    }

    #services {
        padding: 0 1rem;
    }

    #contact {
        height: auto;
        padding: 25px 15px;
    }

    #contact form {
        padding: 0;
    }
}
