
/********************************** General ***********************************/

:root {
    --text-dark: #2f2f2f;
    --text-muted: #586169;
    --grey-light: #f0f0f0;
    --grey-lighter: #f9f9f9;
    --white: #ffffff;

    --pastel-red: #ffb3b3;
    --pastel-peach: #ffd596;
    --pastel-green: #b2e4b2;
    --pastel-teal: #7ad7da;
    --pastel-blue: #b8c0ff;
    --dark-red: #b20000;
    --dark-green: #005c00;
    --dark-teal: #006265;
}

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

body {
    font-family: 'Inter', sans-serif;
    background-color: var(--grey-lighter);
    color: var(--text-dark);
    line-height: 1.6;
}

.grid {
    display: grid;
    justify-content: center;
    grid-template-columns: repeat(auto-fit, minmax(300px, 0.35fr));
    gap: 2rem;
}

.card {
    background: var(--white);
    border-radius: 10px;
    padding: 1.5rem;
    box-shadow: 0 2px 8px rgba(0,0,0,0.2);
    transition: transform 0.4s ease;
    display: flex;
    flex-direction: column;
    min-height: 220px;
    position: relative;
}

.card:hover {
    transform: translateY(-5px);
}

.full-image-card {
    padding: 0;
}

.full-image-card img {
    border-radius: 10px 10px 0 0;
    width: 100%;
    aspect-ratio: 10 / 7;
    object-fit: cover;
}

.full-image-card h3, .full-image-card > p {
    padding: 0rem 1.5rem;
}

.full-image-card h3 {
    margin-top: 1.5rem;
}

.full-image-card > p {
    margin-bottom: 1.5rem;
}

.learn-more {
    color: var(--dark-teal);
    margin-top: auto;
    align-self: flex-end;
    position: relative;
}

.summernote {
    text-align: left;
}

/*********************************** Errors ***********************************/

.alert {
    width: 100vw;
    text-align: center;
    padding: 1rem 0rem;
    position: fixed;
    top: 0;
    transition: top 0.5s ease-in-out;
    z-index: 20;
}

.alert.hidden {
    top: -100px;
    transition: top 0.5s ease-in-out;
}

.alert-danger {
    color: var(--dark-red);
    background-color: var(--pastel-red);
}

.alert-success {
    color: var(--dark-green);
    background-color: var(--pastel-green);
}

.error-page {
    width: 100%;
    height: 100vh;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    text-align: center;
}

/*********************************** Modify ***********************************/

.modify h4, .modify p {
    margin: 1rem 0;
}

.modify-info {
    display: flex;
    flex-wrap: wrap;
    gap: 20px;
    margin: 2rem 0;
}

/*********************************** Header ***********************************/

header {
    background: var(--white);
    height: 80px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1rem 2rem;
    box-shadow: 0 2px 4px rgba(0,0,0,0.2);
    position: sticky;
    top: 0;
    z-index: 3;
}

header img {
    height: 2.5rem;
}

.logo-title {
    display: flex;
    align-items: center;
    gap: 20px;
}

/************************************ Menu ************************************/

nav {
    display: flex;
    flex-direction: row;
    flex-wrap: wrap;
    align-items: center;
}

nav a {
    margin-left: 1.5rem;
    color: inherit;
}

nav .button-red {
    margin-left: 1.5rem;
}

nav a, .underline, nav form {
    padding-top: 0.4em;
    padding-bottom: 0.4em;
    position: relative;
    display: inline-block;
    font-weight: 500;
}

nav form {
    padding: 0px;
}

nav form select {
    padding-top: 0.4em;
    padding-bottom: 0.4em;
}

#nav-toggle {
    display: none;
    flex-direction: column;
    gap: 4px;
    cursor: pointer;
}

#nav-toggle span {
    display: block;
    height: 3px;
    width: 25px;
    background-color: var(--dark-teal);
    border-radius: 2px;
    transition: all 0.3s cubic-bezier(0.4,0,0.2,1);
    position: relative;
}

