:root {
    /* Couleurs */
    --color-bgPrimary: #191919;
    /* inchangé */
    --color-bgAccent: #1a1d3a;
    /* bleu nuit profond */
    --color-fontPrimary: #e0e0e0;
    /* gris clair pour un meilleur contraste */
    --color-fontAccent: #4d79ff;
    /* bleu électrique */
    --color-stroke: #4d79ff;
    /* même bleu électrique pour les bordures */
    --color-btn: #6a5acd;
    /* bleu slate, plus doux mais toujours dynamique */
    /* Espaces */
    --nav-spacing: 1.5rem;
    /* Taille police */
    --nav-font-size: 1rem;
    --brand-font-size: 1.5rem;
    --btn-font-size: 1rem;
}

/* ===== Police de caractères ===== */
@font-face {
    font-family: 'Montserrat';
    font-style: normal;
    font-weight: 400;
    src: url('../assets/fonts/Montserrat-Regular.ttf') format('truetype');
}

@font-face {
    font-family: 'Montserrat';
    font-style: normal;
    font-weight: 500;
    src: url('../assets/fonts/Montserrat-Medium.ttf') format('truetype');
}

@font-face {
    font-family: 'Montserrat';
    font-style: normal;
    font-weight: 700;
    src: url('../assets/fonts/Montserrat-Bold.ttf') format('truetype');
}

@font-face {
    font-family: 'Montserrat';
    font-style: normal;
    font-weight: 900;
    src: url('../assets/fonts/Montserrat-Black.ttf') format('truetype');
}

/* ===== Style appliqué à l'ensemble du contenu ===== */

html {
    scroll-behavior: smooth;
}

html,
body {
    width: 100%;
    height: 100%;
}

body,
button {
    font-family: 'Montserrat', sans-serif;
}

h2 {
    font-size: 2rem;
    font-weight: 900;
    color: var(--color-fontPrimary);
    margin-top: 2rem;
    ;
}

h3 {
    font-size: 0.8rem;
    font-weight: 700;
    color: var(--color-fontAccent)
}

h4 {
    font-size: 1.2rem;
    font-weight: 700;
    color: var(--color-fontAccent)
}

h5 {
    color: var(--color-fontAccent);
    font-size: 1.4rem;
    font-weight: 700;
}

h6 {
    color: var(--color-fontPrimary);
    font-size: 0.7rem;
    font-weight: 400;
}

/* ===== Header ===== */

header {
    position: fixed;
    width: 100%;
    z-index: 900;
}

.navbar,
.navbar-brand,
.btn-contact,
.nav-link {
    font-weight: 700 !important;
}

.navbar-brand span {
    color: var(--color-fontAccent) !important;
    font-size: var(--brand-font-size);
}

.brand-highlight {
    color: var(--color-btn) !important;
}

.nav-link {
    color: var(--color-fontPrimary) !important;
    font-size: var(--nav-font-size);
}

.navbar-brand:hover {
    filter: brightness(1.2);
}

.nav-link:hover {
    filter: brightness(0.7);
}

#cta-btn-ptf {
    color: var(--color-fontPrimary) !important;
    font-size: 0.9rem;
    font-weight: 700 !important;
    border: 2px solid var(--color-stroke);
    border-radius: 0.5rem;
    transition:
        background-color 0.3s ease,
        color 0.3s ease,
        transform 0.2s ease;
}

#cta-btn-ptf:hover {
    box-shadow: 0 0 8px var(--color-stroke);
    color: var(--color-stroke);
    filter: brightness(0.7);
}











/* ===== Language Button ===== */

.lang-switch {
    background: none;
    border: none;
    padding: 0;
    margin: 0;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 0.3rem;
    color: var(--color-fontPrimary);
}

.lang-switch:focus,
.lang-switch:focus-visible {
    outline: none;
    box-shadow: none;
}

.lang-switch i {
    color: var(--color-fontPrimary);
    font-size: 0.8rem;
}

.flag-icon {
    width: 20px;
    height: auto;
    display: block;
}

