@import url('https://fonts.googleapis.com/css2?family=Quicksand:wght@400;600&display=swap');

/* RESET & BASE */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: 'Quicksand', sans-serif;
}

html, body {
    height: 100%;
}

body {
    background-color: #ffd8a9;
    color: #401a17;
    line-height: 1.6;
    padding: 20px;
    display: flex;
    flex-direction: column;
    min-height: 100vh;
}

main {
    max-width: 850px;
    margin: 0 auto;
    flex: 1;
}

/* HEADER */
header {
    background: #401a17;
    color: white;
    padding: 30px 0;
    text-align: center;
    border-radius: 25px;
    margin-bottom: 30px;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.1);
}

nav a {
    color: white;
    margin: 0 15px;
    text-decoration: none;
    font-weight: 600;
    transition: color 0.3s;
}

nav a:hover {
    color: #ffd8a9;
    text-decoration: underline;
}

/* TEXT STYLES */
h1, h2, h3 {
    color: #e86522;
    margin-bottom: 20px;
    font-weight: 600;
}

p, li {
    font-size: 17px;
    margin-bottom: 10px;
}

ul {
    padding-left: 20px;
}

/* BUTTONS */
button, input[type="submit"], .cta-button, .download-btn, .close-popup {
    background: #e86522;
    color: white;
    border: none;
    padding: 12px 20px;
    border-radius: 30px;
    cursor: pointer;
    font-size: 16px;
    font-weight: 600;
    transition: background 0.3s, transform 0.3s;
}

button:hover, input[type="submit"]:hover,
.download-btn:hover, .cta-button:hover, .close-popup:hover {
    background: #bf4918;
    transform: scale(1.05);
}

/* FORMS */
input, textarea {
    width: 100%;
    padding: 12px;
    margin-top: 8px;
    margin-bottom: 16px;
    border: 1px solid #e8b07c;
    border-radius: 20px;
    font-size: 16px;
    background-color: #fffaf5;
}

/* DOWNLOAD */
.download-btn {
    display: inline-block;
    padding: 14px 25px;
    margin-top: 20px;
}

/* FOOTER */
.footer {
    font-size: 16px;
    color: white;
    background-color: #401a17;
    text-align: center;
    padding: 30px 0;
    border-radius: 25px;
    margin-top: 30px;
    box-shadow: 0 -4px 10px rgba(0, 0, 0, 0.1);
}

.footer-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    max-width: 1000px;
    margin: 0 auto;
    padding: 0 20px;
}

.footer-links {
    display: flex;
    gap: 20px;
}

.footer-links a {
    color: white;
    font-weight: 600;
    text-decoration: none;
    transition: color 0.3s;
}

.footer-links a:hover {
    color: #ffd8a9;
    text-decoration: underline;
}

.footer-right {
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    gap: 10px;
    text-align: right;
}

.linkedin-link {
    color: #ffd8a9;
    font-weight: 600;
    text-decoration: none;
    transition: color 0.3s;
}

.linkedin-link:hover {
    color: white;
    text-decoration: underline;
}

/* HERO */
.hero {
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 100px 20px;
    background: linear-gradient(135deg, #ffe7cc, #ffd8a9);
    border-radius: 25px;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.05);
    margin-bottom: 40px;
}

.hero-content {
    text-align: center;
    max-width: 700px;
}

.hero h1 {
    font-size: 2.8rem;
    color: #401a17;
    margin-bottom: 20px;
}

.hero h1 span {
    color: #e86522;
    font-weight: 700;
}

.hero p {
    font-size: 1.2rem;
    color: #401a17;
    margin-bottom: 30px;
}

/* SECTION BLOCKS */
.about-me, .skills, .quote, .contact-cta {
    background: linear-gradient(135deg, #ffe7cc, #ffd8a9);
    border-radius: 25px;
    padding: 30px;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
    margin-bottom: 30px;
    border: 2px solid #ffd8a9;
    text-align: center;
}
.footer-contact-link {
    color: #ffd8a9;
    font-weight: 600;
    text-decoration: none;
    border-bottom: 2px solid transparent;
    transition: color 0.3s, border-bottom 0.3s;
    margin-right: 10px;
}

.footer-contact-link:hover {
    color: white;
    border-bottom: 2px solid white;
}


.skills-list {
    list-style: none;
    padding: 0;
}

.skills-list li {
    font-size: 17px;
    margin-bottom: 10px;
    color: #401a17;
}

.quote blockquote {
    font-style: italic;
    font-size: 1.1rem;
    color: #401a17;
}

.quote cite {
    display: block;
    margin-top: 10px;
    color: #e86522;
    font-weight: 600;
}

/* PORTFOLIO IMAGES */
.portfolio-images {
    display: flex;
    justify-content: center;
    gap: 40px;
    flex-wrap: wrap;
    margin-top: 20px;
}

.image-card {
    position: relative;
    overflow: hidden;
    border-radius: 15px;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.15);
    transition: transform 0.3s;
    width: 280px;
    height: 280px;
}

