@keyframes slideIn {
    0% {
        transform: translateX(-100%);
        opacity: 0;
    }
    100% {
        transform: translateX(0);
        opacity: 1;
    }
}
@keyframes slideUp {
    0% {
        transform: translateY(0);
    }
    60% {
        transform: translateY(50%);
    }
    100% {
        transform: translateY(-100%);
    }
}
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(2rem);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}
@keyframes modalFadeIn {
    from {
        opacity: 0;
        transform: translateY(-30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}
@keyframes overlayFadeIn {
    from {
        opacity: 0;
    }
    to {
        opacity: 1;
    }
}
@keyframes badgePulse {
    0%,
    100% {
        transform: scale(1);
    }
    50% {
        transform: scale(1.05);
    }
}
@keyframes progressPulse {
    0% {
        opacity: 1;
    }
    50% {
        opacity: 0.8;
    }
    100% {
        opacity: 1;
    }
}
@keyframes timelinePulse {
    0% {
        box-shadow: 0 0 0 0 rgba(255, 49, 49, 0.4);
    }
    70% {
        box-shadow: 0 0 0 10px rgba(255, 49, 49, 0);
    }
    100% {
        box-shadow: 0 0 0 0 rgba(255, 49, 49, 0);
    }
}
::-webkit-scrollbar {
    width: 12px;
    background: #223052;
}
::-webkit-scrollbar-thumb {
    background: linear-gradient(120deg, #3e4d6e 40%, #071530 100%);
    border-radius: 8px;
    border: 2px solid #fff;
}
::-webkit-scrollbar-thumb:hover {
    background: linear-gradient(120deg, #ff3131 40%, #3e4d6e 100%);
}
::-webkit-scrollbar-track {
    background: #b3c6e0;
    border-radius: 8px;
}
html,
body,
#droitePage {
    scrollbar-width: thin;
    scrollbar-color: #3e4d6e #b3c6e0;
}
* {
    scrollbar-width: thin;
    scrollbar-color: #3e4d6e #b3c6e0;
}
.loader {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: #071530;
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 10;
    animation: slideUp 1s ease-in-out 1s forwards;
}
.loader img {
    width: 20vw;
    height: auto;
    animation: slideIn 1s ease-in-out;
    filter: invert(1);
}
body {
    margin: 0;
    background-image: url("Images/photoAccueil.jpg");
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    background-attachment: fixed;
    display: flex;
    flex-direction: row;
    font-family: 'Courier New', Courier, monospace;
    min-height: 100vh;
    position: relative;
}
nav {
    position: fixed;
    width: 20vw;
    height: 100vh;
    background-color: #071530;
    box-shadow: #071530 0vw 20vw 20vw 0vw;
    z-index: 2;
    padding: 1vh 1vw;
    display: flex;
    flex-direction: column;
    top: 0;
    left: 0;
    border-right: 2px solid rgba(255, 49, 49, 0.3);
}
nav img {
    height: 40vh;
    width: 100%;
    filter: invert(1);
}
nav>a {
    padding: 0;
}
nav ul {
    display: flex;
    flex-wrap: nowrap;
    flex-direction: column;
    list-style: none;
    padding: 0;
    width: 100%;
    height: 54vh;
    margin: 2vh 0;
    justify-content: space-around;
    text-align: center;
    overflow-y: auto;
    overflow-x: hidden;
}
nav ul li {
    display: flex;
    align-content: center;
    justify-content: center;
}
nav ul li a {
    font-weight: bold;
    text-decoration: none;
    color: #071530;
    width: 100%;
    padding: 0.5vh 0;
    font-size: 1vw;
    border-radius: 50vw;
    background-color: white;
    transition: all 0.3s ease;
    border: 2px solid transparent;
}
nav ul li a:hover {
    background-color: #3e4d6e;
    transform: rotate(2deg) scale(0.95);
    color: white;
    border-color: #ff3131;
}
nav ul li a:active {
    transform: scale(0.92);
}
#droitePage {
    width: 78vw;
    min-height: 100vh;
    margin-left: 22vw;
    overflow-y: auto;
    z-index: 3;
    position: relative;
    display: flex;
    flex-direction: column;
    flex-wrap: nowrap;
    padding-bottom: 0;
}
#droitePage>*:not(footer) {
    flex: 0 0 auto;
}
#nomAccueilBienvenue {
    margin: 15vh 0 70vh 0;
    z-index: 3;
    padding-left: 5vw;
    padding-right: 2vw;
}
#imageProfil {
    width: 150px;
    height: 150px;
    border-radius: 50%;
    border: 3px solid white;
    object-fit: cover;
    margin-bottom: 2vh;
    box-shadow: 0 4px 20px rgba(255, 49, 49, 0.3);
}
#nomAccueilBienvenue ul {
    list-style: none;
    display: flex;
    flex-direction: row;
    padding: 0;
    margin: 2vh 0;
}
#nomAccueilBienvenue ul>li {
    margin-right: 2vw;
}
#nomAccueilBienvenue ul li a {
    display: flex;
}
#nomAccueilBienvenue ul li img {
    width: 2vw;
    min-width: 35px;
    filter: invert(1);
    transition: transform 0.3s ease;
}
#nomAccueilBienvenue ul li img:hover {
    transform: scale(1.1);
}
#nomAccueilBienvenue h2 {
    margin: 0.5vh 0;
    font-size: 1.5vw;
    color: white;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.5);
}
#nomAccueilBienvenue h1 {
    font-size: 5vw;
    margin: 1vh 0;
    font-weight: bolder;
    font-style: oblique;
    color: #071530;
    font-family: initial;
    -webkit-text-stroke: 1px white;
    text-shadow: 0 0 20px rgba(255, 255, 255, 0.3);
}
#nomAccueilBienvenue button {
    font-weight: bold;
    text-decoration: none;
    color: white;
    padding: 1vh 1.5vw;
    font-size: 1.2vw;
    border-radius: 50vw;
    border: 2px solid white;
    background-color: #071530;
    transition: all 0.3s ease;
    cursor: pointer;
    margin-top: 2vh;
}
#nomAccueilBienvenue button:hover {
    background-color: white;
    transform: rotate(2deg) scale(0.95);
    color: #3e4d6e;
    border-color: #ff3131;
}
footer {
    background-color: #071530;
    color: white;
    text-align: center;
    padding: 7vh 0;
    width: 78vw;
    margin-left: 0;
    margin-top: auto;
    border-top: 2px solid rgba(255, 49, 49, 0.3);
}
.footer-container {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 1vw;
    justify-content: center;
}
.footer-links {
    list-style: none;
    padding: 0;
    display: flex;
    gap: 1vw;
}
.footer-links li a {
    color: white;
    text-decoration: none;
    font-weight: bold;
    transition: color 0.3s;
}
.footer-links li a:hover {
    color: #ff3131;
}
#presentationPersonnel,
#parcoursScolaire,
#certifDiplomes,
#expPro,
#competences,
#projets,
#CV,
#veilleTechnologiques,
#contact {
    width: 100%;
    background-color: #071530a0;
    backdrop-filter: blur(5px);
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 0 1.5rem 3rem 1.5rem !important;
    flex-wrap: wrap;
    overflow-wrap: break-word;
    box-sizing: border-box;
}
#contact>h2,
#veilleTechnologiques>h2,
#parcoursScolaire>h2,
#presentationPersonnel>h2,
#certifDiplomes>h2,
#expPro>h2,
#competences>h2,
#projets>h2,
#CV>h2 {
    font-size: 3rem;
    text-align: center;
    width: 90%;
    color: white;
    background: linear-gradient(135deg, #071530, #0a1a3f);
    padding: 1.5rem 0;
    margin: 1.5rem 0 2rem 0;
    border-radius: 1rem;
    box-shadow: 0 4px 20px rgba(255, 49, 49, 0.2);
    text-transform: uppercase;
    font-weight: bold;
    font-family: 'Courier New', Courier, monospace;
    border: 1px solid rgba(255, 49, 49, 0.3);
    letter-spacing: 4px;
}
#presentationPersonnel h3,
#certifDiplomes>h3,
#expPro>h3,
#parcoursScolaire>h3,
#veilleTechnologiques>h3 {
    font-size: 2rem;
    color: white;
    text-align: center;
    margin: 2rem 0 1.5rem 0;
    padding-bottom: 0.8rem;
    border-bottom: 3px solid #ff3131;
    display: inline-block;
    text-transform: uppercase;
    letter-spacing: 2px;
}
#contact p,
#veilleTechnologiques>p,
#parcoursScolaire>p,
#presentationPersonnel p,
#certifDiplomes>p,
#expPro>p {
    color: #e0e6f0;
    font-size: 1.2rem;
    text-align: center;
    margin: 1vw 2vw;
    line-height: 1.8;
    max-width: 1000px;
}
#imageProfil {
    width: 15rem;
    height: 15rem;
    max-width: none;
    aspect-ratio: 1 / 1;
    display: block;
    border-radius: 50%;
    border: 4px solid #ff3131;
    object-fit: cover;
    margin: 1rem 0;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}
#imageProfil:hover {
    transform: scale(1.05);
    box-shadow: 0 0 30px rgba(255, 49, 49, 0.5);
}
#listeCIUl {
    display: flex;
    flex-direction: column;
    padding: 0;
    margin: 3vh 1vw;
    gap: 3vh;
    width: 100%;
    max-width: 1200px;
}
#listeCIUl li {
    display: flex;
    flex-direction: row;
    list-style: none;
    padding: 0;
    background: rgba(22, 36, 71, 0.6);
    border-radius: 1.5rem;
    overflow: hidden;
    border: 1px solid rgba(62, 77, 110, 0.5);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}
