/*
0 - 600px:      Phone
600 - 900px:    Tablet portrait
900 - 1200px:   Tablet landscape
[1200 - 1800] is where our normal styles apply
1800px + :      Big desktop
$breakpoint arguement choices:
- phone
- tab-port
- tab-land
- big-desktop

Inside media queries 1em is always 16px i.e 1em = 16px at every screen size only inside media queries
*/
*,
*::after,
*::before {
  margin: 0;
  padding: 0;
  box-sizing: inherit;
  font-family: inherit; }

html {
  font-size: 62.5%;
  scroll-behavior: smooth; }
  @media only screen and (max-width: 75em) {
    html {
      font-size: 59%; } }
  @media only screen and (max-width: 56.25em) {
    html {
      font-size: 56%; } }
  @media only screen and (min-width: 112.5em) {
    html {
      font-size: 65%; } }

#webgl-canvas {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    z-index: -1; /* Le place tout au fond */
    pointer-events: none; /* Laisse passer les clics vers le site HTML */
}

body {
  box-sizing: border-box;
  position: relative;
  line-height: 1.5;
  overflow-x: hidden;
  overflow-y: scroll;
  background-color: #7b7b7b; 
  font-family: 'Consolas', monospace;
}

a {
  text-decoration: none;
  color: inherit; }

li {
  list-style: none; }

input:focus,
button:focus,
a:focus,
textarea:focus {
  outline: none; }

button {
  border: none;
  cursor: pointer; }

textarea {
  resize: none; }

.heading-primary {
  font-size: 6rem;
  text-transform: uppercase;
  letter-spacing: 3px;
  text-align: center; }
  @media only screen and (max-width: 37.5em) {
    .heading-primary {
      font-size: 4.5rem; } }

.heading-secondary {
  font-size: 3rem;
  text-transform: uppercase;
  letter-spacing: 3px;
  text-align: center; }
  @media only screen and (max-width: 37.5em) {
    .heading-secondary {
      font-size: 4.5rem; } }

.heading-ter {
  margin-top: 2rem;
  font-size: 2rem;
  text-transform: uppercase;
  letter-spacing: 3px;
  text-align: center; }
  @media only screen and (max-width: 37.5em) {
    .heading-ter {
      font-size: 4.5rem; } }

.heading-sec__mb-bg {
  margin-bottom: 11rem; }
  @media only screen and (max-width: 56.25em) {
    .heading-sec__mb-bg {
      margin-bottom: 8rem; } }

.heading-sec__mb-med {
  margin-bottom: 9rem; }
  @media only screen and (max-width: 56.25em) {
    .heading-sec__mb-med {
      margin-bottom: 8rem; } }

