/*
<============================== GENERAL ==============================>
*/
/* Color styles */
:root {
    --primary: #1F2B3C;
    --text: #3A4E6A;
    --secondary: #F3EDE2;
    --bg-bloc: #DCCEBC;
    --accent: #E94F80;
    --white: #FFFFFF;
}

/* Réglages par défaut */
html {
    scroll-padding-top: 60px;
}

body {
    font-family: 'Satoshi', sans-serif;
    overflow-x: hidden;
}

body.stop-scrolling {
    overflow-y: hidden;
}

/* Structure générale des sections */
.section {
    padding: 3rem 2rem;
    width: 100%;
}

.section-content {
    max-width: 1500px;
    /* centrage du contenu */
    margin: 0 auto;
}

/* Titres uniformisés */
h1 {
    font-size: 3rem;
    font-weight: bold;
    margin-bottom: 0.5rem;
    color: var(--secondary);
}

h2 {
    font-size: 2rem;
    font-weight: lighter;
    text-transform: uppercase;
    margin-bottom: 0.5rem;
    color: var(--secondary);
}

h3 {
    font-size: 1.5rem;
    font-weight: 400;
    margin-bottom: 1rem;
    color: var(--primary);
}

h4 {
    font-size: 1rem;
    font-weight: 600;
    color: var(--primary);
}

/* Conteneur de tags */
.tags {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    margin: 0.5rem 0 1rem 0;
}

/* Style unique pour tous les tags */
.tag {
    display: inline-block;
    font-size: 1rem;
    font-weight: 400;
    padding: 0.3rem 0.8rem;
    border-radius: 2rem;
    background-color: var(--secondary);
    color: var(--primary);
    white-space: nowrap;
    transition: background-color 0.3s ease, color 0.3s ease;
}

/* Profil */
.profile-picture {
    width: 200px;
    height: auto;
    border-radius: 50%;
    margin: 0 auto 1.5rem auto;
}

/* Boutons */
.about-buttons a {
    display: inline-block;
    margin: 1.5rem 1rem;
    padding: 0.6rem 2rem;
    border-radius: 0.3rem;
    font-weight: bold;
    transition: all 0.3s ease;
}

a.button1 {
    color: var(--primary) !important;
    background: var(--secondary) !important;
    border: 2px solid var(--secondary) !important;
}

a.button1:hover {
    background: var(--accent) !important;
    border-color: var(--accent) !important;
    color: var(--primary) !important;
}

a.button2 {
    color: var(--secondary) !important;
    border: 2px solid var(--secondary) !important;
}

a.button2:hover {
    color: var(--accent) !important;
    border-color: var(--accent) !important;
}

/* Bio */
.presentation {
    font-size: 1.3rem;
    font-weight: 200;
    color: var(--secondary);
    margin: 1.5rem 0;
    border: 1px solid var(--accent);
    border-radius: 1rem;
    padding: 2rem;
}

element.style {
    max-height: 100%;
    padding-bottom: 10px;
}

a,
a:hover {
    text-decoration: none;
}

.grey-divider {
    width: 25%;
    height: 4px;
    background: var(--text);
    margin: 0px auto 0px auto;
}

.primary-divider {
    width: 25%;
    height: 4px;
    background: var(--primary);
    margin: 20px auto 50px auto;
}

.secondary-divider {
    width: 25%;
    height: 4px;
    background: var(--secondary);
    margin: 20px auto 50px auto;
}

ul,
ol {
    list-style: none;
}


/* Custom scrollbar */
::-webkit-scrollbar {
    width: 10px;
}

/* Track */
::-webkit-scrollbar-track {
    background: var(--text);
    border: 1px solid #cacac8;
}

/* Handle */
::-webkit-scrollbar-thumb {
    background: var(--secondary);
    border-radius: 25px;
}

/* Responsive */
@media (max-width: 768px) {
    .profile-picture {
        width: 150px;
    }

    h1 {
        font-size: 1.8rem;
    }

    h2 {
        font-size: 1.3rem;
    }

    .about-buttons a {
        padding: 0.5rem 1.5rem;
    }
}

