/* =========================
   GÉNÉRAL & RESET
   ========================= */
html, body {
    height: 100%;
    margin: 0;
    padding: 0;
}

body {
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

.wrapper {
    flex: 1;
    display: flex;
    flex-direction: column;
}

@font-face {
    font-family: "Trickster";
    src:"Police/Inter-Italic-VariableFont_opsz\,wght.ttf" format("truetype");
}

a {
    text-decoration: none;
    color: black;
}

a:hover:visited {
    color: rgb(24, 24, 24);
}

::selection {
    color: black;
    background-color: rgb(57, 103, 143);
}

/* =========================
   STRUCTURE & FOND
   ========================= */
.background {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-image: url('image/background.jpg');
    background-size: cover;
    background-repeat: no-repeat;
    background-position: center;
    z-index: -2;
}

.background::after {
    content: "";
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.8);
    z-index: -1;
}

.container {
    margin-left: 8px;
    margin-right: 8px;
    color: white;
    padding-left: 8px;
    padding-right: 8px;
    margin-bottom: 80px;
}

.container h1 {
    text-align: center;
    font-size: 36px;
    margin-bottom: 20px;
    color: #ffffff;
}

/* =========================
   BANDEAU & NAVIGATION
   ========================= */
.bandeau {
    background-color: rgb(53, 52, 52);
    width: 100%;
    height: 150px;
    display: flex;
    position: sticky;
    top: 0;
    border-bottom: 2px solid rgb(44, 44, 44);
    z-index: 200; /* <-- Ajoute ou augmente cette valeur */
}

.photo_titre_bandeau {
    margin-left: 8px;
    display: flex;
}

#bouttons_liens_nav {
    border-left: 2px solid grey;
    width: 100%;
    max-height: 150px;
    display: flex;
    justify-content: space-evenly;
    align-items: center;
}

.bouttons_liens {
    background-color: #ffffff;
    color: grey;
    height: 50px;
    width: 200px;
    text-align: center;
    text-decoration: none;
    display: inline-block;
    font-size: 16px;
    border-radius: 12px;
    padding-top: 7%;
    border-right: 2px solid black;
}

.dropdown-nav {
    position: relative;
    display: flex;
    align-items: center;
    gap: 20px;
}

.dropdown-toggle {
    display: none;
    background: #fff;
    border: 2px solid #bbb;
    border-radius: 8px;
    font-size: 2rem;
    padding: 4px 16px;
    cursor: pointer;
    color: #333;
    margin-right: 10px;
}

.dropdown-menu {
    display: flex;
    gap: 10px;
}

.dropdown-toggle {
    display: none;
    background: #35526e;
    border: none;
    border-radius: 8px;
    font-size: 2rem;
    padding: 8px 18px;
    cursor: pointer;
    color: #fff;
    margin-right: 10px;
    box-shadow: 0 2px 8px rgba(30,95,163,0.10);
    transition: background 0.2s, transform 0.2s;
}

.dropdown-toggle:hover,
.dropdown-toggle:focus {
    background: #27405a;
    transform: scale(1.04);
    outline: none;
}

/* =========================
   ACCUEIL & BLOCS
   ========================= */
.blocs {
    display: flex;
    gap: 30px;
    justify-content: center;
    margin-top: 40px;
    flex-wrap: wrap;
}

.bloc1 {
    float: left;
    width: 200px;
    background-color: grey;
    padding: 15px;
    margin-left: 10%;
    margin-top: 5%;
    border: solid black 2px;
    border-radius: 10%;
}

.bloc2 {
    float: right;
    width: 200px;
    background-color: grey;
    padding: 15px;
    margin-right: 10%;
    margin-top: 10%;
    border: solid black 2px;
    border-radius: 10%;
}

.bloc-texte {
    margin-top: 30px;
    margin-left: 20px;
    line-height: 1.6;
}

/* =========================
   TABLEAUX
   ========================= */
#taille_tableau {
    width: 50%;
}

th {
    background-color: cyan;
}

td {
    background-color: white;
}

.images_tableau {
    max-width: 150px;
}

#legende_tableau {
    float: right;
    width: 50%;
}

/* =========================
   IMAGES & ICONES
   ========================= */
.image_accueil {
    height: 120px;
    width: 100px;
    border-radius: 50%;
    margin-top: 15px;
}

.images_bouttons_liens {
    height: 30px;
    width: 30px;
}

.taille_image_gallerie {
    height: 250px;
    width: 400px;
}

/* =========================
   LIENS & TEXTE
   ========================= */
.centrer {
    text-align: center;
}

.activités {
    background-color: orangered;
}

.texte_principal {
    width: 80%;
    float: left;
}