#listeCIUl li:hover {
    transform: translateY(-5px);
    box-shadow: 0 15px 30px rgba(255, 49, 49, 0.25);
    border-color: #ff3131;
}
#listeCIUl li.inverse {
    flex-direction: row-reverse;
}
#listeCIUl li img {
    width: 30vw;
    max-width: 300px;
    object-fit: cover;
    aspect-ratio: 16/9;
    cursor: pointer;
    transition: transform 0.3s ease;
}
#listeCIUl li img:hover {
    transform: scale(1.02);
}
#listeCIUl li div {
    display: flex;
    flex-direction: column;
    height: 100%;
    justify-content: center;
    padding: 1.5rem 2rem;
}
#listeCIUl li div h4 {
    color: #ff3131;
    font-size: 1.5rem;
    margin: 0 0 1rem 0;
    text-align: left;
}
#listeCIUl li div p {
    color: white;
    font-size: 1rem;
    line-height: 1.6;
    margin: 0;
    text-align: left;
}
#listeCIUl li.inverse div h4,
#listeCIUl li.inverse div p {
    text-align: right;
}
.timeline {
    display: flex;
    flex-direction: column;
    align-items: center;
    position: relative;
    width: 100%;
    max-width: 1200px;
    margin: 2rem auto;
}
.timeline::before {
    content: "";
    position: absolute;
    width: 4px;
    background: linear-gradient(to bottom, #ff3131, #3e4d6e);
    top: 0;
    bottom: 0;
    left: 50%;
    transform: translateX(-50%);
    z-index: 1;
    border-radius: 2px;
}
.event {
    background: rgba(22, 36, 71, 0.5);
    backdrop-filter: blur(3px);
    border: 1px solid rgba(62, 77, 110, 0.5);
    border-radius: 1.2rem;
    padding: 0;
    width: 100%;
    max-width: 800px;
    margin: 1.5rem 0;
    position: relative;
    z-index: 2;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    overflow: hidden;
}
.event:hover {
    transform: translateY(-5px) scale(1.02);
    box-shadow: 0 15px 30px rgba(255, 49, 49, 0.25);
    border-color: #ff3131;
}
.event h3 {
    background: linear-gradient(135deg, #071530, #0a1a3f);
    color: white;
    padding: 1rem 1.5%;
    margin: 0 0 1rem 0;
    border-radius: 1.2rem 1.2rem 0 0;
    border-bottom: 2px solid #ff3131;
    display: flex;
    align-items: center;
    gap: 0.8rem;
    width: 97%;
}
.event h3 i,
.event h3 em {
    color: #ff3131;
}
.event > *:not(h3) {
    padding-left: 1.5rem;
    padding-right: 1.5rem;
}
.event > *:first-child:not(h3) {
    padding-top: 1rem;
}
.event h4 {
    color: #b3c6e0;
    font-size: 1.1rem;
    margin: 0.5rem 0 0.5rem 0;
    padding-bottom: 0.3rem;
    border-bottom: 1px solid rgba(62, 77, 110, 0.5);
    text-transform: uppercase;
    letter-spacing: 1px;
}
.event p {
    color: white;
    font-size: 1rem;
    line-height: 1.6;
    margin: 0.5rem 0;
}
.event ul {
    background: rgba(7, 21, 48, 0.4);
    border-radius: 0.8rem;
    padding: 1rem 1.5rem;
    margin: 0.5rem 0 0 0;
}
.event ul li {
    color: #e0e6f0;
    padding: 0.3rem 0;
}
.event button {
    font-weight: bold;
    background: linear-gradient(135deg, #ff3131, #b71c1c);
    color: white;
    padding: 0.8rem 1.5rem;
    border-radius: 2rem;
    border: none;
    font-size: 1rem;
    cursor: pointer;
    transition: all 0.3s ease;
    margin: 1rem 0 1.5rem 0;
}
.event button:hover {
    transform: scale(0.95);
    box-shadow: 0 5px 15px rgba(255, 49, 49, 0.4);
}
#tampon {
    position: absolute;
    width: 100px;
    right: 10px;
    top: 10px;
    transform: rotate(-15deg);
    opacity: 0.8;
    z-index: 10;
}
#certifsDiplomesBlocBas {
    display: flex;
    flex-direction: row;
    width: 100%;
    justify-content: center;
    gap: 2rem;
    box-sizing: border-box;
}
#certifs,
#diplomes {
    width: 48%;
    text-align: center;
    color: white;
}
#certifs h3,
#diplomes h3 {
    font-size: 1.5rem;
    color: white;
    margin-bottom: 1.5rem;
    border-bottom: 3px solid #ff3131;
    padding-bottom: 0.5rem;
    display: inline-block;
}
#formDemandeDoc {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    background: rgba(7, 21, 48, 0.97);
    z-index: 1000;
    align-items: center;
    justify-content: center;
    backdrop-filter: blur(10px);
}
#formDemandeDocInner {
    background: linear-gradient(135deg, #1a2744, #0d1b2e);
    border-radius: 1.5rem;
    box-shadow: 0 4px 30px rgba(255, 49, 49, 0.3);
    padding: 2.5rem;
    display: flex;
    flex-direction: column;
    gap: 1.5em;
    min-width: 320px;
    max-width: 95vw;
    width: 450px;
    border: 1px solid #ff3131;
}
#formDemandeDocInner label {
    color: #fff;
    font-weight: bold;
    margin-bottom: 0.3em;
}
#formDemandeDocInner input,
#formDemandeDocInner textarea {
    width: 100%;
    padding: 0.8em;
    border-radius: 0.8rem;
    border: 1px solid #3e4d6e;
    font-size: 1em;
    background: #f3f6fa;
    color: #071530;
    margin-top: 0.3em;
    box-sizing: border-box;
    transition: border 0.3s ease;
}
#formDemandeDocInner input:focus,
#formDemandeDocInner textarea:focus {
    border-color: #ff3131;
    outline: none;
}
#formDemandeDocInner button {
    padding: 0.8em 2em;
    border-radius: 2rem;
    border: none;
    font-size: 1.1em;
    font-weight: bold;
    cursor: pointer;
    transition: all 0.3s ease;
}
#formDemandeDocInner button[type="submit"] {
    background: #ff3131;
    color: white;
}
#formDemandeDocInner button[type="submit"]:hover {
    background: #b71c1c;
    transform: scale(0.95);
}
#formDemandeDocInner button[type="button"] {
    background: #3e4d6e;
    color: white;
}
#formDemandeDocInner button[type="button"]:hover {
    background: #223052;
}
#actualitePro {
    width: 100%;
    padding: 3vh 0;
    background: rgba(7, 21, 48, 0.3);
    border-radius: 2rem;
    margin: 2rem 0;
}
#actualitePro h3 {
    text-align: center;
    width: 100%;
    color: white;
    text-transform: uppercase;
    margin: 1vh 0 2vh 0;
    font-size: 1.8rem;
    border-bottom: 3px solid #ff3131;
    display: inline-block;
    padding-bottom: 0.5rem;
}
#linkedinCarousel {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 1vw;
    width: 100%;
    max-width: 900px;
    margin: 0 auto;
    position: relative;
    flex-wrap: wrap;
    padding: 0 1vw;
    box-sizing: border-box;
}
.carousel-container {
    flex: 1;
    overflow: hidden;
    border-radius: 1.5rem;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.3);
    min-width: 350px;
    max-width: 600px;
    width: 100%;
    height: auto;
    display: flex;
    justify-content: center;
    aspect-ratio: 504 / 950;
}
.carousel-track {
    display: flex;
    transition: transform 0.5s ease-in-out;
    width: 100%;
    align-items: stretch;
    margin: 0;
    padding: 0;
}
.carousel-slide {
    min-width: 100%;
    display: flex;
    flex-direction: column;
    justify-content: flex-start;
    align-items: center;
    padding: 1.5vh 0;
    background-color: #162447;
    overflow-y: auto;
    text-align: center;
    width: 100%;
    box-sizing: border-box;
}
.carousel-btn {
    background: linear-gradient(135deg, #071530, #0a1a3f);
    color: white;
    border: 2px solid #ff3131;
    border-radius: 50%;
    width: 4vw;
    height: 4vw;
    min-width: 50px;
    min-height: 50px;
    font-size: 1.5rem;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}
.carousel-btn:hover {
    background: #ff3131;
    transform: scale(1.1);
}
.carousel-indicators {
    display: flex;
    gap: 1vw;
    justify-content: center;
    margin-top: 2vh;
}
.indicator {
    width: 1rem;
    height: 1rem;
    border-radius: 50%;
    background-color: #3e4d6e;
    cursor: pointer;
    transition: all 0.3s ease;
    border: 2px solid transparent;
}
.indicator:hover {
    background-color: #b3c6e0;
    transform: scale(1.1);
}
.indicator.active {
    background-color: #ff3131;
    border-color: white;
    transform: scale(1.2);
}
#competences {
    background-color: #071530b9;
    backdrop-filter: blur(5px);
    padding: 2rem 1.5rem !important;
}
#competences>h2 {
    font-size: 3rem;
    margin-bottom: 2.5rem !important;
    letter-spacing: 4px;
}
#competences>section {
    width: 100%;
    max-width: 1400px;
    margin: 0 auto 2rem auto;
    background: rgba(7, 21, 48, 0.4);
    border-radius: 2rem;
    padding: 2rem 1.5rem;
    border: 1px solid rgba(62, 77, 110, 0.5);
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.2);
}
#competences>section>h3 {
    font-size: 2rem !important;
    color: white !important;
    margin-top: 0 !important;
    margin-bottom: 2rem !important;
    padding-bottom: 1rem !important;
    border-bottom: 3px solid #ff3131 !important;
    background: transparent !important;
    text-align: left !important;
    padding-left: 1rem !important;
}
#competences>section>h3::before {
    content: "▹";
    color: #ff3131;
    margin-right: 0.8rem;
    font-size: 1.8rem;
    vertical-align: middle;
}
#competences>section>section {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 1.5rem;
    margin: 0;
    width: 100%;
    background: transparent;
    border: none;
    padding: 0;
}
.competence-card {
    background: rgba(22, 36, 71, 0.6);
    border-radius: 1.2rem;
    padding: 1.5rem;
    border-left: 4px solid #ff3131;
    border: 1px solid rgba(62, 77, 110, 0.5);
    transition: all 0.3s ease;
    backdrop-filter: blur(4px);
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.2);
    height: fit-content;
    margin: 1rem 0;
}
.competence-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 15px 30px rgba(255, 49, 49, 0.25);
    background: rgba(22, 36, 71, 0.8);
    border-color: #ff3131;
}
.competence-card h4 {
    font-size: 1.2rem;
    font-weight: 700;
    color: white;
    margin: 0 0 1.2rem 0;
    padding-bottom: 0.7rem;
    border-bottom: 2px solid #ff3131;
    text-align: left;
    letter-spacing: 1px;
    display: flex;
    align-items: center;
    gap: 0.6rem;
    text-transform: uppercase;
}
.competence-card h4::before {
    content: "▹";
    color: #ff3131;
    font-size: 1.3rem;
}
.card-large {
    grid-column: span 2;
}
.card-large h4 {
    font-size: 1.3rem;
    border-bottom: 3px solid #ff3131;
}
.osi-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    gap: 1rem;
}
.osi-layer {
    background: rgba(7, 21, 48, 0.5);
    border-radius: 0.8rem;
    padding: 1rem;
    border-left: 3px solid #b3c6e0;
}
.osi-layer h5 {
    font-size: 0.95rem;
    font-weight: 600;
    color: #b3c6e0;
    margin: 0 0 0.8rem 0;
    padding-bottom: 0.3rem;
    border-bottom: 1px solid rgba(62, 77, 110, 0.5);
    text-transform: uppercase;
    letter-spacing: 1px;
    display: flex;
    align-items: center;
    gap: 0.4rem;
}
.osi-layer h5::before {
    content: "📌";
    color: #ff3131;
    font-size: 0.9rem;
}
#competences ul {
    display: flex;
    flex-direction: column;
    gap: 0.7rem;
    padding: 0;
    margin: 0;
    width: 100%;
}
#competences ul li {
    color: white;
    display: flex;
    flex-direction: column;
    text-align: left;
    list-style: none;
    padding: 0.3rem 0;
    border-bottom: 1px solid rgba(62, 77, 110, 0.2);
    font-size: 0.95rem;
}
progress {
    display: block;
    width: 100%;
    height: 0.7rem;
    margin-top: 0.4rem;
    border-radius: 1rem;
    background-color: rgba(255, 255, 255, 0.1);
    border: none;
    overflow: hidden;
    transition: all 0.3s ease;
}
progress::-webkit-progress-bar {
    background-color: rgba(255, 255, 255, 0.1);
    border-radius: 1rem;
}
progress::-webkit-progress-value {
    background: linear-gradient(90deg, #ff3131, #ff6b6b);
    border-radius: 1rem;
    transition: width 0.8s ease;
    box-shadow: 0 0 10px rgba(255, 49, 49, 0.5);
}
progress:hover {
    transform: scale(1.02);
}
progress:hover::-webkit-progress-value {
    background: linear-gradient(90deg, #ff5252, #ff8a8a);
    box-shadow: 0 0 15px rgba(255, 49, 49, 0.8);
}
#logiciels {
    width: 100% !important;
    max-width: 1400px;
    margin: 2rem auto 0 auto !important;
    background: rgba(22, 36, 71, 0.6) !important;
    border-radius: 2rem !important;
    padding: 2rem 1.5rem !important;
    border: 1px solid #3e4d6e;
}
#logiciels h3 {
    font-size: 2rem !important;
    color: white !important;
    border-bottom: 3px solid #ff3131 !important;
    padding-bottom: 1rem !important;
    margin-bottom: 2rem !important;
    text-align: left !important;
}
#logiciels ul {
    display: flex !important;
    flex-direction: row !important;
    flex-wrap: wrap !important;
    justify-content: center;
    gap: 1.5rem !important;
    padding: 0 !important;
    margin: 0 !important;
}
#logiciels ul li {
    flex: 0 0 auto;
    background: rgba(7, 21, 48, 0.6);
    border-radius: 1.2rem;
    padding: 1rem !important;
    transition: all 0.3s ease;
    border: 1px solid rgba(62, 77, 110, 0.5);
}
#logiciels ul li:hover {
    background: rgba(255, 49, 49, 0.15);
    transform: translateY(-5px) scale(1.05);
    border-color: #ff3131;
    box-shadow: 0 10px 20px rgba(255, 49, 49, 0.3);
}
#logiciels img {
    height: 4rem;
    width: auto;
    filter: brightness(1.1);
    transition: all 0.3s ease;
}
#logiciels ul li:hover img {
    filter: brightness(1.2) drop-shadow(0 0 8px rgba(255, 49, 49, 0.5));
}
#projets {
    width: 100%;
    margin: 0 auto;
    padding: 2rem 3vw;
    box-sizing: border-box;
    overflow-x: hidden;
}
.section-divider {
    margin: 4rem 0 2rem 0;
    padding-top: 2rem;
    border-top: 1px solid rgba(62, 77, 110, 0.3);
}
.section-divider:first-child {
    margin-top: 0;
    border-top: none;
}
.section-title {
    font-size: clamp(1.4rem, 5vw, 2.5rem);
    font-weight: bold;
    color: #fff;
    margin: 0 0 1.5rem 0;
    padding-bottom: 0.8rem;
    border-bottom: 3px solid #ff3131;
    display: inline-block;
}
.subsection-title {
    font-size: clamp(1.2rem, 4vw, 1.8rem);
    font-weight: bold;
    color: #b3c6e0;
    margin: 2.5rem 0 1.5rem 0;
    padding-left: 1rem;
    border-left: 4px solid #ff3131;
}
.projects-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(clamp(15rem, 27vw, 22rem), 1fr));
    gap: 2rem;
    padding: 0.5rem 0;
    width: 100%;
    margin-bottom: 2rem;
    box-sizing: border-box;
}
.project-card {
    background: linear-gradient(135deg, #1a2744 0%, #0d1b2e 100%);
    border: 1px solid #3e4d6e;
    border-radius: 1.2rem;
    padding: 1.5rem;
    cursor: pointer;
    transition: all 0.3s ease;
    position: relative;
    display: flex;
    flex-direction: column;
    animation: fadeInUp 0.6s ease forwards;
    opacity: 0;
    overflow: hidden;
    border-left: 5px solid transparent;
}
.project-card:hover {
    transform: translateY(-5px);
    border-color: #ff3131;
    box-shadow: 0 15px 30px rgba(255, 49, 49, 0.3);
}
.project-card-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(7, 21, 48, 0.9);
    display: none;
    justify-content: center;
    align-items: center;
    color: white;
    font-weight: bold;
    border-radius: 1.2rem;
    z-index: 10;
    backdrop-filter: blur(3px);
    border: 2px solid #ff3131;
    animation: overlayFadeIn 0.2s ease;
}
.project-card:hover .project-card-overlay {
    display: flex;
}
.project-card-header {
    display: flex;
    align-items: center;
    gap: 1rem;
    margin-bottom: 1rem;
    position: relative;
    z-index: 2;
}
.project-logo {
    width: 3.5rem;
    height: 3.5rem;
    object-fit: contain;
    border-radius: 0.8rem;
    background: rgba(255, 255, 255, 0.05);
    padding: 0.5rem;
}
.project-title {
    font-size: 1.2rem;
    font-weight: bold;
    color: #fff;
    margin: 0;
    line-height: 1.3;
}
.project-description {
    color: #b3c6e0;
    font-size: 0.95rem;
    line-height: 1.6;
    margin-bottom: 1rem;
    flex-grow: 1;
    position: relative;
    z-index: 2;
}
.project-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    margin-top: auto;
    position: relative;
    z-index: 2;
}
.project-tag {
    background: rgba(62, 77, 110, 0.8);
    color: #fff;
    padding: 0.3rem 0.8rem;
    border-radius: 2rem;
    font-size: 0.8rem;
    border: 1px solid rgba(255, 49, 49, 0.3);
}
.project-badge {
    position: absolute;
    top: 1rem;
    right: 1rem;
    background: linear-gradient(135deg, #ff3131, #b71c1c);
    color: white;
    padding: 0.4rem 0.8rem;
    border-radius: 2rem;
    font-size: 0.75rem;
    font-weight: bold;
    animation: badgePulse 2s infinite;
    z-index: 3;
}

/* Badges pour marquer Projet vs Activité */
.project-card[data-type="projet"] {
    border-left: 5px solid #64c8ff;
}

.project-card[data-type="activite"] {
    border-left: 5px solid #ff5050;
}

.project-card::before {
    display: none;
}

/* Texte vertical inscrusté dans la banderole */
.project-card::after {
    content: attr(data-type);
    position: absolute;
    bottom: 1.5rem;
    left: 0.5rem;
    font-size: 0.65rem;
    font-weight: bold;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    z-index: 2;
    opacity: 1;
    font-family: 'Courier New', monospace;
    transform: rotate(-90deg);
    transform-origin: left bottom;
    white-space: nowrap;
}

.veille-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(350px, 1fr));
    gap: 2rem;
    margin: 3vh 0;
    width: 100%;
    max-width: 1400px;
}
.veille-card {
    background: linear-gradient(135deg, #1a2744, #0d1b2e);
    color: white;
    border-radius: 1.2rem;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.2);
    display: flex;
    align-items: flex-start;
    gap: 1.2rem;
    padding: 1.8rem;
    transition: all 0.3s ease;
    border: 1px solid rgba(62, 77, 110, 0.5);
    height: 100%;
}
.veille-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 15px 40px rgba(255, 49, 49, 0.25);
    border-color: #ff3131;
}
.veille-icone {
    min-width: 3.5rem;
    min-height: 3.5rem;
    border-radius: 1rem;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 2rem;
    background: rgba(7, 21, 48, 0.6);
    padding: 0.5rem;
}
.veille-icone img {
    width: 2.5rem;
    height: 2.5rem;
    object-fit: contain;
}
.veille-titre {
    color: #ff3131;
    font-weight: bold;
    font-size: 1.2rem;
    text-decoration: none;
    transition: color 0.3s;
}
.veille-titre:hover {
    color: white;
    text-decoration: underline;
}
.veille-desc {
    font-size: 0.95rem;
    margin: 0.5rem 0;
    color: #e0e6f0;
    line-height: 1.6;
}
.veille-tag {
    display: inline-block;
    padding: 0.2rem 0.8rem;
    border-radius: 2rem;
    font-size: 0.85rem;
    font-weight: bold;
    background: #223052;
    color: #b3c6e0;
}
#contact form {
    width: 60%;
    max-width: 600px;
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
    background: rgba(22, 36, 71, 0.6);
    padding: 2.5rem;
    border-radius: 2rem;
    border: 1px solid rgba(62, 77, 110, 0.5);
    backdrop-filter: blur(5px);
}
#contact label {
    font-weight: bold;
    color: white;
    display: flex;
    flex-direction: column;
    gap: 0.3rem;
}
#contact input,
#contact textarea {
    width: 100%;
    padding: 0.8rem 1rem;
    border-radius: 0.8rem;
    border: 1px solid #3e4d6e;
    font-size: 1rem;
    background: white;
    color: #071530;
    box-sizing: border-box;
    transition: all 0.3s ease;
}
#contact input:focus,
#contact textarea:focus {
    border-color: #ff3131;
    outline: none;
    box-shadow: 0 0 10px rgba(255, 49, 49, 0.3);
}
#contact button[type="submit"] {
    background: linear-gradient(135deg, #ff3131, #b71c1c);
    color: white;
    padding: 1rem;
    border-radius: 2rem;
    border: none;
    font-size: 1.1rem;
    font-weight: bold;
    cursor: pointer;
    transition: all 0.3s ease;
    margin-top: 1rem;
}
#contact button[type="submit"]:hover {
    transform: scale(0.98);
    box-shadow: 0 5px 20px rgba(255, 49, 49, 0.4);
}
#CV iframe {
    width: 80%;
    max-width: 1000px;
    height: 1200px;
    border: 3px solid #ff3131;
    border-radius: 1rem;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.3);
}
.project-modal,
#projectDetailModal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    background: rgba(7, 21, 48, 0.98);
    z-index: 10000;
    align-items: center;
    justify-content: center;
    backdrop-filter: blur(15px);
    overflow-y: auto;
    padding: 2rem;
    box-sizing: border-box;
}
.project-modal.active,
#projectDetailModal.active {
    display: flex !important;
}
.project-modal-content,
#projectDetailModal .modal-content {
    background: linear-gradient(135deg, #1a2744, #0d1b2e);
    border: 2px solid #ff3131;
    border-radius: 1.5rem;
    max-width: 900px;
    width: 90%;
    max-height: 90vh;
    overflow-y: auto;
    overflow-x: hidden;
    box-shadow: 0 20px 40px rgba(255, 49, 49, 0.3);
    animation: modalFadeIn 0.3s ease;
    padding: 2rem;
    padding-top: 0;
    position: relative;
    box-sizing: border-box;
}
.project-modal-header,
#projectDetailModal .modal-header {
    position: sticky;
    top: 0;
    background: linear-gradient(135deg, #071530, #0d1b2e);
    border-bottom: 2px solid #ff3131;
    padding: 1.5rem 2rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
    z-index: 10;
    border-radius: 1.5rem 1.5rem 0 0;
    margin: -2rem -2rem 1.5rem -2rem;
}
.project-modal-title,
#projectDetailModal .modal-title {
    font-size: 1.8rem;
    font-weight: bold;
    color: #fff;
    margin: 0;
    line-height: 1.2;
    word-break: break-word;
    padding-right: 1rem;
}
.project-modal-close,
#projectDetailModal .modal-close {
    background: none;
    border: none;
    color: #fff;
    font-size: 2.2rem;
    cursor: pointer;
    width: 3rem;
    height: 3rem;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    transition: all 0.3s ease;
    flex-shrink: 0;
}
.project-modal-close:hover,
#projectDetailModal .modal-close:hover {
    background: rgba(255, 49, 49, 0.2);
    transform: rotate(90deg);
    color: #ff3131;
}
.project-modal-body,
#projectDetailModal .modal-body {
    padding: 0.5rem 0 1.5rem 0;
    color: #e0e6f0;
    font-size: 1.1rem;
    line-height: 1.8;
    word-wrap: break-word;
    overflow-wrap: break-word;
}
.project-modal-body h3,
#projectDetailModal .modal-body h3 {
    color: #fff;
    font-size: 1.4rem;
    margin: 1.8rem 0 1rem 0;
    padding-bottom: 0.5rem;
    border-bottom: 2px solid #ff3131;
    font-weight: 600;
}
.project-modal-body h3:first-of-type,
#projectDetailModal .modal-body h3:first-of-type {
    margin-top: 0.5rem;
}
.project-modal-body h4,
#projectDetailModal .modal-body h4 {
    color: #b3c6e0;
    font-size: 1.2rem;
    margin: 1.2rem 0 0.8rem 0;
    font-weight: 600;
}
.project-modal-body p,
#projectDetailModal .modal-body p {
    margin-bottom: 1.2rem;
    color: #e0e6f0;
    line-height: 1.7;
}
.project-modal-body ul,
#projectDetailModal .modal-body ul {
    list-style: none;
    padding-left: 0;
    margin: 1rem 0 1.5rem 0;
}
.project-modal-body ul li,
#projectDetailModal .modal-body ul li {
    padding: 0.4rem 0 0.4rem 1.8rem;
    position: relative;
    line-height: 1.6;
    color: #e0e6f0;
}
.project-modal-body ul li::before,
#projectDetailModal .modal-body ul li::before {
    content: '▹';
    position: absolute;
    left: 0;
    color: #ff3131;
    font-weight: bold;
    font-size: 1.2rem;
}
.project-modal-body a,
#projectDetailModal .modal-body a {
    color: #ff3131;
    text-decoration: none;
    font-weight: 600;
    border-bottom: 1px solid rgba(255, 49, 49, 0.3);
    padding-bottom: 2px;
    transition: all 0.2s ease;
}
.project-modal-body a:hover,
#projectDetailModal .modal-body a:hover {
    color: #fff;
    border-bottom-color: #fff;
}
.project-modal-image {
    width: 100%;
    max-height: 50vh;
    margin: 1.5rem 0;
    display: block;
    border-radius: 0.8rem;
    border: 2px solid #3e4d6e;
    cursor: zoom-in;
    transition: transform 0.3s ease;
    object-fit: contain;
    background: rgba(0, 0, 0, 0.2);
}
.project-modal-image:hover {
    transform: scale(1.02);
    border-color: #ff3131;
}
.project-modal-iframe {
    aspect-ratio: 16/9;
    width: 100%;
    height: auto;
    border: 2px solid #3e4d6e;
    border-radius: 0.8rem;
    margin: 1.5rem 0;
    background: white;
    display: block;
}
.project-languages {
    display: flex;
    flex-wrap: wrap;
    gap: 1rem;
    margin: 1.5rem 0;
}
.language-item {
    display: flex;
    align-items: center;
    gap: 0.8rem;
    background: rgba(62, 77, 110, 0.3);
    padding: 0.8rem 1.5rem;
    border-radius: 2rem;
    border: 1px solid #3e4d6e;
    transition: all 0.2s ease;
}
.language-item:hover {
    background: rgba(255, 49, 49, 0.15);
    border-color: #ff3131;
    transform: translateY(-2px);
}
.language-item img {
    width: 2.2rem;
    height: 2.2rem;
    object-fit: contain;
}
.language-item h4 {
    margin: 0;
    color: #fff;
    font-size: 1rem;
    font-weight: 500;
}