.image-card img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    transition: transform 0.3s ease;
}

.image-card:hover img {
    transform: scale(1.05);
}

.image-title {
    position: absolute;
    bottom: 0;
    background: rgba(0, 0, 0, 0.6);
    color: #fff;
    width: 100%;
    text-align: center;
    padding: 10px;
    font-size: 18px;
    opacity: 0;
    transition: opacity 0.3s ease;
    white-space: normal; /* autorise les retours à la ligne */
    overflow: visible;   /* le contenu déborde si nécessaire */
    text-overflow: unset;
}

.image-card:hover .image-title {
    opacity: 1;
}

/* POPUP */
.popup {
    position: fixed;
    top: 0; left: 0;
    width: 100%; height: 100%;
    background: rgba(0, 0, 0, 0.8);
    display: none;
    justify-content: center;
    align-items: center;
    z-index: 1000;
}

.popup:target {
    display: flex;
}

.popup .close {
    position: absolute;
    top: 30px;
    right: 40px;
    font-size: 40px;
    color: white;
    text-decoration: none;
    font-weight: bold;
    transition: 0.3s;
}

.popup .close:hover {
    color: #ffccaa;
}

.popup-content {
    display: flex;
    gap: 30px;
    background: white;
    border-radius: 20px;
    padding: 30px;
    max-width: 90vw;
    max-height: 80vh;
    box-shadow: 0 0 30px rgba(0,0,0,0.4);
    overflow: hidden;
    align-items: center;
    flex-wrap: nowrap;
}

.popup-content img {
    max-width: 60vw;      /* prend jusqu’à 60% de la largeur viewport */
    max-height: 80vh;     /* limite la hauteur */
    width: auto;
    height: auto;
    object-fit: contain;
    border-radius: 15px;
    box-shadow: 0 0 15px rgba(0,0,0,0.2);
    flex-shrink: 0;       /* ne rétrécit pas sous une certaine taille */
}

.popup-text {
    max-width: 35vw;     /* texte prend jusqu’à 35% de la largeur viewport */
    max-height: 80vh;
    overflow-y: auto;
    color: #401a17;
}

@media (max-width: 768px) {
    .popup-content {
        flex-direction: column;
        max-width: 90vw;
        max-height: 90vh;
        padding: 20px;
        gap: 20px;
    }
    .popup-content img,
    .popup-text {
        max-width: 100%;
        max-height: 50vh;
    }
    .popup-text {
        max-height: none;
        overflow: visible;
    }
}


.popup-text h3 {
    font-size: 24px;
    margin-bottom: 15px;
    color: #e86522;
}

.popup-text p {
    font-size: 17px;
    line-height: 1.6;
    white-space: normal;
    overflow: visible;
    text-overflow: unset;
}


.popup-overlay {
    display: flex;
    justify-content: center;
    align-items: center;
    height: 100%;
    width: 100%;
}

.popup-content.carousel-content {
    background: #fffaf5;
    padding: 30px;
    border-radius: 20px;
    max-width: 90%;
    max-height: 90%;
    overflow: auto;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.3);
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 20px;
}

.carousel-container {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 20px;
}

.carousel-container img {
    max-width: 85vw;
    max-height: 75vh;
    border-radius: 10px;
    box-shadow: 0 0 15px rgba(0, 0, 0, 0.3);
}


.carousel-btn {
    background: none;
    border: none;
    font-size: 2rem;
    color: #e86522;
    cursor: pointer;
    transition: transform 0.2s ease;
}

.carousel-btn:hover {
    transform: scale(1.2);
    color: #bf4918;
}


.carousel-btn.left {
    left: 10px;
}

.carousel-btn.right {
    right: 10px;
}

/* TOOL LOGO CLOUD */
.tool-logo-cloud {
    position: relative;
    width: 100%;
    height: 350px;
    margin-top: 30px;
}

.tool-logo-cloud img {
    position: absolute;
    width: 60px;
    height: auto;
    transition: transform 0.3s ease;
    filter: drop-shadow(2px 2px 5px rgba(0,0,0,0.1));
    animation: floaty 4s ease-in-out infinite;
}