.texte_principal:hover {
    color: black;
}

.liste_liens {
    margin-top: 5px;
    margin-bottom: 5px;
}

#liens_externes {
    width: 20%;
    border: 2px solid black;
    float: right;
}

/* =========================
   PROJETS
   ========================= */
.section-title {
    text-align: center;
    margin: 20px 0;
    font-size: 18px;
    color: #ffffff;
}

.projects-grid {
    display: flex;
    justify-content: center;
    gap: 20px;
    flex-wrap: wrap;
    margin: 20px 0;
}

.project-card {
    position: relative;
    background: #ffffff;
    border-radius: 16px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.10);
    padding: 24px 20px;
    margin: 18px 0;
    min-width: 220px;
    min-height: 120px;
    transition: box-shadow 0.2s, transform 0.2s;
    overflow: hidden;
}

.project-card:hover {
    transform: scale(1.05);
    box-shadow: 0 8px 24px rgba(0,0,0,0.18);
    z-index: 10;
}

.project-card h3 {
    margin: 0;
    font-size: 2.1rem;
    color: #333;
    font-weight: bold;
}

.project-card p {
    font-size: 14px;
    color: #666;
    margin-top: 10px;
    padding: 8px 0;
    line-height: 1.6;
    word-break: break-word;
}

.project-card img,
.project-card.expanded img {
    width: 100%;
    max-width: 100%;
    height: auto;
    display: block;
    margin: 20px auto 0 auto;
    border-radius: 10px;
}

.project-card.expanded img {
    max-width: 700px;
}

/* État agrandi */
.project-card.expanded {
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%) scale(1.2);
    width: 60vw;
    min-height: 400px;
    max-height: 90vh;
    z-index: 100;
    background: #fff;
    box-shadow: 0 8px 24px rgba(0,0,0,0.18);
    transition: 
        transform 0.3s cubic-bezier(.4,2,.6,1), 
        box-shadow 0.3s, 
        z-index 0.1s,
        width 0.3s,
        height 0.3s;
    overflow-y: auto;
    padding: 32px 28px;
}

.close-btn {
    position: absolute;
    top: 10px;
    right: 15px;
    background: #fff;
    border: none;
    font-size: 2rem;
    color: #888;
    cursor: pointer;
    z-index: 30;
    border-radius: 50%;
    width: 36px;
    height: 36px;
    box-shadow: 0 2px 6px rgba(0,0,0,0.08);
    transition: background 0.2s;
}
.close-btn:hover {
    background: #eee;
    color: #333;
}

/* =========================
   COMPÉTENCES (SKILLS)
   ========================= */
.apropos-card {
    display: flex;
    align-items: center;
    justify-content: space-between;
    background: rgb(53, 52, 52);
    border: 2px solid #bbb;
    border-radius: 15px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.07);
    margin: 30px 0;
    padding: 30px;
    width: 100%;
    max-width: 100%;
    box-sizing: border-box;
    gap: 30px;
}

.apropos-texte {
    flex: 2;
}

.apropos-image img {
    max-width: 250px;
    border-radius: 10px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.10);
}

.skill-row {
    display: flex;
    align-items: center;
    margin-bottom: 18px;
    gap: 10px;
}

.skill-row span {
    width: 110px;
    min-width: 70px;
    font-weight: 500;
    color: #fff;
}

.skill-bar {
    flex: 1;
    min-width: 80px;
    max-width: 300px;
    height: 16px;
    background: #bbb;
    border-radius: 8px;
    overflow: hidden;
    margin-left: 10px;
    display: block;
}

.skill-level {
    height: 100%;
    background: linear-gradient(90deg, #4e9cff, #1e5fa3);
    border-radius: 8px 0 0 8px;
    transition: width 0.4s;
}

.skill-logo {
    width: 28px;
    height: 28px;
    object-fit: contain;
    margin-right: 10px;
    vertical-align: middle;
}

/* =========================
   CONTACT & CV
   ========================= */
.contact-section a {
    color: white;
    text-decoration: none;
}

.contact-section a:hover {
    text-decoration: underline;
}

.cv-title {
    text-align: center;
    margin-bottom: 20px;
}

.cv-container {
    text-align: center;
    margin-top: 20px;
}

.cv-preview {
    width: 200px;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    cursor: pointer;
}

.cv-preview:hover {
    transform: scale(1.5);
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.2);
}

.cv-download-text {
    text-align: center;
    margin-top: 10px;
    font-size: 14px;
    color: #ffffff;
}

/* =========================
   AUTRES
   ========================= */
.bonne-visite {
    text-align: center;
    margin-top: 30%;
    font-size: 1.5em;
}

/* =========================
   FOOTER
   ========================= */