#nav-toggle.active span:nth-child(1) {
    transform: translateY(7px) rotate(45deg);
}

#nav-toggle.active span:nth-child(2) {
    opacity: 0;
}

#nav-toggle.active span:nth-child(3) {
    transform: translateY(-7px) rotate(-45deg);
}

nav.small-screen {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    position: absolute;
    top: 100%;
    right: 0;
    background: var(--white);
    box-shadow: 0 4px 8px rgba(0,0,0,0.1);
    width: 100%;
    padding: 1rem;
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.4s cubic-bezier(0.4, 0, 0.2, 1), padding 0.3s;
    padding-top: 0;
    padding-bottom: 0;
}

nav.small-screen.active {
    max-height: 500px;
    padding-top: 1rem;
    padding-bottom: 1rem;
    transition: max-height 0.6s cubic-bezier(0.4, 0, 0.2, 1), padding 0.3s;
}

nav.small-screen:not(.active) {
    max-height: 0;
    padding-top: 0;
    padding-bottom: 0;
    overflow: hidden;
}

nav.active a {
    width: fit-content;
}

.lang-select, nav .button2 {
    margin-top: 0.4em;
    margin-bottom: 0.4em;
}

.lang-select {
    width: fit-content;
    margin-left: 1.5rem;
    padding: 0.4em 1em;
    border-radius: 8px;
    border: 1px solid var(--pastel-teal);
    background: var(--white);
    color: var(--dark-teal);
    font-family: inherit;
    font-size: 1rem;
    font-weight: 500;
    box-shadow: 0 2px 6px rgba(0,0,0,0.05);
    transition: border-color 0.2s, box-shadow 0.2s;
    appearance: none;
    cursor: pointer;
    outline: none;
    position: relative;
}

.lang-select:focus, .lang-select:hover {
    border-color: var(--dark-teal);
    box-shadow: 0 4px 12px rgba(0,98,101,0.08);
}

/***************************** Texts and Buttons ******************************/

h2:has(img), h3:has(img), h4:has(img) {
    display: flex;
    flex-direction: row;
    flex-wrap: wrap;
    gap: 5px;
}

h1 {
    text-align: center;
    margin-top: 2rem;
    font-size: 2rem;
}

img[src="/images/plus-solid.svg"],
img[src="/images/xmark-solid.svg"] {
    position: relative;
    transform: translateY(5px)
}

h1 img[src="/images/plus-solid.svg"],
h1 img[src="/images/xmark-solid.svg"],
.section-title img[src="/images/plus-solid.svg"],
.section-title img[src="/images/xmark-solid.svg"] {
    height: 2rem;
    width: 2rem;
}

button:has(img) {
    padding: 0;
    margin: 0;
    background-color: inherit;
    border: none;
    cursor: pointer;
}

h1 img[src="/images/pen-solid.svg"] {
    height: 1.7rem;
    width: 1.7rem;
}

.section-title img[src="/images/pen-solid.svg"],
.subsection-title img[src="/images/plus-solid.svg"],
.subsection-title img[src="/images/xmark-solid.svg"] {
    height: 1.5rem;
    width: 1.5rem;
}

.subsection-title img[src="/images/pen-solid.svg"],
.subsection-title img[src="/images/trash-solid.svg"] {
    height: 1.2rem;
    width: 1.2rem;
}

li img[src="/images/pen-solid.svg"],
li img[src="/images/trash-solid.svg"] {
    width: 1rem;
    height: 1rem;
    object-fit: none;
    border-radius: 0;
    transform: translateY(2px);
}

.card img[src="/images/trash-solid.svg"] {
    width: 2.2rem;
    height: 2.2rem;
    object-fit: none;
    border-radius: 0.5rem;
    position: absolute;
    top: 1rem;
    right: 1rem;
    background-color: rgba(255, 255, 255, 0.9);
    padding: 0.5rem;
}