/*
<============================== FIN GENERAL ==============================>
*/

/* ===================== MENU DESKTOP ===================== */
.navbar {
    background-color: var(--secondary);
    font-size: 12px;
    letter-spacing: 1px;
    text-transform: uppercase;
    font-weight: bold;
    z-index: 1;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.15);
}

.navbar li.nav-item {
    padding: 5px;
}

.nav-pills .nav-link {
    color: var(--primary) !important;
    text-align: center;
}

.nav-pills .nav-link.active,
.nav-pills .nav-link:hover {
    color: var(--secondary) !important;
    background-color: var(--primary) !important;
}

.navbar-toggler {
    display: none;
    /* plus de menu burger */
}

/* ---------- TAB BAR MOBILE ---------- */
.tabbar {
    position: fixed;
    bottom: 0;
    left: 0;
    width: 100%;
    background-color: var(--secondary);
    display: none;
    /* affichage géré par media query */
    justify-content: space-around;
    align-items: center;
    border-top: 1px solid #ccc;
    z-index: 9999;
    padding: 0.5rem 0;
}

.tabbar-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    font-size: 0.8rem;
    color: var(--primary);
    text-decoration: none;
}

.tabbar-item i {
    font-size: 1.2rem;
    margin-bottom: 0.2rem;
}

.tabbar-item.active,
.tabbar-item:hover {
    color: var(--accent);
}

/* Desktop : masquer tab bar */
@media (min-width: 769px) {
    .tabbar {
        display: none !important;
    }
}

/* Mobile / tablette : masquer menu desktop, afficher tab bar */
@media (max-width: 768px) {
    .navbar {
        display: none !important;
    }

    .tabbar {
        display: flex !important;
    }
}


/* ============================= BOUTON FLOTTANT ============================== */
.floating-contact {
    position: fixed;
    bottom: 4rem;
    right: 1rem;
    width: 3.5rem;
    height: 3.5rem;
    background-color: var(--accent);
    color: var(--white);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
    z-index: 9999;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.2);
    transition: all 0.2s ease;
    text-decoration: none;
}

.floating-contact:link,
.floating-contact:visited,
.floating-contact:active {
    color: var(--white);
}

.floating-contact:hover {
    color: var(--secondary);
    transform: translateY(-5px);
}

/*
<============================== SECTION COMPETENCES ==============================>
*/

/* Titre spécifique pour la section */
.section-title {
    text-align: center;
    color: var(--primary);
    margin-bottom: 1rem;
}

/* Ligne de blocs compétences */
.skills-row {
    display: flex;
    flex-wrap: wrap;
    gap: 2rem;
    /* espace entre les blocs */
    justify-content: center;
    /* centrer les blocs si moins de 3 sur la ligne */
}

/* Bloc compétence */
.skill-block {
    background-color: var(--bg-bloc);
    border-radius: 1rem;
    padding: 2rem 1rem;
    flex: 1 1 300px;
    /* prend tout l'espace dispo, minimum 300px */
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    min-height: 100%;
    /* pour que tous les blocs aient la même hauteur */
}

.skill-block .tags {
    justify-content: center;
}

/* Icône */
.skill-icon {
    font-size: 2rem;
    color: var(--secondary);
    background-color: var(--primary);
    padding: 1rem;
    border-radius: 50%;
    margin-bottom: 1rem;
}

/* Responsive */
@media (max-width: 768px) {
    .skill-block {
        flex: 1 1 100%;
        /* un bloc par ligne */
        padding: 1.5rem 1rem;
    }
}

/*
<============================== FIN SECTION COMPETENCES ==============================>
*/

/*
<============================== SECTION OUTILS ==============================>
*/

/* Grille Boîte à outils */
.tools-grid {
    display: flex;
    flex-wrap: wrap;
    justify-content: flex-start;
    /* aligne les blocs sur la gauche */
    margin: 0 -0.75rem;
    /* pour compenser les padding bootstrap si besoin */
}

