:root {
    /* Couleurs primaires */
    --primary-dark: #1a3a8f; /* textes + icones + divers éléments + éléments dégradés (couleur 1) */
    --primary-light: #3a5fcd; /* certains icones + éléments dégradés (couleur 2) */
    --secondary-dark: #141f3f;
    
    /* Arrière-plans */
    --bg-light: #e0ebff;
    --bg-dark: #1a1a1a;
    --gray-light: #f5f5f5; /* arrière plan de certains elements */
    
    /* Textes */
    --text-dark: #222;
    --text-light: #333;            
                
    /* Transparences */
    --transparent-dark: rgba(0, 0, 0, 0.1);
    --transparent-darker: rgba(0, 0, 0, 0.3);
    --transparent-darkest: rgba(0, 0, 0, 0.5);

    --transparent-light: rgba(255, 255, 255, 0.1);
    --transparent-lighter: rgba(255, 255, 255, 0.2);
    --transparent-lightest: rgba(255, 255, 255, 0.5); /* Dot du carrousel */

    --transparent-light-blue: rgba(58, 95, 205, 0.2); /* Formulaire */
    --transparent-blue: rgba(26, 58, 143, 0.3);  /* Ombre 1 */
    --transparent-dark-blue: rgba(26, 58, 143, 0.4);  /* Ombre 2 */

    /* Couleurs spécifiques */
    --white: #ffffff;
    --border: #e0e0e0; /* Formulaire */
    --labels: #f0f5ff;

    /* dégradés */
    --gradient: linear-gradient(135deg, var(--primary-light) 0%, var(--primary-dark) 100%);
    --dark-gradient: linear-gradient(135deg, var(--secondary-dark) 0%, var(--primary-dark) 100%);
    --gradient-horizontal: linear-gradient(90deg, var(--primary-dark), var(--primary-light));
    --transparent-color: rgba(26, 58, 143, 0.4);  /* par dessus mon image */
    --more-transparent-color: rgba(26, 58, 143, 0.1);  /* par dessus mon image */
}












/* Général */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
}

body {
    background-color: var(--bg-dark);
    color: var(--text-dark);
    line-height: 1.6;
    overflow-x: hidden;
}

section {
    padding: 9rem 2rem;
    position: relative;
}

section:nth-child(odd) {
    background-color: var(--bg-light);
}

section:nth-child(even) {
    background-color: var(--white);
}

h2 {
    color: var(--primary-dark);
    margin-bottom: 2rem;
    padding-bottom: 0.8rem;
    text-align: center;
    font-size: 4rem;
    position: relative;
    text-transform: uppercase;
    font-weight: 601;
}

h3 {
    margin: 1.5rem 0 1rem;
    font-size: 1.4rem;
}

a {
    color: var(--primary-dark);
}













/* Nav bar */
nav {
    box-shadow: 0 2px 10px var(--transparent-dark);
    position: sticky;
    top: 0;
    z-index: 100;
}

.nav-container {
    background-color: var(--white);
    margin: 0 auto;
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    padding: 0 1rem;
    min-height: 55px;
}

.nav-brand {
    font-weight: 700;
    font-size: 1.8rem;
    color: var(--primary-dark);
    text-decoration: none;
    position: absolute;
    left: calc(40% + 220px);
    transform: translateX(-50%);
}

.nav-links {
    display: flex;
    flex-wrap: wrap;
    transition: color 0.3s ease;

    position: absolute;
    left: 20px;
    top: 50%;
    transform: translateY(-50%);
    margin-right: 0;
}

.nav-social {
    display: flex;
    align-items: center;
    margin-left: auto;

    position: absolute;
    right: 20px;
    top: 50%;
    transform: translateY(-50%);
    margin-left: 0;
}

.nav-link, .social-link {
    color: var(--primary-dark);
    text-decoration: none;
    padding: 1rem;
    font-weight: 600;
    transition: all 0.3s ease;
    position: relative;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.9rem;
}

.nav-link:hover, .social-link:hover {
    color: var(--primary-light);
}

.nav-link::after, .social-link::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 0;
    height: 3px;
    background: var(--gradient-horizontal);
    transition: width 0.3s ease;
}

.nav-link:hover::after, .social-link:hover::after {
    width: 70%;
}

.nav-link i, .social-link i {
    font-size: 0.9rem;
}