.lang-switch:hover {
    filter: brightness(0.7);
}

/* ===== Dropdown langue ===== */

.dropdown-menu {
    background-color: var(--color-stroke);
    /* même couleur que ton bouton */
    border: none;
    border-radius: 10px;
    padding: 0.5rem 0;
}

/* Texte blanc comme navbar */
.dropdown-item {
    color: var(--color-fontPrimary);
    font-weight: 500;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

/* Hover propre */
.dropdown-item:hover {
    background-color: rgba(0, 0, 0, 0.2);
    color: var(--color-fontPrimary);
}

.flag-dropdown {
    width: 22px;
    height: 14px;
    /* ratio rectangulaire */
    object-fit: cover;
    border-radius: 2px;
    /* léger arrondi moderne */
}

.dropdown-menu {
    box-shadow: 0 0 10px var(--color-stroke);
}

/* Scrollspy */

#mainNavbar .nav-link.active {
    background-color: var(--color-btn) !important;
    border: none !important;
    color: var(--color-bgPrimary) !important;
    font-size: var(--btn-font-size);
    border-radius: 12px;
}

#mainNavbar .nav-link.active:hover {
    filter: brightness(1.2);
}

/* Toggler mobile personnalisé */
.navbar-toggler {
    background-color: var(--color-btn) !important;
    border: none !important;
}

.navbar-toggler:focus,
.navbar-toggler:focus-visible {
    outline: none !important;
    box-shadow: 0 0 0 0.2rem var(--color-fontPrimary) !important;
}

/* ===== Particles ===== */

.hero {
    display: flex;
    align-items: center;
    justify-content: center;
    height: 100vh;
    position: relative;
    /* z-index: 0; */
    /* au-dessus du canvas particles */
    width: max-content;
    margin: 0 auto;
    /* ← centre le bloc horizontalement */
}

.cta-wrapper {
    display: inline-flex;
    flex-direction: column;
    align-items: center;
    width: max-content;
    transform: translateY(-20%);
    /* remonte de 10% de sa propre hauteur */
    z-index: 10;
    margin-top: 3rem;
}

.cta-image {
    display: block;
    width: 41%;
    max-width: 73vw;
    height: auto;
    margin-right: 4px;
    filter: brightness(0.8);
}

#cta-btn {
    width: 33%;
    padding: 0.6rem;
    font-size: 1.2rem;
    color: var(--color-fontPrimary);
    background-color: var(--color-bgPrimary);
    border: 3px solid var(--color-stroke);
    border-radius: 1rem;
    transition:
        background-color 0.3s ease,
        color 0.3s ease,
        transform 0.2s ease;
    cursor: default;
}

#cta-btn:hover {
    box-shadow: 0 0 8px var(--color-stroke);
    color: var(--color-stroke);
}

.glow {
    color: var(--color-fontPrimary);
    text-shadow: 0 0 8px var(--color-btn), 0 0 12px var(--color-btn);
}

.scroll-down {
    position: absolute;
    bottom: 8rem;
    /*  ajustez selon l’espacement souhaité */
    left: 50%;
    transform: translateX(-50%);
    font-size: 3rem;
    color: var(--color-stroke);
    z-index: 10;
}

/* ===== aboutMe ===== */

.aboutMe {
    background-color: var(--color-bgAccent);
    width: 100%;
    height: auto;
    position: relative;
    z-index: 20;
}

.lead {
    color: var(--color-fontPrimary);
    font-size: 1rem;
    font-weight: 500;
    margin-top: 3rem;
    line-height: 2;
    text-align: left;
}

.text-accent {
    color: var(--color-fontAccent)
}

/* ===== skills ===== */

.skills-section {
    background-color: var(--color-bgPrimary);
    color: var(--color-fontPrimary);
    position: relative;
    z-index: 20;
}

.skill-card {
    background-color: var(--color-bgAccent);
    border-radius: 1rem;
    padding: 1.5rem;
    flex: 0 0 auto;
    text-align: left;
    min-width: 180px;
    min-height: 12rem;
    margin-top: 3rem;
    max-width: 80%;
    margin: auto;
}

