html{
    scroll-behavior: smooth;
}

:root {
    color-scheme: light;
    /* <-- pas 'only' */
    --primary-color-start: #E90073;
    --primary-color-end: #FF5151;
    --secondary-color: #ffaf7b;
    --text-color: #353535;
    --button-bg-color: rgba(255, 255, 255, 0.9);
    --button-text-color: #FFFFFF;
    --safe-bottom: env(safe-area-inset-bottom, 0px);
}

/* Même si l’OS est en dark, on reste en clair */
@media (prefers-color-scheme: dark) {
    :root {
        color-scheme: light;
    }
}

@font-face {
    font-family: "Roboto";
    src: url("../fonts/Roboto-VariableFont_wdth,wght.ttf") format("truetype");
    font-weight: 100 900; /* variable */
    font-style: normal;
  }

  @font-face {
      font-family: "SourceSansPro";
      src: url("../fonts/SourceSansPro-Regular.ttf") format("truetype");
      font-weight: 400; /* normal */
      font-style: normal;
  }

  @font-face {
      font-family: "SourceSansPro";
      src: url("../fonts/SourceSansPro-Semibold.ttf") format("truetype");
      font-weight: 600; /* semibold */
      font-style: normal;
  }

  @font-face {
      font-family: "SourceSansPro";
      src: url("../fonts/SourceSansPro-Bold.ttf") format("truetype");
      font-weight: 700; /* bold */
      font-style: normal;
  }

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

body {
    font-family: "SourceSansPro", "Roboto", sans-serif;
    background-image: linear-gradient(to top, var(--primary-color-end), var(--primary-color-start));
    color: var(--text-color);
    overflow-x: hidden;
    min-height: 100svh;
    margin: 0; /* Évite les marges par défaut du body */
    padding-bottom: calc(16px + var(--safe-bottom));
}



.container {
    width: 100%;
    max-width: 450px;
    min-height: 100vh;
    max-height: 900px;
    margin: auto;
    position: relative;
    overflow: hidden;
}

.slide {
    opacity: 0;
    transform: translateX(100%);
    transition: opacity 0.2s ease, transform 0.2s ease;
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    z-index: 0;
    height: 100%;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    padding: 6vh 16px 6vh;
    opacity: 0;
    box-sizing: border-box;
}

.slide.content {
    padding: 0 5vw;
}

/* Active slide */
.slide.active {
    opacity: 1;
    transform: translateX(0);
    z-index: 1;
}

/* Sortie vers la gauche (quand on avance) */
.slide.exit-left {
    opacity: 0;
    transform: translateX(-100%);
}

/* Entrée depuis la droite (quand on avance) */
.slide.enter-right {
    transform: translateX(100%);
    opacity: 0;
}

/* Sortie vers la droite (quand on recule) */
.slide.exit-right {
    opacity: 0;
    transform: translateX(100%);
}

/* Entrée depuis la gauche (quand on recule) */
.slide.enter-left {
    transform: translateX(-100%);
    opacity: 0;
}

.results {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    padding: 60px 16px 60px;
    overflow-y: scroll;
    -ms-overflow-style: none;
    scrollbar-width: none;
    
}

#slide5 {
    padding: 0;
    overflow-y: scroll;
    -ms-overflow-style: none;
    scrollbar-width: none;
    justify-content: flex-start;
}

button {
    font-family: "SourceSansPro";
    font-size: 20px;
    font-style: normal;
    font-weight: 400;
    line-height: 150%
}

.cathedrale {
    width: 100%;
    box-sizing: border-box;
    margin-bottom: -100px;
    z-index: -1;
    -webkit-animation: 1s ease-in-out 0s 1 alternate intro_cathedrale;
    animation: 1s ease-in-out 0s 1 alternate intro_cathedrale;

    } @keyframes intro_cathedrale {
        from {
        margin-bottom: 100vh;
        }
        to {
        margin-bottom: -100px;
        }
    }
  
  .cathedrale img {
    width: 100%;
    height: auto;
    display: block;
  }