/* Navigation principale dans la barre sur les ecrans larges */
body > nav {
    display: none !important;
}

#burgerMenu {
    display: none !important;
}

.portfolio-topbar {
    padding-right: 1.25rem;
    padding-left: 1.25rem;
}

.portfolio-desktop-nav {
    display: block;
    position: static;
    width: auto;
    height: auto;
    min-width: 0;
    max-width: 100%;
    padding: 0;
    overflow: hidden;
    background: transparent;
    border: 0;
    box-shadow: none;
    transform: none;
    visibility: visible;
    pointer-events: auto;
}

.portfolio-desktop-nav-list {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: 0.35rem;
    width: max-content;
    min-width: 0;
    height: auto;
    max-height: none;
    margin: 0;
    padding: 0;
    list-style: none;
    overflow: visible;
}

.portfolio-desktop-nav-list li {
    flex: 0 0 auto;
}

.portfolio-desktop-nav-list a {
    display: inline-flex;
    align-items: center;
    min-height: 2.2rem;
    padding: 0.4rem 0.55rem;
    color: #fff;
    font-size: 0.72rem;
    font-weight: bold;
    line-height: 1.1;
    text-align: center;
    text-decoration: none;
    white-space: nowrap;
    background: rgba(62, 77, 110, 0.35);
    border: 1px solid transparent;
    border-radius: 0.45rem;
    transition: background-color 0.2s ease, border-color 0.2s ease, color 0.2s ease;
}