.ia {
    padding: 2rem;
    background-color: var(--secondary);
    border-radius: 1rem;
}

.ia h3 {
    padding-bottom: 1rem;
}

/* Bloc outil */
.tool-box {
    background-color: var(--secondary);
    border-radius: 1rem;
    padding: 1.5rem;
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    height: 100%;
    /* même hauteur sur la ligne */
    transition: transform 0.2s ease;
}

.tool-block-ia {
    background-color: var(--bg-bloc);
    border-radius: 1rem;
    padding: 2rem 1rem;
    flex: 1 1 300px;
    /* prend tout l'espace dispo, minimum 300px */
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    min-height: 100%;
    /* pour que tous les blocs aient la même hauteur */
    border: 1px solid var(--primary);
}

.tool-box:hover {
    transform: translateY(-5px);
}

/* Logo outil */
.tool-logo {
    width: 60px;
    height: 60px;
    object-fit: contain;
    margin-bottom: 0.5rem;
}

/* Label outil */
.tool-box p {
    margin: 0;
    font-weight: 500;
    color: var(--primary);
}

/* Responsive */
@media (max-width: 1400px) {
    .tools-grid {
        grid-template-columns: repeat(5, 1fr);
    }
}

@media (max-width: 1200px) {
    .tools-grid {
        grid-template-columns: repeat(4, 1fr);
    }
}

@media (max-width: 992px) {
    .tools-grid {
        grid-template-columns: repeat(3, 1fr);
    }
}

@media (max-width: 768px) {
    .tools-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 480px) {
    .tools-grid {
        grid-template-columns: 1fr;
    }
}

/*
<============================== FIN SECTION OUTILS ==============================>
*/

/*
<============================== PORTFOLIO ==============================>
*/

#portfolio {
    background-color: var(--primary);
    color: var(--secondary);
    padding: 0 0 3rem 0;
}

#portfolio .secondary-divider {
    margin-bottom: 3rem !important;
}

.portfolio-context-title {
    color: var(--secondary);
    padding: 3rem 0 1rem 0;
    text-align: center;
    margin-bottom: 1rem;
}

/* Container de la grille */
#portfolio .row.portfolio-items {
    display: flex;
    flex-wrap: wrap;
    gap: 2rem; /* même gap que skills-row */
    justify-content: center;
    margin:2rem;
}

/* Bloc portfolio */
#portfolio .portfolio-item {
    flex: 1 1 calc(33.333% - 2rem); /* max 3 colonnes */
    min-width: 280px; /* pour que ça ne devienne jamais trop petit */
    max-width: 33.333%; /* jamais plus de 3 colonnes */
    box-sizing: border-box;
    display: flex;
    flex-direction: column;
}

#portfolio .portfolio-item.hide {
    display: none;
}

#portfolio .portfolio-item.show {
    display: flex;
    animation: fadeInTop 0.5s ease;
}

/* Vignette cliquable */
.portfolio-item-inner {
    border-radius: 1rem;
    background-color: var(--bg-bloc);
    color: var(--primary);
    text-decoration: none;
    flex: 1;
    display: flex;
    flex-direction: column;
    justify-content: space-between; /* titre + desc en haut, tags en bas */
    padding-bottom: 0.5rem;
}

.portfolio-item-inner:hover {
    text-decoration: none;
    color: var(--primary);
}

/* Image + hover */
#portfolio .portfolio-item-img img {
    border-radius: 1rem 1rem 0 0;
    width: 100%;
    transition: all 0.3s ease;
}

.portfolio-item-inner:hover .portfolio-item-img img {
    transform: translateY(-1.5rem);
    cursor: pointer;
}

/* Titre et description */
.portfolio-item-title {
    padding: 0.8rem 1rem 0 1rem;
    font-size: 1.2rem;
}

.portfolio-item-desc {
    font-size: 0.9rem;
    line-height: 1.4;
    color: var(--text);
    padding: 0 1rem 1rem 1rem;
    margin: 0.3rem 0;
}

/* Tags et images outils */
.tags {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    align-items: center;
    justify-content: flex-start;
    padding: 0 1rem;
}

