:root {
    --color-low-dark: #1b1b1b;
    --color-low-white: #efefef;
    --color-white: #ffffff;
    --color-blue: #8AA0B7;
    --filter-yellow: #FCFBF2;
    /* masque de fusion: produit & 100% opacity */
    --filter-yellow-rgba: rgba(252, 251, 242, 0.99);
}

.d-flex {
    display: flex !important;
}

.mx-l-auto {
    margin-left: auto !important;
}

/* Load local TrueType font placed at the same level as index.html */
@font-face {
    font-family: 'FREESCPT';
    src: url('../innerfonts/FREESCPT.TTF') format('truetype');
    font-weight: normal;
    font-style: normal;
    font-display: swap;
}

.Raleway {
    font-family: "Raleway", sans-serif;
    font-optical-sizing: auto;
    font-weight: 400;
    font-style: normal;
}

/* Page base styles (mobile-first) */
body {
    background-size: contain;
    background-image: url('../../images/MD-fond-papier.png');
    color: var(--color-blue) !important;
    font-family: 'FREESCPT', 'Raleway', Verdana, 'DejaVu Sans', 'Bitstream Vera Sans', Geneva, sans-serif !important;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    margin: 0;
    padding: 0;
}

/* Yellow translucent overlay that acts like a color filter but doesn't block clicks */
body::before {
    content: "";
    position: fixed;
    inset: 0;
    background: var(--filter-yellow-rgba);
    pointer-events: none;
    mix-blend-mode: multiply;
    z-index: 9998;
}

#main-page {
    min-height: 100vh;
    /* Ensure it takes full viewport height */
    flex-direction: column;
}

#main-page .container {
    display: table;
    margin: auto;
}

#main-page .container .row {
    padding-top: 10vh;
}

/* Hero image sizing: 70% width on md and up, 100% on smaller screens */
.hero-image {
    width: 100%;
    height: auto;
    object-fit: cover;
    margin-right: 10%;
}

/* @media (min-width: 768px) { */
@media (min-width: 1199px) {
    .hero-image {
        width: 60%;
    }
}

@media (min-width: 978px) {
    .d-off-to-highscreen {
        display: none !important;
    }
}

.align-main-title {
    display: flex;
    align-items: flex-start;
    flex-direction: column;
    padding-left: 1rem;
}

#main-page .container .row .col-md-6 h1 {
    font-size: 42px;
    /* font-weight: bold; */
    text-transform: uppercase;
}

#comment,
#pourquoi,
.div7,
.div11,
.div13,
.div14 {
    padding-top: 5vh;
    padding-bottom: 5vh;
}

.div10 {
    padding-top: 5vh;
}

/* ============================== MENU ===================================== */
#page-wrapper #header {
    background: none;
    height: 0;
}

#nav>ul {
    box-shadow: inset 0px 0px 1px 1px var(--color-blue);
}

#nav>ul>li:first-child {
    padding-right: 18vw;
}

#nav>ul>li>a {
    color: var(--color-blue);
    font-weight: bold;
    font-size: 1rem;
    padding: 0.25rem 0.5rem;
}

/* Make the top-level UL a horizontal flex container and center items vertically */
#nav>ul {
    display: flex;
    flex-direction: row;
    align-items: center;
    /* vertical centering of LI within the UL */
    justify-content: center;
    /* keep menu centered horizontally */
    gap: 1rem;
    padding: 0.5rem 1rem;
    /* --- */
    max-width: 65vw;
    width: 100%;
    padding-right: calc(var(--bs-gutter-x) * .5);
    padding-left: calc(var(--bs-gutter-x) * .5);
    margin-right: auto;
    margin-left: auto;
}

/* Ensure top-level LIs are also flex containers so their children (links) are centered */
#nav>ul>li {
    display: flex;
    align-items: center;
    padding: 0;
}

#nav>ul>li h1 {
    margin-bottom: 0;
}

/* Reset nested ULs (dropdowns) so they keep their original block behaviour */
#nav>ul>li>ul,
#nav .dropotron {
    display: block;
}

#nav>ul>li>a {
    display: inline-flex;
    align-items: center;
    padding: 0.5rem 0.75rem;
}

#nav>ul>li:hover>a:hover {
    color: #4a637e;
}

#navPanel nav a:first-child {
    margin-top: 1.5vh;
    margin-bottom: 1.5vh;
    color: var(--color-blue);
}

/* Fixed nav on scroll */
#nav.nav-fixed {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    z-index: 20000;
    /* user requested */
    -webkit-backface-visibility: hidden;
    backface-visibility: hidden;
}

/* Slide down animation when nav becomes fixed */
@keyframes mj-nav-slide-down {
    from {
        transform: translateY(-100%);
        opacity: 0;
    }

    to {
        transform: translateY(0);
        opacity: 1;
    }
}

#nav.nav-fixed {
    animation: mj-nav-slide-down 300ms ease forwards;
}

/* Backdrop blur and translucent background for the top-level UL when fixed */
#nav.nav-fixed>ul {
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    background-color: rgba(252, 251, 242, 0.69);
    transition: background-color 250ms ease, backdrop-filter 250ms ease;
    padding: 0%;
}

#nav.nav-fixed>ul li {
    height: 3rem;
}

#nav.nav-fixed>ul li a {
    height: inherit;
}

/* Placeholder used to avoid layout jump when nav is removed from flow */
#nav-placeholder {
    display: none;
    width: 100%;
    height: 0;
}

/* When placeholder is shown it will occupy the same height as the nav */
#nav-placeholder.show {
    display: block;
}

/* ================================== ZONE CONTACT ================================= */
#contact {
    padding-top: 5vh !important;
    padding-bottom: 10vh !important;
}

#contact h2 {
    font-size: 45px;
    text-align: center;
}

#contact hr {
    margin: 2em 0 2em 0;
}

form {
    transition: opacity 0.5s ease;
    color: var(--color-blue);
}

.form-group {
    position: relative;
    margin-bottom: 1rem;
}

#contactForm input,
#contactForm textarea {
    background-color: white;
    border-radius: 18px;
    box-shadow: inset 0px 0px 1px 0px #A9C8E8;
}

#contactForm input:focus-visible,
#contactForm textarea:focus-visible {
    outline: none;
    border: 1px solid #A9C8E8;
}

#contactForm ::placeholder {
    color: var(--color-blue);
    opacity: 1;
}

input,
textarea {
    width: 100%;
    padding: 12px 10px;
    border: 1px solid #A9C8E8;
    border-radius: 10px;
    font-size: 14px;
    background: none;
}

label {
    position: absolute;
    top: 12px;
    left: 12px;
    color: var(--color-blue);
    font-size: 14px;
    pointer-events: none;
    transition: 0.2s ease all;
    background-color: #fff;
}

#contactForm label {
    padding: 0 8px;
    font-weight: 400;
    margin: 0;
    color: var(--color-blue);
    border-radius: 10px;
}

input:focus+label,
input:not(:placeholder-shown)+label,
textarea:focus+label,
textarea:not(:placeholder-shown)+label {
    top: -8px;
    left: 10px;
    font-size: 12px;
    color: #6c7a89;
}

#contactForm button {
    background-color: #A9C8E8;
    border-radius: 18px;
    color: white;
    padding: 10px;
    border: none;
    cursor: pointer;
    font-size: 16px;
    width: 100%;
    transition: all 0.3s ease, transform 0.1s ease, box-shadow 0.1s ease;
}

#contactForm button:hover {
    background-color: var(--color-blue);
}

#contactForm button:active {
    transform: scale(0.98);
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
}

#contactForm form.submitted {
    opacity: 0.5;
}