.card img[src="/images/pen-solid.svg"] {
    width: 2.2rem;
    height: 2.2rem;
    object-fit: none;
    border-radius: 0.5rem;
    position: absolute;
    top: 1rem;
    right: 3.7rem;
    background-color: rgba(255, 255, 255, 0.9);
    padding: 0.5rem;
}

svg {
    height: 1rem;
}

p {
    text-align: justify;
}

p.left {
    text-align: left;
}

p.center {
    text-align: center;
}

a {
    color: var(--dark-teal);
    text-decoration: none;
    cursor: pointer;
}

a:hover {
    text-decoration: underline;
}

button.button1 {
    border: none;
    font-family: 'Inter', sans-serif;
}

.button1 {
    width: fit-content;
    display: inline-block;
    padding: 0.75rem 1.5rem;
    background: var(--dark-teal);
    color: var(--white);
    border-radius: 10px;
    text-decoration: none;
    font-weight: 600;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.button1:hover {
    text-decoration: none;
    transform: scale(1.02);
    box-shadow: 0 8px 16px rgba(0,0,0,0.3);
}

.button2 {
    width: fit-content;
    background: var(--pastel-teal);
    color: var(--dark-teal);
    border-radius: 10px;
    border: none;
    padding: 0.4em 1em;
    transition: background 0.25s ease-in-out, color 0.25s ease-in-out;
}

.button2:hover {
    background: var(--dark-teal);
    color: var(--white);
    text-decoration: none;
}

.card .button2 {
    margin-top: 0.6rem;
    align-self: flex-end;
    position: relative;
}

.button3 {
    width: fit-content;
    background: var(--dark-teal);
    color: var(--white);
    border-radius: 10px;
    border: none;
    box-shadow: 0 8px 16px rgba(0,0,0,0.3);
    padding: 0.4em 1em;
    transition: transform 0.2s ease;
    overflow: visible;
    position: relative;
    z-index: 2;
}

.button3:hover {
    transform: scale(1.1);
}

.button-red {
    background: var(--dark-red);
    color: var(--white);
    font-size: 1rem;
    padding: 0.6rem 1rem;
    border-radius: 10px;
    border: none;
    transition: background 0.2s ease-in-out, color 0.2s ease-in-out;
}

.button-red:hover {
    background: var(--pastel-red);
    color: var(--dark-red);
}

ul {
    list-style-position: inside;
    margin: 10px 0;
}

.warning {
    font-weight: bold;
    margin-bottom: 15px;
}

.underline:hover {
    text-decoration: none;
}

.underline::after {
    content: '';
    position: absolute;
    left: 50%;
    bottom: 0;
    transform: translateX(-50%) scaleX(0) translateY(-0.4em);
    transform-origin: center;
    width: 100%;
    height: 2px;
    background: var(--pastel-teal);
    transition: transform 0.2s ease;
}

.underline:hover::after {
    transform: translateX(-50%) scaleX(1) translateY(-0.4em);
}

/******************************** Hero Section ********************************/

.hero {
    background: linear-gradient(135deg, var(--pastel-blue), var(--pastel-peach));
    padding: 4rem 2rem;
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    position: relative;
    overflow: hidden;
}

.hero::before {
    content: "";
    position: absolute;
    inset: 0;
    background: url('/images/banner_1920_600.png') center/cover no-repeat;
    opacity: 0.2;
    z-index: 0;
    pointer-events: none;
}

.hero-text {
    max-width: 600px;
    position: relative;
    z-index: 1;
}

.hero h1 {
    font-size: 2.5rem;
    margin-bottom: 1rem;
    text-align: left;
}

.hero p {
    font-size: 1.2rem;
    margin-bottom: 2rem;
}

@media (max-width: 768px) {
    .hero {
        flex-direction: column;
        text-align: center;
    }
    .hero h1, .hero p {
        text-align: center;
    }
}

/********************************** Sections **********************************/

section {
    padding: 4rem 2rem;
    max-width: 1200px;
    margin: auto;
    scroll-margin-top: 100px;
}

section.publi-section, section.resources-section {
    padding: 1rem 2rem;
}

.section-title {
    border-left: 6px solid var(--pastel-teal);
    font-size: 2rem;
}

.subsection-title {
    border-left: 6px solid var(--pastel-peach);
    font-size: 1.3rem;
}

.section-title, .subsection-title {
    width: fit-content;
    margin-bottom: 2rem;
    padding-left: 1rem;
}

.about {
    display: flex;
    align-items: flex-end;
    flex-wrap: wrap;
    gap: 2rem;
}

.about-text {
    flex: 1 1 60%;
}

.about-image {
    flex: 1 1 35%;
    max-width: 500px;
    min-width: 330px;
    border-radius: 10px;
    aspect-ratio: 10 / 7;
    object-fit: cover;
}

/*********************************** Footer ***********************************/

.footer {
    background: var(--grey-light);
    padding: 2rem;
    display: flex;
    flex-wrap: wrap;
    justify-content: space-between;
    color: var(--text-muted);
    font-size: 0.9rem;
}

.footer div {
    display: flex;
    flex-direction: column;
}

.footer div img {
    height: 70px;
    margin-top: 10px;
    object-fit: scale-down;
}

.footer div a {
    width: fit-content;
    color: inherit;
}

/********************************** Profiles **********************************/

.staff-card {
    justify-content: center;
    align-items: center;
    text-align: center;
}

.staff-card p {
    text-align: center;
}

.staff-card img {
    width: 150px;
    height: 150px;
    object-fit: cover;
    border-radius: 50%;
}

.profile-container {
    display: flex;
    flex-direction: row;
    align-items: center;
    gap: 20px;
}

.profile-container img {
    width: 250px;
    height: 250px;
    object-fit: cover;
    aspect-ratio: 1/1;
    border-radius: 50%;
}

.profile-infos {
    display: flex;
    flex-direction: column;
}

@media (max-width: 650px) {
    .profile-container {
        flex-direction: column;
        gap: 20px;
    }

    .profile-container p {
        text-align: center;
    }
}

/********************************** Research **********************************/

.project {
    display: flex;
    flex-direction: row;
    gap: 20px;
    margin-bottom: 2rem;
}

.project img {
    width: 300px;
    object-fit: contain;
}

@media (max-width: 900px) {
    .project {
        flex-direction: column;
    }
}

.publi .dropdown {
    display: flex;
    align-items: flex-start;
    flex-wrap: wrap;
    gap: 20px;
}

.dropdown {
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.4s cubic-bezier(0.4, 0, 0.2, 1), padding 0.3s;
    padding-top: 0;
    padding-bottom: 0;
}

.dropdown.active {
    max-height: 500px;
    transition: max-height 0.6s cubic-bezier(0.4, 0, 0.2, 1), padding 0.3s;
    margin-top: 20px;
    overflow: auto;
}

.dropdown-text {
    flex: 1 1 70%;
}

.dropdown-image {
    flex: 1 1 10%;
    max-width: 330px;
    min-width: 230px;
    border-radius: 10px;
}

.publi, .publi-visible {
    display: flex;
    flex-direction: column;
}

.arrow {
    width: fit-content;
    height: fit-content;
    align-self: flex-end;
    position: relative;
    margin: 5px;
    padding-left: 10px;
    padding-top: 10px;
}

.arrow:hover {
    cursor: pointer;
}

.arrow span {
    display: block;
    height: 5px;
    width: 25px;
    background-color: var(--dark-teal);
    border-radius: 2px;
    transition: all 0.3s cubic-bezier(0.4,0,0.2,1);
    position: relative;
}

.arrow span:nth-child(1) {
    transform: translateY(-2px) translateX(-12px) rotate(45deg);
}

.arrow span:nth-child(2) {
    transform: translateY(-7px) translateX(3px) rotate(-45deg);
}

.arrow.active span:nth-child(1) {
    transform: translateY(-2px) translateX(-12px) rotate(-45deg);
}

.arrow.active span:nth-child(2) {
    transform: translateY(-7px) translateX(3px) rotate(45deg);
}

.modify-info > img {
    max-width: 330px;
    min-width: 230px;
    object-fit: contain;
}

/********************************** Machines **********************************/

img.about-machine {
    width: 100%;

}

/********************************** Contact ***********************************/

form.contact-form {
    background: var(--white);
    border-radius: 12px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.2);
    padding: 2rem;
    max-width: 500px;
    margin: 2rem auto 0 auto;
    display: flex;
    flex-direction: column;
    gap: 1.2rem;
}

