@import url('https://fonts.googleapis.com/css2?family=Montserrat:ital,wght@0,100..900;1,100..900&display=swap');

* {
    margin: 0;
    font-family: "Montserrat", sans-serif;
}

#mobileHint {
    position: fixed;
    bottom: 20%;
    left: 50%;
    transform: translateX(-50%);
    display: none;

    z-index: 50;
    pointer-events: none;

    font-size: 1.2rem;
    color: white;
    opacity: 0.85;
}

#mobileHint.show {
    display: flex;
    align-items: center;
    gap: 0.6rem;
}

.hint-icon {
    font-size: 1.8rem;
}

img {
    max-width: 200px;
    height: 100%;
    object-fit: cover;
    /* ou contain selon le besoin */
    border-radius: 50%;
}

.hidden {
    display: none !important;
}

main {
    background-color: #0B0B0B;
}

#sectionTitle {
    position: relative;
    width: 100vw;
    height: 100vh;
    background-color: #0B0B0B;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
}

#title {
    color: #F6F6F6;
    font-size: 7vmin;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    gap: 20px;
    margin-bottom: 50px;
    text-align: center;
}

#sectionCanvas {
    display: none;
    width: 100vw;
    height: 100vh;
}

#canvas {
    width: 100%;
    height: 100%;
    background-color: #0B0B0B;
    display: block;
}

#canvas:hover {
    cursor: pointer;
}


.backToCanvasBtn {
    color: #F6F6F6;
    margin: 15px 0px 50px 20px;
    opacity: 0.8;
    transition: opacity 0.2s ease, transform 0.2s ease;
}

.backToCanvasBtn:hover {
    cursor: pointer;
    color: rgb(255, 92, 0);
    opacity: 1;
    transform: translateX(-4px);
}

.fourSections {
    display: none;
    opacity: 0;
    background-color: #0B0B0B;
    width: 100%;
    height: 100vh;
    flex-direction: column;
    position: absolute;
    /* permet de faire glisser la section par-dessus */
    top: 0;
    left: 0;
    color: #F6F6F6;
}


#h2About {
    text-align: center;
    font-size: 5rem;
}

#presentation {
    width: 100%;
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 10%;
    margin-top: 10%;
}

#presentationP {
    width: 35%;
    line-height: 1.7;
    text-align: left;
    color: #F6F6F6;
    font-size: 1.3rem;

    word-break: normal;
    overflow-wrap: break-word;
}

#devWeb,
#presJoke {
    word-break: break-all;
}

.char {
    color: black;
    /* couleur de départ */
    display: inline-block;
}

.word {
    display: inline-block;
    white-space: nowrap;
}

#devWeb {
    color: #FF5C00;
}

#photoContainer {
    width: fit-content;
    border: 2px solid #FF5C00;
    border-radius: 50%;
    display: flex;
    justify-content: center;
    align-items: center;
    box-shadow: 0 4px 20px rgba(255, 255, 255, 0.5);
    background-color: #FF5C00;
}

#presJoke {
    font-weight: 600;
    display: inline;
}

#passionsDiv {
    margin-top: 300px;
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 10%
}


@media screen and (max-width:1000px) {

    .backToCanvasBtn {
        margin: 15px 0 10px 20px;
    }

    #h2About {
        margin-top: 0;
    }

    #presentation {
        display: flex;
        flex-direction: column;
        gap: 10%;
        margin-top: 50px;
    }

    #h2About {
        font-size: 3rem;
    }

    #presentationP {
        font-size: 1rem;
        width: 60%;
    }
}

/* section skills */

#skillsTitle {
    text-align: center;
    font-size: 2.5rem;
    transition: color 2s cubic-bezier(0.4, 0, 0.2, 1);
}

#clickCue {
    text-align: center;
    color: rgba(255, 255, 255, 0.5);
    margin-top: 30px;
}

#skillsTitle:hover {
    color: #ff5c00;
}

:root {
    --cube-size: 200px;
}

#cubeContainer {
    height: 100vh;
    display: grid;
    grid-template-columns: 1fr 2fr 1fr;
    grid-template-rows: 1fr 2fr 1fr;
    grid-template-areas:
        "frontEndSkills learning backEndSkills"
        "dbSkills sceneContainer versionControlSkills"
        "toolsSkills . designSkills"
}