.heading-sec__main {
  display: block;
  font-size: 4rem;
  text-transform: uppercase;
  letter-spacing: 1px;
  letter-spacing: 3px;
  text-align: center;
  margin-bottom: 3.5rem;
  position: relative; }
  .heading-sec__main--lt {
    color: #fff; }
    .heading-sec__main--lt::after {
      content: '';
      background: #fff !important; }
  .heading-sec__main::after {
    content: '';
    position: absolute;
    top: calc(100% + 1.5rem);
    height: 5px;
    width: 3rem;
    background: #545454;
    left: 50%;
    transform: translateX(-50%);
    border-radius: 5px; }
    @media only screen and (max-width: 37.5em) {
      .heading-sec__main::after {
        top: calc(100% + 1.2rem); } }

.heading-sec__sub {
  display: block;
  text-align: center;
  color: #777;
  font-size: 2rem;
  font-weight: 500;
  max-width: 80rem;
  margin: auto;
  line-height: 1.6; }
  @media only screen and (max-width: 37.5em) {
    .heading-sec__sub {
      font-size: 1.8rem; } }
  .heading-sec__sub--lt {
    color: #eee; }

.heading-sm {
  font-size: 2.2rem;
  text-transform: uppercase;
  letter-spacing: 1px; }

.main-container {
  max-width: 120rem;
  margin: auto;
  width: 92%; }

.btn {
  background: #868686;
  color: #333;
  text-transform: uppercase;
  letter-spacing: 2px;
  display: inline-block;
  font-weight: 700;
  border-radius: 5px;
  box-shadow: 0 5px 15px 0 rgba(0, 0, 0, 0.15);
  transition: transform .3s; }
  .btn:hover {
    transform: translateY(-3px); }
  .btn--bg {
    padding: 1.5rem 4rem;
    font-size: 2rem; }
  .btn--med {
    padding: 1rem 1.6rem;
    font-size: 1.6rem; }
  .btn--theme {
    background: #545454;
    color: #fff; }
  .btn--theme-inv {
    color: #545454;
    background: #fff;
    border: 2px solid #545454;
    box-shadow: none;
    padding: calc(1.5rem - 2px) calc(5rem - 2px); }

.sec-pad {
  padding: 12rem 0; }
  @media only screen and (max-width: 56.25em) {
    .sec-pad {
      padding: 8rem 0; } }

.text-primary {
  color: #fff;
  font-size: 2.2rem;
  text-align: left;
  width: 100%;
  line-height: 1.6; }
  @media only screen and (max-width: 37.5em) {
    .text-primary {
      font-size: 2rem; } }

.d-none {
  display: none; }

.home-hero {
  color: #fff;
  background: linear-gradient(to right, rgba(0, 98, 185, 0.8), rgba(0, 98, 185, 0.8)), url(../../assets/svg/common-bg.svg);
  background-position: center;
  height: 100vh;
  min-height: 80rem;
  max-height: 120rem;
  position: relative; }
  @media only screen and (max-width: 37.5em) {
    .home-hero {
      height: unset;
      min-height: unset; } }
  .home-hero__socials {
    position: absolute;
    top: 50%;
    border: 2px solid #eee;
    border-left: 2px solid #eee;
    transform: translateY(-50%); }
    @media only screen and (max-width: 56.25em) {
      .home-hero__socials {
        display: none; } }
  .home-hero__mouse-scroll-cont {
    position: absolute;
    bottom: 3%;
    left: 50%;
    transform: translateX(-50%); }
    @media only screen and (max-width: 37.5em) {
      .home-hero__mouse-scroll-cont {
        display: none; } }
  .home-hero__social {
    width: 5rem; }
  .home-hero__social-icon-link {
    width: 100%;
    display: block;
    padding: 1.2rem;
    border-bottom: 2px solid #eee;
    transition: background .3s; }
    .home-hero__social-icon-link:hover {
      background: rgba(255, 255, 255, 0.1); }
    .home-hero__social-icon-link--bd-none {
      border-bottom: 0; }
  .home-hero__social-icon {
    width: 100%; }
  .home-hero__content {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    max-width: 90rem;
    width: 92%; }
    @media only screen and (max-width: 37.5em) {
      .home-hero__content {
        padding: 19rem 0 13rem 0;
        margin: auto;
        position: static;
        transform: translate(0, 0); } }
  .home-hero__info {
    margin: 0;
    margin-top: 4rem;
    max-width: 80rem; }
  .home-hero__cta {
    margin-top: 5rem;
    text-align: left; }

.about {
  background: #fafafa; }
  .about__content {
    display: grid;
    grid-template-columns: 1fr 1fr;
    grid-gap: 10rem; }
    @media only screen and (max-width: 56.25em) {
      .about__content {
        grid-template-columns: 1fr;
        grid-gap: 8rem; } }
    .about__content-title {
      font-weight: 700;
      font-size: 2.8rem;
      margin-top: 1rem;
      margin-bottom: 2rem; }
      @media only screen and (max-width: 37.5em) {
        .about__content-title {
          font-size: 2.4rem; } }
    .about__content-details-para {
      font-size: 1.5rem;
      color: grey;
      max-width: 60rem;
      line-height: 1.7;
      margin-bottom: 1rem; }
      .about__content-details-para--hl {
        font-weight: 700;
        margin: 0 3px; }
      .about__content-details-para:last-child {
        margin-bottom: 4rem; }

.projects__row {
  display: grid;
  grid-template-columns: 1.5fr 1fr;
  grid-gap: 5rem;
  margin-bottom: 11rem; }
  @media only screen and (max-width: 56.25em) {
    .projects__row {
      grid-template-columns: 1fr;
      grid-gap: 2rem;
      margin-bottom: 8rem; } }
  @media only screen and (max-width: 56.25em) {
    .projects__row {
      text-align: center; } }
  .projects__row:last-child {
    margin-bottom: 0; }
  .projects__row-img-cont {
    overflow: hidden; }
  .projects__row-img {
    width: 100%;
    display: block;
    object-fit: cover; }
  .projects__row-content {
    padding: 2rem 0;
    display: flex;
    justify-content: center;
    flex-direction: column;
    align-items: flex-start; }
    @media only screen and (max-width: 56.25em) {
      .projects__row-content {
        align-items: center; } }
    .projects__row-content-title {
      font-weight: 700;
      font-size: 2.8rem;
      margin-bottom: 2rem; }
      @media only screen and (max-width: 37.5em) {
        .projects__row-content-title {
          font-size: 2.4rem; } }
    .projects__row-content-subtitle {
      font-weight: 300;
      font-size: 1.8rem;
      margin-bottom: 2rem;
      opacity: 0.55; }
      @media only screen and (max-width: 37.5em) {
        .projects__row-content-subtitle {
          font-size: 1.8rem; } }
    .projects__row-content-desc {
      font-size: 1.5rem;
      color: grey;
      max-width: 60rem;
      line-height: 1.7;
      margin-bottom: 3rem; }
      @media only screen and (max-width: 37.5em) {
        .projects__row-content-desc {
          font-size: 1.7rem; } }

.contact {
  background: linear-gradient(to right, rgba(0, 98, 185, 0.8), rgba(0, 98, 185, 0.8)), url(../../assets/svg/common-bg.svg);
  background-size: cover;
  background-position: center; }
  .contact__form-container {
    box-shadow: 0 0 10px rgba(0, 0, 0, 0.1);
    background: white;
    padding: 4rem;
    margin-top: 6rem;
    max-width: 80rem;
    text-align: right;
    width: 95%;
    border-radius: 5px;
    margin: 5rem auto 0 auto; }
    @media only screen and (max-width: 37.5em) {
      .contact__form-container {
        padding: 3rem; } }
  .contact__form-field {
    margin-bottom: 4rem; }
    @media only screen and (max-width: 37.5em) {
      .contact__form-field {
        margin-bottom: 3rem; } }
  .contact__form-label {
    color: #666;
    font-size: 1.4rem;
    letter-spacing: 1px;
    font-weight: 700;
    margin-bottom: 1rem;
    display: block;
    text-align: left; }
  .contact__form-input {
    color: #333;
    padding: 2rem;
    width: 100%;
    border: 1px solid #ebebeb;
    font-size: 1.6rem;
    letter-spacing: 0px;
    background: #f0f0f0;
    border-radius: 5px;
    font-weight: 600;
    /* Code for Modern Browsers */
    /* Code for WebKit, Blink, Edge */
    /* Code for Internet Explorer 10-11 */
    /* Code for Microsoft Edge */
    /* Code for Mozilla Firefox 4 to 18 */
    /* Code for Mozilla Firefox 19+ */ }
    .contact__form-input::placeholder {
      color: #999;
      font-weight: 600;
      font-size: 1.6rem; }
    .contact__form-input::-webkit-input-placeholder {
      color: #999;
      font-weight: 600;
      font-size: 1.6rem; }
    .contact__form-input:-ms-input-placeholder {
      color: #999;
      font-weight: 600;
      font-size: 1.6rem; }
    .contact__form-input::-ms-input-placeholder {
      color: #999;
      font-weight: 600;
      font-size: 1.6rem; }
    .contact__form-input:-moz-placeholder {
      opacity: 1;
      color: #999;
      font-weight: 600;
      font-size: 1.6rem; }
    .contact__form-input::-moz-placeholder {
      opacity: 1;
      color: #999;
      font-weight: 600;
      font-size: 1.6rem; }
  .contact__btn {
    width: 30%;
    padding: 2rem 4rem;
    font-size: 1.6rem; }
    @media only screen and (max-width: 37.5em) {
      .contact__btn {
        width: 100%; } }

.project-cs-hero {
  color: #fff;
  background: linear-gradient(to right, rgba(0, 98, 185, 0.8), rgba(0, 98, 185, 0.8)), url(../../assets/svg/common-bg.svg);
  background-size: cover;
  background-position: center;
  position: relative; }
  @media only screen and (max-width: 37.5em) {
    .project-cs-hero {
      height: unset;
      min-height: unset; } }
  .project-cs-hero__content {
    padding: 25rem 0 17rem 0;
    max-width: 90rem;
    width: 92%;
    margin: auto; }
    @media only screen and (max-width: 37.5em) {
      .project-cs-hero__content {
        padding: 19rem 0 13rem 0;
        margin: auto;
        position: static;
        transform: translate(0, 0); } }
  .project-cs-hero__info {
    margin: 3rem auto 0 auto;
    max-width: 80rem; }
  .project-cs-hero__cta {
    margin-top: 5rem;
    text-align: center; }

.project-details__content {
  padding: 8rem 0;
  max-width: 90rem;
  margin: auto; }
  .project-details__content-title {
    font-weight: 700;
    font-size: 2.8rem;
    margin-bottom: 3rem; }
    @media only screen and (max-width: 37.5em) {
      .project-details__content-title {
        font-size: 2.4rem; } }

.project-details__showcase-img-cont {
  width: 100%;
  margin-bottom: 6rem; }

.project-details__showcase-img {
  width: 100%; }

.project-details__content-main {
  width: 100%;
  max-width: 70rem;
  margin: auto; }

.project-details__desc {
  margin: 0 0 7rem 0; }
  .project-details__desc-para {
    font-size: 1.8rem;
    line-height: 1.7;
    color: grey;
    margin-bottom: 2rem; }

.project-details__tools-used {
  margin: 0 0 7rem 0; }
  .project-details__tools-used-list {
    display: flex;
    flex-wrap: wrap; }
  .project-details__tools-used-item {
    padding: 1rem 2rem;
    margin-bottom: 1.5rem;
    margin-right: 1.5rem;
    font-size: 1.6rem;
    background: rgba(153, 153, 153, 0.2);
    border-radius: 5px;
    font-weight: 600;
    color: #777; }

.project-details__links {
  margin: 0 0; }
  .project-details__links-btn {
    margin-right: 2rem; }
    @media only screen and (max-width: 37.5em) {
      .project-details__links-btn {
        margin-right: 0;
        width: 70%;
        margin-bottom: 2rem;
        text-align: center; } }
    .project-details__links-btn:last-child {
      margin: 0; }
      @media only screen and (max-width: 37.5em) {
        .project-details__links-btn:last-child {
          margin: 0; } }

.header {
  position: fixed;
  width: 100%;
  z-index: 1000;
  background: #000;
  background: #fff;
  box-shadow: 0 10px 10px rgba(0, 0, 0, 0.1); }
  .header__content {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 1rem 5rem; }
    @media only screen and (max-width: 56.25em) {
      .header__content {
        padding: 0 2rem; } }
  .header__logo-container {
    display: flex;
    align-items: center;
    cursor: pointer;
    color: #333;
    transition: color .3s; }
    .header__logo-container:hover {
      color: #545454; }
  .header__logo-img-cont {
    width: 5rem;
    height: 5rem;
    border-radius: 50px;
    overflow: hidden;
    margin-right: 1.5rem;
    background: #545454; }
    @media only screen and (max-width: 56.25em) {
      .header__logo-img-cont {
        width: 4.5rem;
        height: 4.5rem;
        margin-right: 1.2rem; } }
  .header__logo-img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center;
    display: block; }
  .header__logo-sub {
    font-size: 1.8rem;
    text-transform: uppercase;
    font-weight: 700;
    letter-spacing: 1px; }
  .header__links {
    display: flex; }
    @media only screen and (max-width: 37.5em) {
      .header__links {
        display: none; } }
  .header__link {
    padding: 2.2rem 3rem;
    display: inline-block;
    font-size: 1.6rem;
    color: #333;
    text-transform: uppercase;
    letter-spacing: 1px;
    font-weight: 700;
    transition: color .3s; }
    .header__link:hover {
      color: #545454; }
    @media only screen and (max-width: 56.25em) {
      .header__link {
        padding: 3rem 1.8rem;
        font-size: 1.5rem; } }
  .header__main-ham-menu-cont {
    display: none;
    width: 3rem;
    padding: 2.2rem 0; }
    @media only screen and (max-width: 37.5em) {
      .header__main-ham-menu-cont {
        display: block; } }
  .header__main-ham-menu {
    width: 100%; }
  .header__main-ham-menu-close {
    width: 100%; }
  .header__sm-menu {
    background: #fff;
    position: absolute;
    width: 100%;
    top: 100%;
    visibility: hidden;
    opacity: 0;
    transition: all .3s;
    box-shadow: 0px 5px 5px 0px rgba(0, 0, 0, 0.1);
    -webkit-box-shadow: 0px 5px 5px 0px rgba(0, 0, 0, 0.1);
    -moz-box-shadow: 0px 5px 5px 0px rgba(0, 0, 0, 0.1); }
    .header__sm-menu--active {
      visibility: hidden;
      opacity: 0; }
      @media only screen and (max-width: 37.5em) {
        .header__sm-menu--active {
          visibility: visible;
          opacity: 1; } }
  .header__sm-menu-link a {
    display: block;
    text-decoration: none;
    padding: 2.5rem 3rem;
    font-size: 1.6rem;
    color: #333;
    text-align: right;
    border-bottom: 1px solid #eee;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 2px;
    transition: color .3s; }
    .header__sm-menu-link a:hover {
      color: #545454; }
  .header__sm-menu-link:first-child a {
    border-top: 1px solid #eee; }
  .header__sm-menu-link-last {
    border-bottom: 0; }

.main-footer {
  background: #000;
  color: #fff; }
  .main-footer__upper {
    display: flex;
    justify-content: space-between;
    padding: 8rem 0; }
    @media only screen and (max-width: 56.25em) {
      .main-footer__upper {
        padding: 6rem 0; } }
    @media only screen and (max-width: 37.5em) {
      .main-footer__upper {
        display: block; } }
  .main-footer__row-1 {
    order: 2; }
    @media only screen and (max-width: 56.25em) {
      .main-footer__row-1 {
        margin-bottom: 5rem; } }
  .main-footer__row-2 {
    width: 40%;
    order: 1;
    max-width: 50rem; }
    @media only screen and (max-width: 56.25em) {
      .main-footer__row-2 {
        width: 100%; } }
  .main-footer__short-desc {
    margin-top: 2rem;
    color: #eee;
    font-size: 1.5rem;
    line-height: 1.7; }
  .main-footer__social-cont {
    margin-top: 2rem;
    display: flex;
    align-items: center; 
    gap: 1.5rem }
  .main-footer__icon {
    margin-right: 1rem;
    width: 2.5rem; }
    .main-footer__icon--mr-none {
      margin-right: 0; }
  .main-footer__lower {
    padding: 4rem 0;
    border-top: 1px solid #444;
    color: #eee;
    font-size: 1.2rem;
    text-align: left;
    text-align: center; }
    .main-footer__lower a {
      text-decoration: underline;
      font-weight: bold;
      margin-left: 2px; }
    @media only screen and (max-width: 56.25em) {
      .main-footer__lower {
        padding: 3.5rem 0; } }

.skills {
  display: flex;
  flex-wrap: wrap; }
  .skills__skill {
    padding: 0.6rem 1rem;
    margin-bottom: 3.5rem;
    margin-right: 1rem;
    font-size: 1.3rem;
    background: rgba(153, 153, 153, 0.2);
    border-radius: 15px;
    font-weight: 600;
    color: #777; }

.mouse {
  width: 25px;
  height: 40px;
  border: 2px solid #eee;
  border-radius: 60px;
  position: relative;
  overflow: hidden; }
  .mouse::before {
    content: '';
    width: 5px;
    height: 5px;
    position: absolute;
    top: 7px;
    left: 50%;
    transform: translateX(-50%);
    background-color: #eee;
    border-radius: 50%;
    opacity: 1;
    animation: wheel 1.3s infinite;
    -webkit-animation: wheel 1.3s infinite; }

@keyframes wheel {
  to {
    opacity: 0;
    top: 27px; } }

@-webkit-keyframes wheel {
  to {
    opacity: 0;
    top: 27px; } }

#ascii-container {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    z-index: -1;
    pointer-events: none;
    background-color: #050505;
    overflow: hidden; /* Coupe ce qui dépasse du texte, mais garantit le cadre */
    margin: 0;
    padding: 0;

    font-family: monospace !important; /* Laisse le navigateur choisir sa police à espacement fixe par défaut */
    font-weight: 300 !important; /* Force une épaisseur de trait très fine */
    -webkit-font-smoothing: antialiased !important; /* Crucial : c'est ce qui "évide" et affine le texte sur Brave/Chrome */
    opacity: 1 !important; /* Baisse légèrement l'opacité globale pour accentuer le côté "gris discret" */
    font-size: 14px !important; /* Verrouille la taille des caractères (ajuste cette valeur si c'est trop gros/petit) */
    line-height: 14px !important; /* Verrouille la hauteur de chaque ligne de texte */
}

/* ==========================================================================
   PASSAGE EN DARK MODE ET TRANSPARENCE POUR LA 3D
   ========================================================================== */

/* 1. Suppression des arrière-plans pour voir le canvas Three.js */
body, 
section, 
header, 
footer,
.about, 
.projects, 
.contact, 
.home-hero,
.main-footer,
.dynamicBg,
.sec-pad {
    background-color: transparent !important;
    background: none !important;
}

.projects__row, 
.about__content-main, 
.about__content-skills,
.contact__form-container {
    background-color: rgba(0, 0, 0, 0.03) !important;
    box-shadow: 0 0 30px rgba(0, 0, 0, 0.05) !important;
    
    border: none; 
    border-radius: 7px;
    
    /* Flou d'arrière-plan doublé pour un effet verre dépoli intense */
    backdrop-filter: blur(22) !important;
    -webkit-backdrop-filter: blur(22) !important;
}

/* 2. Passage des polices en teintes claires */
body, 
p, 
span, 
li, 
a, 
.text-primary,
.heading-sec__sub,
.about__content-details-para,
.projects__row-content-desc {
    color: #393939 !important; /* Gris clair agréable à lire */
}

h1, 
h2, 
h3, 
h4, 
h5, 
h6, 
.heading-primary, 
.heading-sec__main, 
.about__content-title,
.projects__row-content-title,
.header__logo-sub {
    color: #2b2b2b !important; /* Blanc pur pour les titres */
}

/* 3. Adaptation du menu de navigation */
.header {
    background-color: rgba(255, 255, 255, 0.85) !important; /* Blanc semi-transparent au lieu de gris foncé */
    backdrop-filter: blur(10px);
}

.header__link, 
.header__sm-menu-link a {
    color: #2b2b2b !important;
}

/* 4. Adaptation du formulaire de contact */
.contact__form-label {
    color: #333333 !important;
}

.contact__form-input {
    background-color: rgba(0, 0, 0, 0.03) !important;
    color: #333333 !important;
    border: 1px solid rgba(0, 0, 0, 0.1) !important;
}

.contact__form-input::placeholder {
    color: #888888 !important;
}

/* 5. Esthétique des badges de compétences (Skills) */
.skills__skill {
    background-color: rgba(0, 0, 0, 0.05) !important;
    color: #2b2b2b !important;
    border: 1px solid rgba(0, 0, 0, 0.1);
    cursor: pointer !important; /* Force l'apparition de la main au survol */
    transition: background-color 0.3s ease, color 0.3s ease !important;
}

/* Gère l'alignement horizontal du nom et des icônes */
.header__brand {
  display: flex;
  align-items: center;
  gap: 2.5rem; /* Espace entre ton nom et la première icône */
}

/* Gère l'espacement entre les icônes elles-mêmes */
.header__socials {
  display: flex;
  align-items: center;
  gap: 1.5rem; 
}

/* Adapte la taille des images au menu et ajoute une transition */
.header__social-icon {
  width: 2.5rem;
  transition: transform 0.3s ease, opacity 0.3s ease;
  display: block;
  color: #000;
  opacity: 0.5;
}

/* Petit effet sympa au survol */
.header__social-icon:hover {
  transform: translateY(-3px);
  opacity: 0.8;
}

.about,
.projects,
.cv,
.contact,
.main-footer {
  transform: translateY(100px); 
  opacity: 0;
  transition: transform 0.8s ease-out, opacity 0.8s ease-out;
}

/* État final : elles remontent à leur place initiale quand la classe est ajoutée */
.about.slide-up-active,
.projects.slide-up-active,
.cv.slide-up-active,
.contact.slide-up-active,
.main-footer.slide-up-active {
  transform: translateY(0);
  opacity: 1;
}

/* Réduit l'espace en bas de la section À propos */
.about.sec-pad {
  padding-bottom: 6rem; /* Tu peux ajuster cette valeur (ex: 2rem ou 6rem) */
}

/* Réduit l'espace en haut de la section Projets */
.projects.sec-pad {
  padding-top: 6rem; /* Tu peux ajuster cette valeur */
}

/* On s'assure que sur mobile, l'espace reste bien proportionné */
@media only screen and (max-width: 56.25em) {
  .about.sec-pad {
    padding-bottom: 3rem;
  }
  .projects.sec-pad {
    padding-top: 3rem;
  }
}

/* ==========================================================================
   ALIGNEMENT À GAUCHE (Textes, Titres et Boutons)
   ========================================================================== */

/* 1. Textes et bouton de la section d'accueil (Hero) */
.heading-primary,
.heading-secondary,
.heading-ter,
.text-primary,
.home-hero__cta {
  text-align: left !important;
}

/* 2. Titres et sous-titres de toutes les autres sections */
.heading-sec__main,
.heading-sec__sub {
  text-align: left !important;
  margin-left: 0 !important; /* Empêche le centrage automatique du sous-titre */
}

/* 3. Déplacement de la petite barre bleue sous les titres de section */
.heading-sec__main::after {
  left: 0 !important;
  transform: none !important;
}

/* 4. Réajustement des marges du paragraphe dans la section À propos */
.about__content-details-para {
  margin-left: 0 !important;
}

/* ==========================================================================
   RÉDUCTION DES ESPACES - SECTION PROJETS
   ========================================================================== */

/* 1. Réduit l'espace géant entre le grand titre et le premier projet */
.projects .heading-sec__mb-bg {
  margin-bottom: 5rem !important; /* Au lieu des 11rem de base */
}

/* 2. Réduit l'écart entre chaque projet (ex: entre le projet IRIT et la Fonction Gamma) */
.projects__row {
  margin-bottom: 5rem !important; /* Au lieu des 11rem de base */
}

/* 3. Réduit légèrement l'espacement interne (titre du projet -> texte -> bouton) */
.projects__row-content-title {
  margin-bottom: 1rem !important; /* Au lieu de 2rem */
}

.projects__row-content-desc {
  margin-bottom: 2rem !important; /* Au lieu de 3rem */
}

/* 4. On ajuste aussi pour la version mobile (écrans plus petits) */
@media only screen and (max-width: 56.25em) {
  .projects .heading-sec__mb-bg {
    margin-bottom: 4rem !important; 
  }
  .projects__row {
    margin-bottom: 4rem !important;
  }
}

/* 1. Modifie le conteneur ASCII existant pour enlever le fond noir */
#ascii-container {
    /* ... tes autres propriétés existantes ... */
    background-color: transparent !important; /* Modifié ici */
}

/* ==========================================================================
   COULEUR DES ICÔNES RÉSEAUX SOCIAUX
   ========================================================================== */
.header__social-icon,
.main-footer__icon {
    /* Force l'image à devenir noire, peu importe sa couleur de base */
    filter: brightness(0) !important; 
    
    /* On la met à 70% d'opacité pour avoir un gris foncé élégant qui matche ton texte */
    opacity: 0.7 !important; 
    transition: opacity 0.3s ease, transform 0.3s ease !important;
}

/* Petit effet visuel pour qu'ils deviennent 100% noirs au survol */
.header__social-icon:hover,
.main-footer__icon:hover {
    opacity: 1 !important;
    transform: translateY(-3px) !important;
}

#matrix-canvas {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    z-index: -3; /* Tout au fond, derrière les halos et la 3D */
    pointer-events: none; /* Laisse passer les clics */
    background-color: #ffffff;
}

.btn {
    background-color: #bfbfbf !important; 
    color: #ffffff !important; 
    border: none !important;
    /* On ajoute "color 0.3s ease" pour que la transition du texte soit aussi fluide que le fond */
    transition: transform 0.3s ease, background-color 0.3s ease, color 0.3s ease !important; 
}

/* Fluidité de l'animation pour les liens du menu (Haut Droite) */
.header__link {
    /* Permet au texte de bouger et de changer de couleur en douceur (0.25 seconde) */
    transition: transform 0.25s ease, color 0.25s ease !important;
}

/* ==========================================================================
   COULEUR DE SÉLECTION DU TEXTE (Surlignage)
   ========================================================================== */
::selection {
    background-color: #2b2b2b !important; /* Le fond de sélection devient gris foncé/noir */
    color: #ffffff !important; /* Le texte surligné passe en blanc pour être lisible */
}

/* Version spécifique pour la compatibilité avec le navigateur Mozilla Firefox */
::-moz-selection {
    background-color: #2b2b2b !important;
    color: #ffffff !important;
}

/* ==========================================================================
   ALIGNEMENT DES BOUTONS DE PROJETS
   ========================================================================== */
.projects__buttons-container {
    display: flex;
    gap: 2.5rem; /* Crée un bel espace régulier de 2rem entre les boutons */
    flex-wrap: wrap; /* Sécurité : si l'écran est vraiment trop petit (mobile), le deuxième bouton passera à la ligne proprement */
}

/* Sur mobile, on centre les boutons pour que ce soit plus joli */
@media only screen and (max-width: 56.25em) {
    .projects__buttons-container {
        justify-content: center;
    }
}

/* ==========================================================================
   STYLES MOBILES RAFFINÉS — Écrans ≤ 37.5em (600px)
   Adapte l'expérience au format poche en préservant intégralement
   l'âme du site : typographie monospace, glassmorphism, fond matrix.
   L'affichage desktop n'est pas affecté.
   ========================================================================== */

@media only screen and (max-width: 37.5em) {

  /* ──────────────────────────────────────────────
     CORRECTION DES BUGS DE TYPOGRAPHIE HERO
     Les deux sous-titres héritaient par erreur de
     font-size: 4.5rem (taille du nom principal).
     ────────────────────────────────────────────── */

  .heading-primary {
    font-size: 3.6rem;
    letter-spacing: 2px;
  }

  /* "Étudiant en L3..." — sous-titre clair et compact */
  .heading-secondary {
    font-size: 1.75rem !important;
    letter-spacing: 1.5px;
    margin-top: 1rem;
  }

  /* "Université de Toulouse…" — mention discrète */
  .heading-ter {
    font-size: 1.05rem !important;
    letter-spacing: 2.5px;
    margin-top: 0.8rem;
    opacity: 0.7;
  }

  /* ──────────────────────────────────────────────
     SECTION HÉRO — Plein écran, contenu centré
     On restaure le comportement desktop (100vh +
     positionnement absolu) sur mobile également.
     ────────────────────────────────────────────── */

  .home-hero {
    height: 100vh !important;
    min-height: 100vh !important;
  }

  .home-hero__content {
    position: absolute !important;
    top: 50% !important;
    left: 50% !important;
    transform: translate(-50%, -50%) !important;
    padding: 0 !important;
    width: 88%;
    max-width: 88%;
  }

  .home-hero__info {
    margin-top: 2.2rem;
  }

  .text-primary {
    font-size: 1.5rem !important;
    line-height: 1.75;
  }

  .home-hero__cta {
    margin-top: 2.8rem;
  }

  /* Bouton CTA hero légèrement plus compact */
  .btn--bg {
    padding: 1rem 2.5rem;
    font-size: 1.5rem;
  }

  /* ──────────────────────────────────────────────
     HEADER — Nom + icônes + hamburger sur 375px
     ────────────────────────────────────────────── */

  .header__content {
    padding: 0 1.8rem !important;
  }

  .header__brand {
    gap: 1.2rem;
  }

  /* Nom légèrement réduit pour laisser la place au hamburger */
  .header__logo-sub {
    font-size: 1.3rem !important;
    letter-spacing: 0.5px;
  }

  .header__social-icon {
    width: 1.8rem !important;
  }

  .header__socials {
    gap: 1rem;
  }

  /* Menu déroulant mobile : glassmorphism cohérent avec le header */
  .header__sm-menu {
    background: rgba(255, 255, 255, 0.93) !important;
    backdrop-filter: blur(12px) !important;
    -webkit-backdrop-filter: blur(12px) !important;
  }

  /* ──────────────────────────────────────────────
     ESPACEMENT GÉNÉRAL DES SECTIONS
     ────────────────────────────────────────────── */

  .sec-pad {
    padding: 5rem 0 !important;
  }

  .about.sec-pad {
    padding-bottom: 2rem !important;
  }

  .projects.sec-pad {
    padding-top: 2rem !important;
  }

  /* Titres et sous-titres de section */
  .heading-sec__main {
    font-size: 2.8rem !important;
    margin-bottom: 2rem;
  }

  .heading-sec__sub {
    font-size: 1.5rem !important;
  }

  /* Marges sous les en-têtes de section */
  .heading-sec__mb-bg {
    margin-bottom: 4rem !important;
  }

  .heading-sec__mb-med {
    margin-bottom: 3.5rem !important;
  }

  /* ──────────────────────────────────────────────
     SECTION À PROPOS
     ────────────────────────────────────────────── */

  .about__content {
    grid-gap: 3rem;
  }

  /* Padding interne des cartes glassmorphism */
  .about__content-main,
  .about__content-skills {
    padding: 2.2rem !important;
  }

  .about__content-title {
    font-size: 2rem !important;
    margin-bottom: 1.2rem;
  }

  .about__content-details-para {
    font-size: 1.4rem !important;
    line-height: 1.75;
  }

  /* ──────────────────────────────────────────────
     SECTION PROJETS
     Alignement gauche préservé : cohérence avec
     l'esthétique éditoriale/terminal du site.
     ────────────────────────────────────────────── */

  .projects__row {
    text-align: left !important;
    padding: 2.2rem !important;
    margin-bottom: 2.5rem !important;
  }

  .projects__row-content {
    align-items: flex-start !important;
    padding: 0;
  }

  .projects__row-content-title {
    font-size: 1.9rem !important;
    line-height: 1.4;
    margin-bottom: 0.8rem !important;
  }

  .projects__row-content-subtitle {
    font-size: 1.3rem !important;
    margin-bottom: 1.2rem;
  }

  .projects__row-content-desc {
    font-size: 1.4rem !important;
    line-height: 1.7;
    margin-bottom: 1.8rem !important;
  }

  .projects .heading-sec__mb-bg {
    margin-bottom: 3.5rem !important;
  }

  /* Boutons alignés à gauche — comme tout le reste sur ce site */
  .projects__buttons-container {
    justify-content: flex-start !important;
    gap: 1.2rem;
  }

  /* ──────────────────────────────────────────────
     BADGES DE COMPÉTENCES
     ────────────────────────────────────────────── */

  .skills__skill {
    font-size: 1.15rem !important;
    padding: 0.5rem 0.9rem !important;
    margin-bottom: 0.9rem;
    margin-right: 0.8rem;
  }

  /* ──────────────────────────────────────────────
     FOOTER
     ────────────────────────────────────────────── */

  .main-footer__upper {
    padding: 4rem 0 !important;
  }

  .main-footer__row-1 {
    margin-bottom: 3rem;
  }

  .main-footer__short-desc {
    font-size: 1.3rem;
    line-height: 1.7;
  }

  /* ──────────────────────────────────────────────
     ANIMATIONS D'APPARITION
     Amplitude réduite sur petit écran pour un
     effet plus doux et moins saccadé.
     ────────────────────────────────────────────── */

  .about,
  .projects,
  .contact,
  .main-footer {
    transform: translateY(50px) !important;
  }

  /* ──────────────────────────────────────────────
     FOND MATRIX — Légèrement atténué sur mobile
     pour ne pas saturer visuellement le petit écran.
     ────────────────────────────────────────────── */

  #matrix-canvas {
    opacity: 0.5;
  }
}

/* ==========================================================================
   ANIMATION LETTRE PAR LETTRE - SECTION HERO
   ========================================================================== */
.hero-letter {
    display: inline-block; /* Requis pour que "transform" fonctionne sur une lettre individuelle */
    transition: color 0.15s ease, transform 0.15s ease !important;
}

.first-p-red {
    color: #e74c3c !important; /* Rouge vif initial */
}

/* ==========================================================================
   CORRECTION DU DÉCALAGE DE SCROLL (HEADER FIXE)
   ========================================================================== */
#projects {
    /* Décale le point d'arrêt du scroll de 100px (10rem) vers le bas, 
       laissant ainsi la place pour que le titre apparaisse sous le header */
    scroll-margin-top: 13rem; 
}

#about {
    /* Décale le point d'arrêt du scroll de 100px (10rem) vers le bas, 
       laissant ainsi la place pour que le titre apparaisse sous le header */
    scroll-margin-top: 8rem; 
}

/* On adapte légèrement pour la version mobile si le menu est plus fin */
@media only screen and (max-width: 37.5em) {
    #about, 
    #projects {
        scroll-margin-top: 8rem;
    }
}

/* ==========================================================================
   COMPARTIMENTS FORMATION & EXPÉRIENCE - SECTION HERO (Version agrandie)
   ========================================================================== */
.home-hero__experience-container {
    display: flex; 
    flex-wrap: wrap; 
    gap: 15rem; /* Espace horizontal augmenté (de 6rem à 7rem) */
    margin-top: 15rem;
}

.home-hero__compartment {
    display: flex;
    flex-direction: column;
    gap: 1.8rem; /* Espace vertical entre le titre et les logos augmenté */
}

/* Style des petits sous-titres "Formation" et "Expérience" */
.home-hero__compartment-title {
    font-size: 2rem; /* Texte plus grand (passé de 1.2rem à 1.5rem) */
    text-transform: uppercase;
    letter-spacing: 2px;
    color: #777; 
    font-weight: 700;
    text-align: left;
}

/* Le conteneur des logos à l'intérieur de chaque compartiment */
.home-hero__logos {
    display: flex;
    align-items: center;
    gap: 3.5rem; /* Espacement entre les logos augmenté pour la lisibilité */
}

.home-hero__logo {
    height: 7.5rem; /* Logos plus imposants (passé de 4rem à 5.5rem) */
    width: auto;
    object-fit: contain;
    filter: grayscale(100%) opacity(60%);
    transition: filter 0.3s ease, transform 0.3s ease;
}

.home-hero__logo:hover {
    filter: grayscale(0%) opacity(100%);
    transform: translateY(-3px);
}

/* ==========================================================================
   ADAPTATION MOBILE DES LOGOS (Écrans ≤ 600px)
   ========================================================================== */
@media only screen and (max-width: 37.5em) {
    .home-hero__experience-container {
        flex-direction: column;
        gap: 4rem; /* Plus d'espace entre les compartiments superposés */
        margin-top: 4rem;
    }
    .home-hero__compartment-title {
        font-size: 1.3rem; /* Un peu plus grand sur mobile aussi */
    }
    .home-hero__logos {
        gap: 2.5rem;
    }
    .home-hero__logo {
        height: 4.5rem; /* Logos agrandis sur téléphone (passé de 3.5rem à 4.5rem) */
    }
}

.home-hero {
    display: flex;
    align-items: flex-start;
    justify-content: center;
    padding-top: 24rem; /* Maintient le texte sous le header */
    
    /* Nouvelles règles pour empêcher le chevauchement : */
    height: auto !important; /* La section s'adapte à la taille de son contenu */
    min-height: 100vh !important; /* Elle fera toujours au moins la taille de l'écran */
    max-height: none !important; /* Supprime le blocage à 120rem */
    padding-bottom: 8rem; /* Ajoute un espace de respiration avant la section suivante */
}

.home-hero__content {
    position: relative !important;
    top: auto !important;
    left: auto !important;
    transform: none !important;
    margin: 0 auto; 
}

/* ==========================================================================
   SECTION CV - Mise en page (Texte + Bouton à gauche, CV à droite)
   ========================================================================== */

/* Le conteneur principal qui aligne les deux colonnes côte à côte */
.cv__layout {
    display: flex;
    justify-content: space-between;
    align-items: flex-start; /* Aligne parfaitement le haut du titre et le haut du CV */
    gap: 5rem; /* Espace entre le texte et le CV */
}

/* La colonne de gauche (Titre, sous-titre, bouton) */
.cv__text-content {
    flex: 0.8; /* Prend tout l'espace disponible à gauche */
    display: flex;
    flex-direction: column;
    align-items: flex-start; /* Aligne les éléments à gauche */
}

/* Assure que le sous-titre s'étend correctement sans être centré */
.cv__text-content .heading-sec__sub {
    max-width: 100%;
}

/* Le conteneur du CV (Colonne de droite) */
.cv__preview-container {
    position: relative; 
    width: 576px; /* Taille réduite pour inciter au téléchargement */
    height: 810px; /* Conserve les proportions d'une page A4 */
    flex-shrink: 0; /* Empêche l'aperçu de s'écraser s'il y a beaucoup de texte */
    border-radius: 7px;
    box-shadow: 0 0 30px rgba(0, 0, 0, 0.08); /* Ombre douce pour détacher le CV du fond */
    overflow: hidden;
    
    /* Effet glassmorphism léger sur le conteneur */
    background-color: rgba(255, 255, 255, 0.2); 
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);

    margin-right: 18rem;
}

/* L'image de l'aperçu du CV */
.cv__image {
    width: 100%;
    height: 100%;
    object-fit: cover; /* Permet à l'image de bien remplir le conteneur */
    pointer-events: none; /* Empêche le drag & drop ou le clic droit sur l'image */
    display: block;
}

/* Calque invisible par-dessus pour bloquer complètement les interactions */
.cv__overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 10;
    background: transparent;
}

/* Adaptation pour téléphones portables et tablettes */
@media only screen and (max-width: 56.25em) {
    .cv__layout {
        flex-direction: column; /* Superpose le texte et le CV sur petit écran */
        gap: 4rem;
    }

    .cv__preview-container {
        width: 100%;
        max-width: 400px;
        height: 550px; /* Un peu plus grand sur mobile pour la lisibilité */
    }
}

/* Décalage du scroll pour le menu fixe */
#cv {
    scroll-margin-top: 8rem;
}

/* ==========================================================================
   ANIMATION ET MODALE DE ZOOM POUR LE CV
   ========================================================================== */

/* Animation de rotation et curseur sur le conteneur existant */
.cv__preview-container {
    transition: transform 0.4s ease, box-shadow 0.4s ease !important;
    cursor: zoom-in; /* Change la souris en loupe pour indiquer l'action */
}

/* Effet de survol : légère rotation et grossissement */
.cv__preview-container:hover {
    transform: rotate(-0.5deg) scale(1.02) !important;
    box-shadow: 0 15px 40px rgba(0, 0, 0, 0.15) !important;
}

/* Le fond plein écran de la modale de zoom */
.cv-modal {
    display: flex;
    align-items: flex-start; /* Changé pour éviter de couper le haut de l'image géante */
    justify-content: center;
    position: fixed;
    z-index: 2000;
    left: 0;
    top: 0;
    width: 100vw;
    height: 100vh;
    background-color: rgba(0, 0, 0, 0.85);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    overflow-y: auto; /* Permet de scroller verticalement */
    padding: 4rem 2vw; /* Garde toujours un espace cliquable autour du CV pour quitter */
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.6s cubic-bezier(0.16, 1, 0.3, 1), visibility 0.6s cubic-bezier(0.16, 1, 0.3, 1);
}

.cv-modal.show {
    opacity: 1;
    visibility: visible;
}

/* L'image du CV en grand (Zoom 1) */
.cv-modal__content {
    margin: auto; /* Permet de centrer l'image quand on est en Zoom 1 */
    max-width: 95%;
    max-height: 90vh; /* Contraint l'image à la hauteur de l'écran */
    border-radius: 5px;
    box-shadow: 0 0 30px rgba(0,0,0,0.5);
    cursor: zoom-in; /* Indique qu'on peut cliquer pour agrandir encore */
    transform: scale(0.92); 
    transition: transform 0.6s cubic-bezier(0.16, 1, 0.3, 1); /* width / max-width sont animés en JS (zoom progressif) */
}

.cv-modal.show .cv-modal__content {
    transform: scale(1);
}

/* Le Zoom 2 (ajouté via Javascript au clic) */
.cv-modal__content.zoomed-in {
    max-height: none; /* Fait sauter la limite de hauteur : le scroll s'active */
    max-width: 1200px; /* L'image s'affiche en énorme (ajustez si besoin) */
    width: 96%;
    will-change: width;
    cursor: zoom-out; /* Indique qu'on peut recliquer pour revenir au Zoom 1 */
}

/* La croix pour fermer */
.cv-modal__close {
    position: fixed; /* Changé de absolute à fixed pour qu'elle suive le scroll */
    top: 2rem;
    right: 4rem;
    color: #fff;
    font-size: 4rem;
    font-weight: bold;
    cursor: pointer;
    transition: color 0.3s ease;
    z-index: 2001; /* Assure que la croix reste au-dessus de l'image géante */
}

.cv-modal__close:hover {
    color: #e74c3c;
}

/* Adaptation sur téléphone */
@media only screen and (max-width: 37.5em) {
    .cv-modal__close {
        top: 1rem;
        right: 2rem;
    }
}