form.contact-form label {
    font-weight: 500;
    margin-bottom: 0.4em;
    color: var(--dark-teal);
}

form.contact-form .field input:not(input[type="file"]),
form.contact-form textarea,
form.modify input:not(input[type="file"]) {
    border: 1px solid var(--pastel-teal);
    border-radius: 8px;
    padding: 0.7em 1em;
    font-size: 1rem;
    background: var(--grey-lighter);
    color: var(--text-dark);
    transition: border-color 0.2s;
    width: 100%;
    box-sizing: border-box;
}

form.modify input {
    width: fit-content;
}

form.contact-form .field input:focus,
form.contact-form textarea:focus,
form.modify input:focus {
    border-color: var(--dark-teal);
    outline: none;
}

form.contact-form textarea {
    min-height: 100px;
    resize: vertical;
}

form.contact-form .checkbox {
    align-items: flex-start;
    gap: 0.5em;
    font-size: 0.97em;
}

form.contact-form button[type="submit"] {
    background: var(--dark-teal);
    color: var(--white);
    border: none;
    border-radius: 8px;
    padding: 0.8em 1.5em;
    font-size: 1.1rem;
    font-weight: 600;
    cursor: pointer;
    transition: background 0.3s;
    margin-top: 0.5em;
}

form.contact-form button[type="submit"]:hover {
    background: var(--pastel-teal);
    color: var(--dark-teal);
}

