/* =========================
   RESET
========================= */

/* http://meyerweb.com/eric/tools/css/reset/ 
   v2.0 | 20110126
   License: none (public domain)
*/

html, body, div, span, applet, object, iframe,
h1, h2, h3, h4, h5, h6, p, blockquote, pre,
a, abbr, acronym, address, big, cite, code,
del, dfn, em, img, ins, kbd, q, s, samp,
small, strike, strong, sub, sup, tt, var,
b, u, i, center,
dl, dt, dd, ol, ul, li,
fieldset, form, label, legend,
table, caption, tbody, tfoot, thead, tr, th, td,
article, aside, canvas, details, embed, 
figure, figcaption, footer, header, hgroup, 
menu, nav, output, ruby, section, summary,
time, mark, audio, video {
	margin: 0;
	padding: 0;
	border: 0;
	font-size: 100%;
	font: inherit;
	vertical-align: baseline;
}
/* HTML5 display-role reset for older browsers */
article, aside, details, figcaption, figure, 
footer, header, hgroup, menu, nav, section {
	display: block;
}
body {
	line-height: 1;
}
ol, ul {
	list-style: none;
}
blockquote, q {
	quotes: none;
}
blockquote:before, blockquote:after,
q:before, q:after {
	content: '';
	content: none;
}
table {
	border-collapse: collapse;
	border-spacing: 0;
}


/* =========================
   GLOBAL STYLES
========================= */

html {
    font-size: 10px;
    scroll-behavior: smooth;
}

body {
    font-family: 'Roboto', Arial, sans-serif;
    color: #07090F;
    font-size: 1.6rem;
    line-height:2rem;
}

h1, h2, h3, h4, h5, button, nav a, header section div a {
    font-family: 'Josefin Sans', Arial, sans-serif;
}

h1 {
    font-size: 3.6rem;
}

h2 {
    font-size: 3rem;
    font-weight: 800;
    margin: 3rem 0;
}

h3 {
    font-size: 2.6rem;
    font-weight: 600;
    margin: 3rem 0;
}

h4 {
    font-size: 2rem;
    margin: 0.6rem 0;
}

h5 {
    font-size:1.8rem;
    margin: 0.4rem 0;
}

strong {
    font-weight: 600;
}

a {
    color: #0b8293;
    text-decoration: none;
    cursor: pointer;
}

a:not(nav a) {
    font-weight:600;
}

a:hover {
    color: rgba(11, 130, 147, 0.25);
}

i {
    font-style: italic;
}

main {
    min-height:58vh;
}

.hidden {
    display:none;
}


/* =========================
   MOBILE VERSION
========================= */

main:not(.tarifs):not(.asacontact):not(.activites-scientifiques):not(.schema) > section:not(.caroussel):not(.list) h4,
main > article h4 {
    border-left: 3px solid #F15A22;
    padding-left: 1rem;
}

.burger-menu-toggle {
    display: block;
}

.burger-bar {
    display:block;
    width: 30px;
    height: 3px;
    background-color: #0b8293; 
    margin: 6px 0;
    transition: all 0.3s ease;
}

header.nav-open .burger-menu-toggle .burger-bar:nth-child(2) {
    transform: translateY(9px) rotate(45deg);
}

header.nav-open .burger-bar {
    background-color: #fff; /* Blanc quand le menu est ouvert */
}

/* La barre du MILIEU (3ème enfant) */
header.nav-open .burger-menu-toggle .burger-bar:nth-child(3) {
    opacity: 0;
    transform: translateX(10px);
}

/* La barre du BAS (4ème enfant) */
header.nav-open .burger-menu-toggle .burger-bar:nth-child(4) {
    transform: translateY(-9px) rotate(-45deg);
}

header {
    display: flex;
    flex-direction: column;
    position: relative;
    top: 0;
    left: 0;
    width: 100%;
    /* sheight: 19.4rem; */
    z-index:1000;
    background-color: #fff;
    box-shadow: 0 4px 6px -1px rgb(0 0 0 / 0.1);
}