.portfolio-nav-icon {
    display: inline-grid;
    width: 1rem;
    margin-right: 0.25rem;
    place-items: center;
    color: var(--portfolio-accent);
    font-size: 0.9rem;
    line-height: 1;
}

.portfolio-desktop-nav-list a:hover,
.portfolio-desktop-nav-list a:focus-visible {
    color: #fff;
    background: rgba(255, 49, 49, 0.18);
    border-color: var(--portfolio-accent);
}

.portfolio-desktop-nav-list a[href="index.html"] {
    color: var(--portfolio-accent);
}

#droitePage > section:not(#nomAccueilBienvenue) {
    padding-right: clamp(1rem, 4vw, 4rem) !important;
    padding-left: clamp(1rem, 4vw, 4rem) !important;
}

#droitePage > section:not(#nomAccueilBienvenue) > * {
    width: min(100%, 92rem);
}

@media (max-width: 1200px) and (min-width: 901px) {
    .portfolio-current-page {
        display: none;
    }

    .portfolio-desktop-nav-list a {
        padding-right: 0.4rem;
        padding-left: 0.4rem;
        font-size: 0.66rem;
    }
}

/* Chronologie lisible dans les grilles */
.timeline {
    counter-reset: timeline-step;
}

.timeline::before {
    display: block;
    position: static;
    grid-column: 1 / -1;
    width: 100%;
    height: auto;
    padding: 0 0 0.5rem;
    color: var(--portfolio-muted);
    background: none;
    border-bottom: 1px solid rgba(255, 49, 49, 0.45);
    border-radius: 0;
    content: "Chronologie - du plus recent au plus ancien";
    font-size: 0.85rem;
    font-weight: bold;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    transform: none;
    z-index: auto;
}

.timeline .event {
    counter-increment: timeline-step;
}

.timeline .event::before {
    position: absolute;
    top: 0.65rem;
    right: 0.8rem;
    z-index: 4;
    padding: 0.25rem 0.55rem;
    color: #fff;
    background: var(--portfolio-accent);
    border-radius: 1rem;
    content: "Etape " counter(timeline-step);
    font-size: 0.7rem;
    font-weight: bold;
    letter-spacing: 0.04em;
}

/* Galerie de publications LinkedIn */
#linkedinCarousel {
    display: grid;
    grid-template-columns: auto minmax(0, 1fr) auto;
    align-items: center;
    gap: 1rem;
    width: min(100%, 92rem);
    max-width: none;
    margin: 0 auto;
}

.carousel-container {
    min-width: 0;
    max-width: none;
    width: 100%;
    height: 38rem;
    aspect-ratio: auto;
    overflow: hidden;
    border: 1px solid rgba(255, 49, 49, 0.35);
    background: rgba(7, 21, 48, 0.45);
}

.carousel-track {
    display: flex;
    align-items: stretch;
    gap: 1rem;
    width: max-content;
    height: 100%;
    margin: 0;
    padding: 1rem;
    transition: transform 0.45s ease;
}

.carousel-slide {
    flex: 0 0 clamp(17rem, 30vw, 24rem);
    min-width: 0;
    width: clamp(17rem, 30vw, 24rem);
    height: 100%;
    padding: 0;
    overflow: hidden;
    background: #162447;
    border: 1px solid rgba(179, 198, 224, 0.25);
    border-radius: 1rem;
    box-shadow: 0 0.75rem 1.5rem rgba(0, 0, 0, 0.25);
    transition: transform 0.25s ease, border-color 0.25s ease, box-shadow 0.25s ease;
}

.carousel-slide:hover {
    z-index: 2;
    border-color: var(--portfolio-accent);
    box-shadow: 0 1rem 2rem rgba(255, 49, 49, 0.25);
    transform: scale(1.025);
}

.carousel-slide iframe {
    width: 100% !important;
    height: 100% !important;
    min-height: 0 !important;
    border: 0;
}

.carousel-btn {
    position: relative;
    z-index: 3;
}
@keyframes modalFadeIn {
    from {
        opacity: 0;
        transform: translateY(-30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}
.modal-image {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    background: rgba(7, 21, 48, 0.98);
    z-index: 99999;
    align-items: center;
    justify-content: center;
    backdrop-filter: blur(15px);
}
.modal-image.active {
    display: flex;
}
.modal-image-close {
    position: absolute;
    top: 2rem;
    right: 3rem;
    font-size: 3rem;
    color: white;
    cursor: pointer;
    z-index: 100001;
    transition: all 0.3s ease;
}
.modal-image-close:hover {
    color: #ff3131;
    transform: rotate(90deg);
}
.modal-image-content {
    max-width: 90vw;
    max-height: 90vh;
    border-radius: 1rem;
    box-shadow: 0 0 30px rgba(255, 49, 49, 0.3);
    object-fit: contain;
}
#projectExplorer {
    width: 90%;
    margin: 2rem auto;
}
.explorer-content {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
    gap: 2rem;
}
.folder-card,
.project-item-card {
    background: linear-gradient(135deg, #1a2744, #0d1b2e);
    border: 1px solid #3e4d6e;
    border-radius: 1.2rem;
    padding: 1.5rem;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
}
.folder-card:hover,
.project-item-card:hover {
    border-color: #ff3131;
    transform: translateY(-5px);
    box-shadow: 0 15px 30px rgba(255, 49, 49, 0.25);
}
.folder-icon {
    font-size: 3rem;
    margin-bottom: 1rem;
}
.folder-name,
.project-item-title {
    color: white;
    font-weight: bold;
    font-size: 1.1rem;
    margin-bottom: 0.5rem;
}
#projectFilters,
#projectsGrid,
#tableMatieresProjects {
    display: none !important;
}
@media (max-width: 1200px) {
    nav ul li a {
        font-size: 1.2vw;
    }
    #nomAccueilBienvenue {
        margin: 15vh 0 65vh 0;
    }
    #imageProfil {
        width: 155px;
        height: 155px;
    }
    #nomAccueilBienvenue h2 {
        font-size: 2vw;
    }
    #nomAccueilBienvenue h1 {
        font-size: 6vw;
    }
    #nomAccueilBienvenue ul li img {
        width: 2.8vw;
        min-width: 42px;
    }
    #nomAccueilBienvenue button {
        font-size: 1.6vw;
        padding: 1.2vh 2vw;
    }
}

/* Navigation repliee et mise en page stable */
:root {
    --portfolio-background: #071530;
    --portfolio-panel: #162447;
    --portfolio-accent: #ff3131;
    --portfolio-muted: #b3c6e0;
    --navigation-width: min(22rem, 88vw);
}

*,
*::before,
*::after {
    box-sizing: border-box;
}

html {
    overflow-x: hidden;
}

body {
    min-width: 0;
    overflow-x: hidden;
}

body.menu-open {
    overflow: hidden;
}

nav {
    position: fixed;
    top: 0 !important;
    left: 0;
    z-index: 10000;
    width: var(--navigation-width);
    height: 100vh;
    height: 100dvh;
    max-height: 100dvh;
    padding: 1.5rem 1rem;
    overflow-x: hidden;
    overflow-y: auto;
    transform: translateX(-105%);
    visibility: hidden;
    pointer-events: none;
    transition: transform 0.25s ease, visibility 0.25s ease;
    box-shadow: 0.5rem 0 2rem rgba(0, 0, 0, 0.35);
}

nav.active {
    transform: translateX(0);
    visibility: visible;
    pointer-events: auto;
}

nav img {
    width: 100%;
    height: auto;
    max-height: 10rem;
    object-fit: contain;
}

nav ul {
    width: 100%;
    height: auto;
    max-height: none;
    margin: 1.5rem 0 0;
    gap: 0.6rem;
    justify-content: flex-start;
}

nav ul li,
nav ul li a {
    width: 100%;
}

nav ul li a {
    display: block;
    min-height: 2.75rem;
    padding: 0.7rem 0.8rem;
    font-size: 1rem;
    line-height: 1.3;
    overflow-wrap: anywhere;
}

#burgerMenu {
    position: fixed;
    top: 1rem;
    left: 1rem;
    z-index: 10001;
    display: flex !important;
    align-items: center;
    justify-content: center;
    width: 3rem;
    height: 3rem;
    padding: 0;
    cursor: pointer;
    background: var(--portfolio-background);
    border: 2px solid var(--portfolio-accent);
    border-radius: 0.6rem;
    box-shadow: 0 0.25rem 1rem rgba(0, 0, 0, 0.3);
}

#burger-icon {
    display: flex;
    flex-direction: column;
    gap: 0.3rem;
}

#burger-icon span {
    display: block;
    width: 1.5rem;
    height: 0.18rem;
    margin: 0;
    background-color: #fff;
    border-radius: 0.2rem;
    transition: transform 0.2s ease, opacity 0.2s ease;
}

#burgerMenu.open #burger-icon span:nth-child(1) {
    transform: translateY(0.48rem) rotate(45deg);
}

#burgerMenu.open #burger-icon span:nth-child(2) {
    opacity: 0;
}

#burgerMenu.open #burger-icon span:nth-child(3) {
    transform: translateY(-0.48rem) rotate(-45deg);
}

#burgerMenu:focus-visible,
nav a:focus-visible,
button:focus-visible {
    outline: 0.2rem solid #fff;
    outline-offset: 0.2rem;
}

#droitePage {
    width: 100%;
    min-width: 0;
    margin-left: 0;
    overflow: visible;
}

#droitePage > section,
#droitePage > footer {
    min-width: 0;
    max-width: 100%;
}

#nomAccueilBienvenue {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    justify-content: center;
    width: min(100%, 72rem);
    min-height: calc(100vh - 8rem);
    margin: 0 auto;
    padding: 8rem 3rem 6rem;
}

#nomAccueilBienvenue h1 {
    max-width: 100%;
    font-size: 4rem;
    line-height: 1.1;
    overflow-wrap: anywhere;
}

#nomAccueilBienvenue h2 {
    max-width: 50rem;
    font-size: 1.4rem;
    line-height: 1.45;
}

#nomAccueilBienvenue p,
#nomAccueilBienvenue ul {
    max-width: 100%;
}

#nomAccueilBienvenue button {
    font-size: 1rem;
}

footer {
    width: 100%;
    min-width: 0;
}

img,
iframe,
video {
    max-width: 100%;
}

@media (prefers-reduced-motion: reduce) {
    *,
    *::before,
    *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        scroll-behavior: auto !important;
        transition-duration: 0.01ms !important;
    }
}

/* Barre d'identite commune a toutes les pages */
body {
    padding-top: 4.5rem;
}

.portfolio-topbar {
    position: fixed;
    inset: 0 0 auto;
    z-index: 9000;
    display: flex;
    align-items: center;
    justify-content: space-between;
    min-height: 4.5rem;
    gap: 1rem;
    padding: 0.65rem 1.5rem 0.65rem 5.5rem;
    color: #fff;
    background: rgba(7, 21, 48, 0.9);
    border-bottom: 1px solid rgba(255, 49, 49, 0.45);
    box-shadow: 0 0.4rem 1.5rem rgba(0, 0, 0, 0.22);
    backdrop-filter: blur(0.8rem);
}