/************************************Popup ************************************/

.popup-background {
    position: fixed;
    top: 0; left: 0; right: 0; bottom: 0;
    background: rgba(0,0,0,0.7);
    z-index: 10;
}

.note-modal-backdrop {
    z-index: 9;
}

.popup-container {
    width: 100%;
    height: 100%;
    display: flex;
    justify-content: center;
    align-items: center;
}

.popup {
    min-width: 300px;
    max-width: 900px;
    max-height: 90%;
    background: var(--grey-lighter);
    padding: 2em;
    margin: 0 5%;
    border-radius: 8px;
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    overflow: auto;
}

.popup-div {
    width: 100%;
    display: flex;
    justify-content: center;
    flex-direction: row;
    flex-wrap: wrap;
    align-items: flex-end;
    gap: 10px;
}

.popup img {
    width: 65px;
    height: 65px;
    object-fit: cover;
    border-radius: 50%;
}

.bigger-image img {
    height: 150px;
    width: fit-content;
    object-fit: contain;
    border-radius: 0;
}

.popup h3 {
    color: var(--dark-teal);
    margin-bottom: 15px;
}

.two-button-choice {
    display: flex;
    flex-direction: row;
    gap: 10px;
    margin-top: 15px;
}

.popup .two-button-choice button[type="button"],
.popup .two-button-choice button[type="submit"].button-red {
    background: var(--dark-red);
    color: var(--white);
    transition: background 0.2s ease-in-out, color 0.2s ease-in-out;
}

.popup .two-button-choice button[type="submit"] {
    background: var(--dark-green);
    color: var(--white);
    transition: background 0.2s ease-in-out, color 0.2s ease-in-out;
}