.skill-card:hover {
    filter: brightness(1.4);
}

.skill-icons {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 0.75rem;
    padding-top: 1.2rem;
    cursor: help;
}

.skill-icons img {
    width: auto;
    height: 44px;
}

.skill-icons.stack {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.75rem;
}

.skill-icons.oneline {
    padding-top: 2.5rem;
}

.icon-32 {
    display: inline-block;
    width: 32px;
    height: 32px;
    font-size: 32px;
    line-height: 32px;
    padding: 0;
}

/* ===== Formation ===== */

.formation-section {
    background-color: var(--color-bgPrimary);
    color: var(--color-fontPrimary);
    position: relative;
    z-index: 20;
}

.dot {
    flex-shrink: 0;
    width: 1rem;
    height: 1rem;
    background-color: var(--color-stroke);
    border-radius: 50%;
    margin-top: 1.5rem;
}

.card {
    border: none;
    border-radius: 20px;
    background-color: var(--color-bgAccent);
}

.card-body {
    color: var(--color-fontPrimary);
    line-height: 1.6;
    text-align: left;
    font-weight: 500;
}

.card-body-f:hover {
    box-shadow: 0 0 10px var(--color-stroke);
    transition: box-shadow 0.3s ease;
    border-radius: 20px;
    filter: brightness(0.8);
}

.card-wBody {
    background-color: var(--color-bgPrimary);
    padding-left: 0.9rem;
}

.step-title {
    color: var(--color-fontAccent);
    font-weight: 700;
    margin-bottom: .25rem;
    padding-top: 1rem;
    line-height: 2;
}

.institution {
    font-weight: 500;
    margin-bottom: .25rem;
    color: var(--color-fontPrimary);
}

.year {
    color: var(--color-fontPrimary);
    font-size: 0.8rem;
    font-weight: 400;
}

/* ===== Portfolio ===== */

.portfolio-section {
    background-color: var(--color-bgPrimary);
    color: var(--color-fontPrimary);
    position: relative;
    z-index: 20;
}

.card-image-wrapper {
    background-color: var(--color-bgAccent);
    width: 100%;
    height: 200px;
    overflow: hidden;
}

.project-img {
    filter: brightness(0.8);
    /* 0 = noir total, 1 = image d'origine */
    cursor: pointer;
    display: block;
    /* supprime l’espace blanc sous l’image */
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.project-img:hover {
    filter: brightness(1);
    /* 0 = noir total, 1 = image d'origine */
}

.iconPtf {
    font-size: 24px;
}

.projets-icon1 {
    width: auto;
    height: 24px;
}

.projets-icon2 {
    width: auto;
    height: 24px;
}

.projets-icon3 {
    width: auto;
    height: 27px;
}

.card-text {
    font-size: 0.8rem;
    font-weight: 500;
    padding-top: 0.5em;
}

.badge-project {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background-color: var(--color-btn);
    color: var(--color-bgPrimary);
    font-weight: 700;
    padding: 0.5em 0.75em;
    border-radius: 0.8rem;
    min-width: 4rem;
}

#galleryCarousel .carousel-item img {
    height: 65vh;
    width: auto;
    max-width: 100%;
    object-fit: contain;
}

/* Flèches du carousel */
.carousel-control-prev-icon,
.carousel-control-next-icon {
    filter: invert(64%) sepia(93%) saturate(392%) hue-rotate(120deg) brightness(150%) contrast(85%);
    /* Exemple de filtre pour teinte verte type #19c79a */
    /* Tu peux modifier la teinte en changeant "hue-rotate(...)" ou tester sur https://codepen.io/sosuke/pen/Pjoqqp */
}

/* Croix de fermeture du modal */
.btn-close {
    filter: invert(64%) sepia(93%) saturate(392%) hue-rotate(120deg) brightness(96%) contrast(85%);
    /* Même filtre pour harmoniser avec les flèches */
}