/* Menu burger */
.burger-menu {
    display: none;
    cursor: pointer;
    padding: 1rem;
    order: -1;
    height: 58px;


    position: absolute;
    top: -3px;
    left: 0px;
    z-index: 101;
}

.burger-menu span {
    display: block;
    width: 25px;
    height: 3px;
    background-color: var(--primary-dark);
    margin: 5px 0;
    transition: all 0.3s ease;
}















/* Carrousel */
.carousel {
    position: relative;
    width: 100%;
    height: calc(100vh - 55px);
    overflow: hidden;
}

.carousel-slide {
    position: absolute;
    width: 100%;
    height: 100%;
    opacity: 0;
    transition: opacity 0.7s ease-in-out;
    background-size: cover;
    background-position: center;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-direction: column;
    text-align: center;
    color: var(--white);
}

.carousel-slide.active {
    opacity: 1;
}

.carousel-slide::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: var(--transparent-darkest);
}

.carousel-content {
    position: relative;
    z-index: 1;
    max-width: 800px;
    padding: 0 20px;
}

.carousel h2 {
    font-size: 3rem;
    margin-bottom: 1.5rem;
    color: var(--white);
    border: none;
}

.carousel p {
    font-size: 1.5rem;
    margin-bottom: 2rem;
}

.btn {
    padding: 0.8rem 2rem;
    border-radius: 30px;
    font-size: 1.1rem;
    cursor: pointer;
    transition: all 0.3s ease;
    text-decoration: none;
    display: inline-block;
    font-weight: 600;
}

.carousel-btn {
    background: transparent;
    color: var(--white);
    border: 2px solid var(--white);
}

.carousel-btn:hover {
    background: var(--white);
    color: var(--primary-dark);
}

.carousel-text {
        margin-top: 0vh;
        margin-inline: 92px;
}

/* Contrôles du carrousel */
.carousel-controls {
    position: absolute;
    bottom: 30px;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    z-index: 10;
}

.carousel-dot {
    width: 12px;
    height: 12px;
    border-radius: 50%;
    background: var(--transparent-lightest);
    margin: 0 5px;
    cursor: pointer;
    transition: all 0.3s ease;
}

.carousel-dot.active {
    background: var(--white);
    transform: scale(1.2);
}

.carousel-arrow {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    width: 50px;
    height: 50px;
    background: var(--transparent-darker);
    color: var(--white);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
    cursor: pointer;
    z-index: 10;
    transition: all 0.3s ease;
}

.carousel-arrow:hover {
    background: var(--transparent-darkest);
}

.carousel-arrow.prev {
    left: 20px;
}

.carousel-arrow.next {
    right: 20px;
}















/* Barre réseaux sociaux */
.footer-social {
    margin: 2rem 0;
    display: flex;
    flex-wrap: wrap;
    gap: 0.8rem;
    justify-content: center;
}

.social-icon {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 45px;
    height: 45px;
    background: var(--transparent-dark);
    color: var(--white);
    border-radius: 50%;
    font-size: 1.2rem;
    transition: all 0.3s ease;
    text-decoration: none;
    position: relative;
    overflow: hidden;
}

.social-icon i {
    position: relative;
    z-index: 1;
    transition: color 0.3s ease;
}

.social-icon:hover i {
    color: var(--white);
}

.social-icon::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: var(--primary-light);
    opacity: 0;
    transition: opacity 0.3s ease;
    border-radius: 50%;
}

.social-icon:hover::after {
    opacity: 1;
}

.navSocial {
    background: rgba(0,0,0,0);
}

.navSocial .fab  {
    color: var(--primary-dark);
}

/* section qui s'ajoute en dessous du caroussel */
.responsive-social {
    display: none;
    background-color: var(--white);
    padding: 1rem 0;
    box-shadow: 0 2px 10px var(--transparent-dark);
    justify-content: center;
}

.responsive-social .social-icon {
    background: var(--transparent-light-blue);
    color: var(--primary-dark);
    width: 40px;
    height: 40px;
}

.responsive-social .social-icon:hover {
    background: var(--primary-light);
    color: var(--white);
}

.responsive-social .social-icon i {
    color: inherit;
}

.responsiveSocial {
    margin-inline: 0.5rem;
}