.tags img {
    height: 1.5rem;
    width: auto;
    object-fit: contain;
    vertical-align: middle;
}

/* Tags toujours en bas */
#portfolio .portfolio-item-tags {
    margin-top: auto;
}

/* Portfolio nav */
#portfolio .portfolio-filter {
    padding: 0.5rem 0;
    width: 100%;
    text-align: center;
    margin-bottom: 1rem;
}

#portfolio .portfolio-filter ul li {
    display: inline-block;
    margin-right: 5px;
    padding: 0.6rem 0.6rem;
    border-radius: 3px;
    font-size: 0.9rem;
    transition: all 0.3s ease;
    cursor: pointer;
    text-transform: uppercase;
    font-weight: 600;
}

#portfolio .portfolio-filter ul li:hover,
#portfolio .portfolio-filter ul li.active {
    color: var(--primary);
    background-color: var(--secondary);
}

/* ===== RESPONSIVE ===== */
@media (max-width: 1200px) {
    #portfolio .portfolio-item {
        flex: 1 1 calc(50% - 2rem); /* 2 colonnes */
        max-width: 50%;
    }
}

@media (max-width: 768px) {
    #portfolio .portfolio-item {
        flex: 1 1 100%; /* 1 colonne */
        max-width: 100%;
    }

    /* Scroll horizontal filtres */
    #portfolio .portfolio-filter {
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
        scrollbar-width: none;
    }

    #portfolio .portfolio-filter::-webkit-scrollbar {
        display: none;
    }

    #portfolio .portfolio-filter ul.filter-scrollable {
        display: flex;
        flex-wrap: nowrap;
        gap: 8px;
        padding: 0 10px;
        margin: 0;
        width: max-content;
    }

    #portfolio .portfolio-filter ul.filter-scrollable li {
        flex: 0 0 auto;
        white-space: nowrap;
    }
}

/*
<============================== FOOTER ==============================>
*/

footer {
    background: #F3EDE2;
    border-top: 1px solid #fff;
    padding: 0px 0 10px;
}

span.fas.fa-chevron-up {
    font-size: 25px;
    margin: 10px 0 5px 0;
    color: var(--primary);
    height: 30px
}

span.fas.fa-chevron-up:hover {
    font-size: 25px;
    color: #DCCEBC;
}

footer h5 {
    color: var(--primary);
    font-size: 1rem;
    font-weight: normal;
}

footer h5 a {
    color: #fff;
    text-decoration: none;
}

footer h6 {
    color: #fff;
    font-size: 1rem;
    font-weight: normal;
}

footer h6 a {
    color: var(--primary);
    font-weight: bold;
    text-decoration: none;
}

footer h5 a:hover,
footer h6 a:hover {
    color: #282827;
}

/*
<============================== FIN FOOTER ==============================>
/* =========================
   TEMPLATE PROJET
========================= */

/* Général */
.project-page {
    background-color: var(--primary);
}

.project-container {
    max-width: 1250px;
    margin: 0 auto;
    padding: 1.5rem;
    /* espace intérieur */

    border-radius: 1rem;
    /* coins arrondis */
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.05);
    /* optionnel pour relief */
    display: flex;
    flex-direction: column;
    gap: 2rem;
    /* espace vertical entre les blocs */
}

.project-header {
    background-color: var(--bg-bloc);
    padding: 2rem;
    position: relative;
    /* pour bouton close */
    border-radius: 1rem;
}

.project-title {
    font-size: 2rem;
    font-weight: 700;
    margin-bottom: 1rem;
    padding-left: 1rem;
    color: var(--primary);
}

.project-objective {
    font-size: 1.2rem;
    font-weight: 200;
    margin: 0rem 0rem;
    line-height: 1.4;
    padding: 1.5rem 1.5rem 1rem 1.5rem;
    color: var(--primary);
}

.project-objective p {
    padding: 0rem;
    margin: 0.5rem;
}

.project-objective p strong {
    font-weight: 600;
}

.project-objective h3 {
    font-size: 1.5rem;
    font-weight: 400;
    color: var(--primary);
}

