/**
* CSS file to hold styles that apply across the application
*/

@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(40px);
    }

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

@keyframes fadeInUpPortfolio {
    from {
        opacity: 0;
        transform: translateY(40px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@import url("https://fonts.googleapis.com/css2?family=Cormorant+Garamond:wght@300;400&family=Montserrat:wght@200;400;600;800&display=swap");

*, *::before, *::after {
    box-sizing: border-box;
}

html,
body {
    margin: 0;
    padding: 0;
    height: 100%;
    font-family: "Montserrat", sans-serif;
    max-width: 100%;
    overflow-x: hidden;
}

:root {
    --scrollbar-width: 0px;
}

@media screen and (min-width: 768px) {
    :root {
        --scrollbar-width: 17px; /* Largeur typique des scrollbars */
    }
}

* {
    word-wrap: break-word;
}

img, iframe, table {
    max-width: 100%;
}

div#main {
  display: flex;
  flex-direction: column;
}

section {
  position: relative;
}

section.dark {
  min-height: 100vh;
  color: white;
  background: rgba(0, 0, 0, 0.25);
}

section.light {
  color: black;
  background: linear-gradient(135deg, #f8fafc 0%, #e3e8f0 100%);
  padding: 8rem 0;
}

section img.background {
        width: 100vmax;
        height: 100%;
        z-index: -1;
        position: absolute;
        top: 0;
        left: 50%;
        transform: translate(-50%, 0);
        pointer-events: none;
        object-fit: cover;
}

section img.background0 {
        width: 100vmax;
        height: 100%;
        z-index: -1;
        position: absolute;
        top: 0;
        left: 50%;
        transform: translate(-50%, 0);
        pointer-events: none;
        object-fit: cover;
}

h1 {
  font-weight: 300;
  font-family: "Cormorant Garamond", serif;
  font-size: 7rem;
  margin: 0;
}

.about-frame {
    background: rgba(255,255,255,0.2);
    border: 2px solid #888;
    border-radius: 1.5rem;
    padding: 2rem 0;
    width: 80%;
    max-width: 1200px;
    margin: 3rem auto 0 auto;
    box-shadow: 0 4px 24px rgba(0,0,0,0.08);
    backdrop-filter: blur(2px);
    opacity: 0;
    transition: opacity 0.4s;
}

    .about-frame.visible {
        animation: fadeInUp 0.8s cubic-bezier(0.23, 1, 0.32, 1) forwards;
        opacity: 1;
    }

.about-content {
    display: flex;
    flex-direction: column;
    align-items: center; /* centre horizontalement le contenu */
    justify-content: center;
    width: 95%;
    max-width: 1100px;
    min-width: 220px;
    margin: 0 auto;
    background: transparent;
    padding: 2rem 1.5rem;
    box-sizing: border-box;
}

    @media (max-width: 900px) {
        .about-frame {
            width: 98%;
            padding: 1rem 0.5rem;
            margin: 2rem auto 0 auto;
        }

        .about-content {
            width: 100%;
            padding: 1.5rem 0.5rem;
        }
    }

    @media (max-width: 600px) {
        .about-content {
            width: 100%;
            padding: 1rem 0.5rem;
        }

        .about-frame {
            width: 98%;
            padding: 1rem 0.5rem;
            margin: 1rem auto 0 auto;
        }
    }

    @media screen and (max-width: 300px) {
        h1 {
            font-weight: 300;
            font-family: "Cormorant Garamond", serif;
            font-size: 3rem;
            margin: 0;
        }
    }

    @media screen and (min-width: 301px) and (max-width: 360px) {
        h1 {
            font-weight: 300;
            font-family: "Cormorant Garamond", serif;
            font-size: 4rem;
            margin: 0;
        }
    }

    @media screen and (min-width: 361px) and (max-width: 420px) {
        h1 {
            font-weight: 300;
            font-family: "Cormorant Garamond", serif;
            font-size: 5rem;
            margin: 0;
        }
    }

    h2 {
  font-weight: 400;
  font-size: 2rem;
  margin: 0;
  text-align: center;
}

h3 {
  font-weight: 400;
  font-size: 1.25rem;
  margin: 0;
}

p {
  font-size: 20px;
  line-height: 1.5;
  margin-bottom: 0;
  font-weight: 300;
}

p.large {
  font-size: 24px;
  text-align: justify;
}

p.small {
  font-size: 15px;
}

hr {
  margin: 2.5rem;
}

li {
  line-height: 1.7;
}

li::marker {
  color: #4e567e;
}

a {
  text-decoration: none;
  color: black;
}

a:hover {
  color: #4e567e;
}

.portfolio-container {
  display: block;
  flex-direction: row;
  padding-top: 3rem;
}

@media screen and (max-width: 420px) {
  .portfolio-container {
    flex-direction: column;
  }
}

.portfolio-hero {
  max-width: 40%;
  align-self: center;
}

@media screen and (max-width: 420px) {
  .portfolio-hero {
    max-width: 100%;
    align-self: center;
  }
}

.portfolio-animate {
    opacity: 0;
    transition: opacity 0.4s;
}

.portfolio-animate.visible {
    animation: fadeInUpPortfolio 0.8s cubic-bezier(0.23, 1, 0.32, 1) forwards;
    opacity: 1;
}

.portfolio-frame {
    background: rgba(255,255,255,0.13);
    border: 2px solid #7bb0ff;
    border-radius: 1.5rem;
    padding: 2.5rem 0.5rem 2rem 0.5rem;
    width: 100%;
    margin: 3rem auto 0 auto;
    box-shadow: 0 4px 24px rgba(0,0,0,0.10);
    backdrop-filter: blur(2px);
    max-width: 1200px;
    transition: box-shadow 0.3s;
}

@media (max-width: 900px) {
    .portfolio-frame {
        width: 98%;
        padding: 1.2rem 0.2rem;
    }
}

.container {
  margin: 20px auto;
  display: grid;
  grid-template-columns: repeat(4, 1fr); /* 4 colonnes égales */
  grid-gap: 20px;
}

@media screen and (max-width: 900px) {
  .container {
    grid-template-columns: repeat(2, 1fr); /* 2 colonnes sur tablette/mobile */
  }
}

@media screen and (max-width: 500px) {
  .container {
    grid-template-columns: 1fr; /* 1 colonne sur très petit écran */
  }
}

@media screen and (max-width: 420px) {
  .container {
    margin: 20px auto;
    display: inline;
    grid-template-columns: 330px 300px;
    grid-gap: 20px;
  }
}

.container .box {
  border-radius: 10px;
  padding: 24px 16px;
  display: flex;
  justify-content: flex-start;
  flex-direction: column;
  border: 1px solid rgb(204, 204, 204);
  text-align: center;
  background: rgba(30,40,60,0.85); /* pour la lisibilité sur fond sombre */
  color: #fff;
  box-shadow: 0 2px 8px rgba(78,86,126,0.04);
  transition:
      transform 0.25s cubic-bezier(0.23, 1, 0.32, 1),
      box-shadow 0.25s cubic-bezier(0.23, 1, 0.32, 1),
      background 0.2s;
}

.container .box:hover {
  transform: translateY(-8px) scale(1.04);
  box-shadow: 0 8px 32px rgba(78,86,126,0.18);
  background: rgba(60,80,120,0.95);
  cursor: pointer;
}

img.social-icon {
  width: 30px;
  height: 30px;
}

.skills-list {
    list-style: none;
    padding: 0;
    margin: 2rem auto;
    display: grid;
    grid-template-columns: repeat(3, 1fr); /* 3 colonnes */
    gap: 1.5rem 2.5rem;
    max-width: 900px;
    width: 100%;
    /*justify-items: center; centre les items dans la grille */
}

@media (max-width: 900px) {
    .skills-list {
        grid-template-columns: repeat(2, 1fr); /* 2 colonnes sur mobile/tablette */
        margin: 2rem 0.5rem;
        max-width: 500px;
    }
}

@media (max-width: 600px) {
    .skills-list {
        grid-template-columns: repeat(2, 1fr); /* 2 colonnes */
        margin: 1.5rem 0.2rem;
        max-width: 100%;
    }
}

.skills-list li {
    display: flex;
    /**/align-items: center;
    font-size: 1.45rem; /* plus grand */
    gap: 1.2rem;
    padding: 0.7rem 1.2rem;
    transition: 
        transform 0.25s cubic-bezier(0.23, 1, 0.32, 1),
        background 0.2s;
    box-shadow: 0 2px 8px rgba(78,86,126,0.04);
}

.skills-list li:focus {
    outline: 2px solid #4e567e;
    outline-offset: 2px;
}

.skills-list li:hover {
    background: rgba(78,86,126,0.07);
    border-radius: 0.5rem;
    cursor: pointer;
    transform: scale(1.08);
}

.skill-icon {
    width: 40px;   /* plus grand */
    height: 40px;
    object-fit: contain;
    margin-right: 0.7rem;
    transition: transform 0.25s cubic-bezier(0.23, 1, 0.32, 1);
}

.skills-list li:hover .skill-icon {
    transform: scale(1.25);
}

.skills-title {
    text-align: left;
    margin: 1rem 0 0.5rem 0;
    font-size: 1.3rem;
    color: #4e567e;
    font-weight: 600;
}

.home-hero-gradient {
    position: relative;
    min-height: 100vh;
    width: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(120deg, #1a2233 0%, #3a4a6b 100%);
    overflow: hidden;
}


.home-hero-gradient a:hover {
    color: #7bb0ff;
}

.home-hero-row {
    display: flex;
    align-items: center;
    justify-content: center; /* centre horizontalement */
    width: 100%;
    max-width: 1100px; /* réduit la largeur max */
    margin: 0 auto;
    gap: 2.5rem;
    z-index: 1;
    padding: 0 2vw;
}

.home-hero-content {
    background: none;
    border-radius: 0;
    box-shadow: none;
    padding: 0;
    max-width: 420px;
    color: #fff;
    margin: 0 auto;
    text-align: center;
    backdrop-filter: none;
}

.home-hero-content h1 {
    font-size: 2.5rem;
    margin-bottom: 0.5rem;
}

.home-hero-content h2 {
    font-size: 1.3rem;
    margin-bottom: 1.2rem;
}

.home-hero-content p {
    font-size: 1.1rem;
    margin-bottom: 0;
}

.home-hero-photo {
    display: flex;
    align-items: center;
    justify-content: center;
    min-width: 220px;
}

.home-hero-photo img {
    width: 320px;   /* agrandit la photo */
    height: 320px;
    max-width: 35vw;
    max-height: 35vw;
    object-fit: cover;
    border-radius: 50%;
    box-shadow: 0 4px 32px rgba(0,0,0,0.18);
    border: 4px solid #fff3;
    background: #222;
}

.about-gradient {
    min-height: 100vh;
    width: 100%;
    background: linear-gradient(120deg, #1a2233 0%, #3a4a6b 100%);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    position: relative;
    overflow: hidden;
}

.about-gradient,
.about-gradient h1,
.about-gradient h2,
.about-gradient h3,
.about-gradient p,
.about-gradient .skills-title,
.about-gradient .about-frame,
.about-gradient .about-content {
    color: #fff;
}

.about-gradient .about-frame {
    border-color: #3a4a6b;
    background: rgba(30,40,60,0.18);
}

.about-gradient .skills-title {
    color: #7bb0ff;
}

.about-gradient hr {
    border-color: #3a4a6b;
    opacity: 0.5;
}

@media (max-width: 900px) {
    .home-hero-row {
        flex-direction: column;
        gap: 2rem;
        align-items: center;
    }
    .home-hero-photo img {
        width: 180px;
        height: 180px;
        max-width: 60vw;
        max-height: 60vw;
    }
    .home-hero-content {
        max-width: 95vw;
    }
}

.load-more-container {
    display: flex;
    justify-content: center;
    align-items: center;
    margin-top: 2.5rem;
    width: 100%;
}

#blazor-error-ui {
    background: lightyellow;
    bottom: 0;
    box-shadow: 0 -1px 2px rgba(0, 0, 0, 0.2);
    display: none;
    left: 0;
    padding: 0.6rem 1.25rem 0.7rem 1.25rem;
    position: fixed;
    width: 100%;
    z-index: 1000;
}

    #blazor-error-ui .dismiss {
        cursor: pointer;
        position: absolute;
        right: 0.75rem;
        top: 0.5rem;
    }

.loading-progress {
    position: relative;
    display: block;
    width: 8rem;
    height: 8rem;
    margin: 20vh auto 1rem auto;
}

    .loading-progress circle {
        fill: none;
        stroke: #e0e0e0;
        stroke-width: 0.6rem;
        transform-origin: 50% 50%;
        transform: rotate(-90deg);
    }

        .loading-progress circle:last-child {
            stroke: #1b6ec2;
            stroke-dasharray: calc(3.141 * var(--blazor-load-percentage, 0%) * 0.8), 500%;
            transition: stroke-dasharray 0.05s ease-in-out;
        }

.loading-progress-text {
    position: absolute;
    text-align: center;
    font-weight: bold;
    inset: calc(20vh + 3.25rem) 0 auto 0.2rem;
}

    .loading-progress-text:after {
        content: var(--blazor-load-percentage-text, "Loading");
    }

.portfolio-section {
    min-height: 100vh;
    padding: 6rem 0 4rem 0;
    background: linear-gradient(120deg, #1a2233 0%, #3a4a6b 100%);
    color: #fff;
    position: relative;
    overflow: hidden;
}

.portfolio-title {
    text-align: center;
    font-size: 3rem;
    font-family: "Cormorant Garamond", serif;
    font-weight: 400;
    margin-bottom: 2.5rem;
    letter-spacing: 0.02em;
    color: #fff;
}

.portfolio-subtitle {
    text-align: center;
    font-size: 1.6rem;
    font-family: "Montserrat", sans-serif;
    font-weight: 400;
    color: #7bb0ff;
    margin-bottom: 2rem;
    letter-spacing: 0.01em;
}

.portfolio-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
    gap: 1.2rem 1rem; /* réduit */
    max-width: 1200px;
    margin-bottom: 0;
    padding-bottom: 0;
    margin: 0 auto;
    width: 100%;
}

@media (max-width: 600px) {
    .portfolio-grid {
        grid-template-columns: 1fr; /* 1 colonne */
        justify-items: center;      /* centre les cards */
    }
    .portfolio-card {
        max-width: 340px;           /* largeur max pour éviter d'être trop large */
        width: 100%;
        margin: 0 auto;
    }
}

.portfolio-card {
    background: rgba(30,40,60,0.92);
    border-radius: 1.2rem;
    box-shadow: 0 4px 24px rgba(0,0,0,0.10);
    padding: 1.2rem 0.8rem 1rem 0.8rem; /* réduit */
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    transition:
        transform 0.22s cubic-bezier(0.23, 1, 0.32, 1),
        box-shadow 0.22s cubic-bezier(0.23, 1, 0.32, 1),
        background 0.18s;
    border: 1px solid #2a3550;
    min-height: 140px; /* réduit */
    max-width: 340px;  /* limite la largeur */
}

.portfolio-card:hover {
    transform: translateY(-10px) scale(1.03);
    box-shadow: 0 12px 36px rgba(78,86,126,0.18);
    background: rgba(60,80,120,0.98);
}

.portfolio-card h3 {
    font-size: 1.08rem; /* réduit */
    margin: 0 0 0.6rem 0; /* réduit */
    font-weight: 600;
    color: #7bb0ff;
    letter-spacing: 0.01em;
    transition: color 0.18s;
}

.portfolio-card a {
    color: inherit;
    text-decoration: none;
}

.portfolio-card a:hover h3 {
    color: #fff;
    text-shadow: 0 2px 8px #7bb0ff44;
}

.portfolio-desc {
    font-size: 0.98rem; /* réduit */
    font-weight: 300;
    color: #e3e8f0;
    margin: 0;
    line-height: 1.6;
}

.portfolio-thumb {
    width: 100%;
    height: 120px; /* réduit */
    object-fit: cover;
    border-radius: 0.7rem;
    margin-bottom: 0.7rem; /* réduit */
    transition: transform 0.22s cubic-bezier(0.23, 1, 0.32, 1);
}

.btn.btn-primary {
    background: linear-gradient(90deg, #4e567e 0%, #7bb0ff 100%);
    border: none;
    color: #fff;
    font-weight: 600;
    padding: 0.8rem 2.2rem;
    border-radius: 2rem;
    font-size: 1.1rem;
    box-shadow: 0 2px 8px #1a223355;
    transition: background 0.18s, transform 0.18s;
}

.btn.btn-primary:hover {
    background: linear-gradient(90deg, #7bb0ff 0%, #4e567e 100%);
    transform: scale(1.06);
}

.readmore-btn {
    background: none;
    border: none;
    color: #7bb0ff;
    font-weight: 600;
    cursor: pointer;
    margin-top: 0.5rem;
    font-size: 1rem;
    transition: color 0.18s;
    padding: 0;
}

.readmore-btn:hover {
    color: #4e567e;
    text-decoration: underline;
}

.scroll-down-arrow {
    position: absolute;
    left: 50%;
    bottom: 2.5rem; /* valeur raisonnable pour desktop */
    transform: translateX(-50%);
    z-index: 10;
    display: flex;
    justify-content: center;
    align-items: center;
}

.scroll-down-arrow img {
    height: 3rem;
    width: 3rem;
    cursor: pointer;
    transition: transform 0.2s;
}

.scroll-down-arrow img:hover {
    transform: scale(1.15);
}

/* Responsivité pour petits écrans */
@media (max-width: 600px) {
    .scroll-down-arrow {
        bottom: 1rem; /* un peu plus bas sur mobile */
    }
    .scroll-down-arrow img {
        height: 2.2rem;
        width: 2.2rem;
    }
}