/* Section Théo Rolland*/
.hero-section {
    background: var(--gradient);
    color: var(--white);
    padding: 6rem 0 10rem 0;
    position: relative;
    overflow: hidden;
}

.hero-section a {
    color: #cce8ff;
}

.hero-container {
    display: flex;
    align-items: center;
    max-width: 1500px;
    margin: 0 auto;
    padding: 0 4rem;
    gap: 3rem;
    position: relative;
    z-index: 2;
}

.hero-content {
    flex: 1;
    position: relative;
    z-index: 2;
}

.hero-image {
    position: absolute;
    right: 0;
    top: 0;
    height: 100%;
    width: 50%;
    max-width: 700px;
    clip-path: polygon(0% 0, 100% 0, 100% 100%, 30% 100%);
    overflow: hidden;
}

.hero-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

.hero-image::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: var(--more-transparent-color);
}

.hero-title {
    font-size: 3.5rem;
    font-weight: 700;
    margin-bottom: 1.5rem;
    line-height: 1.2;
    padding-right: 50%;
}

.hero-description {
    font-size: 1.2rem;
    margin-bottom: 2.5rem;
    line-height: 1.8;
    padding-right: 50%;
}

.hero-description-text{
    margin-bottom: 1rem;
}

.hero-buttons {
    display: flex;
    gap: 1.5rem;
}

.hero-buttons a{
    color: var(--primary-dark);
}

.hero-btn {
    background: var(--white);
    color: var(--primary-dark);
    border: 2px solid var(--white);
}

.hero-btn:hover {
    background: transparent;
    color: var(--white);
    transform: translateY(-3px);
}

.hero-cards {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
    gap: 2rem;
    margin-top: 3rem;
}

.card {
    background: var(--transparent-dark);
    backdrop-filter: blur(10px);
    border-radius: 10px;
    padding: 1.8rem 1.8rem 1.1rem 1.8rem;
    transition: all 0.3s ease;
    text-decoration: none;
    color: var(--white);
    border: 1px solid var(--transparent-darker);
}

.card p {
     padding-bottom: 0.7rem;
}

.card:hover {
    transform: translateY(-5px);
    background: var(--transparent-darker);
    box-shadow: 0 10px 20px var(--transparent-dark);
}

.card i {
    font-size: 2rem;
    margin-bottom: 1rem;
    color: var(--white);
}

.card p {
    color: #ffffff;
}

.card h3 {
    margin: 0 0 1rem 0;
    font-size: 1.4rem;
    color: var(--white);
}



















/* Projets */
.projects {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
    gap: 2rem;
    max-width: 1200px;
    margin: 0 auto;
    position: relative;
    overflow: hidden;
    max-height: 950px;
}

.projects.expanded {
    max-height: max-content;
}

.project-card {
    border-radius: 10px;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    background-color: var(--white);
    text-decoration: none;
    color: inherit;
}

.project-img {
    height: 200px;
    background-color: var(--gray-light);
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--text-light);
    overflow: hidden;
    position: relative;
}

.project-img img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.project-info {
    padding: 0.5rem 2rem 2rem 2rem;
    flex-grow: 1;
}

.project-header {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.project-icon {
    font-size: 1.8rem;
    color: var(--text-dark);
}

.text-with-margin {
    margin-bottom: 0.5rem;
}

.tech-tags {
    margin-top: 1.8rem;
}

.tech-tag {
    display: inline-block;
    background-color: var(--labels);
    color: var(--primary-dark);
    padding: 0.4rem 0.9rem;
    border-radius: 20px;
    font-size: 0.8rem;
    margin-right: 0.5rem;
    margin-bottom: 0.7rem;
}

/* Show more projects button */
.show-more-container {
    position: relative;
    margin-top: 3rem;
    display: flex;
    justify-content: center;
}

.show-more-gradient {
    position: absolute;
    top: -190px;
    left: 0;
    right: 0;
    height: 150px;
    pointer-events: none;
    opacity: 1;

    background: linear-gradient(
        to bottom,
        rgba(224, 235, 255, 0) 0%,
        rgba(224, 235, 255, 0.9) 80%,
        var(--bg-light) 90%,
        var(--bg-light) 100%
    );
}

.show-more-gradient.hidden {
    opacity: 0;
}

.show-more-btn {
    background: var(--gradient);
    color: white;
    border: none;
    padding: 1rem 2rem;
    border-radius: 30px;
    font-size: 1.1rem;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    transition: all 0.3s ease;
    z-index: 1;
}

.show-more-btn:hover {
    transform: translateY(-3px);
    box-shadow: 0 5px 15px var(--transparent-blue);
}

.show-more-btn i {
    transition: transform 0.3s ease;
}

.show-more-btn.active i {
    transform: rotate(180deg);
}
















/* Statistiques */
.stats-section {
    background: var(--dark-gradient);
    padding: 8rem 0 10rem 0;
    overflow: hidden;
}

.stats-container {
    display: flex;
    animation: scroll 20s linear infinite;
    width: max-content;
}

.stat-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 1rem;
    margin: 0 3rem;
    color: var(--white);
    min-width: 300px;
    text-align: center;
}

