/* ================================== CSS SAM =================================== */

/* ========================= CSS GÉNÉRAL ========================= */
:root {
    --primary: hsl(198.6, 88.7%, 48.4%);
    --primary-dark: hsl(198.6, 88.7%, 20%);
    --bg-dark: hsl(222.2 84% 5%);
    --success: hsl(140, 90%, 45%);
}

body {
    background: var(--bg-dark);
    font-family: 'Roboto', sans-serif;
}

/* Font */
h1, h2, h3, h4, h5, h6 {
    font-family: 'Poppins', sans-serif;
}

.icon-sm {
    width: 16px;
    height: 16px;
    color: var(--primary);
}

.bg-primary {
    background-color: var(--primary) !important;
}

.text-primary {
    color: var(--primary) !important;
}

.text-success {
    color: var(--success) !important
}
/* ======================== FIN CSS GÉNÉRAL ====================== */

/* =========================== HERO ============================== */
/* Navbar */
#mainNav {
    transition: background-color 0.5s ease-in-out;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    z-index: 1030;
}

.navbar-scrolled {
    background-color: hsla(222.2, 84%, 5%, 0.8);
    -webkit-backdrop-filter: blur(10px);
    backdrop-filter: blur(10px);
    border-bottom: 1px solid hsl(198.6, 88.7%, 10%);
}

.nav-link {
    position: relative;
    display: inline-block;
    color: grey;
    transition: color 0.3s ease;
}

.nav-link.active::after {
    content: '';
    position: absolute;
    bottom: -2px;
    left: 50%;
    transform: translateX(-50%);
    width: 100%;
    height: 2px;
    background-color: var(--primary);
    transition: width 0.3s ease;
}

.nav-link.active {
    color: var(--primary) !important;
}

.nav-link.active::after {
    width: 100%;
}

/* ===================== NAVBAR MOBILE ===================== */
@media (max-width: 991.98px) {
    /* Conteneur du menu */
    .navbar-collapse {
        max-height: 0;
        overflow: hidden;
        transition: max-height 0.5s ease;
        background-color: rgba(15,23,42,0.95);
        backdrop-filter: blur(5px);
        border-radius: 0 0 0.5rem 0.5rem;
        box-shadow: 0 8px 20px rgba(0,0,0,0.4);
        position: absolute;
        top: 100%;
        left: 0;
        width: 100%;
    }

    /* Quand ouvert */
    .navbar-collapse.show {
        max-height: 500px;
    }

    /* Liens centrés verticalement */
    .navbar-nav {
        flex-direction: column;
        gap: 1rem;
        text-align: center;
        padding: 1rem 0;
    }

    .nav-link {
        font-size: 1.2rem;
        color: white;
        transition: all 0.3s ease;
    }

    .nav-link:hover {
        color: var(--primary);
        transform: scale(1.05);
    }

    /* Bouton burger toujours au-dessus */
    .navbar-toggler {
        z-index: 1050;
        border: none;
    }

    .navbar-toggler:focus {
        outline: none;
        box-shadow: none;
    }

    .nav-link.active::after {
        width: 100%;
        left: 50%;
        transform: translateX(-50%);
    }
}

/* Background image */
.hero {
    background-image: linear-gradient(rgba(15, 23, 42, 0.8), rgba(15, 23, 42, 0.9)), url(../img/hero-bg.webp);
    background-size: cover;
    background-position: center;
    height: 100vh;
    display: flex;
    flex-direction: column;
}

.hero-content-container {
    flex-grow: 1;
    display: flex;
    flex-direction: column;
    justify-content: center;
}

/* Texte */
.gradient-nom {
    background-image: linear-gradient(135deg, var(--primary), hsl(240, 100%, 70%));
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
}

/* Curseur */
.cursor {
    color: white;
    animation: blink 2s infinite;
    margin-left: 5px;
}

/* Animation curseur */
@keyframes blink {
    0%, 100% {
        opacity: 1;
    }
    50% {
        opacity: 0;
    }
}

/* === BOUTONS === */
/* Bouton projets */
.btn-projets {
    background-image: linear-gradient(135deg, var(--primary), hsl(240, 100%, 70%));
    color: black;
    padding: 15px 50px;
    border:none;
    transition: all 0.5s ease-in-out;
}

.btn-projets:hover {
    box-shadow: 0 0 20px var(--primary);
    scale: 1.05;
    color:black;
}