.portfolio-topbar::after {
    position: absolute;
    right: 0;
    bottom: -1px;
    left: 0;
    height: 2px;
    content: "";
    background: linear-gradient(90deg, transparent, var(--portfolio-accent), transparent);
}

.portfolio-brand {
    display: inline-flex;
    align-items: center;
    min-width: 0;
    gap: 0.7rem;
    color: #fff;
    text-decoration: none;
}

.portfolio-brand img {
    width: 2.7rem;
    height: 2.7rem;
    object-fit: contain;
    filter: invert(1);
}

.portfolio-brand-text {
    display: flex;
    flex-direction: column;
    min-width: 0;
    line-height: 1.15;
}

.portfolio-brand-text strong {
    overflow: hidden;
    font-size: 1rem;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.portfolio-brand-text small {
    margin-top: 0.2rem;
    color: var(--portfolio-muted);
    font-size: 0.72rem;
    letter-spacing: 0.05em;
    text-transform: uppercase;
}

.portfolio-current-page {
    max-width: 42%;
    overflow: hidden;
    color: var(--portfolio-muted);
    font-size: 0.85rem;
    font-weight: bold;
    letter-spacing: 0.04em;
    text-align: right;
    text-overflow: ellipsis;
    white-space: nowrap;
}

/* Priorite finale : le mode de navigation depend uniquement de la largeur */
@media (min-width: 901px) {
    body > nav {
        display: none !important;
        transform: translateX(-105%) !important;
    }

    #burgerMenu {
        display: none !important;
    }
}

/* Correction finale de la barre desktop : elle ne doit jamais heriter du panneau nav */
@media (min-width: 901px) {
    header.portfolio-topbar {
        display: flex !important;
        height: 5.5rem !important;
        min-height: 5.5rem !important;
        max-height: 5.5rem !important;
        overflow: hidden !important;
    }

    header.portfolio-topbar .portfolio-desktop-nav {
        position: static !important;
        display: block !important;
        flex: 1 1 auto !important;
        width: auto !important;
        height: auto !important;
        max-height: none !important;
        min-width: 0 !important;
        max-width: none !important;
        margin: 0 !important;
        padding: 0 !important;
        overflow: hidden !important;
        overflow-y: hidden !important;
        background: transparent !important;
        border: 0 !important;
        box-shadow: none !important;
        transform: none !important;
        visibility: visible !important;
    }

    header.portfolio-topbar .portfolio-desktop-nav-list {
        display: flex !important;
        flex-direction: row !important;
        align-items: center !important;
        justify-content: space-evenly !important;
        width: 100% !important;
        height: auto !important;
        max-height: none !important;
        margin: 0 auto !important;
        padding: 0 !important;
        overflow: visible !important;
    }

    body {
        padding-top: 5.5rem;
    }

    header.portfolio-topbar .portfolio-desktop-nav-list a {
        flex: 1 1 0 !important;
        flex-direction: column !important;
        justify-content: center !important;
        gap: 0.25rem;
        min-width: 5.8rem;
        min-height: 4.25rem;
        padding: 0.45rem 0.6rem;
        background: transparent;
        border-color: transparent;
        border-radius: 0.6rem;
        font-size: 0.78rem;
    }

    header.portfolio-topbar .portfolio-desktop-nav-list a:hover,
    header.portfolio-topbar .portfolio-desktop-nav-list a:focus-visible {
        background: rgba(62, 77, 110, 0.7);
        border-color: transparent;
    }

    header.portfolio-topbar .portfolio-nav-icon {
        width: auto;
        margin: 0;
        font-size: 1.55rem;
    }
}

html,
body {
    overflow-x: hidden !important;
}

#presentationPersonnel > #imageProfil,
#nomAccueilBienvenue > #imageProfil {
    width: min(15rem, 70vw) !important;
    height: min(15rem, 70vw) !important;
    max-width: none !important;
    max-height: none !important;
    aspect-ratio: 1 / 1 !important;
    object-fit: cover !important;
    object-position: center !important;
    border-radius: 50% !important;
}

@media (min-width: 901px) and (max-width: 1500px) {
    header.portfolio-topbar .portfolio-desktop-nav-list a {
        min-width: 2.8rem;
        padding-right: 0.25rem;
        padding-left: 0.25rem;
        font-size: 0;
    }

    header.portfolio-topbar .portfolio-nav-icon {
        font-size: 1.45rem;
    }
}

/* Barre desktop alignee a droite */
@media (min-width: 901px) {
    header.portfolio-topbar .portfolio-brand {
        flex: 0 0 auto;
    }

    header.portfolio-topbar .portfolio-desktop-nav {
        flex: 0 1 auto !important;
        margin-left: auto !important;
    }

    header.portfolio-topbar .portfolio-desktop-nav-list {
        width: auto !important;
        margin: 0 !important;
    }

    header.portfolio-topbar .portfolio-desktop-nav-list a {
        flex: 0 1 auto !important;
    }

    header.portfolio-topbar .portfolio-current-page {
        display: none !important;
    }
}

/* Organisation en colonnes pour eviter les pages trop verticales */
#presentationPersonnel,
#parcoursScolaire,
#certifDiplomes,
#expPro,
#competences,
#projets,
#CV,
#veilleTechnologiques,
#contact {
    width: 100%;
    min-width: 0;
}

#contact > h2,
#veilleTechnologiques > h2,
#parcoursScolaire > h2,
#presentationPersonnel > h2,
#certifDiplomes > h2,
#expPro > h2,
#competences > h2,
#projets > h2,
#CV > h2 {
    width: min(100%, 92rem);
    font-size: clamp(1.65rem, 3vw, 2.7rem);
    line-height: 1.2;
    letter-spacing: 0.12em;
}

.timeline {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    align-items: stretch;
    gap: 1.5rem;
    width: min(100%, 92rem);
    max-width: none;
    margin: 1.5rem auto;
}

.timeline::before {
    display: none;
}

.timeline .event {
    width: 100%;
    max-width: none;
    margin: 0;
}

.competence-grid,
#competences > section > section {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 1.25rem;
    width: 100%;
}

.competence-grid .competence-card,
#competences > section > section .competence-card {
    min-width: 0;
    margin: 0;
}

.projects-grid,
.veille-grid,
.explorer-content {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 1.25rem;
    width: min(100%, 92rem);
    max-width: none;
}

.project-card,
.veille-card,
.folder-card,
.project-item-card {
    min-width: 0;
}

#presentationPersonnel > p,
#contact > p,
#veilleTechnologiques > p {
    width: min(100%, 58rem);
    max-width: 58rem;
    font-size: 1rem;
    line-height: 1.65;
}

/* Surcharges finales pour la chronologie et la galerie LinkedIn */
.timeline {
    counter-reset: timeline-step;
}

.timeline::before {
    display: block !important;
    position: static !important;
    grid-column: 1 / -1;
    width: 100% !important;
    height: auto !important;
    padding: 0 0 0.5rem;
    color: var(--portfolio-muted);
    background: none !important;
    border-bottom: 1px solid rgba(255, 49, 49, 0.45);
    content: "Chronologie - du plus recent au plus ancien";
    font-size: 0.85rem;
    font-weight: bold;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    transform: none !important;
}

.timeline .event {
    counter-increment: timeline-step;
}

.timeline .event::before {
    position: absolute;
    top: 0.65rem;
    right: 0.8rem;
    z-index: 4;
    padding: 0.25rem 0.55rem;
    color: #fff;
    background: var(--portfolio-accent);
    border-radius: 1rem;
    content: "Etape " counter(timeline-step);
    font-size: 0.7rem;
    font-weight: bold;
}

#linkedinCarousel {
    display: grid !important;
    grid-template-columns: auto minmax(0, 1fr) auto;
    align-items: center;
    gap: 1rem;
    width: min(100%, 92rem);
    max-width: none;
}

#linkedinCarousel .carousel-container {
    min-width: 0;
    max-width: none;
    width: 100%;
    height: 38rem;
    aspect-ratio: auto;
    overflow: hidden;
}

#linkedinCarousel .carousel-track {
    display: flex;
    align-items: stretch;
    gap: 1rem;
    width: max-content;
    height: 100%;
    padding: 1rem;
    transition: transform 0.45s ease;
}

#linkedinCarousel .carousel-slide {
    flex: 0 0 clamp(17rem, 30vw, 24rem);
    width: clamp(17rem, 30vw, 24rem);
    min-width: 0;
    height: 100%;
    padding: 0;
    overflow: hidden;
    border: 1px solid rgba(179, 198, 224, 0.25);
    border-radius: 1rem;
    transition: transform 0.25s ease, border-color 0.25s ease, box-shadow 0.25s ease;
}

#linkedinCarousel .carousel-slide:hover {
    z-index: 2;
    border-color: var(--portfolio-accent);
    box-shadow: 0 1rem 2rem rgba(255, 49, 49, 0.25);
    transform: scale(1.025);
}

#linkedinCarousel .carousel-slide iframe {
    width: 100% !important;
    height: 100% !important;
    min-height: 0 !important;
    border: 0 !important;
}

.timeline-controls {
    display: flex;
    justify-content: flex-end;
    width: min(100%, 92rem);
    margin: 1.25rem auto -0.5rem;
}

.timeline-sort-button {
    padding: 0.65rem 1rem;
    color: #fff;
    font: inherit;
    font-size: 0.85rem;
    font-weight: bold;
    background: rgba(62, 77, 110, 0.75);
    border: 1px solid rgba(255, 49, 49, 0.55);
    border-radius: 2rem;
    cursor: pointer;
    transition: background-color 0.2s ease, transform 0.2s ease;
}

.timeline-sort-button:hover,
.timeline-sort-button:focus-visible {
    background: var(--portfolio-accent);
    transform: translateY(-2px);
}

.timeline .event > h3 {
    display: block;
    width: 100% !important;
    min-height: 0;
    margin: 0 !important;
    padding: 1.25rem 4.5rem 1.1rem 1.5rem !important;
    box-sizing: border-box;
    overflow-wrap: anywhere;
    text-align: center;
    line-height: 1.35;
}

.timeline .event > h3 i,
.timeline .event > h3 em {
    display: block;
    margin-top: 0.45rem;
}

/* Publications LinkedIn en grille, sans cadre global ni controles */
#actualitePro {
    width: min(100%, 92rem);
    margin: 2rem auto;
    padding: 0;
    background: transparent;
    border-radius: 0;
}

#actualitePro > h3,
#centreInteret > h3 {
    width: 100%;
    margin: 0 0 1.25rem;
    padding-bottom: 0.75rem;
    border-bottom: 2px solid var(--portfolio-accent);
    color: #fff;
    font-size: clamp(1.35rem, 2.5vw, 2rem);
    text-align: left;
}

#linkedinCarousel {
    display: block !important;
    width: 100%;
    margin: 0;
}

#linkedinCarousel .linkedin-grid {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 1rem;
    width: 100%;
}

#linkedinCarousel .carousel-slide {
    width: 100%;
    height: 32rem;
    min-width: 0;
    overflow: hidden;
    background: #162447;
    border: 1px solid rgba(179, 198, 224, 0.25);
    border-radius: 0.75rem;
    box-shadow: 0 0.6rem 1.4rem rgba(0, 0, 0, 0.22);
    transform: none;
}

#linkedinCarousel .carousel-slide:hover {
    transform: scale(1.025);
    border-color: var(--portfolio-accent);
    box-shadow: 0 1rem 2rem rgba(255, 49, 49, 0.25);
}

#linkedinCarousel .carousel-slide iframe {
    display: block;
    width: 100% !important;
    height: 100% !important;
}

.passions-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 1rem;
    width: 100%;
}

.passion-card {
    min-width: 0;
    overflow: hidden;
    background: rgba(22, 36, 71, 0.72);
    border: 1px solid rgba(179, 198, 224, 0.25);
    border-radius: 0.9rem;
    box-shadow: 0 0.6rem 1.4rem rgba(0, 0, 0, 0.22);
    transition: transform 0.25s ease, border-color 0.25s ease, box-shadow 0.25s ease;
}

.passion-card:hover {
    transform: translateY(-0.35rem) scale(1.015);
    border-color: var(--portfolio-accent);
    box-shadow: 0 1rem 2rem rgba(255, 49, 49, 0.2);
}

.passion-card > img {
    display: block;
    width: 100%;
    height: 12rem;
    object-fit: cover;
    cursor: zoom-in;
}