.stat-icon {
    font-size: 3rem;
    color: var(--white);
    background: var(--transparent-light);
    width: 110px;
    height: 110px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 1rem;
}

.stat-text {
    display: flex;
    flex-direction: column;
}

.stat-number {
    font-size: 6rem;
    font-weight: 700;
}

.stat-label {
    font-size: 1.1rem;
    opacity: 0.9;
}

@keyframes scroll {
    0% { transform: translateX(0); }
    100% { transform: translateX(-50%); }
}
















/* Frise chronologique */
.timeline {
    position: relative;
    max-width: 1200px;
    margin: 3rem auto 0;
}

.timeline::after {
    content: '';
    position: absolute;
    width: 4px;
    background: var(--gradient-horizontal);
    top: 0;
    bottom: 0;
    left: 50%;
    margin-left: -2px;
    border-radius: 2px;
}

.timeline-item {
    padding: 15px 40px;
    position: relative;
    width: 50%;
    box-sizing: border-box;
    margin-bottom: 2rem;
}

.timeline-item::after {
    content: '';
    position: absolute;
    width: 25px;
    height: 25px;
    background-color: var(--white);
    border: 4px solid var(--primary-dark);
    border-radius: 50%;
    top: 20px;
    z-index: 1;
    box-shadow: 0 0 0 4px var(--transparent-dark);
}

.left {
    left: 0;
}

.right {
    left: 50%;
}

.left::after {
    right: -16px;
}

.right::after {
    left: -16px;
}




















/* Centres d'intérêt */
.interests-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
    gap: 2rem;
    text-align: center;
    margin: 0 auto;
    max-width: 1400px;
    padding-inline: 2rem;
}

.interest-item {
    text-decoration: none;
    color: inherit;
    transition: all 0.3s ease;
    perspective: 1000px;
    margin-bottom: 1rem;
}

.interest-item:hover {
    transform: translateY(-2px);
}

.interest-icon {
    background: var(--gradient);
    width: 90px;
    height: 90px;
    margin: 0 auto 1.5rem;
    border-radius: 20px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--white);
    font-size: 2.2rem;
    box-shadow: 0 8px 15px var(--transparent-blue);
    transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    transform-style: preserve-3d;
}

.interest-item:hover .interest-icon {
    transform: rotateY(20deg) scale(1.1);
    box-shadow: 0 15px 25px var(--transparent-dark-blue);
}

.interest-title {
    font-weight: 600;
    margin-bottom: 0.5rem;
    color: var(--primary-dark);
    font-size: 1.2rem;
}

.interest-item p {
    color: var(--text-light);
    font-size: 0.95rem;
}




















/* Footer */
footer {
    background: var(--dark-gradient);
    color: var(--white);
    text-align: center;
    padding: 3rem 0;
    position: relative;
}

.quote {
    font-style: italic;
    margin: 1rem auto;
    max-width: 600px;
    opacity: 0.8;
    font-size: 1.1rem;
    line-height: 1.8;
}

.copyright {
    margin-top: 1rem;
    opacity: 0.7;
    font-size: 0.9rem;
}

.footer-contact {
    margin-top: 1.5rem;
    margin-inline: 2rem;
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 0.8rem;
    font-size: 1.1rem;
}

.footer-contact i {
    color: var(--white);
}



















/* Responsive */
@media (max-width: 1100px) {
    .nav-brand {
        display: none;
    }
} 