/* Bouton CV */
.btn-cv {
    position: relative;
    overflow: hidden;
    color: var(--primary);
    padding: 10px 35px;
    border: 1px solid var(--primary);
    background-color: hsl(222.2, 84%, 4.9%);
    transition: color 0.5s ease-in-out, border-color 0.5s ease-in-out;
    z-index: 1;
}

.btn-cv::before {
    content: "";
    position: absolute;
    inset: 0;
    background-color: var(--primary);
    opacity: 0;
    transition: opacity 0.5s ease-in-out;
    z-index: -1;
}

.btn-cv:hover::before {
    opacity: 1;
}

.btn-cv:hover {
    color: black;
    border-color: transparent;
}

/* Socials icônes */
.rounded-circle {
    border:1px solid hsl(217.2 32.6% 17.5%);
    border-radius:50%;
    width:50px;
    height:50px;
    background-color: hsl(217.2 32.6% 17.5%);
}

.social-icon {
    color: var(--primary);
}

/* Animation scroll down */
.scroll-down-indicator {
    z-index: 10;
}

.mouse {
    width: 25px;
    height: 40px;
    border: 2px solid #fff;
    border-radius: 20px;
    display: flex;
    justify-content: center;
    padding-top: 5px;
}

.wheel {
    width: 4px;
    height: 8px;
    background-color: #fff;
    border-radius: 2px;
    animation: scroll 1.5s infinite;
}

@keyframes scroll {
    0% {
        transform: translateY(0);
        opacity: 1;
    }
    50% {
        transform: translateY(10px);
        opacity: 0.5;
    }
    100% {
        transform: translateY(20px);
        opacity: 0;
    }
}

/* ========================= FIN HERO ============================ */

/* ======================== MES PROJETS ========================== */
/* Background */
.projets,
.contact {
    background: linear-gradient(150deg, hsl(222.2, 84%, 4.9%), hsl(217.2 32.6% 20%));
}

/* Carte projet */
.card-projet {
    background-color: hsl(217.2 32.6% 17.5%);
    border: 1.5px solid var(--primary-dark) !important;
    border-radius: 0;
    transition: all 0.3s ease-in-out;
}

.card-projet:hover {
    box-shadow: 0 0 30px var(--primary-dark);
    transform: translateY(-10px);
}

.card .card-header {
    overflow: hidden;
}

.card-img-top {
    transition: transform 0.3s ease-in-out;
}

.card:hover .card-img-top {
    transform: scale(1.1);
}

.card-body {
    background-color: transparent !important;
}

/* Badges stacks */
.badge-stacks {
    color: var(--primary);
    border: 1px solid hsl(198.6, 88.7%, 25%);
}

.badge-stacks:hover {
    background-color: hsl(217.2, 32.6%, 17.5%) !important;
    border: 1px solid hsl(198.6, 88.7%, 30%);
}

.badge-stacks2 {
    background-color: hsl(198.6, 88.7%, 13%, 0.8) !important;
    color: var(--primary);
    border: 1px solid hsl(198.6, 88.7%, 25%);
}

.badge-stacks2:hover {
    background-color: hsl(198.6, 88.7%, 30%, 0.5) !important;
    border: 1px solid hsl(198.6, 88.7%, 30%);
}

/* === BOUTONS === */
/* Boutons demo / code */
.btn-demo {
    background: var(--primary) !important;
    color: black;
    border:none;
    transition: all 0.5s ease-in-out;
}

.btn-demo:hover {
    box-shadow: 0 0 20px var(--primary);
    color: white;
    scale: 1.05;
}

.btn-code {
    position: relative;
    overflow: hidden;
    color: var(--primary);
    border: 1px solid hsl(198.6, 75%, 48.4%);
    background-color: hsl(222.2, 84%, 4.9%);
    transition: all 0.5s ease-in-out;
}

.btn-code:hover {
    color: white;
    border: 1px solid var(--primary);
}

.btn-view {
    background-color: transparent;
    color: var(--primary);
    border: 1px solid var(--primary);
    transition: all 0.5s ease-in-out;
}

.btn-view:hover {
    background-color: var(--primary);
    box-shadow: 0 0 20px var(--primary);
    color: white;
}

/* ====================== FIN MES PROJETS ======================== */

/* =========================== ABOUT ============================= */
/* Image profile */
.img-profil {
    border-radius: 0.4rem;
}

.profile-image-container {
    position: relative;
    transition: transform 0.3s ease-in-out, border-color 0.3s ease-in-out;
    border: 1px solid var(--primary-dark);
}

