/* =========================================
   VARIABLES POUR LE SCALE (AJOUT)
   ========================================= */
:root {
    --cv-w: 600px;
    --cv-h: 848.7097px;
    --cv-gap: 10px;
    /* Petite marge de sécurité */

    /* Formule mathématique pour calculer le ratio d'écran */
    --cv-scale: min(1,
            calc((100vw - var(--cv-gap)) / var(--cv-w)),
            calc((100vh - var(--cv-gap)) / var(--cv-h)));
}

/* =========================================
   FIX MOBILE & GLOBAL
   ========================================= */
body,
html {
    height: 100%;
    padding: 0 !important;
    margin: 0;

    /* CRUCIAL : Empêche le téléphone de grossir le texte */
    -webkit-text-size-adjust: 100%;
    -moz-text-size-adjust: 100%;
    text-size-adjust: 100%;
}

.header,
.nav,
.social,
footer {
    display: none;
}

main {
    padding: 10px 0;
    display: flex;
    justify-content: center;
    color: black;
    min-height: 100vh;
    align-items: flex-start;

    /* AJOUT : Important pour couper ce qui dépasse lors du scale */

}

main.light {
    background-color: #c0c0c0 !important;
}

main.dark {
    background-color: #363636 !important;
}

/* =========================================
   TON STYLE ORIGINAL (PRÉSERVÉ)
   ========================================= */
.cv p {
    font-size: 73%;
}

.cv.light p,
.cv.light ul {
    color: black;
}

.cv.dark p,
.cv.dark ul {
    color: white;
}

.cv ul {
    font-size: 70%;
    list-style-position: inside;
}

#cookies-banner {
    display: none !important;
    opacity: 0 !important;
}

.cv {
    background-repeat: no-repeat;
    background-size: cover;

    /* Dimensions fixes (ne pas toucher) */
    width: 600px;
    height: 848.7097px;

    padding: 10px;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    align-items: center;
    border-radius: 5px;
    font-size: 16px;
    line-height: 1.2;

    /* --- MODIFICATION RESPONSIVE --- */
    /* On remplace zoom par transform pour une précision parfaite */
    transform: scale(var(--cv-scale));
    transform-origin: top center;
    /* On ancre le CV en haut au centre */
    flex-shrink: 0;
    /* Empêche le flex parent d'écraser le CV */

    /* Petite compensation de marge en bas si nécessaire */
    margin-bottom: -100px;
}

.cv.light {
    background-image: url('../images/fond_cv.svg');
}

.cv.dark {
    background-image: url('../images/fond_cv_dark.svg');
}

.cv .top {
    display: flex;
    flex-direction: row;
    justify-content: space-between;
    align-items: center;
    gap: 20px;
    width: 100%;
    height: 70%;
}

.cv .top .left {
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    align-items: center;
    width: 35%;
    height: 100%;
}

.cv .top .left .profil {
    width: 100%;
    border-radius: 25px;
    margin-bottom: 20px;
}

.cv .top .left .infos {
    list-style: none;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    align-items: stretch;
    gap: 1%;
    width: 100%;
    height: 100%;
    padding: 3%;
    border-radius: 15px;
}

.cv .top .left .infos> :nth-child(odd) {
    border-radius: 13px;
}

.cv.light .top .left .infos> :nth-child(odd) {
    background-color: #e8e8e8;
}

.cv.dark .top .left .infos> :nth-child(odd) {
    background-color: #3f3f3f;
}

.cv .top .left .infos a {
    height: fit-content;
    width: 100%;
}

.cv.light .top .left .infos a {
    text-decoration: underline black;
}

.cv.dark .top .left .infos a {
    text-decoration: underline white;
}


.cv .top .left .infos li {
    display: flex;
    flex-direction: row;
    align-items: center;
    justify-content: flex-start;
    gap: 6%;
    width: 100%;
    font-size: 150%;
    padding: 4%;
}

.cv .top .left .infos li img {
    width: 11%;
}

.cv .top .right {
    display: flex;
    flex-direction: column;
    justify-content: flex-start;
    align-items: center;
    width: 65%;
    height: 100%;
}

.cv .top .right h1 {
    font-size: 300%;
    display: block;
    text-shadow: none;
    /* Ton style conservé */
    text-align: right;
    height: fit-content;
    width: 100%;
}

.cv .top .right h1 .violet {
    color: #6b48be;
}

.cv .top .right h1 .orange {
    color: #e0752d;
}