@media (max-width: 840px) {
    .carousel p {
        font-size: 1.2rem;
    }

    .carousel h2 {
        font-size: 2rem;
    }

    .interests-grid {
        grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
        padding: 0 2rem;
    }
    
    .nav-social {
        display: none;
    }

    .responsive-social {
        display: flex;
    }

    .stat-item {
    min-width: 150px;
    }

    /* Timeline responsive */
    .timeline {
        grid-template-columns: 1fr;
    }

    .timeline::after {
        left: 0px;
    }

    .timeline-item {
        width: 100%;
        padding-left: 10px;
        padding-right: 0;
    }
    
    .timeline-item::after {
        left: 0;
    }

    .left::after, .right::after {
        left: -10px;
        top: 40px;
    }
    
    .left, .right {
        left: 0;
        text-align: left;
    }

    /* A propos de moi */
    .hero-section {
        padding-top: 25rem;
    }

    .hero-container {
        padding: 0 2rem;
    }

    .hero-image {
        width: 100%;
        max-width: 100%;
        height: 500px;
        clip-path: polygon(0 0, 100% 0, 100% 500px, 0 400px);
    }

    .hero-image img {
        object-position: 50% 30%
    }

    @media (max-height: 450px) {
        .hero-image {
            position: absolute;
            height: 300px; 
            width: 100%;
            clip-path: polygon(0 0, 100% 0, 100% 300px, 0 230px);
            overflow: hidden;
        }

        .hero-section {
            padding-top: 13.5rem;
        }
    }

    .hero-title {
        padding-right: 0%;
    }

    .hero-description {
        padding-right: 0%;
    }

}

@media (max-width: 650px) {
    h2 {
        font-size: 3rem;
    }

    .nav-links {
        display: none;
        width: 100%;
        flex-direction: column;

        position: fixed;
        top: 55px;
        left: 0;

        transform: none !important;
        transform-origin: top left;

        box-shadow: 0 5px 10px var(--transparent-dark);
        z-index: 1000;
    }
    
    .nav-links.active {
        display: flex;
        background-color: var(--white);
    }
    
    .burger-menu {
        display: block;
        margin-right: auto;
    }

    .nav-brand {
        display: block;
        margin-left: auto;
        margin-right: 0rem;
        position: static;
        transform: none;
        order: 1;
    }
    
    .nav-link {
        justify-content: center;
    }

    .nav-link:hover::after, .social-link:hover::after {
        width: 50px;
    }

    .stats-section {
        background: var(--dark-gradient);
        padding: 4rem 0 6rem 0;
        overflow: hidden;
    }

}

@media (max-width: 550px) {
    .hero-section {
        padding-bottom: 4rem;
    }

    .hero-buttons {
        flex-direction: column;
        gap: 1rem;
    }

    section {
        padding: 5rem 1rem;
    }

    h2 {
        font-size: 2rem;
    }

    .stats-container {
        animation: scroll 12s linear infinite;
    }
}

@media (max-height: 600px) {
    /* Statistiques */
    .stats-section {
        background: var(--dark-gradient);
        padding: 2rem 0 3rem 0;
        overflow: hidden;
    }
    
    .stat-icon {
        font-size: 2rem;
        width: 70px;
        height: 70px;
        margin-bottom: 0rem;
    }
    
    .stat-number {
        font-size: 3rem;
    }
    
    .stat-label {
        font-size: 1rem;
    }
}

/* Mode paysage mobile */
@media (max-height: 450px) {
    .nav-container, .nav-links {
        display: none;
    }

    @media (min-width: 650px) {
        .nav-social {
            display: none;
        }

        body.burger-active .nav-social {
            display: flex;
        }
    }

    body.burger-active .nav-container, body.burger-active .nav-links {
        display: flex;
    }

    .burger-menu {
        display: block;
        margin-right: auto;
    }

    .burger-menu:not(.active){
        background: var(--white);
        box-shadow: 0 3px 10px var(--transparent-dark);
    }

    @media (min-width: 650px) {
        .nav-links {
            left: 70px;
        }
    }

    body.burger-active .burger-menu {
        box-shadow: none;
    }
    
    .carousel{
        height: 100vh;
    }

    section {
        padding: 5rem 1rem;
    }

    .carousel p {
        font-size: 1.2rem;
    }

    .carousel h2 {
        font-size: 2rem;
    }
}