.profile-image-container:hover {
    transform: scale(1.05);
    border: 1px solid var(--primary);
}

/* Icône profile */
.profile-icon-overlay {
    position: absolute;
    bottom: -1rem;
    right: -1rem;
    width: 3rem;
    height: 3rem;
    background-color: var(--primary);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    animation: pulse-glow 2s infinite;
}

.profile-icon-overlay svg {
    color: black;
}

@keyframes pulse-glow {
    0%, 100% {
        box-shadow: 0 0 1rem var(--primary);
    }
    50% {
        box-shadow: 0 0 1.5rem var(--primary);
    }
}

/* Card profile */
.card-profil {
    background-color: hsla(217.2, 32.6%, 17.5%, 0.50) !important;
    border: 1px solid hsl(198.6, 88.7%, 15%); !important;
    transition: all 0.3s ease-in-out;
}

.card-profil:hover {
    border: 1px solid var(--primary-dark); !important;
}

/* Card compétences */
.card-comp {
    background-color: hsla(217.2, 32.6%, 17.5%, 0.50) !important;
    border: 1px solid var(--primary-dark); !important;
    transition: all 0.3s ease-in-out;
}

.card-comp:hover {
    border: 1px solid hsl(198.6, 88.7%, 30%); !important;
}

.comp {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
}

.badge-comp {
    background-color: var(--primary-dark);
}

/* Timeline */
.timeline {
    position: relative;
    margin: 2rem 0;
    padding: 2rem 0;
}
.timeline::before {
    content: "";
    position: absolute;
    top: 0;
    bottom: 0;
    left: 50%;
    width: 4px;
    background: linear-gradient(135deg, var(--primary), hsl(240, 100%, 70%));
    transform: translateX(-50%);
}
.timeline-item {
    position: relative;
    margin: 2rem 0;
    opacity: 0;
    transform: translateY(50px);
    transition: opacity 0.5s ease-out, transform 0.5s ease-out;
}

.timeline-item.is-visible {
    opacity: 1;
    transform: translateY(0);
}
.timeline-item .timeline-content {
    position: relative;
    padding: 1.5rem;
    box-shadow: 0 4px 10px rgba(0,0,0,0.1);
    width: 45%;
    background-color: hsl(217.2 32.6% 17.5%);
    border: 1px solid var(--primary-dark); !important;
}
.timeline-item.left .timeline-content {
    margin-right: auto;
}

.timeline-item.right .timeline-content {
    margin-left: auto;
}
.timeline-item::after {
    content: "";
    position: absolute;
    top: 50%;
    left: 50%;
    width: 20px;
    height: 20px;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--primary), hsl(240, 100%, 70%));
    border: 3px solid black;
    z-index: 1;
    animation: pulse-timeline 1.5s infinite;
}

@keyframes pulse-timeline {
    0% {
        transform: translate(-50%, -50%) scale(1);
        opacity: 1;
    }
    50% {
        transform: translate(-50%, -50%) scale(1.3);
        opacity: 1;
    }
    100% {
        transform: translate(-50%, -50%) scale(1);
        opacity: 1;
    }
}

@media (max-width: 768px) {
    .timeline::before {
        left: 20px;
        transform: translateX(-50%);
    }
    .timeline-item .timeline-content {
        width: calc(100% - 50px);
        margin: 0 0 1rem 50px;
    }
    .timeline-item.left .timeline-content,
    .timeline-item.right .timeline-content {
        margin-left: 50px;
        width: calc(100% - 50px);
    }
    .timeline-item::after {
        left: 20px;
        transform: translateX(-50%);
    }
}

/* ========================= FIN ABOUT =========================== */

/* ========================== CONTACT ============================ */
.card-contact {
    background-color: hsl(217.2 32.6% 17.5%);
    border: 1px solid var(--primary-dark); !important;
}

.icon-contact {
    color: var(--primary);
}

.bg-icon-contact {
    background-color: hsl(212, 46%, 18%);
}

.form-control {
    background-color: hsl(220, 46%, 10%);
    border: 1px solid var(--primary-dark); !important;
    color: white;
}

.form-control:focus {
    background-color: hsl(220, 46%, 10%);
    border: 2px solid var(--primary-dark);
    outline: 2px solid var(--primary);
    outline-offset: 2px;
    color: white;
}

.form-control::placeholder {
    color: white;
    opacity: 0.50;
}

