/* ================== GLOBAL ================== */
* {
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    margin: 0;
    font-family: 'Roboto', sans-serif;
    color: #2A2A2A;
    background: url('images/backgrounds/background.png') center top / cover fixed;
    overflow-x: hidden;
    max-width: 100vw;
}

@media (max-width: 768px) {

    /* Agrandir la police des expériences et formations dans My Resume */
    #resume ul,
    #resume ul li,
    #resume h3 {
        font-size: 1.1em;
    }

    /* Réduction police pour textes principaux dans My Resume et My Studies */
    #resume p,
    #resume ul,
    #resume li,
    main>section p,
    main>section ul,
    main>section li {
        font-size: 0.67em;
    }

    footer p {
        font-size: 1em;
    }

    .pagination-container {
        max-width: 350px;
        width: 90vw;
        margin-left: auto;
        margin-right: auto;
        border-radius: 12px;
    }

    .projects,
    .search-bar,
    #resume,
    main>section {
        max-width: 350px;
        width: 90vw;
        margin-left: auto;
        margin-right: auto;
        border-radius: 12px;
    }

    footer {
        max-width: 240px;
        width: 85vw;
        margin-left: auto;
        margin-right: auto;
        border-radius: 12px;
        font-size: 0.5rem;
        padding: 2px 0 !important;
    }

    body {
        background: url('images/backgrounds/background_mobile.png') center top / cover fixed;
    }
}

.content {
    position: relative;
    z-index: 1;
    max-width: 100%;
    overflow-x: hidden;
}

/* ================== CONTAINERS ================== */
header,
section,
footer {
    background-color: rgba(58, 124, 165, 0.12);
    border-radius: 10px;
    margin: 20px auto;
    padding: 20px;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.05);
    max-width: 950px;
}

section {
    margin-bottom: 40px;
    transition: transform 0.3s, box-shadow 0.3s;
}

section:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 20px rgba(58, 124, 165, 0.15);
}