.cv .top .right .sous-titre {
    width: 99%;
    text-align: right;
    text-shadow: none;
    /* Ton style conservé */
    margin-bottom: 8%;
    white-space: nowrap;
    display: block;

}

.cv.light .top .right .sous-titre {
    color: black;
}

.cv.dark .top .right .sous-titre {
    color: white;
}


.cv .top .right div.presentation {
    text-align: justify;
    padding: 2.5%;
    border-radius: 15px;
    margin-bottom: 4%;
    
}

.cv .top .right .exp {
    display: flex;
    flex-direction: column;
    justify-content: flex-start;
    align-items: flex-start;
}

.cv .top .right .exp h2 {
    font-size: 80%;
    font-weight: 700;
    width: 100%;
    color: #6b48be;
    text-align: center;
    text-shadow: none;
    /* Ton style conservé */
    margin-bottom: 4%;
}

.cv .top .right .exp ul {
    margin-bottom: 4.5%;
}

.cv .top .right .exp ul a {
    text-decoration: underline;
}

.cv.light .top .right .exp ul a{
    color: black;
}

.cv.dark .top .right .exp ul a{
    color: white;
}

.cv .line {
    width: 100%;
    height: 2px;
    border-radius: 10px;
}

.cv.light .line {
    background-color: #e8e8e8;
}

.cv.dark .line {
    background-color: #3f3f3f;
}


.cv .bottom {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 20px;
    width: 100%;
    height: 23%;
}

.cv .bottom .left {
    width: 35%;
    height: 100%;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: space-between;
}

.cv .bottom h2 {
    font-size: 80%;
    font-weight: 700;
    width: 100%;
    color: #6b48be;
    text-align: center;
    text-shadow: none;
    /* Ton style conservé */
    margin-bottom: 4%;
}

.cv .bottom .left ul {
    display: flex;
    flex-direction: column;
    justify-content: flex-start;
    align-items: flex-start;
    gap: 8%;
    width: 100%;
    height: 60%;
}

.cv .bottom .left .qr-code {
    display: flex;
    justify-content: flex-start;
    align-items: center;
    gap: 4%;
    height: fit-content;
    width: 100%;
    padding: 3% 0 3% 3%;
    border-radius: 15px;
}

.cv .bottom .left .qr-code img {
    width: 15%;
}

.cv .bottom .right {
    width: 65%;
    height: 100%;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: flex-start;
}

.cv .bottom .right .container {
    width: 100%;
    padding: 3%;
    border-radius: 15px;
    display: flex;
    flex-direction: row;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    height: 100%;
}


.cv .bottom .right .container .logiciel {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    width: 25%;
}

.cv .bottom .right .container .logiciel img {
    border-radius: 7px;
    width: 42%;
    margin-bottom:5px;
}


.boutons {
    width: 100%;
    display: flex;
    justify-content: flex-end;
    align-items: center;
    gap: 4%;
    margin-bottom: 2%;
}

.cv .boutons a,
.cv .boutons .theme {
    display: flex;
    justify-content: center;
    align-items: center;
    width: fit-content;
    height: fit-content;
    border-radius: 100px;
    padding: 3px;
    transition: 0.3s ease;
}

.cv.light .boutons a,
.cv.light .boutons .theme {
    background-color: #F7F7F7;
    border: solid white 1px;
    box-shadow: rgba(0, 0, 0, 0.493) 1px 1px 2px;

}

.cv.dark .boutons a,
.cv.dark .boutons .theme {
    background-color: #212121;
    border: solid rgb(0, 0, 0) 1px;
    box-shadow: rgba(255, 255, 255, 0.493) 1px 1px 2px;

}


.cv.light .boutons a:hover,
.cv.light .boutons .theme:hover {
    background-color: #e8e8e8;
    transition: 0.3s ease;
}

.cv.dark .boutons a:hover,
.cv.dark .boutons .theme:hover {
    background-color: #3f3f3f;
}



.theme {
    background: none;
    border: none;
    padding: 0;
    margin: 0;
    box-shadow: none;
    font: inherit;
    color: inherit;
    outline: none;
    cursor: pointer;
}


.boutons img {
    width: 25px;
    height: auto;
}

.cv.dark .boutons .noir {
    display: none;
}

.cv.light .boutons .blanc {
    display: none;
}


/* =========================================
   MEDIA QUERY : NETTOYAGE
   ========================================= */
@media (max-width:850px) {
    .cv p {
        font-size: 73% !important;
    }
}