/* ===== Contact ===== */

.contact-section {
    background-color: var(--color-bgAccent);
    color: var(--color-fontPrimary);
}

.contact-button {
    width: 25%;
    padding: 0.6rem;
    font-size: 1.2rem;
    color: var(--color-fontPrimary);
    background-color: var(--color-bgPrimary);
    border: 3px solid var(--color-btn);
    border-radius: 1rem;
    transition:
        background-color 0.3s ease,
        color 0.3s ease,
        transform 0.2s ease;
    z-index: 20;
}

.contact-button:hover {
    background-color: var(--color-btn);
}

.btn-cv {
    width: 25%;
    background-color: var(--color-btn) !important;
    border: none !important;
    color: var(--color-bgPrimary) !important;
    font-size: 1.2rem;
    font-weight: 700;
    border-radius: 12px;
    height: 53.98px;
    z-index: 20;
    padding-top: 0.8rem;
}

.btn-cv:hover {
    filter: brightness(1.2);
}

/* ===== Formulaire ===== */

.form-contact {
    position: relative;
    z-index: 20;
    color: var(--color-fontPrimary);
}

.form-label {
    color: var(--color-fontAccent);
    font-weight: 400;
    margin-bottom: 0.3rem;
}

.form-control {
    background-color: var(--color-bgPrimary);
    color: var(--color-fontPrimary);
    border-radius: 12px;
    font-size: 0.9rem;
    border: none;
}

.form-control:focus {
    background-color: var(--color-bgAccent);
    box-shadow: 0 0 10px var(--color-btn);
    color: var(--color-fontPrimary);
    border-radius: 12px;
    filter: brightness(0.8);
}

input::placeholder,
textarea::placeholder {
    color: var(--color-fontPrimary) !important;
    opacity: 1 !important;
    font-style: italic !important;
    font-size: 0.9rem;
    filter: brightness(0.7);
}

#form-success {
    background-color: var(--color-btn) !important;
    border: none !important;
    color: var(--color-bgPrimary) !important;
    font-size: 1.2rem;
    font-weight: 700;
    border-radius: 12px;
    z-index: 20;
    padding-top: 0.8rem;
}


/* ===== Footer ===== */
#mainFooter {
    position: relative;
    bottom: 0;
    left: 0;
    width: 100%;
    background-color: var(--color-bgPrimary);
}

/* ===== Media ===== */

/* Desktop */
@media (min-width: 992px) {
    .navbar-nav .nav-item+.nav-item {
        margin-left: var(--nav-spacing);
    }
}

/* Tablet */
@media (max-width: 991.98px) {
    .navbar-nav .nav-item+.nav-item {
        margin-top: 0.75rem;
    }
}

/* Mobile */
@media (max-width: 575.98px) {

    #cta-btn {
        font-size: 0.9rem;
        width: 60%;
        /* plus petit que la valeur par défaut */
    }

    .cta-image {
        width: 75%;
    }

    .lead {
        font-size: 1rem;
    }

    .contact-button {
        font-size: 0.7rem;
    }

    .btn-cv {
        font-size: 0.7rem;
        height: 100%;
    }

    .badge-project {
        font-size: 0.6rem;
    }
}

/*===== Animation du contenu =====*/

@media (prefers-reduced-motion: reduce) {
    * {
        animation: none !important;
        transition: none !important;
        scroll-behavior: auto !important;
    }

    [data-aos] {
        opacity: 1 !important;
        transform: none !important;
    }
}

/* ===== Adoucir le scroll spy ===== */

#mainNavbar .nav-link {
    border-radius: 12px !important;
    padding: 0.5rem 1rem;
    transition: background-color 0.3s;
}

#mainNavbar .nav-link.active {
    background-color: var(--color-btn) !important;
    color: var(--color-bgPrimary) !important;
}

/* On désactive toute transition sur le border-radius ou le padding */
#mainNavbar .nav-link,
#mainNavbar .nav-link.active {
    transition-property: background-color;
}