/* ================== HEADER ================== */
header {
    position: relative;
    text-align: center;
    background: linear-gradient(135deg, #3A7CA5 0%, #1F4E5F 100%);
    color: white;
    clip-path: polygon(0 0, 100% 0, 100% 85%, 0 100%);
    margin-top: 40px;
    margin-bottom: 30px;
    padding: 30px 20px;  /* ← AJOUTEZ CETTE LIGNE */
}

@media (max-width: 768px) {
    header {
        margin-top: 0;
        padding-top: 15px;
        padding-bottom: 40px;
        border-radius: 0 !important;
        max-width: 100vw;
        width: 100vw;
        left: 50%;
        right: 50%;
        transform: translateX(-50%);
        box-sizing: border-box;
    }

    header a.btn {
        margin-bottom: 30px;
    }
}

header a.btn {
    margin: 20px 15px 20px 0;
    padding: 12px 25px;
    font-size: 1rem;
}

/* Header Logo */
.header-logo {
    position: absolute;
    top: 28px;
    left: 28px;
    width: 60px;
    height: auto;
    z-index: 5;
    opacity: 0.3;
    animation: shineLogo 4s ease-in-out infinite;
    transition: transform 0.3s, filter 0.3s, opacity 0.3s;
}

.header-logo:hover {
    animation: swingLogo 2.5s ease-in-out infinite;
    opacity: 0.85;
}

.header-logo:active {
    animation: clickShineLogo 0.6s ease-in-out;
    opacity: 1;
}

@keyframes shineLogo {

    0%,
    100% {
        filter: brightness(1) drop-shadow(0 0 2px #fff);
    }

    50% {
        filter: brightness(1.5) drop-shadow(0 0 8px #3A7CA5);
    }
}

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

    25% {
        transform: rotate(5deg);
    }

    50% {
        transform: rotate(-5deg);
    }

    75% {
        transform: rotate(5deg);
    }

    100% {
        transform: rotate(0deg);
    }
}

@keyframes clickShineLogo {
    0% {
        filter: brightness(1) drop-shadow(0 0 2px #fff);
        transform: rotate(0deg);
    }

    50% {
        filter: brightness(2.5) drop-shadow(0 0 20px #3A7CA5);
        transform: rotate(5deg);
    }

    100% {
        filter: brightness(1) drop-shadow(0 0 2px #fff);
        transform: rotate(0deg);
    }
}

/* Google Translate Button */
#google_translate_element {
    position: absolute;
    top: 28px;
    right: 120px;
    z-index: 5;
}

#google_translate_element .goog-te-gadget-simple {
    background: linear-gradient(135deg, rgba(58, 124, 165, 0.25) 0%, rgba(31, 78, 95, 0.25) 100%) !important;
    color: white !important;
    border: none !important;
    border-radius: 5px !important;
    padding: 10px 20px !important;
    font-family: 'Roboto', sans-serif !important;
    font-weight: bold !important;
    text-transform: uppercase !important;
    font-size: 14px !important;
    cursor: pointer !important;
    transition: transform 0.2s, background 0.3s !important;
    box-shadow: 0 4px 3px rgba(0, 0, 0, 0.15) !important;
    display: inline-block !important;
}




/* Tool Rain Animation */
.tool {
    position: fixed;
    font-size: 24px;
    pointer-events: none;
    z-index: 9999;
    animation: fallTool 3s linear forwards;
}

@keyframes fallTool {
    0% {
        transform: translateY(0) rotate(0deg);
        opacity: 1;
    }

    100% {
        transform: translateY(100vh) rotate(360deg);
        opacity: 0;
    }
}

/* ================== TYPOGRAPHY ================== */
section h2 {
    color: #1F4E5F;
    font-size: 1.8rem;
    margin-bottom: 15px;
    margin-top: 15px;
    font-family: 'Open Sans', sans-serif;
}

section h3 {
    margin: 2em 0 1em;
    font-family: 'Open Sans', sans-serif;
    color: #3A7CA5;
}

section p,
section ul {
    font-size: 1rem;
    margin-bottom: 1.5em;
    line-height: 1.6;
}

section ul li {
    margin-bottom: 0.9em;
    line-height: 1.4;
}

/* ================== BUTTONS ================== */
.btn {
    display: inline-block;
    margin: 20px 10px 20px 0;
    padding: 10px 20px;
    background: linear-gradient(135deg, #3A7CA5 0%, #1F4E5F 100%);
    color: white;
    text-transform: uppercase;
    font-weight: bold;
    border-radius: 5px;
    text-decoration: none;
    transition: background 0.3s, transform 0.2s;
    box-shadow: 0 4px 3px rgba(0, 0, 0, 0.15);
    will-change: transform;
    backface-visibility: hidden;
}

.btn:hover {
    background: linear-gradient(135deg, #1F4E5F 0%, #163d4d 100%);
    transform: scale(1.05);
}

/* ================== FOOTER ================== */
footer {
    text-align: center;
    padding: 15px 0;
    background: rgba(58, 124, 165, 0.2);
    color: #1F4E5F;
    font-size: 0.75rem;
    margin-top: 30px;
}

/* ================== PROJECT CARDS ================== */
.projects-card {
    background: rgba(255, 255, 255, 0.9);
    border-radius: 15px;
    box-shadow: 0 8px 16px rgba(58, 124, 165, 0.15);
    padding: 20px;
    width: 290px;
    text-align: center;
    transition: transform 0.3s ease;
    cursor: pointer;
    position: relative;
}

.projects-card:hover {
    transform: scale(1.05);
    box-shadow: 0 12px 24px rgba(58, 124, 165, 0.25);
}

.projects-card h3 {
    font-size: 1.6rem;
    margin: 0;
    color: #1F4E5F;
}

.projects-card p {
    font-size: 1.1rem;
    color: #444;
}

.projects-card .brand-name {
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 10px;
}

.projects-logo {
    width: 80%;
    aspect-ratio: 7 / 5;
    object-fit: contain;
    border-radius: 25px;
}

/* Favorite Star */
.favorite-star {
    position: absolute;
    top: 10px;
    left: 10px;
    font-size: 30px;
    color: #FFD700;
    text-shadow: 1px 1px 4px rgba(0, 0, 0, 0.4);
    z-index: 2;
    transition: transform 0.4s ease, filter 0.3s ease;
    animation: floatStar 2s ease-in-out infinite;
}

.projects-card:hover .favorite-star {
    transform: rotate(25deg) scale(1.2);
    filter: brightness(1.4) drop-shadow(0 0 6px #FFD700);
}

@keyframes floatStar {

    0%,
    100% {
        transform: translateY(0);
    }

    50% {
        transform: translateY(-5px);
    }
}

/* View Project Button */
.view-project-btn {
    background-color: #3A7CA5;
    color: white;
    padding: 10px 20px;
    border: none;
    border-radius: 5px;
    cursor: pointer;
    margin-top: 0;
    transition: background 0.3s;
}

.view-project-btn:hover {
    background-color: #1F4E5F;
}

/* ================== PROJECT GRID ================== */
#project-list {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
    gap: 50px;
    padding: 20px;
    justify-items: center;
}

/* ================== SEARCH & FILTERS ================== */
.search-bar {
    text-align: center;
}

.search-bar input,
.search-bar select {
    padding: 10px;
    margin: 5px;
    border: 1px solid #C4D4DD;
    border-radius: 5px;
    font-family: 'Roboto', sans-serif;
    background-color: #fff;
    color: #333;
}

.search-bar input {
    width: 200px;
    margin-top: 15px;
}

.search-bar select {
    width: 140px;
    color: #3A7CA5;
    font-size: 0.8rem;
    appearance: none;
    -webkit-appearance: none;
    -moz-appearance: none;
    margin-top: 15px;
}

.search-bar button {
    padding: 10px 20px;
    background-color: #3A7CA5;
    color: white;
    border: none;
    border-radius: 5px;
    margin-left: 5px;
    cursor: pointer;
    transition: transform 0.2s, background 0.3s;
}

.search-bar button:hover {
    background-color: #1F4E5F;
    transform: scale(1.05);
}

#reset-filters {
    background: linear-gradient(135deg, #E74C3C 0%, #C0392B 100%);
    color: white;
    border: none;
    padding: 10px 20px;
    border-radius: 5px;
    cursor: pointer;
    transition: transform 0.2s, background 0.3s;
}

#reset-filters:hover {
    transform: scale(1.05);
    background: linear-gradient(135deg, #C0392B 0%, #A93226 100%);
}


/* Sort Button */
/* Boutons de tri (médaille/horloge) : contour carré sans arrondi */
#sort-difficulty,
#sort-date,
.sort-btn {
    border-radius: 20px !important;
}

#sort-difficulty {
    padding: 10px;
    background-color: transparent;
    color: #3A7CA5;
    border: none;
    margin: 5px;
    cursor: pointer;
    font-size: 1rem;
    min-width: 50px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

#sort-difficulty:hover {
    background-color: rgba(58, 124, 165, 0.15);
    transform: scale(0.95);
}

/* ================== PAGINATION ================== */
.pagination-container {
    text-align: center;
    margin: 20px auto;
}

.pagination-container button {
    background: linear-gradient(135deg, #3A7CA5 0%, #1F4E5F 100%);
    color: white;
    border: none;
    padding: 10px 20px;
    margin: 0 5px;
    border-radius: 5px;
    cursor: pointer;
    transition: transform 0.2s, background 0.3s;
}

.pagination-container button:hover {
    background-color: #1F4E5F;
    transform: scale(1.05);
}

/* ================== EMPTY STATE ================== */
#no-projects-message {
    text-align: center;
    font-size: 1.5rem;
    color: #3A7CA5;
    margin-bottom: 30px;
    font-weight: bold;
}

/* ================== MODALS ================== */
.modal {
    display: none;
    position: fixed;
    z-index: 1000;
    inset: 0;
    overflow: auto;
    background-color: rgba(0, 0, 0, 0.5);
    padding: 0;
}

.modal.active,
.modal[style*="display: block"] {
    display: flex !important;
    align-items: center;
    justify-content: center;
    padding: 20px;
}

.modal-content {
    background-color: #ffffff;
    margin: 20px auto;
    padding: 20px;
    border: 1px solid #C4D4DD;
    width: 90%;
    max-width: 500px;
    max-height: 90vh;
    overflow-y: auto;
    border-radius: 12px;
    position: relative;
    text-align: center;
    box-sizing: border-box;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.3);

    /* Scrollbar personnalisée */
    scrollbar-width: thin;
    scrollbar-color: rgba(58, 124, 165, 0.5) transparent;
}

/* Scrollbar WebKit (Chrome, Safari, Edge) */
.modal-content::-webkit-scrollbar {
    width: 6px;
}

.modal-content::-webkit-scrollbar-track {
    background: transparent;
    border-radius: 10px;
}

.modal-content::-webkit-scrollbar-thumb {
    background: rgba(58, 124, 165, 0.4);
    border-radius: 10px;
}

.modal-content::-webkit-scrollbar-thumb:hover {
    background: rgba(58, 124, 165, 0.7);
}

.modal-content::-webkit-scrollbar-button {
    display: none;
}

/* Modal Titles */
#modal-title {
    font-size: 1.6rem;
    font-weight: bold;
    color: #1F4E5F;
    margin-bottom: 10px;
}

#modal-info {
    font-size: 1.1rem;
    font-weight: bold;
    color: #1F4E5F;
    margin-bottom: 10px;
}

/* Close Button */
.close-btn {
    position: absolute;
    top: 10px;
    right: 10px;
    color: white;
    font-size: 0;
    font-weight: bold;
    cursor: pointer;
    z-index: 2100;
    background: rgba(0, 0, 0, 0.6);
    border-radius: 50%;
    width: 36px;
    height: 36px;
    line-height: 36px;
    text-align: center;
    transition: background 0.3s, transform 0.2s;
    border: none;
    padding: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    outline: none !important;
    -webkit-tap-highlight-color: transparent;
}

.close-btn:focus,
.close-btn:active {
    outline: none !important;
    border: none !important;
}

.close-btn::before,
.close-btn::after {
    content: '';
    position: absolute;
    left: 50%;
    top: 50%;
    width: 20px;
    height: 3px;
    background-color: white;
    border-radius: 2px;
}

.close-btn::before {
    transform: translate(-50%, -50%) rotate(45deg);
}

.close-btn::after {
    transform: translate(-50%, -50%) rotate(-45deg);
}

.close-btn:hover {
    background: rgba(255, 0, 0, 0.8);
    transform: scale(1.2);
}

/* Modal Content Details */
.sort-btn {
    width: 48px;
    height: 48px;
    font-size: 1.35rem;
    border: 2px solid #3A7CA5;
    border-radius: 20px !important;
    background: #fff !important;
    color: #3A7CA5;
    transition: background 0.2s, color 0.2s, border-color 0.2s;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    box-sizing: border-box;
    padding: 0;
    box-shadow: 0 2px 8px rgba(58, 124, 165, 0.08);
}

.sort-btn.active {
    background: linear-gradient(135deg, #3A7CA5 0%, #1F4E5F 100%) !important;
    color: #fff;
    border-color: #1F4E5F;
}

.sort-btn:focus {
    outline: 2px solid #3A7CA5;
}



#pdf-preview {
    border: 3px solid #1F4E5F;
    border-radius: 5px;
    margin-top: 15px;
    width: 100%;
    height: 300px;
}

#pdf-fallback-image {
    display: none;
    width: 100%;
    max-height: 1000px;
    object-fit: contain;
    margin: 20px auto;
    border-radius: 20px;
    background: #f0f0f0;
    min-height: 200px;
}