header section div .site-logo {
    display: flex;
    justify-content: center;
}

header section div .site-logo img {
    height: 10rem;
}

header section {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    grid-template-rows: repeat(2, auto);
    justify-content: center;
    row-gap: 1rem;
    padding: 1rem 0.5rem;
}

header section div:first-of-type {
    grid-column: 2/3;
    grid-row:1/2;
}

header > section > div:nth-of-type(2) img {
    width: 5rem;
}

header > section > div:nth-of-type(2) button {
    border: none;
    background-color: #ffffff;
    margin: 0 1rem ;
}

header > section > div:nth-of-type(2) a {
    font-size: 1.6rem;
    text-decoration: none;
    color: #0b8293;
    font-weight: 600;
    padding: 8px 15px;
    /* margin-left: 10px; */
    border-radius: 4px;
    border: 2px solid rgba(11, 130, 147, 0);
    background-color: rgba(11, 130, 147, 0.25);
    text-align: center;
}

header > section > div:nth-of-type(2) a:hover {
    border: 2px solid rgba(11, 130, 147, 0.25);
    background-color: #FFFFFF;
}

header section div:nth-of-type(2) {
    grid-column:1/4;
    grid-row:2/3;
    display: grid;
    grid-template-columns: repeat(2, auto);
    grid-template-rows: repeat(3, auto);
    justify-content: center;
    align-items: center;
    row-gap:0.7rem;
    column-gap: 0.8rem;
}

header section div:nth-of-type(2) a:first-of-type {
    grid-column:1/2;
    grid-row:1/2;
}

header section div:nth-of-type(2) a:nth-of-type(2) {
    grid-column:2/3;
    grid-row:1/2;
}

header section div:nth-of-type(2) button:first-of-type {
    grid-column:1/3;
    grid-row:2/3;
}

header section div:nth-of-type(2) button:last-of-type {
    grid-column:1/3;
    grid-row:3/4;
    /* width: 4.5rem; */
    padding: 0.5rem;
    border: 2px solid rgba(11,130,147, 0);
    border-radius: 6px;
    display: flex;
    align-items: center;
    background-color: rgba(11, 130, 147, 0.25);
}

header section div:nth-of-type(2) button:last-of-type:hover {
    background-color: #FFFFFF;
    border: 2px solid rgba(11,130,147, 0.25);
}

header section div:nth-of-type(2) button:hover {
    cursor: pointer;
}

header section div:nth-of-type(2) button:last-of-type img {
    width: 100%;
}

header section button {
    grid-column:3/4;
    grid-row:1/2;
    justify-self: center;
}

header > nav {
    position: fixed;
    top: 0; 
    height: 100vh;
    right: -100%; 
    left: auto;
    width: 90%;
    padding: 0; 
    background-color: #f15a22; 
    z-index: 999;
    box-shadow: 0 4px 6px -1px rgb(0 0 0 / 0.1);
    max-width: 400px;
    transition: right 0.4s cubic-bezier(0.25, 0.46, 0.45, 0.94);
}

header.nav-open > nav {
    right: 0;
}

header > nav > ul {
    height: 100%;
    padding-top: 100px; 
    overflow-y: auto;
    display: flex;
    flex-direction: column;
}

header > nav > ul > li {
    width: 100%;
    border-bottom: 1px solid rgba(255, 255, 255, 0.2);
}

nav > ul > li > a {
    color: #fff;
    background-color:#F15A22;
    padding: 1.5rem 1rem;
    font-size: 1.8rem;
    display: block;
    text-align: center;
}

nav > ul > li:has(.dropdown-menu) > a::after {
    content: '▼';
    position: absolute;
    right: 20px;
    font-size: 0.8rem;
    transition: transform 0.3s ease;
}

nav > ul > li:has(.dropdown-menu.active) > a::after {
    transform: rotate(180deg);
}