.project-objective i {
    color: var(--text);
}

.project-close-btn {
    position: absolute;
    top: 1rem;
    right: 2rem;
    font-size: 2rem;
    cursor: pointer;
    color: var(--text);
    text-decoration: none;
    transition: color 0.3s;
    z-index: 10;
}

.project-close-btn:hover {
    color: var(--primary);
}

/* =========================
   SLIDER
========================= */
.project-slider {
    position: relative;
    width: 100%;
    border-radius: 1rem;
    overflow: hidden;
}

.project-slider .slide {
    display: none;
    /* toutes les slides cachées */
    width: 100%;
}

.project-slider .slide.active {
    display: block;
    /* slide visible */
}

.project-slider img {
    width: 100%;
    height: auto;
    /* ratio conservé */
    display: block;
    border-radius: 1rem;
}

/* Chevron navigation */
.project-slider-chevron {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    width: 2.5rem;
    height: 2.5rem;
    background-color: var(--text);
    color: var(--secondary);
    border-radius: 50rem;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    font-size: 1.5rem;
    z-index: 10;
}

.project-slider-chevron:hover {
    background-color: var(--primary);
}

.project-slider-chevron-left {
    left: 0.5rem;
}

.project-slider-chevron-right {
    right: 0.5rem;
}

/* Dots navigation */
.project-slider-dots {
    position: absolute;
    bottom: 1rem;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    gap: 0.5rem;
    z-index: 10;
}

.project-slider-dots .dot {
    width: 0.8rem;
    height: 0.8rem;
    background-color: var(--text);
    border-radius: 50%;
    transition: all 0.3s ease;
    cursor: pointer;
}

.project-slider-dots .dot.active {
    width: 1.5rem;
    border-radius: 50rem;
    background-color: var(--primary);
}

/* =========================
   BLOCS TEXTE
========================= */

#projects {
    background-color: var(--secondary);
    border-radius: 1rem;
    margin-bottom: 0rem !important;

}

.project-row {
    display: flex;
    flex-wrap: wrap;
    gap: 1rem;
    margin: 1rem;
    /* espace entre les blocs */
    justify-content: center;
    /* centrer les blocs si moins de 3 sur la ligne */
}

.project-block {
    background-color: var(--bg-bloc);
    border-radius: 1rem;
    padding: 2rem 1rem 1rem 2rem;
    flex: 1 1 300px;
    /* prend tout l'espace dispo, minimum 300px */
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    min-height: 100%;
    /* pour que tous les blocs aient la même hauteur */
}

.project-block h3 {
    font-size: 1.5rem;
    font-weight: 400;
    margin-bottom: 0.8rem;
    color: var(--primary);
}

.project-block p {
    font-size: 1rem;
    line-height: 1.6;
    color: var(--primary);
    text-align: left;
}

.link-portfolio {
    color: var(--text);
    font-weight: 500;
}

.link-portfolio:hover {
    color: var(--primary);
    text-decoration: underline;
}

/* Bouton retour */
.project-back-btn {
    display: inline-block;
    padding: 0.6rem 1.2rem;
    background-color: var(--primary);
    color: var(--secondary);
    text-decoration: none;
    border-radius: 6px;
    font-size: 1.2rem;
    font-weight: 600;
    transition: background 0.3s;
}

.project-back-btn:hover {
    background-color: var(--text);
    color: var(--secondary);
}

/* =========================
   RESPONSIVE
========================= */
@media (max-width: 768px) {

    .project-title {
        font-size: 1.5rem;
    }

    .project-slider-chevron {
        width: 2rem;
        height: 2rem;
        font-size: 1.2rem;
    }

    .project-slider-dots {
        position: relative;
        bottom: 1.5rem;
        justify-content: center;
        transform: translateX(-50%);
        z-index: 20;
    }

    .project-slider-dots .dot.active {
        width: 1.2rem;
        border-radius: 50rem;
    }
}

@media (max-width: 480px) {
    .project-container {
        padding: 1rem;
    }
}