/* Random placement */
.tool-logo-cloud img:nth-child(1) { top: 10%; left: 20%; transform: rotate(-15deg); }
.tool-logo-cloud img:nth-child(2) { top: 40%; left: 5%; transform: rotate(10deg); }
.tool-logo-cloud img:nth-child(3) { top: 65%; left: 25%; transform: rotate(-8deg); }
.tool-logo-cloud img:nth-child(4) { top: 20%; left: 70%; transform: rotate(12deg); }
.tool-logo-cloud img:nth-child(5) { top: 60%; left: 75%; transform: rotate(-20deg); }
.tool-logo-cloud img:nth-child(6) { top: 45%; left: 50%; transform: rotate(5deg); }
.tool-logo-cloud img:nth-child(7) { top: 15%; left: 85%; transform: rotate(-5deg); }
.tool-logo-cloud img:nth-child(8) { top: 80%; left: 60%; transform: rotate(18deg); }
.tool-logo-cloud img:nth-child(9) { top: 30%; left: 35%; transform: rotate(-12deg); }
.tool-logo-cloud img:nth-child(10) { top: 70%; left: 10%; transform: rotate(7deg); }
.tool-logo-cloud img:nth-child(11) { top: 5%; left: 55%; transform: rotate(-10deg); }

.tool-logo-cloud img:hover {
    transform: scale(1.1) rotate(0deg);
}

@keyframes floaty {
    0% { transform: translateY(0px) rotate(var(--angle)); }
    50% { transform: translateY(-10px) rotate(calc(var(--angle) + 3deg)); }
    100% { transform: translateY(0px) rotate(var(--angle)); }
}

/* PORTFOLIO VIDEO */
.portfolio-section video {
    margin: 0 auto;
    display: block;
    max-width: 100%;
    border-radius: 25px;
    box-shadow: 0 8px 20px rgba(232, 101, 34, 0.4);
    border: 3px solid #e86522;
    background-color: #fffaf5;
    outline-offset: 6px;
    outline: 3px solid #ffd8a9;
    transition: box-shadow 0.3s ease, transform 0.3s ease;
}

.portfolio-section video:hover,
.portfolio-section video:focus {
    box-shadow: 0 12px 30px rgba(232, 101, 34, 0.7);
    transform: scale(1.03);
    cursor: pointer;
}

/* PROJECT BLOCKS */
.project-block {
    display: flex;
    flex-wrap: wrap;
    gap: 2rem;
    margin-bottom: 3rem;
    align-items: center;
}

.carousel-preview {
    flex: 1;
    max-width: 400px;
    cursor: pointer;
}

.carousel-preview img {
    width: 100%;
    border-radius: 10px;
    box-shadow: 0 0 10px rgba(0,0,0,0.15);
}

.project-text {
    flex: 2;
    min-width: 250px;
}

.project-text h3 {
    margin-bottom: 0.5rem;
    font-size: 1.3rem;
}

.project-text p {
    font-size: 1rem;
    line-height: 1.6;
}

/* RESPONSIVE */
@media (max-width: 768px) {
    .portfolio-images {
        flex-direction: column;
        align-items: center;
    }

    .image-card img {
        width: 100%;
        max-width: 300px;
    }

    .carousel-btn {
        font-size: 30px;
        padding: 8px 16px;
    }

    .popup-content {
        flex-direction: column;
        align-items: center;
        padding: 20px;
    }

    .popup-image img {
        width: 100%;
    }

    .popup-text {
        max-width: 100%;
        text-align: center;
    }
}
.portfolio-card {
    background: linear-gradient(135deg, #ffe7cc, #ffd8a9);
    border-radius: 16px;
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.1);
    margin: 40px auto;
    padding: 30px;
    max-width: 1200px;
    transition: transform 0.3s ease;
}

.portfolio-card:hover {
    transform: translateY(-5px);
}

.portfolio-section h2 {
    font-size: 1.8rem;
    margin-bottom: 20px;
    border-left: 5px solid #555;
    padding-left: 10px;
}
.video-card {
    display: flex;
    flex-direction: row;
    gap: 2rem;
    align-items: flex-start;
    margin-top: 2rem;
    flex-wrap: wrap;
}

.video-container {
    flex: 1 1 400px;
    max-width: 600px;
}

.video-container video {
    width: 100%;
    border-radius: 10px;
    box-shadow: 0 5px 20px rgba(0,0,0,0.2);
}

.video-description {
    flex: 1 1 300px;
    max-width: 500px;
}

.video-description h3 {
    margin-bottom: 1rem;
}

.video-description p {
    font-size: 1rem;
    line-height: 1.6;
}