.dropdown-menu {
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.3s ease;
    padding: 0;
    background-color: #FACCBB;
}

.dropdown-menu.active {
    max-height: 500px;
}

.dropdown-menu li {
    list-style: none;
    border-bottom: 1px solid #ddd;
}

.dropdown-menu li:last-child {
    border-bottom: none;
}

.dropdown-menu li a {
    color: #07090F;
    padding: 1rem;
    display: block;
    font-weight:400;
    text-decoration: none;
    transition: background-color 0.2s ease;
}

.dropdown-menu li a:hover {
    background-color: #e8e8e8;
}

/* Masquer les éléments sans dropdown */
nav > ul > li:not(:has(.dropdown-menu)) > a {
    cursor: pointer;
}

/* CSS FOR MAIN */
main {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    margin-bottom: 8rem;
}

main > .background-image {
    z-index:-10;
    width: 100%;
    background-image: url('../IMAGES/banniere-asa-3.png');
    background-repeat: no-repeat;
    background-size: cover; 
    background-position: center center;
    padding-top: 30%;
}

main .background-image p {
    background-color: rgba(255, 255, 255, 0.85);
    box-shadow: 0 4px 6px -1px rgb(0 0 0 / 0.1), 0 2px 4px -2px rgb(0 0 0 / 0.1);
    padding: 2rem 1.5rem;
    font-size: 1.6rem;
    border-radius: 6px;
    width:fit-content;
    margin: 0 .5rem 2rem .5rem;
    text-align: center;
}

main > .list {
    width: 95vw;
    display: flex;
    flex-wrap: wrap;
    justify-content: space-around;
    /* align-items: stretch; */
    align-content:stretch;
    row-gap: 5rem;
    column-gap:2rem;
    margin: 6rem 0;
    
}

main > .list > article {
    display: flex;
    flex-direction: column;
    justify-content: flex-start;
    width: 35rem;
    padding: 1.2rem;
    background-color: #F8F8F8;
    border-radius: 6px;
    border: 1px solid #e9e9e9;
    box-shadow: 0 4px 6px -1px rgb(0 0 0 / 0.1), 0 2px 4px -2px rgb(0 0 0 / 0.1);
    box-sizing: border-box;
}

main > .list > article > div > h4 {
    margin:1.4rem 0;
}

main > .list > article > div {
    flex-grow:1;
}

main > .list > article > img {
    width: 100%;
    height: 20rem;
    border-radius: 6px;
}

main > .list > article p {
    margin: 0.5rem 0;
    text-align: justify;
    hyphens: auto;
    word-break: break-word;
}

main > .list > article > a {
    text-decoration: none;
    /* margin: 0.6rem 0; */
    padding: 0.8rem 1rem;
    align-self: flex-end;
    background-color: rgba(11, 130, 147, 0.25);
    color: #0b8293;
    font-weight: 600;
    border-radius: 6px;
    border: 2px solid rgba(11, 130, 147, 0);
}

main > .list > article > a:hover {
    background-color: #F8F8F8;
    border: 2px solid rgba(11, 130, 147, 0.25);
}

/* CSS FOR CAROUSSEL */
.caroussel {
    width: 100%;
    overflow: hidden;
    position: relative;
    box-shadow: 0 4px 6px -1px rgb(0 0 0 / 0.1), 0 2px 4px -2px rgb(0 0 0 / 0.1);
}

.caroussel .slides h4 {
    margin-top:0;
}

.slides {
    position: relative;
    width: 400%;
    height: 35rem;
    display:flex;
    transition: transform 0.5s ease-in-out;
}

.slide {
    /* position: absolute; */
    width: 25%;
    flex-shrink:0;
    height: 100%;
    /* opacity: 0; */
    transition: opacity 0.5s ease;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
}

.slide p {
    text-align: center;
    font-size:1.4rem;
    width:80%;
}

.slide.active {
    opacity: 1;
}