.popup .two-button-choice button[type="button"]:hover,
.popup .two-button-choice button[type="submit"].button-red:hover {
    background: var(--pastel-red);
    color: var(--dark-red);
}

.popup .two-button-choice button[type="submit"]:hover {
    background: var(--pastel-green);
    color: var(--dark-green);
}

/************************************ Form ************************************/

.form {
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    text-align: center;
}

.form .field {
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    margin: 10px 0;
}

.form label {
    font-weight: 500;
    color: var(--dark-teal);
}

.form label:not([class="checkbox-label"]) {
    margin-bottom: 0.4em;
}

.form .field input:not([type="file"]),
.form textarea,
.form select {
    border: 1px solid var(--pastel-teal);
    border-radius: 10px;
    padding: 0.7em 1em;
    font-size: 1rem;
    background: var(--grey-lighter);
    color: var(--text-dark);
    transition: border-color 0.2s;
    width: 100%;
    box-sizing: border-box;
}

.form .field input:focus,
.form textarea:focus,
.form select:focus {
    border-color: var(--dark-teal);
    outline: none;
}

.form textarea {
    min-height: 100px;
    resize: vertical;
}

.form .checkbox {
    margin: 10px 0;
    height: fit-content;
}

.form .checkbox input {
    height: 1rem;
    width: 1rem;
    margin: 4px;
}

.form .two-button-choice button {
    border: none;
    border-radius: 8px;
    padding: 0.5em 1em;
    font-size: 1.1rem;
    font-weight: 600;
    cursor: pointer;
    transition: background 0.3s, box-shadow 0.3s;
    margin-top: 0.5em;
    box-shadow: 0 2px 6px rgba(0,0,0,0.07);
}

.form button[type="submit"] {
    background: var(--dark-teal);
    color: var(--white);
    border: none;
    border-radius: 8px;
    padding: 0.8em 1.5em;
    font-size: 1.1rem;
    font-weight: 600;
    cursor: pointer;
    transition: background 0.3s, box-shadow 0.3s;
    margin-top: 0.5em;
    box-shadow: 0 2px 6px rgba(0,0,0,0.07);
}

.form button[type="submit"]:hover {
    background: var(--pastel-teal);
    color: var(--dark-teal);
}

/********************************** Accounts **********************************/

.profile-container.account {
    align-items: flex-start;
}

section:has(.account-section) {
    padding: 1rem 2rem;
}

section:has(.account-section .arrow.active) {
    padding: 4rem 2rem;
}

.account-section {
    display: flex;
    align-items: flex-start;
    flex-wrap: wrap;
}

.account-section .arrow {
    align-self: flex-start;
    margin-top: 15px;
    margin-left: 15px;
}

#dropInfos {
    display: flex;
    flex-direction: column;
}

.all-publis {
    text-align: left;
}

.table-container {
    display: flex;
    flex-direction: column;
    overflow-x: auto;
}

table, th, td {
    border-bottom: 1px solid black;
    border-collapse: collapse;
}

table {
    width: 100%;
}

th, td {
    padding: 15px;
    text-align: left;
}

.user-image th:first-child {
    width: 50px;
}

.user th:last-child, .user td:last-child {
    width: 1px;
    white-space: nowrap;
    text-align: left;
}

tr:nth-child(even) {
    background-color: #D6EEEE;
}

.user img {
    width: 50px;
    height: 50px;
    object-fit: cover;
    border-radius: 50%;
}

/********************************** Calendar **********************************/

#calendar a {
    color: inherit;
}

.fc-event {
    flex-direction: column;
    justify-content: flex-start;
    align-items: flex-start;
}

.fc-event div, .fc-event div > * {
    display: flex;
    flex-wrap: wrap;
    width: 100%;
    height: fit-content;
}

.fc-daygrid-event {
    white-space: wrap;
}