#pdf-fallback-image[src=""] {
    display: none !important;
}

#project-description-box {
    background: linear-gradient(135deg, rgba(240, 248, 255, 0.95), rgba(225, 235, 245, 0.95));
    border-left: 4px solid #1F4E5F;
    /* accent visuel */
    border-radius: 10px;
    padding: 20px 25px;
    margin: 20px 0;
    color: #1F4E5F;
    font-size: 0.9rem;
    line-height: 1.6;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.05);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

/* Effet au survol pour dynamiser la case */
#project-description-box:hover {
    transform: translateY(-3px);
    box-shadow: 0 8px 16px rgba(0, 0, 0, 0.1);
}

#project-description-box p {
    text-align: justify;
    margin: 0 0 10px 0;
}

/* Si tu veux mettre certains mots-clés ou points forts en évidence */
#project-description-box .highlight {
    font-weight: 600;
    color: #1F4E5F;
    background-color: rgba(31, 78, 95, 0.1);
    padding: 2px 6px;
    border-radius: 4px;
}

#project-skills-box {
    background: linear-gradient(135deg, rgba(240, 248, 255, 0.95), rgba(225, 235, 245, 0.95));
    border-left: 4px solid #1F4E5F;
    border-radius: 10px;
    padding: 20px 25px;
    margin: 20px 0;
    color: #1F4E5F;
    font-size: 0.9rem;
    line-height: 1.6;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.05);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    position: relative;
}