.slide-1, .slide-3 {
    background-color: rgba(241, 90, 34, 0.25);
}

.slide-2, .slide-4 {
    background-color: rgba(11, 130, 147, 0.25);
}

.slides article h4 {
    margin: 2rem 0;
}

.caroussel button {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    background-color: rgba(255, 255, 255, 0.7);
    border: none;
    font-size: 2rem;
    cursor: pointer;
    padding: 0.5rem 1rem;
    border-radius: 6px;
    transition: background-color 0.3s ease;
    z-index: 10;
}

button.prev {
    left: 1rem;
}

button.next {
    right: 1rem;
}

/* CSS FOR CONTACT SECTION */
.contact {
    width: 90%;
    padding: 2rem 0;
    display: flex;
    flex-direction: column;
    align-items: center;
}

.contact h3 {
    text-align: center;
}

.contact article {
    display: flex;
    flex-direction: column;
    align-items: center;
    /* align-items: stretch; */
    padding: 2rem 0;
}

.contact article form {
    display:flex;
    flex-direction: column;
    width: 100%;
}

.contact article form fieldset {
    display:flex;
    flex-direction: column;
    justify-content: flex-start;
    align-items: center;
    margin: 0.8rem 0;
}

.contact article form fieldset input, textarea {
    background-color: #F8F8F8;
    border: 1px solid #e9e9e9;
    border-radius: 6px;
    padding:0.8rem 0.5rem;
    box-shadow: 0 4px 6px -1px rgb(0 0 0 / 0.1), 0 2px 4px -2px rgb(0 0 0 / 0.1);
    width: 100%;
    font-family: 'Roboto', sans-serif;
}

.contact article form fieldset input:focus, textarea:focus {
    border-color: #0b8293;
    outline: none;
    box-shadow: 0 0 0 3px rgba(11, 130, 147, 0.25);
}

.contact article form fieldset label {
    width:20%;
    align-self: flex-start;
}

.contact article form fieldset textarea {
    resize: none;
    height: 10rem;
}

.contact article form input[type="submit"] {
    align-self: flex-end;
    background-color:rgba(11, 130, 147, 0.25);
    font-size:1.6rem;
    color:#0b8293;
    font-family: "Josefin Sans", sans-serif;
    border: 2px solid rgba(11, 130, 147, 0);
    border-radius: 6px;
    font-weight: 700;
    padding: 0.8rem 1.5rem;
    margin-top: 1rem;
}

.contact article form input[type="submit"]:hover {
    background-color: #FFFFFF;
    border: 2px solid rgba(11, 130, 147, 0.25);
    cursor: pointer;
}

.contact article .address {
    width: 90%;
    background-color: #F8F8F8;
    border: 1px solid #e9e9e9;
    border-radius: 6px;
    box-shadow: 0 4px 6px -1px rgb(0 0 0 / 0.1), 0 2px 4px -2px rgb(0 0 0 / 0.1);
    padding: 1.5rem 1.5rem;
    margin-top: 2rem;
}

.contact article .address p:first-of-type {
    font-weight: 500;
}

.contact article .address p:nth-of-type(4),
.contact article .address p:nth-of-type(7) {
    margin-top: 1rem;
    font-weight: 500;
}

.contact article .address p:nth-of-type(10) {
    margin-top: 1rem;
}

.success, 
.failed {
    width: 90%;
    margin-left: auto;
    margin-right: auto;
}

.failed div,
.success div {
    background-color: #F8F8F8;
    border: 1px solid #e9e9e9;
    border-radius: 6px;
    box-shadow: 0 4px 6px -1px rgb(0 0 0 / 0.1), 0 2px 4px -2px rgb(0 0 0 / 0.1);
    padding: 1.5rem 1.5rem;
    margin-top: 2rem;
}

.failed p:not(:last-of-type),
.success p:not(:last-of-type) {
    margin-bottom: 1rem;
}