#sceneContainer {
    grid-area: sceneContainer;
    display: flex;
    justify-content: center;
    align-items: center;
}

.scene {
    width: var(--cube-size);
    height: var(--cube-size);
    perspective: 800px;
}

.cube {
    width: var(--cube-size);
    height: var(--cube-size);
    position: relative;
    transform-style: preserve-3d;
    animation: rotate 10s linear infinite;
}

.face {
    position: absolute;
    width: var(--cube-size);
    height: var(--cube-size);
    background: rgba(255, 255, 255, 0.8);
    border: 2px solid #333;
    box-sizing: border-box;
    cursor: pointer;
    color: white;
    display: flex;
    justify-content: center;
    align-items: center;
    text-align: center;
}


.front {
    transform: translateZ(calc(var(--cube-size) / 2));
    background: rgba(255, 190, 11, 0.7);
}

.back {
    transform: rotateY(180deg) translateZ(calc(var(--cube-size) / 2));
    background: rgba(251, 86, 7, 0.7);
}

.right {
    transform: rotateY(90deg) translateZ(calc(var(--cube-size) / 2));
    background: rgba(255, 0, 110, 0.7);
}

.left {
    transform: rotateY(-90deg) translateZ(calc(var(--cube-size) / 2));
    background: rgba(131, 56, 236, 0.7);
}

.top {
    transform: rotateX(90deg) translateZ(calc(var(--cube-size) / 2));
    background: rgba(85, 255, 225, 0.7);
}

.bottom {
    transform: rotateX(-90deg) translateZ(calc(var(--cube-size) / 2));
    background: rgba(58, 134, 255, 0.7);
}



@keyframes rotate {
    0% {
        transform: rotateX(0deg) rotateY(0deg);
    }

    /* front */
    16% {
        transform: rotateX(0deg) rotateY(90deg);
    }

    /* right */
    33% {
        transform: rotateX(0deg) rotateY(180deg);
    }

    /* back */
    50% {
        transform: rotateX(0deg) rotateY(270deg);
    }

    /* left */
    66% {
        transform: rotateX(90deg) rotateY(270deg);
    }

    /* top */
    83% {
        transform: rotateX(-90deg) rotateY(270deg);
    }

    /* bottom */
    100% {
        transform: rotateX(0deg) rotateY(360deg);
    }

    /* retour front */
}



.skillsDiv {
    display: flex;
    flex-direction: column;
    gap: 10px;
    justify-content: center;
    align-items: flex-start;
}

.techIconAndText {
    display: flex;
    align-items: center;
    gap: 5px;
}

.techIcon {
    width: 20px;
}

#frontEndSkills {
    grid-area: frontEndSkills;
    padding-left: 100px;
}

#backEndSkills {
    grid-area: backEndSkills;
    display: flex;
    align-items: flex-end;
    padding-right: 100px;
}

#dbSkills {
    grid-area: dbSkills;
    padding-left: 100px;
}

#versionControlSkills {
    grid-area: versionControlSkills;
    display: flex;
    align-items: flex-end;
    padding-right: 100px;
}

#toolsSkills {
    grid-area: toolsSkills;
    padding-left: 100px;
}

#designSkills {
    grid-area: designSkills;
    display: flex;
    align-items: flex-end;
    padding-right: 100px;
}

#learning {
    grid-area: learning;
    visibility: hidden;
    opacity: 0;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
}

.logoContainer {
    background-color: white;
    width: fit-content;
    display: flex;
    justify-content: center;
    align-items: center;
    border-radius: 50%;
}

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

#containerContainer {
    display: flex;
    width: 100%;
    justify-content: center;
    align-items: center;
    height: 80%;
}

#titleContact {
    text-align: center;
    font-size: 2.5rem;
    transition: color 2s cubic-bezier(0.4, 0, 0.2, 1);
}

#titleContact:hover {
    color: #ff5c00;
}

#contactBackBtn {
    margin-bottom: 20px;
}

.contactContainer {
    display: flex;
    /* max-width: 500px; */
    justify-content: center;
    align-items: center;
    gap: 8%;
    width: 80%;
    padding: 2rem;
    text-align: center;
}


.contactIntro {
    margin-bottom: 2rem;
    opacity: 0.8;
    width: 50%;
    line-height: 1.7;
}

#contactForm {
    display: flex;
    flex-direction: column;
    gap: 1rem;
    width: 50%;
    /* padding-right: 5%; */
}