.basPage {
    text-align: center;
    background-color: rgb(53, 52, 52);
    padding: 10px 0;
    width: 100%;
    z-index: 10;
}

/* =========================
   MEDIA QUERIES RESPONSIVE
   ========================= */

/* Tablettes et petits écrans */
@media (max-width: 900px) {
    .apropos-card {
        flex-direction: column;
        align-items: flex-start;
        text-align: left;
        padding: 20px;
        gap: 15px;
    }
    .apropos-image img {
        max-width: 100%;
        margin-top: 15px;
    }
    .projects-grid {
        flex-direction: column;
        gap: 15px;
        align-items: center;
    }
    .project-card, .project-card.expanded {
        min-width: unset;
        width: 90vw;
        padding: 16px;
    }
    .container {
        margin: 0 2vw 60px 2vw;
        padding: 0 2vw;
    }
    .bloc1, .bloc2 {
        width: 90vw;
        margin-left: auto;
        margin-right: auto;
        float: none;
    }
    .blocs {
        flex-direction: column;
        gap: 15px;
        margin-top: 20px;
    }
    .image_accueil {
        width: 80px;
        height: 80px;
    }
    .photo_titre_bandeau {
        margin-left: 0;
    }
    .section-title {
        font-size: 1.1em;
    }
}

@media (max-width: 800px) {
    .dropdown-toggle {
        display: block;
    }
    .dropdown-menu {
        display: none;
        position: absolute;
        top: 48px;
        left: 0;
        background: #fff;
        border: 2px solid #bbb;
        border-radius: 10px;
        flex-direction: column;
        min-width: 180px;
        z-index: 100;
        box-shadow: 0 2px 8px rgba(0,0,0,0.12);
        padding: 10px 0;
        max-width: 95vw;
        width: 90vw;
    }
    .dropdown-menu.show {
        display: flex;
    }
    .dropdown-nav {
        flex-direction: column;
        align-items: flex-start;
        gap: 0;
    }
    .bouttons_liens {
        width: 100%;
        box-sizing: border-box;
        white-space: normal; /* Permet le retour à la ligne */
        overflow-wrap: break-word; /* Coupe le texte si besoin */
        padding: 12px 18px;
        font-size: 1.1em;
    }
    .bouttons_liens:hover {
        background: #eee;
    }
    .project-card.expanded {
        width: 98vw !important;
        max-width: 98vw !important;
        min-width: unset !important;
        left: 50%;
        transform: translate(-50%, -50%) scale(1) !important;
        padding: 12px 2vw !important;
        box-sizing: border-box;
    }
}

/* Mobiles */
@media (max-width: 600px) {
    .bandeau {
        flex-direction: column;
        height: auto;
        align-items: flex-start;
        padding-bottom: 10px;
    }
    .photo_titre_bandeau {
        flex-direction: row;
        align-items: center;
        margin-left: 0;
        margin-bottom: 10px;
    }
    #bouttons_liens_nav {
        flex-direction: column;
        border-left: none;
        border-top: 2px solid grey;
        max-height: none;
        width: 100%;
        padding: 0;
        align-items: stretch;
    }
    .bouttons_liens {
        width: 95vw;
        margin: 5px 0;
        font-size: 18px;
        padding-top: 10px;
        height: 40px;
        border-right: none;
        border-bottom: 1px solid #ccc;
        border-radius: 8px;
    }
    .container {
        margin: 0 1vw 40px 1vw;
        padding: 0 1vw;
    }
    .blocs {
        flex-direction: column;
        gap: 10px;
        margin-top: 10px;
    }
    .bloc1, .bloc2 {
        width: 95vw;
        margin: 10px auto;
        border-radius: 10px;
        float: none;
    }
    .apropos-card {
        flex-direction: column;
        gap: 10px;
        padding: 10px;
    }
    .apropos-image img {
        max-width: 95vw;
        margin: 0 auto;
    }
    .skill-row span {
        width: 80px;
        font-size: 14px;
    }
    .projects-grid {
        flex-direction: column;
        gap: 10px;
        align-items: center;
    }
    .project-card, .project-card.expanded {
        min-width: unset;
        width: 98vw;
        padding: 8px;
    }
    .bonne-visite {
        margin-top: 10%;
        font-size: 1.1em;
    }
    .basPage {
        font-size: 13px;
        padding: 6px 0;
    }
    .image_accueil {
        width: 60px;
        height: 60px;
    }
    .taille_image_gallerie {
        width: 98vw;
        height: auto;
    }
    .cv-preview {
        width: 120px;
    }
}

/* Impression */
@media print {
    header {
        display: none;
    }
    .background {
        display: none;
    }
    .basPage {
        display: none;
    }
}