.success p, .success h2 {
    text-align:center;
}

/* CSS FOR PARTNERS' LOGOS */
.logos {
    display:flex;
    flex-wrap: wrap;
    background-color:#F8F8F8;
    width: 100%;
    height: auto;
    justify-content: space-evenly;
    align-items: center;
    padding: 4rem 0;
    box-shadow: 0 4px 6px -1px rgb(0 0 0 / 0.1), 0 2px 4px -2px rgb(0 0 0 / 0.1);
}

.logos img {
    width: 6rem;
    margin:1.5rem 1rem;
}

/* CSS FOR FOOTER */
footer {
    background-color: #f8f8f8;
    display: flex;
    justify-content: center;
    box-shadow: 0px -4px 6px -1px rgba(0,0,0,0.1),0px -2px 4px -2px rgba(0,0,0,0.1);
}

footer section {
    width: 50%;
    padding: 5rem 0;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
}

footer section ul {
    margin-bottom: 1rem;
}

footer section ul li, footer section p {
    text-align:center;
}

/* Accessibilité du menu burger */
.sr-only {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip-path: inset(50%);
    white-space: nowrap;
    border-width: 0;
}

/* VERSION MOBILE */
.burger-menu-toggle {
    display: block;
    cursor: pointer;
    background: none;
    border: none;
    padding: 10px;
    color: #0b8293; 
    z-index: 1001; 
}


/* =========================
   TABLET VERSION
========================= */

@media (min-width: 768px) {
    header > section {
        width: 98vw;
    }

    header > nav {
        max-width:90vw;
    }

    header > nav > ul {
        width: 95vw;
    }

    main .background-image p {
        margin: 0 auto 2rem auto;
    }

    main .slide p {
        width: 60%;
    }

    main .list > article {
        width: 42%;
    }

    .contact article {
        width: 70%;
    }

    .contact article .address {
        width: 100%;
    }
}


/* =========================
   DESKTOP VERSION
========================= */