/* Titre de la box */
.skills-title {
    font-weight: 700;
    font-size: 1rem;
    margin-bottom: 10px;
    color: #1F4E5F;
}

/* Effet au survol (optionnel) */
#project-skills-box:hover {
    transform: translateY(-3px);
    box-shadow: 0 8px 16px rgba(0, 0, 0, 0.1);
}

#project-skills-box p {
    text-align: center;
    margin: 0;
}



.modal-separator {
    border: none;
    height: 1.5px;
    background-color: #3A7CA5;
    margin: 20px 0;
    border-radius: 1.5px;
}

/* ================== IMAGE MODAL ================== */
#image-modal {
    display: none;
    position: fixed;
    z-index: 2000;
    inset: 0;
    background-color: rgba(0, 0, 0, 0.8);
    overflow-y: auto;
    padding-top: 60px;
}

#image-modal.active,
#image-modal[style*="display: block"] {
    display: flex !important;
    align-items: flex-start;
    justify-content: center;
}

#image-modal .modal-content {
    background-color: #fff;
    border-radius: 12px;
    max-width: 640px;
    width: 90vw;
    max-height: 80vh;
    overflow-y: auto;
    padding: 20px;
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 15px;
    position: relative;
    text-align: center;
    scrollbar-width: thin;
    scrollbar-color: rgba(58, 124, 165, 0.5) transparent;
}