.passion-card-content {
    padding: 1rem 1.1rem 1.2rem;
}

.passion-card h4 {
    margin: 0 0 0.5rem;
    color: #fff;
    font-size: 1.15rem;
}

.passion-card p {
    margin: 0;
    color: var(--portfolio-muted);
    font-size: 0.92rem;
    line-height: 1.55;
}

.timeline-controls {
    justify-content: center;
}

.timeline-sort-button {
    display: grid;
    width: 2.75rem;
    height: 2.75rem;
    padding: 0;
    place-items: center;
    font-size: 1.45rem;
    line-height: 1;
}

/* Feed extensible : les elements supplementaires apparaissent avec Voir plus */
.feed-item-hidden {
    display: none !important;
}

.feed-more-button {
    display: block;
    margin: 1rem auto 0;
    padding: 0.65rem 1.25rem;
    color: #fff;
    font: inherit;
    font-size: 0.85rem;
    font-weight: bold;
    background: rgba(62, 77, 110, 0.8);
    border: 1px solid rgba(255, 49, 49, 0.55);
    border-radius: 2rem;
    cursor: pointer;
    transition: background-color 0.2s ease, transform 0.2s ease;
}

.feed-more-button:hover,
.feed-more-button:focus-visible {
    background: var(--portfolio-accent);
    transform: translateY(-2px);
}

#linkedinCarousel .linkedin-grid {
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 0.7rem;
}

#linkedinCarousel .carousel-slide {
    height: 26rem;
    border-radius: 0.55rem;
}

.passion-gallery {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 0.2rem;
    width: 100%;
    background: #071530;
}

.passion-gallery > img {
    display: block;
    width: 100%;
    aspect-ratio: 1 / 1;
    object-fit: cover;
    cursor: zoom-in;
    transition: opacity 0.2s ease, transform 0.2s ease;
}

.passion-gallery > img:hover {
    position: relative;
    z-index: 1;
    opacity: 0.85;
    transform: scale(1.035);
}

.passion-card {
    width: min(100%, 48rem);
    margin: 0 auto;
}

/* LinkedIn : cartes suffisamment larges et lisibles */
#actualitePro {
    width: min(100%, 92rem) !important;
    margin: 3rem auto !important;
    padding: 0 !important;
    background: transparent !important;
    border: 0 !important;
    border-radius: 0 !important;
    box-shadow: none !important;
}

#actualitePro > h3 {
    margin: 0 0 1.25rem;
    font-size: clamp(1.3rem, 2.5vw, 2rem);
    text-align: left;
}

#actualitePro #linkedinCarousel {
    width: 100%;
    max-width: none;
}

#actualitePro #linkedinCarousel .linkedin-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr)) !important;
    gap: 1rem !important;
    align-items: stretch;
}

#actualitePro #linkedinCarousel .carousel-slide {
    height: 28rem !important;
    min-height: 28rem;
    border-radius: 0.55rem;
}

#actualitePro #linkedinCarousel .carousel-slide iframe {
    height: 100% !important;
    min-height: 0 !important;
}

@media (max-width: 1050px) and (min-width: 601px) {
    #actualitePro #linkedinCarousel .linkedin-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
    }
}

/* Pellicule de centre d'interet pleine largeur */
#centreInteret {
    width: min(100%, 92rem) !important;
    margin: 3rem auto 0;
}

#centreInteret > h3 {
    text-align: center;
}

#centreInteret .passions-grid {
    display: block;
    width: 100%;
}

#centreInteret .passion-card {
    width: 100%;
    margin: 0;
    overflow: visible;
    background: transparent;
    border: 0;
    border-radius: 0;
    box-shadow: none;
}

#centreInteret .passion-card:hover {
    transform: none;
    border: 0;
    box-shadow: none;
}

#centreInteret .passion-card-content {
    padding: 0 0 1.25rem;
    text-align: center;
}

#centreInteret .passion-card h4 {
    margin: 0 0 0.5rem;
    font-size: clamp(1.4rem, 3vw, 2.2rem);
}

#centreInteret .passion-card p {
    max-width: 42rem;
    margin: 0 auto;
}

#centreInteret .passion-gallery {
    display: grid;
    grid-template-columns: repeat(5, minmax(0, 1fr));
    gap: 0.3rem;
    width: 100%;
    background: transparent;
}

#centreInteret .passion-gallery > img {
    width: 100%;
    aspect-ratio: 1 / 1;
    height: auto;
    border-radius: 0.25rem;
}

.modal-image-close {
    position: fixed !important;
    top: 6rem !important;
    right: 1.5rem !important;
    z-index: 10001;
    display: grid;
    width: 3rem;
    height: 3rem;
    padding: 0;
    place-items: center;
    color: #fff;
    font: inherit;
    font-size: 2.4rem;
    line-height: 1;
    background: rgba(7, 21, 48, 0.8);
    border: 2px solid #fff;
    border-radius: 50%;
    cursor: pointer;
    pointer-events: auto;
}

.modal-image-close:hover,
.modal-image-close:focus-visible {
    color: #fff;
    background: var(--portfolio-accent);
    border-color: var(--portfolio-accent);
}

/* Couche modale commune : toujours au-dessus de la navigation */
#formDemandeDoc,
.project-modal,
#projectDetailModal,
.modal-image {
    z-index: 30000 !important;
    isolation: isolate;
    background: rgba(7, 21, 48, 0.82) !important;
    backdrop-filter: blur(0.9rem);
    -webkit-backdrop-filter: blur(0.9rem);
}

/* Les modales sont placees dans #droitePage : ne pas les enfermer sous la navbar. */
#droitePage {
    z-index: auto !important;
}

.project-modal-content,
#projectDetailModal .modal-content,
#formDemandeDocInner {
    position: relative;
    z-index: 30001;
}

.project-modal-close,
#projectDetailModal .modal-close,
#formDemandeDocInner button,
.modal-image-close {
    position: relative;
    z-index: 30002;
    cursor: pointer;
}

.project-modal-header,
#projectDetailModal .modal-header {
    z-index: 30003;
}

.modal-image-close {
    position: fixed !important;
    top: 6rem !important;
    right: 1.5rem !important;
}
/* ==========================================================================
   VERSION TELEPHONE - REECRITURE COMPLETE
   --------------------------------------------------------------------------
   Ce bloc remplace TOUS les anciens @media (max-width) du fichier
   (768 / 600 / 480 / 380 / 900 ...) qui se contredisaient.
   Il doit rester tout en bas du fichier pour l'emporter sur le reste.

   Paliers :
     <= 900px  navigation burger, barre du haut, grilles sur 1 colonne,
               puis centrage / espacements / cartes / formulaires / modales
               (telephones portrait + paysage, petites tablettes)
     <= 600px  telephones : barre compacte, fond mobile, LinkedIn 1 colonne
     <= 380px  petits telephones (iPhone SE, Galaxy A ...)
     (hover: none) ecrans tactiles : plus d'effets "survol" collants
   ========================================================================== */


/* ==========================================================================
   PALIER 900px : barre du haut, burger, menu, grilles
   ========================================================================== */
@media (max-width: 900px) {

    :root {
        --topbar-h: 4.5rem;
        --burger-size: 3rem;
        --burger-gap: 0.75rem;
    }

    html {
        -webkit-text-size-adjust: 100%;
        text-size-adjust: 100%;
    }

    body {
        padding-top: var(--topbar-h);
    }

    /* ---- Verrou de geometrie : rien ne doit decaler le contenu lateralement ----
       Neutralise toute marge / padding / left / transform parasite (autre feuille de
       style, style inline ajoute par un script...) sur la page, la zone de contenu
       et les sections. Priorite maximale : ces valeurs ne peuvent pas etre battues. */
    html body {
        margin-right: 0 !important;
        margin-left: 0 !important;
        padding-right: 0 !important;
        padding-left: 0 !important;
    }

    html body #droitePage {
        width: 100% !important;
        max-width: 100% !important;
        margin-right: 0 !important;
        margin-left: 0 !important;
        padding-right: 0 !important;
        padding-left: 0 !important;
        left: auto !important;
        right: auto !important;
        transform: none !important;
        translate: none !important;
    }

    #droitePage > section:not(#nomAccueilBienvenue),
    #projets {
        position: relative !important;
        left: auto !important;
        right: auto !important;
        width: 100% !important;
        max-width: 100% !important;
        margin-right: 0 !important;
        margin-left: 0 !important;
        padding-right: 1rem !important;
        padding-left: 1rem !important;
        transform: none !important;
        translate: none !important;
        overflow-x: visible !important;
    }

    /* Contenu direct des sections : toujours centre, jamais decale */
    #droitePage > section:not(#nomAccueilBienvenue) > * {
        margin-right: auto !important;
        margin-left: auto !important;
        left: auto !important;
        right: auto !important;
        translate: none !important;
    }

    /* ---- Barre du haut ---- */
    .portfolio-topbar,
    header.portfolio-topbar {
        height: var(--topbar-h);
        min-height: var(--topbar-h);
        align-items: center;
        justify-content: space-between;
        gap: 0.75rem;
        padding: 0 1rem 0 calc(var(--burger-gap) + var(--burger-size) + 0.75rem);
    }

    .portfolio-brand {
        min-width: 0;
        max-width: 100%;
    }

    .portfolio-brand-text {
        min-width: 0;
    }

    .portfolio-brand-text strong,
    .portfolio-brand-text small {
        display: block;
        max-width: 100%;
        overflow: hidden;
        text-overflow: ellipsis;
        white-space: nowrap;
    }

    .portfolio-desktop-nav {
        display: none !important;
    }

    /* ---- Bouton burger : centre verticalement dans la barre ---- */
    #burgerMenu {
        display: flex !important;
        align-items: center;
        justify-content: center;
        top: calc((var(--topbar-h) - var(--burger-size)) / 2);
        left: var(--burger-gap);
        width: var(--burger-size);
        height: var(--burger-size);
    }

    /* ---- Menu plein ecran (descend du haut) ---- */
    body > nav {
        display: flex !important;
        flex-direction: column;
        align-items: stretch;
        top: 0 !important;
        left: 0 !important;
        width: 100% !important;
        height: 100vh !important;
        height: 100dvh !important;
        max-height: 100dvh !important;
        padding: calc(var(--topbar-h) + 0.25rem) 1rem 2rem !important;
        overflow-x: hidden !important;
        overflow-y: auto !important;
        overscroll-behavior: contain;
        border-right: 0;
        border-bottom: 2px solid rgba(255, 49, 49, 0.3);
        transform: translateY(-105%) !important;
        transition: transform 0.3s ease, visibility 0.3s ease !important;
    }

    body > nav.active {
        transform: translateY(0) !important;
    }

    body > nav > a {
        display: flex;
        align-self: center;
        justify-content: center;
        width: 100%;
        padding: 0;
    }

    body > nav img {
        width: auto;
        max-width: min(60%, 14rem);
        height: auto;
        max-height: 6.5rem;
        margin: 0 auto;
        object-fit: contain;
        object-position: center;
    }

    body > nav ul {
        display: flex;
        flex-direction: column;
        align-items: center;
        justify-content: flex-start;
        gap: 0.7rem;
        width: 100%;
        height: auto;
        max-height: none;
        margin: 1rem 0 0;
        padding: 0;
        overflow: visible;
    }

    body > nav ul li {
        display: flex;
        justify-content: center;
        width: min(100%, 24rem);
    }

    body > nav ul li a {
        display: block;
        width: 100%;
        min-height: 2.8rem;
        padding: 0.8rem 1.25rem;
        color: var(--portfolio-background) !important;
        font-size: 1rem !important;
        line-height: 1.2;
        text-align: center;
        overflow-wrap: anywhere;
        background: #fff !important;
        border: 0 !important;
        border-radius: 50vw !important;
        transform: none !important;
        transition: background-color 0.2s ease, color 0.2s ease !important;
    }

    body > nav ul li a:hover,
    body > nav ul li a:focus-visible {
        color: #fff !important;
        background: var(--portfolio-accent) !important;
    }

    /* ---- Toutes les grilles sur 1 colonne ---- */
    .timeline,
    .competence-grid,
    #competences > section > section,
    .projects-grid,
    .veille-grid,
    .explorer-content {
        grid-template-columns: minmax(0, 1fr);
    }

    /* Une carte "large" ne doit jamais creer une 2e colonne implicite */
    .card-large {
        grid-column: auto !important;
    }

    .timeline .event {
        margin: 0;
    }

    .timeline-controls {
        justify-content: center;
    }
}


