/* ===================== STYLES GÉNÉRAUX ===================== */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    background-color: #739dbe;
    font-family: 'Imperial Script', cursive;
    color: #fff;
    overflow-x: hidden;
    scroll-behavior: smooth;

    background-image: url('photo/passeport2.png');
    background-repeat: no-repeat; 
    background-size: 700px auto; 
    background-position: right 40px bottom 40px; 
    background-attachment: fixed; 
}

/* ===================== SECTION 1 : PORTFOLIO ===================== */
.portfolio-section {
    display: flex;
    align-items: center;
    justify-content: center;
    background-color: #739dbe;
    height: auto; 
    padding: 40px 20px;
}

.book-container {
    width: 90%;
    max-width: 1400px;
    display: flex;
    justify-content: center;
    position: relative;
}

.book-image {
    width: 100%;
    height: auto;
    transition: transform 0.3s ease;
}

.book-image:hover {
    transform: scale(1.02);
}

.arrow-down {
    position: absolute;
    bottom: 40px;
    left: 88%;
    transform: translateX(-50%);
    font-size: 60px;
    color: #91acba;
    text-decoration: none;
    transition: transform 0.3s ease;
}

.arrow-down:hover {
    transform: translateX(-50%) scale(1.2);
}

/* ===================== SECTION 2 : ABOUT ME ===================== */
.aboutme-section {
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    height: auto;
    padding: 90px 0;
    background-color: #739dbe;
}

.aboutme-image {
    width: 60%;
    max-width: 500px;
    height: auto;
    border-radius: 10px;
    transition: transform 0.3s ease;
}

.aboutme-image:hover {
    transform: scale(1.05);
}

/* ===================== SECTION 3 : COMPÉTENCES ===================== */
.competences-section {
    position: relative;
    width: 100%;
    background-color: #739dbe;
    display: flex;
    flex-direction: column;
    align-items: center;
    min-height: auto;
    padding: 20px;  
}

.lettre-wrapper {
    position: relative;
    display: flex;
    justify-content: center;
    align-items: center;
    width: 600px;
    height: auto;
    padding: 20px 0;
}

.paper-background {
    position: absolute;
    top: -10cm;
    left: 2cm;
    width: 120%;
    height: auto;
    z-index: 1;
}

.paper-image {
    width: 100%;
    height: auto;
    border-radius: 5px;
}

.lettre-biaise {
    width: 480px;
    transform: rotate(-10deg);
    transition: transform 0.3s ease;
    z-index: 2;
    position: relative;
}

.lettre-biaise:hover {
    transform: rotate(-5deg) scale(1.05);
}

.lettre {
    position: absolute;
    width: 260px;
    opacity: 0.95;
    transition: transform 0.4s ease;
    z-index: 1;
}

.lettre-left { left: -90px; top: 22%; transform: rotate(12deg); }
.lettre-right { right: -90px; top: 33%; transform: rotate(10deg); }

.lettre:hover { transform: scale(1.06) rotate(3deg); }

.my-photo-container {
    position: absolute;
    top: 300px;
    left: 20px;
    width: 550px;
    height: 550px;
    overflow: hidden;
    z-index: 3;
    transition: transform 0.4s ease;
}

.my-photo {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

/* ===================== SECTION 4 : PROJETS ===================== */
.proj-section {
    display: flex;
    align-items: center;
    justify-content: center;
    margin-top: 80px;
    height: auto; 
    padding: 40px 20px;
}

.projets-image {
    width: 60%;
    max-width: 500px;
    height: auto;
    border-radius: 10px;
    transition: transform 0.3s ease;
}

.projets-image:hover {
    transform: scale(1.05);
}

.projets-section {
    position: relative;
    min-height: auto;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: flex-start;
    margin-top: 40px;
    padding: 60px 20px;
}

.projets-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(350px, 400px));
    gap: 40px;
    width: 100%;
    max-width: 1400px;
    justify-content: center;
    padding: 20px;
}

.project-card {
    width: 100%;
    height: 450px;
    background-color: #ddebf2;
    border-radius: 30px;
    overflow: hidden;
    position: relative;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    text-decoration: none;
    box-shadow: 0 10px 30px rgba(0,0,0,0.2);
}

.project-card img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.portrait-trio {
    width: 100% !important;
    height: 100% !important;
    object-fit: contain !important;
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
}

.card-video {
    width: 100%;
    height: 100%;
    object-fit: cover;
    position: absolute;
    top: 0;
    left: 0;
}

.project-card:hover { 
    transform: translateY(-15px) scale(1.02);
    box-shadow: 0 15px 40px rgba(0,0,0,0.3);
}

.arrow-up {
    position: fixed;
    bottom: 60px;
    right: 40px;
    font-size: 50px;
    color: #677b86;
    transition: transform 0.3s ease;
    text-decoration: none;
    z-index: 100;
}

.arrow-up:hover { 
    transform: scale(1.2);
    color: #91acba;
}

/* ===================== RESPONSIVE ===================== */
@media (max-width: 900px) {
    .lettre { width: 180px; opacity: 0.85; }
    .projets-grid {
        grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
        gap: 30px;
    }
    .project-card { height: 380px; }
}

@media (max-width: 600px) {
    .lettre { display: none; }
    .aboutme-image { width: 70%; max-width: 350px; }
    .projets-grid {
        grid-template-columns: 1fr;
        gap: 25px;
    }
    .project-card { height: 330px; }
}