#image-modal .modal-content::-webkit-scrollbar {
    width: 6px;
}

#image-modal .modal-content::-webkit-scrollbar-track {
    background: transparent;
    border-radius: 10px;
}

#image-modal .modal-content::-webkit-scrollbar-thumb {
    background: rgba(58, 124, 165, 0.4);
    border-radius: 10px;
}

#image-modal .modal-content::-webkit-scrollbar-thumb:hover {
    background: rgba(58, 124, 165, 0.7);
}

#image-modal .modal-content::-webkit-scrollbar-button {
    display: none;
}

#image-modal-content img {
    width: 100%;
    height: auto;
    border-radius: 8px;
    object-fit: cover;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.2);
}

/* ================== SLIDER ================== */
.slider {
    position: relative;
    width: 100%;
    overflow: hidden;
    border-radius: 15px;
    margin-bottom: 15px;
}

.slide-track {
    display: flex;
    transition: transform 0.5s ease-in-out;
    width: 100%;
}

.slide-image {
    width: 100%;
    flex-shrink: 0;
    object-fit: cover;
    aspect-ratio: 7 / 5;
    border-radius: 15px;
}

.slide-btn {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    background: rgba(58, 124, 165, 0.8);
    color: white;
    border: none;
    padding: 8px 12px;
    font-size: 1.2rem;
    z-index: 2;
    cursor: pointer;
    border-radius: 50%;
    transition: background 0.3s;
}

.slide-btn:hover {
    background: #1F4E5F;
}

.prev-btn {
    left: 5px;
}

.next-btn {
    right: 5px;
}

/* View Images Button */
.view-images-btn {
    position: absolute;
    top: 8px;
    right: 8px;
    background: rgba(255, 255, 255, 0.85);
    color: #3A7CA5;
    border: none;
    font-size: 1.2rem;
    padding: 6px 10px;
    border-radius: 8px;
    cursor: pointer;
    z-index: 3;
    transition: background 0.3s, transform 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    user-select: none;
}