.card-info {
    background-color: hsla(217.2, 32.6%, 17.5%, 0.50) !important;
    border: 1px solid var(--primary-dark); !important;
    transition: all 0.3s ease-in-out;
}

.card-info:hover {
    border: 1px solid var(--primary); !important;
    transform: scale(1.05);
}

.bg-icon-social {
    background-color: hsl(217.2 32.6% 17.5%);
    border: 1px solid var(--primary-dark) !important;
    transition: all 0.5s ease-in-out;
    color: grey !important;
}

.bg-icon-social a,
.bg-icon-social i {
    color: inherit;
}

.bg-icon-social:hover {
    background-color: hsl(217.2 32.6% 25%);
    transform: scale(1.10);
    color: var(--primary) !important;
}

.bg-icon-social:hover svg,
.bg-icon-social:hover rect {
    /* Pour s'assurer que le SVG change bien de couleur comme les autres icônes */
    stroke: var(--primary) !important;
    fill: var(--primary) !important;
    transition: fill 0.5s, stroke 0.5s; /* animation douce */
}

.bg-icon-social:hover text {
    stroke: white;
    fill: white;
}


.dispo-pulse {
    width:12px;
    height:12px;
    background-color: var(--success) !important;
    animation: pulse 1.5s infinite;
}

@keyframes pulse {
    0% {
        transform: scale(1);
        opacity: 1;
    }
    50% {
        transform: scale(1.3);
        opacity: 0.6;
    }
    100% {
        transform: scale(1);
        opacity: 1;
    }
}

/* ======================== FIN CONTACT ========================== */

/* =========================== FOOTER ============================ */
.bg-icon-footer {
    background-color: hsl(220, 46%, 10%);
    border: 1px solid var(--primary-dark);
    height: 50px;
    width: 50px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease-in-out;
    color: grey;
    border-radius: 8px;
}

.bg-icon-footer i {
    font-size: 20px;
    color: inherit;
}

.bg-icon-footer:hover {
    transform: scale(1.1);
    color: var(--primary);
}


.footer-nav a {
    color: grey;
    display: inline-block;
    transition: all 0.3s ease, color 0.3s ease;
}

.footer-nav a:hover {
    transform: translateX(6px);
    color: var(--primary);
}

/* ========================= FIN FOOTER ========================== */

/* ========================= DEMO MODAL ========================== */
#demoModal .modal-content {
    background: var(--bg-dark, #0a1020);
    color: #fff;
    border-radius: 1.5rem;
    box-shadow: 0 8px 32px 0 rgba(14, 38, 74, 0.7);
    border: 2px solid var(--primary-dark, #074d69);
}

#demoModal .modal-header {
    border-bottom: none;
    padding-bottom: 0;
}

#demoModal .modal-body {
    overflow: visible !important;
    min-height: 350px;
}

#demoModal .modal-title {
    color: var(--primary, #05b4e7);
    letter-spacing: 1px;
}

#demoModal .btn-close {
    filter: invert(1);
    opacity: 0.7;
}
#demoModal .btn-close:hover {
    opacity: 1;
}

#demoModal .tab-pane:not(.active) {
    display: none !important;
}
#demoModal .tab-pane.active {
    display: block !important;
}


#demoModal .nav-tabs {
    border-bottom: 2px solid var(--primary, #05b4e7);
}

#demoModal .nav-link {
    color: #fff !important;
    font-weight: 600;
    background: transparent !important;
    border: none !important;
    margin-right: 6px;
    border-radius: 1.5rem 1.5rem 0 0 !important;
    transition: background 0.3s, color 0.2s, border-radius 0.3s;
    box-shadow: none !important;
}

#demoModal .nav-link.active,
#demoModal .nav-link:focus,
#demoModal .nav-link:active {
    color: var(--bg-dark, #0a1020) !important;
    background: var(--primary, #05b4e7) !important;
    border: none !important;
    border-radius: 1.5rem 1.5rem 0 0 !important;
    box-shadow: none !important;
}

/* Suppression de l'outline/focus bleu natif */
#demoModal .nav-link:focus-visible {
    outline: none !important;
    box-shadow: none !important;
}

#demoModal .nav-link:hover {
    color: var(--primary, #05b4e7) !important;
    background: transparent !important;
    box-shadow: none !important;
}

#demoModal .ratio {
    border-radius: 1rem;
    overflow: hidden;
    border: 2px solid var(--primary-dark, #074d69);
    box-shadow: 0 4px 16px rgba(5,180,231,0.08);
}

/* ======================= DEMO MODAL FIN  ======================== */