/* ==========================================================================
   PALIER 900px (suite) : centrage, espacements, cartes, formulaires, modales
   Meme seuil que le burger => telephones en portrait ET en paysage, petites
   tablettes : tout reste coherent, il n'y a plus de zone "entre deux".
   ========================================================================== */
@media (max-width: 900px) {

    /* ---- Regles generales ---- */
    :where(h1, h2, h3, h4, h5, h6, p, li, a, span, label, small, em, strong, i, figcaption) {
        overflow-wrap: break-word;
    }

    a,
    button,
    input,
    select,
    textarea,
    label {
        touch-action: manipulation;
    }

    .loader img {
        width: min(50vw, 14rem);
    }

    /* ---- Accueil (hero) : tout est centre sur le meme axe ---- */
    #nomAccueilBienvenue {
        width: 100%;
        max-width: 100%;
        min-height: calc(100vh - var(--topbar-h));
        min-height: calc(100dvh - var(--topbar-h));
        margin: 0;
        padding: 2rem 1.25rem 3rem;
        align-items: center;
        justify-content: center;
        text-align: center;
    }

    #nomAccueilBienvenue > * {
        max-width: 100%;
    }

    #nomAccueilBienvenue > #imageProfil,
    #presentationPersonnel > #imageProfil {
        flex: 0 0 auto;
        display: block;
        width: min(13rem, 60vw) !important;
        height: min(13rem, 60vw) !important;
        margin: 0 auto 1.25rem !important;
    }

    #nomAccueilBienvenue h1 {
        max-width: 100%;
        margin: 0.5rem 0;
        font-size: clamp(1.9rem, 9vw, 2.6rem);
        line-height: 1.12;
        text-align: center;
        -webkit-text-stroke: 0.6px #fff;
    }

    #nomAccueilBienvenue h2 {
        max-width: 100%;
        margin: 0.4rem 0;
        font-size: clamp(1rem, 4.3vw, 1.25rem);
        line-height: 1.45;
        text-align: center;
    }

    #nomAccueilBienvenue p {
        max-width: 100%;
        text-align: center;
    }

    /* Icones : centrees, espacement identique de chaque cote (plus de marge a droite) */
    #nomAccueilBienvenue ul {
        display: flex;
        flex-direction: row;
        flex-wrap: wrap;
        align-items: center;
        justify-content: center;
        gap: 0.75rem 1.25rem;
        width: 100%;
        max-width: 100%;
        margin: 1.25rem 0 0.5rem;
        padding: 0;
    }

    #nomAccueilBienvenue ul > li {
        display: flex;
        margin: 0;
    }

    #nomAccueilBienvenue ul li a {
        display: flex;
        align-items: center;
        justify-content: center;
        width: 3rem;
        height: 3rem;
    }

    #nomAccueilBienvenue ul li img {
        width: 100%;
        height: 100%;
        min-width: 0;
        max-width: none;
        object-fit: contain;
    }

    #nomAccueilBienvenue button {
        max-width: 100%;
        margin: 1.25rem auto 0;
        padding: 0.85rem 1.75rem;
        font-size: 1rem;
        line-height: 1.25;
        text-align: center;
    }

    /* ---- Sections : marges gauche/droite identiques ---- */
    #droitePage > section:not(#nomAccueilBienvenue),
    #presentationPersonnel,
    #parcoursScolaire,
    #certifDiplomes,
    #expPro,
    #competences,
    #projets,
    #CV,
    #veilleTechnologiques,
    #contact {
        width: 100% !important;
        min-width: 0 !important;
        max-width: 100% !important;
        margin-right: 0;
        margin-left: 0;
        padding: 1.25rem 1rem 2.5rem !important;
        align-items: center;
    }

    /* ---- Titres de section ---- */
    #contact > h2,
    #veilleTechnologiques > h2,
    #parcoursScolaire > h2,
    #presentationPersonnel > h2,
    #certifDiplomes > h2,
    #expPro > h2,
    #competences > h2,
    #projets > h2,
    #CV > h2 {
        margin: 0.75rem 0 1.25rem !important;
        padding: 0.9rem 0.75rem !important;
        font-size: clamp(1.25rem, 6vw, 1.6rem) !important;
        line-height: 1.25;
        letter-spacing: 0.06em !important;
        text-align: center;
        overflow-wrap: anywhere;
        border-radius: 0.9rem;
    }

    #presentationPersonnel h3,
    #certifDiplomes > h3,
    #expPro > h3,
    #parcoursScolaire > h3,
    #veilleTechnologiques > h3 {
        display: block;
        margin: 1.25rem 0 1rem;
        padding-bottom: 0.6rem;
        font-size: clamp(1.15rem, 5.2vw, 1.4rem);
        letter-spacing: 0.05em;
        text-align: center;
    }

    #contact p,
    #contact > p,
    #veilleTechnologiques > p,
    #parcoursScolaire > p,
    #presentationPersonnel p,
    #presentationPersonnel > p,
    #certifDiplomes > p,
    #expPro > p {
        max-width: 100%;
        margin: 0.6rem 0;
        font-size: 1rem;
        line-height: 1.65;
        text-align: center;
        text-wrap: pretty;
    }

    /* ---- Chronologie et evenements ---- */
    .timeline {
        width: 100%;
        gap: 1.1rem;
        margin: 1rem 0;
    }

    .timeline::before {
        font-size: 0.72rem;
        line-height: 1.4;
        letter-spacing: 0.06em;
        text-align: center;
    }

    .event,
    .timeline .event {
        width: 100%;
        max-width: 100%;
        margin: 0;
        border-radius: 1.1rem;
    }

    /* Pastille "Etape N" centree en haut de la carte */
    .timeline .event::before {
        top: 0.7rem;
        right: auto;
        left: 50%;
        transform: translateX(-50%);
        white-space: nowrap;
    }

    /* Bandeau de titre : marges gauche/droite egales => texte vraiment centre */
    .event > h3 {
        justify-content: center;
        flex-wrap: wrap;
        width: 100% !important;
        margin: 0 0 0.75rem !important;
        padding: 1rem !important;
        font-size: 1.1rem !important;
        line-height: 1.3;
        text-align: center;
        border-radius: 1.1rem 1.1rem 0 0;
    }

    .timeline .event > h3 {
        width: 100% !important;
        margin: 0 !important;
        padding: 2.6rem 1rem 1rem !important;
        font-size: 1.1rem !important;
        line-height: 1.3;
        text-align: center;
        border-radius: 1.1rem 1.1rem 0 0;
    }

    .event > *:not(h3) {
        padding-right: 1rem;
        padding-left: 1rem;
    }

    .event > *:first-child:not(h3) {
        padding-top: 1rem;
    }

    .event h4 {
        margin: 0.6rem 0 0.4rem;
        font-size: 1rem;
    }

    .event p {
        margin: 0.5rem 0;
        font-size: 0.95rem;
        line-height: 1.6;
    }

    .event ul {
        margin: 0.6rem 1rem 0;
        padding: 0.75rem 1rem 0.75rem 1.6rem;
    }

    .event img {
        max-width: 100%;
        height: auto;
    }

    .event button {
        display: block;
        width: fit-content;
        min-width: min(100%, 14rem);
        max-width: 100%;
        margin: 1rem auto 1.25rem;
        padding: 0.8rem 1.5rem;
        text-align: center;
    }

    #tampon {
        display: none !important;
    }

    /* ---- Certifications / diplomes ---- */
    #certifsDiplomesBlocBas {
        flex-direction: column;
        align-items: center;
        gap: 1.5rem;
        width: 100%;
    }

    #certifs,
    #diplomes {
        width: 100%;
        text-align: center;
    }

    #certifs h3,
    #diplomes h3 {
        margin-bottom: 1rem;
        font-size: 1.25rem;
    }

    /* ---- Competences ---- */
    #competences > section {
        width: 100%;
        max-width: 100%;
        margin: 0 0 1.25rem;
        padding: 1.25rem 1rem;
        border-radius: 1.25rem;
    }

    #competences > section > h3 {
        margin: 0 0 1.25rem !important;
        padding: 0 0 0.8rem !important;
        font-size: 1.25rem !important;
        text-align: center !important;
    }

    #competences > section > h3::before {
        margin-right: 0.5rem;
        font-size: 1.3rem;
    }

    #competences > section > section,
    .competence-grid {
        gap: 1rem;
        width: 100%;
    }

    .competence-card {
        min-width: 0;
        margin: 0;
        padding: 1.1rem 1rem;
        border-radius: 1rem;
    }

    .competence-card h4,
    .card-large h4 {
        justify-content: center;
        margin: 0 0 1rem;
        font-size: 0.98rem;
        text-align: center;
    }

    .osi-grid {
        grid-template-columns: minmax(0, 1fr);
        gap: 0.75rem;
    }

    #competences ul {
        gap: 0.5rem;
    }

    #logiciels {
        width: 100% !important;
        max-width: 100% !important;
        margin: 1.25rem 0 0 !important;
        padding: 1.25rem 1rem !important;
        border-radius: 1.25rem !important;
    }

    #logiciels h3 {
        margin: 0 0 1.25rem !important;
        padding-bottom: 0.8rem !important;
        font-size: 1.25rem !important;
        text-align: center !important;
    }

    #logiciels ul {
        gap: 0.75rem !important;
    }

    #logiciels ul li {
        padding: 0.65rem !important;
        border-radius: 1rem;
    }

    #logiciels img {
        max-width: 100%;
        height: 2.75rem;
    }

    /* ---- Projets ---- */
    #projets {
        overflow-x: hidden;
    }

    .section-divider {
        margin: 2.5rem 0 1.25rem;
        padding-top: 1.25rem;
        text-align: center;
    }

    .section-title {
        display: inline-block;
        max-width: 100%;
        margin-bottom: 1.1rem;
        font-size: clamp(1.25rem, 5.6vw, 1.6rem);
        text-align: center;
    }

    /* h4 enfant direct de la section : la regle "> *" lui imposait 100% de largeur */
    #droitePage > section:not(#nomAccueilBienvenue) > .subsection-title,
    .subsection-title {
        display: block;
        width: fit-content;
        max-width: 100%;
        margin: 1.75rem auto 1.1rem;
        padding: 0 0 0.6rem;
        text-align: center;
        border-left: 0;
        border-bottom: 3px solid #ff3131;
    }

    .projects-grid,
    .veille-grid,
    .explorer-content {
        width: 100%;
        gap: 1rem;
        margin-right: 0;
        margin-left: 0;
    }

    .projects-grid {
        padding: 0.25rem 0;
    }

    #projectExplorer {
        width: 100%;
        margin: 1.5rem 0;
    }

    /* La carte a une bordure gauche de 5px (couleur du type) et 1px a droite :
       on retire 4px du padding gauche pour que le contenu soit reellement centre. */
    .project-card {
        align-items: center;
        padding: 1.25rem 1.1rem 1.25rem calc(1.1rem - 4px);
        text-align: center;
    }

    /* Badge Projet / Activite : centre en haut, dans le flux (plus de coin qui deborde) */
    .project-badge {
        position: static;
        order: -1;
        align-self: center;
        margin: 0 0 0.9rem;
    }

    /* Etiquette verticale dans la bordure : redondante avec le badge, masquee */
    .project-card::after {
        display: none;
    }

    .project-card-header {
        flex-direction: column;
        align-items: center;
        justify-content: center;
        gap: 0.6rem;
        width: 100%;
        margin-bottom: 0.8rem;
        text-align: center;
    }

    .project-logo {
        flex: 0 0 auto;
    }

    .project-title {
        width: 100%;
        font-size: 1.1rem;
        text-align: center;
        overflow-wrap: anywhere;
    }

    .project-description {
        width: 100%;
        margin: 0 0 1rem;
        font-size: 0.93rem;
        text-align: center;
    }

    .project-tags {
        justify-content: center;
        width: 100%;
    }

    /* ---- Veille technologique ---- */
    .veille-grid {
        margin: 1rem 0;
    }

    .veille-card {
        flex-direction: column;
        align-items: center;
        gap: 0.8rem;
        height: auto;
        padding: 1.25rem 1.1rem;
        text-align: center;
    }

    .veille-card > * {
        min-width: 0;
        max-width: 100%;
    }

    .veille-titre {
        display: inline-block;
        overflow-wrap: anywhere;
    }

    /* ---- Contact ---- */
    #contact form {
        width: 100%;
        max-width: 100%;
        gap: 1.1rem;
        padding: 1.25rem 1rem;
        border-radius: 1.25rem;
    }

    #contact label {
        text-align: left;
    }

    /* 16px minimum : evite le zoom automatique d'iOS au focus */
    #contact input,
    #contact textarea {
        padding: 0.8rem 0.9rem;
        font-size: 16px;
    }

    #contact button[type="submit"] {
        width: 100%;
        padding: 0.95rem;
    }

    /* ---- CV ---- */
    #CV iframe {
        width: 100%;
        max-width: 100%;
        height: 75vh;
        height: 75dvh;
        min-height: 28rem;
        border-width: 2px;
        border-radius: 0.8rem;
    }

    /* ---- Centres d'interet ---- */
    #listeCIUl {
        width: 100%;
        max-width: 100%;
        gap: 1rem;
        margin: 1.25rem 0;
    }

    #listeCIUl li,
    #listeCIUl li.inverse {
        flex-direction: column;
        border-radius: 1.1rem;
    }

    #listeCIUl li img {
        width: 100%;
        max-width: 100%;
        height: auto;
        aspect-ratio: 16 / 9;
    }

    #listeCIUl li div {
        align-items: center;
        height: auto;
        padding: 1.1rem 1rem 1.25rem;
    }

    #listeCIUl li div h4,
    #listeCIUl li div p,
    #listeCIUl li.inverse div h4,
    #listeCIUl li.inverse div p {
        text-align: center !important;
    }

    #centreInteret {
        width: 100% !important;
        margin: 2rem auto 0;
    }

    #centreInteret .passion-card h4 {
        font-size: clamp(1.25rem, 5.5vw, 1.6rem);
    }

    #centreInteret .passion-card-content {
        padding: 1rem 0 1.25rem;
    }

    #centreInteret .passion-card p {
        max-width: 100%;
        font-size: 0.92rem;
    }

    #centreInteret .passion-gallery {
        grid-template-columns: repeat(3, minmax(0, 1fr));
        gap: 0.2rem;
    }

    .passions-grid {
        grid-template-columns: minmax(0, 1fr);
    }

    /* ---- Publications LinkedIn ---- */
    #actualitePro {
        width: 100% !important;
        margin: 2rem 0 !important;
    }

    #actualitePro > h3 {
        margin: 0 0 1.25rem;
        font-size: clamp(1.2rem, 5.2vw, 1.5rem);
        text-align: center;
    }

    /* Aligne les cartes LinkedIn exactement sur le titre (plus de padding 1vw) */
    #actualitePro #linkedinCarousel {
        width: 100%;
        max-width: 100%;
        margin: 0;
        padding: 0;
    }

    /* ---- Pied de page ---- */
    footer {
        width: 100%;
        padding: 2rem 1rem calc(2rem + env(safe-area-inset-bottom, 0px));
    }

    .footer-container {
        gap: 1rem;
        width: 100%;
        text-align: center;
    }

    .footer-links {
        flex-wrap: wrap;
        justify-content: center;
        gap: 0.6rem 1.25rem;
        margin: 0;
        padding: 0;
        text-align: center;
    }

    /* ---- Fenetre "detail du projet" ---- */
    .project-modal,
    #projectDetailModal {
        width: 100%;
        height: 100vh;
        height: 100dvh;
        padding: 1rem;
        align-items: center;
        justify-content: center;
    }

    .project-modal-content,
    #projectDetailModal .modal-content {
        width: 100%;
        max-width: 40rem;
        max-height: calc(100vh - 2rem);
        max-height: calc(100dvh - 2rem);
        margin: 0 auto !important;
        padding: 0 1.5rem 1.5rem !important;
    }

    .project-modal-header,
    #projectDetailModal .modal-header {
        margin: 0 -1.5rem 1.2rem;
        padding: 1rem 1.5rem;
    }

    .project-modal-title,
    #projectDetailModal .modal-title {
        min-width: 0;
        font-size: 1.4rem;
    }

    .project-modal-close,
    #projectDetailModal .modal-close {
        width: 2.75rem;
        height: 2.75rem;
        font-size: 2rem;
    }

    .project-modal-body,
    #projectDetailModal .modal-body {
        font-size: 1rem;
        line-height: 1.65;
    }

    .project-modal-body h3,
    #projectDetailModal .modal-body h3 {
        margin: 1.5rem 0 0.8rem;
        font-size: 1.25rem;
    }

    .project-modal-body a,
    #projectDetailModal .modal-body a {
        overflow-wrap: anywhere;
    }

    .project-modal-body pre,
    #projectDetailModal .modal-body pre {
        max-width: 100%;
        overflow-x: auto;
    }

    .project-modal-body table,
    #projectDetailModal .modal-body table {
        display: block;
        max-width: 100%;
        overflow-x: auto;
    }

    .project-modal-image,
    .project-modal-iframe {
        max-width: 100%;
        margin: 1.2rem auto;
    }

    .project-languages {
        justify-content: center;
        gap: 0.6rem;
    }

    .language-item {
        padding: 0.55rem 1rem;
    }

    .language-item img {
        width: 1.75rem;
        height: 1.75rem;
    }

    .language-item h4 {
        font-size: 0.9rem;
    }

    /* ---- Fenetre "demande de document" ---- */
    #formDemandeDoc {
        width: 100%;
        height: 100vh;
        height: 100dvh;
        padding: 1rem;
    }

    #formDemandeDocInner {
        width: 100%;
        min-width: 0;
        max-width: 28rem;
        max-height: calc(100vh - 2rem);
        max-height: calc(100dvh - 2rem);
        gap: 1.1rem;
        padding: 1.5rem 1.25rem;
        overflow-y: auto;
        border-radius: 1.25rem;
    }

    #formDemandeDocInner input,
    #formDemandeDocInner textarea {
        font-size: 16px;
    }

    #formDemandeDocInner button {
        width: 100%;
        padding: 0.9em 1.25em;
    }

    /* ---- Image agrandie ---- */
    .modal-image {
        width: 100%;
        height: 100vh;
        height: 100dvh;
        padding: 4rem 0.75rem 1rem;
    }

    .modal-image-content {
        width: auto;
        height: auto;
        max-width: 100%;
        max-height: 100%;
        border-radius: 0.8rem;
    }

    .modal-image-close {
        top: calc(env(safe-area-inset-top, 0px) + 0.75rem) !important;
        right: 0.75rem !important;
        width: 2.75rem;
        height: 2.75rem;
        font-size: 2rem;
    }
}