.view-images-btn:hover {
    background: rgba(240, 240, 240, 1);
    transform: scale(1.15) rotate(15deg);
}

.view-images-btn.active {
    transform: scale(1.2) rotate(45deg);
    background: #3A7CA5;
    color: white;
}

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

    /* Modals */
    .modal {
        padding: 10px;
        align-items: center;
        justify-content: center;
        padding-top: 20px;
    }

    .modal-content {
        width: 90%;
        max-width: 90vw;
        max-height: 85vh;
        overflow-y: auto;
        margin: 0 auto;
        box-sizing: border-box;
    }

    .modal-content::-webkit-scrollbar {
        width: 4px;
    }

    /* PDF et Images */
    #pdf-fallback-image {
        max-height: 400px;
        width: 100%;
        object-fit: contain;
        display: block;
        margin: 15px auto;
    }

    #pdf-preview {
        min-height: 300px;
    }

    /* Boutons Modal */
    .modal-buttons {
        display: flex;
        /* Ajouter si manquant */
        flex-direction: column;
        gap: 10px;
        /* espacement vertical entre boutons */
        align-items: center;
        width: 100%;
    }


    .modal-buttons .btn,
    .modal-buttons a {
        width: 100%;
        max-width: 280px;
        text-align: center;
        margin: 0 !important;
        box-sizing: border-box;
        padding: 12px 22px;
    }

    /* Description */
    #project-description-box {
        font-size: 0.7rem;
        padding: 12px;
    }

    /* Description */
    #project-skills-box {
        font-size: 0.7rem;
        padding: 12px;
    }

    /* Titres Modal */
    #modal-title {
        font-size: 1.3rem;
    }

    #modal-info {
        font-size: 1rem;
    }

    /* Bouton Fermer */
    .close-btn {
        width: 44px;
        height: 44px;
        right: 10px;
        top: 10px;
    }

    /* Modal Images */
    #image-modal {
        padding: 10px;
        align-items: center;
        justify-content: center;
    }

    #image-modal .modal-content {
        grid-template-columns: 1fr;
        width: 90%;
        max-width: 90vw;
        padding: 15px;
        box-sizing: border-box;
    }

    #image-modal .modal-content::-webkit-scrollbar {
        width: 4px;
    }

    /* Header */
    header h1 {
        font-size: 2rem;
    }

    header p {
        font-size: 1rem;
    }

    .header-logo {
        width: 50px;
        top: 15px;
        left: 15px;
    }

    /* Grille Projets */
    #project-list {
        grid-template-columns: 1fr;
        gap: 30px;
        padding: 10px;
    }

    .projects-card {
        width: 100%;
        max-width: 400px;
        margin: 0 auto;
    }

    /* Barre de Recherche */
    .search-bar {
        padding: 15px 10px;
    }

    .search-bar form {
        display: flex;
        flex-direction: column;
        align-items: center;
        gap: 10px;
    }

    .search-bar input,
    .search-bar select,
    .search-bar button {
        width: 90%;
        max-width: 300px;
        margin: 0;
        box-sizing: border-box;
    }

    #sort-difficulty {
        width: 60px !important;
        height: 50px;
        padding: 10px;
        display: flex;
        align-items: center;
        justify-content: center;
        font-size: 1.5rem;
    }
}

/* ================== TRÈS PETITS ÉCRANS ================== */
@media (max-width: 480px) {
    #pdf-fallback-image {
        max-height: 250px;
    }

    .modal-content {
        padding: 15px;
        width: 95%;
        max-width: 95vw;
    }

    header h1 {
        font-size: 2rem;
    }

    .favorite-star {
        font-size: 24px;
    }

    .search-bar input,
    .search-bar select,
    .search-bar button {
        width: 95%;
    }

    #sort-difficulty {
        width: 60px !important;
    }

    .modal-buttons .btn,
    .modal-buttons a {
        width: 100%;
        font-size: 0.95rem;
    }
}


/* ================== Google trad ================== */