p.support{
    font-size: 16px;
    font-weight: 400;
    line-height: 20.80px;
    text-align: center;
}

.content {
    background-color: #FFFFFF;
    width: 100%;
    max-height: 80%;
    padding: 16px;
    border-radius: var(--corner, 2px);
    gap: 16px;
    text-align: left;
    display: flex;
    flex-direction: column;
    justify-content: space-around;
    overflow-x: hidden;
    
}

.intro-text {
    font-size: 32px;
    font-weight: 700;
    line-height: 38.40px;
}

p.description{
    font-size: 24px;
    font-weight: 400;
    line-height: 31.20px;
}

.question {
    font-size: 32px;
    font-weight: 700;
    line-height: 38.40px;
}

/*Next Button*/

.nav-button {
    display: flex;
    width: 100%;
    padding: 8px 16px;
    justify-content: center;
    align-items: center;
    gap: 16px;
    color: var(--Color, #E90373);
    cursor: pointer;
    transition: background-color 0.3s, color 0.3s;
    border-radius: var(--corner, 2px);
    border: 2px solid var(--Main, #E90373);
    background: #FFF;

    margin-bottom: 3vh;
}

.nav-button:hover {
    border-radius: var(--corner, 2px);
    border: 2px solid var(--Main, #E90373);
    background: rgba(233, 3, 115, 0.20);
    color: var(--Color, #E90373);
}


.nav-button.inactive {
    opacity: 0.5;
    pointer-events: none;
}

.start-button {
    background: #E90373;
    color: #FFF;
}

/*Previous button*/

.prev-button {
    display: none;
    color: var(--White, #FFF);
    position: fixed;
    z-index: 1000;
    bottom: 16px;
    margin-left: 16px;
    padding: 8px 16px;
    border: none;
    background: none;
    transition: none !important;
}

.prev-button:active {
    border-radius: 2px;
    background:  rgba(255, 255, 255, 0.3);
}


/* Options for single selection */
.options-container {
    display: flex;
    flex-direction: column;
    gap: 16px;
    width: 100%;
}

.option-button {
    border-radius: var(--corner, 2px);
    background: var(--Color, #E90373);
    display: flex;
    width: auto;
    padding: 8px 16px;
    justify-content: space-between;
    align-items: center;
    color: var(--button-text-color);
    border: 2px solid var(--Main, #E90373);
    cursor: pointer;
    transition: background-color 0.3s, transform 0.2s;
}


.option-button:hover {
    /*transform: scale(1.03);*/
    opacity: 0.8;
}
.option-button:active {
    transform: scale(1.00);
    border-radius: var(--corner, 2px);
    border: 2px solid var(--Main, #E90373);
    background: rgba(233, 3, 115, 0.20);
    color: var(--Color, #E90373);
}

.option-button.selected {
    border-radius: var(--corner, 2px);
    border: 2px solid var(--Main, #E90373);
    background: rgba(233, 3, 115, 0.20);
    color: var(--Color, #E90373);
}


/* Options for multiple selections */
.options-container-multiple {
    display: flex;
    flex-wrap: wrap;
    gap: 16px;
    justify-content: center;
    overflow-x: hidden;
}

.options-container-multiple.vertical {
    height: 450px;
    overflow-y: auto;
    flex-direction: column;
    flex-wrap: nowrap;
    gap: 16px;
    justify-content: flex-start;
}

.option-button-multiple {
    border-radius: var(--corner, 2px);
    background: var(--Color, #E90373);
    display: flex;
    width: auto;
    padding: 8px 16px;
    justify-content: space-between;
    align-items: center;
    color: var(--button-text-color);
    border: 2px solid var(--Main, #E90373);
    cursor: pointer;
    transition: background-color 0.3s, transform 0.2s;
}

.option-button-multiple.large {
    border-radius: var(--corner, 2px);
    background: var(--Color, #E90373);
    width: 95%;
    padding: 8px 16px;
    justify-content: space-between;
    align-items: center;
    color: var(--button-text-color);
    border: 2px solid var(--Main, #E90373);
    cursor: pointer;
    transition: background-color 0.3s, transform 0.2s;
    text-align: center;
    display: flex;
    flex-direction: column;
}

.option-button-multiple .sub-text {
    font-size: 12px;
    line-height: 19px;
    font-weight: 400;
}

.option-button-multiple:hover {
    /*transform: scale(1.03);*/
    opacity: 0.8;
}

.option-button-multiple.selected {
    border-radius: var(--corner, 2px);
    border: 2px solid var(--Main, #E90373);
    background: rgba(233, 3, 115, 0.20);
    color: var(--Color, #E90373);
}

/* --- Styles for Results Slide --- */

#slide5 .content {
    background-color: #fff;
}

.result-content {
display: flex;
flex-direction: column;
    gap:24px;
    padding: 16px;
    width: 100%;
    color: var(--text-color);
}

.result-top-card {
    background-color: #FFFFFF;
    color: var(--text-color);
    padding-bottom: 30px;
    margin-bottom: 20px;
}

.result-top-card .project-image {
    margin: 5px;
}

.result-image-banner {
    width: 100%;
    height: 200px;
    background-size: cover;
    background-position: center;
    position: relative;
    display: flex;
    align-items: flex-end;
    padding: 20px;
}
.result-image-banner::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(to top, rgba(0,0,0,0.7), rgba(0,0,0,0));
}

.result-text {
    color: var(--text-color);
    z-index: 1;
}
.result-text-overlay h3 {
    font-weight: bolder;
    font-size: 1.8rem;
}
.result-text-overlay p {
    margin-top: 15px;
}



h2 {
    align-self: stretch;
    font-size: 36px;
    font-style: normal;
    font-weight: 600;
    line-height: 38.4px; /* 120% */
}

.results-page-title {
    color: #ffffff;
    font-size: 32px;
}

.project-card {
    width: 100%;
    margin-top: 15px;
    background-color: #f0f0f0; 
    color: #333;
    border: 2px solid #e4e6e6; 
    /*
    overflow: hidden;
    box-shadow: 0 4px 8px rgba(0,0,0,0.1);*/
}

.borderless-card {
    border: none; 
}

.project-image {
    position: relative;
    color: white;
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    height: 200px;
    display: flex;
    align-items: flex-end;
  }
  

  
  /* Positionner le texte au-dessus du film noir */
  .project-info {
    position: relative;
    z-index: 2;
    padding: 1em;
  }



.project-info {
    padding: 15px;
}
.project-info h4 {
    font-size: 24px;
    font-style: normal;
    font-weight: 700;
    line-height: 38.4px; /* 160% */
}
.project-info p {
    font-size: 0.9rem;
    line-height: 1.4;
    display: -webkit-box;
    -webkit-line-clamp: 3;          /* Nombre de lignes */
    -webkit-box-orient: vertical;
    overflow: hidden;
    text-overflow: ellipsis;
    font-size: 16px;
    font-style: normal;
    font-weight: 400;
    line-height: 20.8px; /* 130% */
}
.project-meta {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-top: 15px;
    font-size: 0.8rem;
    
}
.author-avatar {
    width: 24px;
    height: 24px;
    border-radius: 50%;
    vertical-align: middle;
    margin-right: 5px;
}

.similar-projects {
    display: flex;
    flex-direction: column;
    gap: 16px;
    width: 100%;
    padding: 36px 16px 10px;
    background-color: #ffffff;
}


.decorative-bar {
    width: 40px;
    height: 4px;
    background-color: var(--primary-color-start);
    border-radius: 0px 0px 3px 3px;
    margin-top: 4px;

}

.clickable {
    cursor: pointer !important
}

.result-main-project{
    display: flex;
    flex-direction: column;
    gap:16px;
    justify-content: center;
    align-items: center;
}



.similar-project-link {
    display: inline-flex;
    align-items: center;
    gap: 0.5em;
    color: #000;
    text-decoration: none;
    font-size: 1rem;
    line-height: 1.2;
    margin-top: 1em;
  }
  
  .similar-project-link svg {
    margin-top: -13px;
    vertical-align: middle;
    position: relative;
    top: 0.05em;
    overflow: visible;
  }

.profile-card{
    border-radius: 2px;
    overflow: hidden;
}
.profile-text{
    display: flex;
    padding: 16px;
    flex-direction: column;
    align-items: center;
    gap: 24px;
    align-self: stretch;
    padding: 16px;
    align-items: center;
}
.profile-text h3{
    align-self: stretch;
    font-size: 32px;
    font-style: normal;
    font-weight: 700;
    line-height: 38.4px; /* 120% */
}

.short-description{
    font-size: 18px;
    font-style: normal;
    font-weight: 700;
    line-height: 120%; /* 21.6px */
}

.long-description{
    font-size: 16px;
    font-style: normal;
    font-weight: 400;
    line-height: 20.8px;
}



.profile-image-banner{
    margin-bottom: -60px;
    height: auto;
}

.profile-image-banner img{
    width: 100%;
}

.profile-text{
    background-color: #fff;
}

.shortdescription{
    font-size: 18px;
    font-style: normal;
    font-weight: 700;
    line-height: 120%; /* 21.6px */
}


.down-arrow{
display: flex;
padding: 10px;
flex-direction: column;
align-items: flex-start;
gap: 10px;
border-radius: 50px;
background: rgba(233, 3, 115, 0.20);
}

.down-arrow img{
display: flex;
width: 20px;
height: 21px;
flex-direction: column;
justify-content: center;
align-items: center;
}


.buttonmore{
    background:none;
    border: 2px solid #FFFFFF;
    color: var(--button-text-color);
    display: flex;
    width: 100%;
    padding: 8px 16px;
    justify-content: center;
    align-items: center;
    gap: 16px;
    cursor: pointer;
    transition: background-color 0.3s, color 0.3s;
    border-radius: var(--corner, 2px);
}

.buttonmore:hover {
    opacity: 0.8;
}


.button-all-projects {
    border-radius: var(--corner, 2px);
    border: 2px solid #FFFFFF;
    color: #fff;
    background: var(--Color, #E90373);
    display: flex;
    width: 100%;
    padding: 8px 16px;
    justify-content: center;
    align-items: center;
    gap: 16px;
    cursor: pointer;
    transition: background-color 0.3s, color 0.3s;
}


.button-all-projects:hover {
    /*transform: scale(1.03);*/
    opacity: 0.8;
}



/* Share */

.share-container {
    width: 100%;
    max-width: 450px;
    height: auto;
    margin: auto;
    position: relative;
    overflow: hidden;
    color: #FFF;
}

.share-title {
    margin: 20px 0 20px;
}

.share-subtitle {
    margin-bottom: 8px;
}

.share-checkbox {
    margin-right: 8px;
        margin-top: 5px;
}

.checkbox-container {
    margin: 0 0 10px;
    margin-bottom: 1rem;
        display: flex;
    flex-direction: row;
    align-content: flex-start;
    align-items: flex-start;
}
.checkbox-container span{
    font-size: .8rem;
}

input[type="email"] {
    background: white;
    border: 2px solid #FFFFFF;
    color: black;

    width: 100%;
    padding: 24px 16px;
    font-size: 1rem;
    border-radius: var(--corner, 2px);
    box-sizing: border-box;
    transition: border-color 0.3s ease;

    height: 40px;
    line-height: 1.2;
    display: block;
    margin-bottom: 1rem;
}

input[type="email"]:focus {
    outline: none;
    border: 2px solid #E90073;
}


.separator {
    border: none;
    height: 1px;
    background-color: #eee;
    margin: 1rem 0;
}

.margin-bot {
    margin: 1rem 0;
}

.rose {
    background-color: #E90073;
    color: #FFF;
}

.blanc {
    color: #FFF;
}


.email-button{
    background:none;
    border: 2px solid #FFFFFF;
    color: var(--button-text-color);
    display: flex;
    width: 100%;
    padding: 8px 16px;
    justify-content: center;
    align-items: center;
    gap: 16px;
    cursor: pointer;
    transition: background-color 0.3s, color 0.3s;
    border-radius: var(--corner, 2px);
}

.email-button:hover {
    opacity: 0.8;
}

.email-button-clicked {
    cursor:pointer;
}

.email-error {
    padding-bottom: 5px;
    font-weight: 600;
}



#qrcode {
    display: inline-block;
}
#qrcode img {
    border: 10px solid #c90b67;
    border-radius: 2px;
    display: block; /* Fixes any weird alignment issues */
}


#qrcode-container {
    display: flex;
    justify-content: center; /* Centers horizontally */
    align-items: center;     /* Centers vertically */
    
    padding: 20px;
    margin-top: 10px;
    max-width: 600px;
    
    /* Animation Setup */
    overflow: hidden; /* Hides the content that overflows the container's box */
    max-height: 0;    /* The element is not visible because its height is 0 */
    opacity: 0;       /* Start fully transparent for a fade-in effect */
    
    /* Smooth transition for the properties we want to animate */
    transition: max-height 0.5s ease-in-out, padding 0.5s ease-in-out, opacity 0.4s ease-in-out;
}

/* * This 'visible' class will be added/removed by JavaScript.
    * It sets the max-height to a value larger than the content will ever be.
    * This makes the div expand to its natural content height.
*/
#qrcode-container.visible {
    max-height: 500px; /* Set this to a value larger than your content's height */
    opacity: 1;
    padding-top: 20px;
    padding-bottom: 20px;
}



/* Progress Bar */

.step-progress-bar {
    display: flex;
    justify-content: space-between;
    gap: 16px;
    margin: 20px auto;
    max-width: 600px;
    padding: 0 16px;
    display: none; /* cachée au départ */
  }

.step {
    position: relative;
    flex: 1;
    height: 16px;
    border-radius: 2px;
    background-color: rgba(255, 255, 255, 0.5);
    overflow: hidden;
    min-width: 50px;
    max-width: 120px;
}


.step .fill {
    position: absolute;
    top: 0;
    left: 0;
    height: 100%;
    width: 0%;
    background-color: white;
    transition: width 0.5s ease-in-out;
    z-index: 1;
}



/* 
HTML: <div class="loader"></div> 
https://css-loaders.com/circle/
*/


/* HTML: <div class="loader"></div> */
.loader {
    width: 65px;
    height: 30px;
    margin: 20px 0;
    justify-content: center;
  }
  .loader:before {
    content: "";
    border-radius: 50px;
    box-shadow: 0 0 0 3px inset #fff;
    animation: l3 0.75s infinite alternate;
  }
  @keyframes l3 {
    0% {
      inset: 0 35px 0 0;
    }
    50% {
      inset: 0 0 0 0;
    }
    100% {
      inset: 0 0 0 35px;
    }
  }

  
  @media (min-width: 480px) {
    body {
        display: block; /* ou flex-direction: column si tu veux garder flex */
        align-items: initial;
        justify-content: initial;
        overflow-y: auto !important;
    }

    .container {
        max-height: none;
        margin: auto;
        overflow-y: auto;
    }
    
    .slide.active {
        position: relative;
        height: auto;
        min-height: 100vh;
        overflow-y: auto;
    }
}