/* ==========================================================================
   PALIER 600px : telephones
   ========================================================================== */
@media (max-width: 600px) {

    :root {
        --topbar-h: 4rem;
    }

    /* Fond mobile : image portrait fixe derriere le contenu */
    body {
        background: none !important;
        background-color: #071530 !important;
    }

    body::before {
        content: '';
        position: fixed !important;
        inset: 0;
        z-index: -1;
        background-color: #071530;
        background-image: url("Images/photoAccueilTel.jpg") !important;
        background-position: top center !important;
        background-repeat: no-repeat !important;
        background-size: 100% auto !important;
        pointer-events: none;
    }

    /* Barre du haut : le logo + nom sont centres sur l'ecran.
       Marges gauche et droite identiques (le burger occupe la meme place a gauche). */
    .portfolio-topbar,
    header.portfolio-topbar {
        justify-content: center;
        padding: 0 calc(var(--burger-gap) + var(--burger-size) + 0.5rem);
    }

    .portfolio-brand {
        justify-content: center;
        gap: 0.6rem;
    }

    .portfolio-brand img {
        flex: 0 0 auto;
        width: 2.3rem;
        height: 2.3rem;
    }

    .portfolio-brand-text strong {
        font-size: 0.9rem;
    }

    .portfolio-brand-text small {
        font-size: 0.62rem;
    }

    .portfolio-current-page {
        display: none;
    }

    /* LinkedIn : une seule colonne, cartes pleine largeur */
    #actualitePro #linkedinCarousel .linkedin-grid {
        grid-template-columns: minmax(0, 1fr) !important;
        gap: 1rem !important;
        width: 100% !important;
        max-width: 100% !important;
    }

    #actualitePro #linkedinCarousel .carousel-slide {
        width: 100% !important;
        height: 26rem !important;
        min-height: 26rem;
    }

    #centreInteret .passion-gallery {
        width: 100% !important;
        max-width: 100% !important;
    }

    /* Fenetres modales : "tiroir" collee en bas de l'ecran */
    .project-modal,
    #projectDetailModal {
        padding: 0;
        align-items: flex-end;
    }

    .project-modal-content,
    #projectDetailModal .modal-content {
        max-width: 100%;
        max-height: 92vh;
        max-height: 92dvh;
        padding: 0 1.1rem calc(1.25rem + env(safe-area-inset-bottom, 0px)) !important;
        border-width: 2px 0 0;
        border-radius: 1.25rem 1.25rem 0 0;
    }

    .project-modal-header,
    #projectDetailModal .modal-header {
        margin: 0 -1.1rem 1rem;
        padding: 0.8rem 1.1rem;
    }

    .project-modal-title,
    #projectDetailModal .modal-title {
        font-size: 1.15rem;
    }

    .project-modal-body,
    #projectDetailModal .modal-body {
        font-size: 0.95rem;
        line-height: 1.6;
    }

    .project-modal-body h3,
    #projectDetailModal .modal-body h3 {
        margin: 1.3rem 0 0.7rem;
        font-size: 1.15rem;
    }

    .project-modal-iframe {
        aspect-ratio: 9 / 16 !important;
        max-height: 70vh;
        max-height: 70dvh;
    }

    .project-modal-image {
        max-height: 45vh;
        max-height: 45dvh;
    }
}


/* ==========================================================================
   PALIER 380px : petits telephones
   ========================================================================== */
@media (max-width: 380px) {

    #droitePage > section:not(#nomAccueilBienvenue),
    #presentationPersonnel,
    #parcoursScolaire,
    #certifDiplomes,
    #expPro,
    #competences,
    #projets,
    #CV,
    #veilleTechnologiques,
    #contact {
        padding: 1rem 0.75rem 2rem !important;
    }

    #nomAccueilBienvenue {
        padding: 1.5rem 0.9rem 2.5rem;
    }

    #nomAccueilBienvenue ul {
        gap: 0.6rem 1rem;
    }

    #nomAccueilBienvenue button {
        padding: 0.8rem 1.4rem;
    }

    .event > *:not(h3) {
        padding-right: 0.85rem;
        padding-left: 0.85rem;
    }

    .event ul {
        margin-right: 0.85rem;
        margin-left: 0.85rem;
    }

    .competence-card {
        padding: 1rem 0.85rem;
    }

    .project-card {
        padding: 1.1rem 0.9rem 1.1rem calc(0.9rem - 4px);
    }

    .veille-card {
        padding: 1.1rem 0.9rem;
    }

    #contact form {
        padding: 1.1rem 0.85rem;
    }

    .project-modal-content,
    #projectDetailModal .modal-content {
        padding: 0 0.9rem calc(1rem + env(safe-area-inset-bottom, 0px)) !important;
    }

    .project-modal-header,
    #projectDetailModal .modal-header {
        margin: 0 -0.9rem 0.9rem;
        padding: 0.75rem 0.9rem;
    }

    .project-modal-title,
    #projectDetailModal .modal-title {
        font-size: 1.05rem;
    }

    .project-modal-iframe {
        max-height: 60vh;
        max-height: 60dvh;
    }
}


/* ==========================================================================
   ECRANS TACTILES : pas d'effet "survol" qui reste colle apres un tap
   (evite les cartes agrandies / decalees et l'overlay qui reste affiche)
   ========================================================================== */
@media (hover: none) {

    .event:hover,
    .project-card:hover,
    .competence-card:hover,
    .veille-card:hover,
    .folder-card:hover,
    .project-item-card:hover,
    .language-item:hover,
    .passion-card:hover,
    #centreInteret .passion-card:hover,
    #listeCIUl li:hover,
    #listeCIUl li img:hover,
    #logiciels ul li:hover,
    #linkedinCarousel .carousel-slide:hover,
    .carousel-slide:hover,
    .passion-gallery > img:hover,
    .project-modal-image:hover,
    .timeline-sort-button:hover,
    .feed-more-button:hover,
    .project-modal-close:hover,
    #projectDetailModal .modal-close:hover,
    #nomAccueilBienvenue button:hover,
    #nomAccueilBienvenue ul li img:hover,
    #imageProfil:hover,
    progress:hover {
        transform: none;
    }

    .project-card:hover .project-card-overlay {
        display: none;
    }
}