/* Google Translate - position top right */
#google_translate_element {
    position: absolute;
    top: 15px;
    right: 10px;
    z-index: 20;
    transform: scale(0.9);
}


/* Sur mobile */
@media (max-width: 768px) {
    #google_translate_element {
        top: 0px;
        right: -35px;
        transform: scale(0.5);
    }
}


#google_translate_element .goog-te-gadget-simple:hover {
    background: linear-gradient(135deg, rgba(31, 78, 95, 0.25) 0%, rgba(31, 78, 95, 0.25) 100%) !important;
    transform: scale(1.05) !important;
}

#google_translate_element .goog-te-menu-value {
    color: white !important;
    text-decoration: none !important;
}

#google_translate_element .goog-te-menu-value span {
    color: transparent !important;
    position: relative;
}

#google_translate_element .goog-te-menu-value span::before {
    content: "FR/EN";
    color: white !important;
    position: absolute;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: bold !important;
    text-transform: uppercase !important;
}

#google_translate_element .goog-te-gadget-icon {
    display: none !important;
}

@media (max-width: 768px) {
    header a.btn {
        font-size: 0.9rem;
    }
}

@media (max-width: 768px) {

    /* Titre Filter Projects */
    #filter-projects-title {
        font-size: 1.2rem;
    }

    /* Input, Select */
    .search-bar input,
    .search-bar select {
        width: 90%;
        max-width: 300px;
        font-size: 0.7rem;
        margin: 0;
    }

    /* Boutons (tri et reset) */
    .search-bar button {
        width: 90%;
        max-width: 300px;
        font-size: 0.8rem;
        margin: 0;
        padding: 10px 15px;
    }
}

@media (max-width: 768px) {
    #sort-difficulty {
        margin-top: -5px;
        /* espace au-dessus */
        margin-bottom: -5px;
        /* espace en dessous */
    }
}

@media (max-width: 768px) {
    #image-modal {
        padding-top: 80px;
        /* espace en haut pour mobile */
    }
}

@media (max-width: 768px) {
    .projects-card.active-mobile-card {
        transform: scale(1.05);
        box-shadow: 0 12px 24px rgba(58, 124, 165, 0.25);
        z-index: 10;
        transition: transform 0.25s ease, box-shadow 0.25s ease;
    }
}

/* ================== RESUME PAGE (cv.html) ================== */

/* Boutons CV */
.btn-cv {
    font-size: 14px;
    padding: 6px 10px;
    margin-left: 10px;
}

/* Alignement du titre + boutons */
.resume-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
}

.resume-buttons {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
}

/* Iframe preview CV */
.cv-preview {
    width: 100%;
    height: 600px;
    border: 1px solid #ccc;
    margin-top: 10px;
}

/* Section About Me */
#about-me {
    margin-top: 40px;
    margin-bottom: 10px;
    padding: 20px;
    background-color: rgba(255, 255, 255, 0.95);
    border-radius: 10px;
}

#about-me h2 {
    margin-bottom: 15px;
}

#about-me h3 {
    margin-top: 20px;
    margin-bottom: 10px;
}

#about-me ul {
    list-style-type: disc;
    margin-left: 20px;
}

#about-me p {
    margin-bottom: 10px;
    text-align: justify;
}

/* Section Quotes */
#inspirations {
    margin-top: 30px;
    display: flex;
    flex-direction: column;
    gap: 15px;
}

.quote {
    padding: 15px 20px;
    border-left: 4px solid #0077cc;
    background-color: rgba(240, 248, 255, 0.9);
    border-radius: 8px;
    font-style: italic;
    position: relative;
}

.quote::before {
    content: "💡";
    position: absolute;
    left: -25px;
    top: 15px;
    font-size: 20px;
}

.quote-source {
    font-weight: bold;
    margin-top: 8px;
    font-style: normal;
}

/* Responsive CV page */
@media (max-width: 768px) {

    .resume-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 10px;
    }

    .resume-buttons {
        flex-wrap: wrap;
    }

    .cv-preview {
        height: 400px;
    }

    #about-me ul {
        margin-left: 5px;
        padding-left: 10px;
    }
}