#contactForm input,
#contactForm textarea {
    padding: 0.8rem;
    font-size: 1rem;
    border: 1px solid #ccc;
    border-radius: 6px;
    font-family: inherit;
}

#contactForm textarea {
    resize: vertical;
    min-height: 120px;
}

#contactForm button {
    padding: 0.8rem;
    cursor: pointer;
    border: none;
    border-radius: 6px;
    background: #ff5c00;
    color: #fff;
    font-size: 1rem;
    transition: background 0.3s ease;
}

#contactForm button:hover {
    background: #e14f00;
}

#contactStatus {
    margin-top: 1rem;
    min-height: 1.5rem;
}

#contactSubmit {
    position: relative;
    overflow: hidden;
}

#contactSubmit .btn-loader {
    position: absolute;
    inset: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    pointer-events: none;
}

#contactSubmit.loading .btn-text {
    opacity: 0;
}

#contactSubmit.loading .btn-loader {
    opacity: 1;
}

/* =========================
   RUX SEND OVERLAY
========================= */

#ruxOverlay {
    position: fixed;
    inset: 0;
    background: #0B0B0B;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-direction: column;
    z-index: 2000;
    color: #fff;
    overflow: hidden;
}

#ruxOverlay.hidden {
    display: none;
}

.rux-message {
    font-size: 1.5rem;
    margin-bottom: 40px;
    opacity: 0;
}

.rux-ball {
    width: 22px;
    height: 22px;
    background: #ff5c00;
    border-radius: 50%;
    box-shadow: 0 0 20px #ff5c00;
    position: absolute;
    bottom: 80px;
    left: 50%;
    transform: translateX(-50%);
}

/* =========================
   PORTFOLIO
========================= */

#portfolio,
#about {
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
}

.portfolio-wrapper {
    max-width: 1100px;
    margin: 0 auto;
    padding: 2rem 2rem;
}

.portfolio-header {
    margin-bottom: 3rem;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 50px;
}

.portfolio-header h2 {
    font-size: 2.5rem;
    margin-bottom: 1rem;
    transition: color 2s cubic-bezier(0.4, 0, 0.2, 1);
}

.portfolio-header h2:hover {
    color: #ff5c00;
}

.portfolio-intro {
    max-width: 600px;
    opacity: 0.8;
    text-align: center;
}

/* Grid */
.projects-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 2rem;
}

/* Cards */
.project-card {
    background: rgba(255, 255, 255, 0.04);
    border-radius: 16px;
    padding: 2rem;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    position: relative;
    overflow: hidden;
}

.project-card:hover {
    transform: translateY(-6px);
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.25);
}

.project-badge {
    display: inline-block;
    margin-bottom: 0.75rem;
    font-size: 0.7rem;
    letter-spacing: 0.05em;
    text-transform: uppercase;
    opacity: 0.7;
}

.project-content h3 {
    font-size: 1.5rem;
    margin-bottom: 1rem;
}

.project-description {
    margin-bottom: 1.5rem;
    line-height: 1.5;
    opacity: 0.9;
}

/* Stack */
.project-stack {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    margin-bottom: 1.5rem;
    padding: 0;
    list-style: none;
}

.project-stack li {
    background: rgba(255, 255, 255, 0.1);
    padding: 0.4rem 0.8rem;
    border-radius: 999px;
    font-size: 0.8rem;
}

/* Actions */
.project-actions {
    display: flex;
    gap: 1rem;
}

.btn {
    text-decoration: none;
    padding: 0.6rem 1.2rem;
    border-radius: 8px;
    font-size: 0.9rem;
    transition: background 0.3s ease, transform 0.2s ease;
}

.btn.primary {
    background: #ff5c00;
    color: #fff;
}

.btn.primary:hover {
    transform: translateY(-2px);
    background: #ff7a2f;
}

.btn.secondary {
    border: 1px solid rgba(255, 255, 255, 0.3);
    color: #fff;
    background: rgba(255, 255, 255, 0.1);
}

.btn.secondary:hover {
    background: rgba(255, 255, 255, 0.1);
    cursor: pointer;
}


.modal-content {
    grid-template-columns: 1fr;
    padding: 1.5rem;
    max-height: 90vh;
}

.modal-images {
    min-height: 180px;
}

/* =========================
   PROJECT MODAL
========================= */