@media (min-width: 1024px) {
    .burger-menu-toggle {
        display: none;
    }

    header {
        position: fixed;
        width: 100%;
        top: 0;
        left: 0;
    }

    header > section {
        display: flex;
        justify-content: space-between;
        align-items: center;
        margin: 0 auto;
        padding: 10px 20px;
        width: 98vw;
        background-color:#fff;
    }

    header .site-logo img {
        width: 19rem;
        height: auto;
    }

    header > section > div:nth-of-type(2) {
        display:flex;
        justify-content: space-between;
        align-items: center;
    }

    header section div:nth-of-type(2) button:last-of-type {
        margin-right: 1rem;
    }

    header > nav {
        position: static;
        min-width:100%;
        width:100%;
        height: auto;
        background-color: #F15A22;
        display: flex;
        justify-content: center;
        box-shadow: 0px 0px 6px 4px rgba(0,0,0,0.1);
    }

    header > nav > ul {
        font-family: 'Josefin Sans', sans-serif;
        display: flex;
        flex-direction: row;
        justify-content: space-around;
        overflow-y: visible;
        width: 70vw;
        font-size: 2.2rem;
        padding-top: 0;
    }

    .dropdown-menu {
        position: absolute;
        top: 100%;
        left: 0;
        background-color: #f15a22;
        border: 1px solid #f15a22;
        border-radius: 0 0 8px 8px;
        box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
        min-width: 20rem;
        z-index: 1000;
        opacity: 0;
        visibility: hidden;
        transform: translateY(-10px);
        transition: all 0.3s ease;
        padding: 0.4rem 0;
        margin-top: 0;
        max-height: none;
        overflow: visible;
    }

    nav > ul > li .dropdown-menu {
        top: calc(100% + -2rem);
    }

    .dropdown-menu li {
        position: relative;
    }

    .dropdown-menu > li > a {
        font-family: "Josefin Sans", sans-serif;
        display: block;
        padding: 1.2rem 1.4rem;
        color: #ffffff;
        text-decoration: none;
        font-size: 1.6rem;
        transition: all 0.2s ease;
    }

    .dropdown-menu > li:last-child > a::after {
        display: none;
    }

    .dropdown-menu a:hover {
        background-color: rgba(255, 255, 255, 0.1);
    }

    header > nav > ul > li {
        position: relative;
        border-bottom: none;
        width:auto;
    }

    nav > ul > li > a {
        color: #fff;
        text-decoration: none;
        padding: 2.5rem 1.6rem;
        border-radius: 6px;
        transition: all 0.3s ease;
        font-size:2rem;
        font-family: 'Josefin Sans', sans-serif;
    }

    nav > ul > li > a:hover,
    nav > ul > li > .dropdown-menu > li > a:hover {
        background-color: rgba(255, 255, 255, 0.1);
        color:#fff;
    }

    nav > ul > li:hover .dropdown-menu {
        display: block;
        opacity: 1;
        visibility: visible;
        transform: translateY(2rem);
    }

    nav > ul > li .dropdown-menu {
        top: calc(100% + -2rem);
    }

    nav > ul > li:has(.dropdown-menu) > a::after {
        content: none;
    }

    nav > ul > li:hover > a::after {
        transform: rotate(180deg);
    }


    /* CSS FOR MAIN */
    main {
        margin-top: 19.4rem;
        margin-bottom: 4rem;
    }

    main > .background-image {
        padding-top: 17%;
    }

    main .background-image p {
        padding: 2.5rem 2rem;
        font-size: 2.2rem;
    }

    main .slides {
        height: 24rem;
    }
    
    main .slide p {
        text-align: center;
        width:50%;
    }

    main > .list {
        width: 80vw;
        display: grid;
        grid-template-columns: repeat(3, minmax(0, 35rem));
        justify-content: center;
        column-gap: 10rem;
        row-gap: 5rem;
    }

    main > .list > article {
        /* width: 35rem; */
        width: auto;
    }

    .logos img {
        width: 12rem;
        margin:0.8rem 1rem;
    }

    .burger-menu-toggle {
        display: none;
    }

    /* CSS FOR CONTACT SECTION */
    .contact {
        width: 65vw;
    }

    .contact article {
        flex-direction: row;
        justify-content: space-between;
        align-items: stretch;
        width: 100%;
    }

    .contact article form {
        display:flex;
        flex-direction: column;
        width: 45%;
    }

    .contact article form fieldset {
        flex-direction: row;
        justify-content: space-between;
        align-items: flex-start;
    }

    .contact article form fieldset input, textarea {
        width: 80%;
    }

    .contact article .address {
        width: 40%;
        margin-top: 0;
    }

    .contact article .address p:nth-of-type(4) {
        margin-top: 1rem;
    }

    .contact article .address p:nth-of-type(7) {
        margin-top: 1rem;
    }

    .success {
        width: 60%;
    }

    /* CSS FOR FOOTER */
    footer {
        background-color: #f8f8f8;
        display: flex;
        justify-content: center;
        box-shadow: 0px -4px 6px -1px rgba(0,0,0,0.1),0px -2px 4px -2px rgba(0,0,0,0.1);
    }

    footer section {
        width: 30%;
        padding: 5rem 0;
        display: flex;
        flex-direction: row;
        justify-content: space-between;
        align-items: center;
    }

    footer section ul {
        margin-bottom: 0;
    }

    footer section ul li {
        text-align:end;
    }
}


/* =========================
   BIG DESKTOP VERSION
========================= */
@media (min-width: 1440px) {
    main {
        min-height:60vh;
    }

    main > .list {
        width: 75vw;
    }

    main > .list > article {
        /* width: 34rem; */
        width: auto;
    }
}

@media (min-width: 2000px) {
    main > .list {
        width: 70vw;
        column-gap: 10rem;
    }

    main > .list > article {
        /* width: 38rem; */
    }
}