.project-modal {
    position: fixed;
    inset: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 999;
}

.project-modal.hidden {
    display: none;
}

.modal-overlay {
    position: absolute;
    inset: 0;
    background: rgba(0, 0, 0, 0.75);
    backdrop-filter: blur(8px);
}

.modal-content {
    background: #111;
    /* contraste fort */
    color: #fff;
    max-width: 700px;
    width: 90%;
    max-height: 85vh;
    overflow-y: auto;
    border-radius: 16px;
    padding: 2rem;
    position: relative;
    box-shadow: 0 30px 60px rgba(0, 0, 0, 0.6);
    pointer-events: auto;
}

/* Bouton fermer */
.modal-close {
    position: absolute;
    top: 12px;
    right: 16px;
    background: none;
    border: none;
    font-size: 1.6rem;
    color: #fff;
    cursor: pointer;
    z-index: 20;
    /* 👈 IMPORTANT */
    pointer-events: auto;
    /* 👈 IMPORTANT */
}

/* Texte */
.modal-text h3 {
    font-size: 1.8rem;
    margin-bottom: 1rem;
}

.modal-text p {
    line-height: 1.6;
    opacity: 0.9;
    white-space: pre-line;
    /* IMPORTANT pour tes descriptions multilignes */
}

/* =========================
   MODAL SLIDER
========================= */

.modal-images {
    position: relative;
    margin-bottom: 1.5rem;
    width: 100%;
    height: 260px;
    /* ← HAUTEUR FIXE */
    display: flex;
    align-items: center;
    justify-content: center;
}

.slider {
    width: 100%;
    height: 100%;
    overflow: hidden;
    border-radius: 12px;
}

.slider img {
    width: 100%;
    height: 100%;
    object-fit: contain;
    /* ou cover si tu préfères */
}

.slider video {
    width: 100%;
    height: 100%;
    object-fit: contain;
    border-radius: 12px;
    background: #000;
}

/* Boutons */
.slider-btn {
    background: rgba(255, 255, 255, 0.1);
    border: none;
    color: #fff;
    font-size: 2rem;
    padding: 0.2rem 0.6rem;
    cursor: pointer;
    border-radius: 8px;
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    transition: background 0.2s ease;
}

.slider-btn:hover {
    background: rgba(255, 255, 255, 0.25);
}

.slider-btn.prev {
    left: 8px;
}

.slider-btn.next {
    right: 8px;
}

/* =========================
   MODAL IMAGE OVERRIDE
========================= */

.project-modal img {
    max-width: 100%;
    height: 100%;
    object-fit: contain;
    border-radius: 0 !important;
}

/* Mobile */
@media (max-width: 600px) {
    .modal-content {
        padding: 1.5rem;
    }
}


@media screen and (min-width: 700px) and (max-width: 1000px) {
    #presentation {
        height: 100%;
    }

    #presentationP {
        font-size: 1.5rem;
    }
}

@media screen and (max-width: 700px) {
    :root {
        --cube-size: 100px;
    }

    .techIconAndText p,
    .face h3,
    #learning h3 {
        font-size: 0.6rem;
    }

    #frontEndSkills,
    #dbSkills,
    #toolsSkills {
        padding-left: 20px;
    }

    #backEndSkills,
    #versionControlSkills,
    #designSkills {
        padding-right: 20px;
    }

    .contactContainer {
        flex-direction: column;
        align-items: center;
    }

    #contactForm,
    .contactIntro {
        width: 100%;
    }

    .project-card {
        text-align: center;
    }

    .portfolio-header {
        margin-bottom: 30px;
        gap: 20px;
    }

    .project-stack,
    .project-actions {
        justify-content: center;
    }

}



@media screen and (max-height: 700px) {
    #titleContact {
        padding-bottom: 15px;
    }

    .contactIntro {
        line-height: 1;
    }

    #portfolio,
    #about {
        padding-top: 1.5rem;
        padding-bottom: 2rem;
    }

    .portfolio-header {
        margin-bottom: 0;
    }

    .projects-grid {
        gap: 1.5rem;
        padding-top: 50px;
    }

    #presentationP {
        line-height: 1.1;
    }

    #presentation {
        margin-top: 50px;
    }

    #h2About {
        font-size: 2rem;
    }

    .portfolio-wrapper {
        padding: 2rem 2rem;
    }
}