:root{
    --bg: #f3f3f8;
    --surface: #ffffff;
    --surface-muted: #f9f9fc;
    --text: #171822;
    --text-soft: #474b5f;
    --brand: #4a0ab8;
    --brand-2: #7318d6;
    --accent: #e39a34;
    --line: #e5e6ef;
    --shadow-soft: 0 10px 30px rgba(16, 24, 40, 0.08);
}

*{
    font-family: "Avenir Next", Avenir, "Segoe UI", sans-serif;
    padding: 0;
    margin: 0;
    box-sizing: border-box;
}

body{
    background: radial-gradient(circle at 20% 10%, #f8f3ff, var(--bg) 30%), var(--bg);
    color: var(--text);
}

p{
    font-size: 1em;
    line-height: 1.65;
    color: var(--text-soft);
    text-align: left;
}

a{
    text-decoration: none;
    color: var(--text);
}

header, footer{
    width:100%;
    padding: 20px 0px;
    background: linear-gradient(135deg, var(--brand) 0%, var(--brand-2) 100%);
    box-shadow: 0 12px 30px rgba(32, 7, 86, 0.35);
}

header{
    position: relative;
}

.header-content {
    width: 90%;
    margin: 0 auto;
    text-align: center;
    position: relative;
    padding-top: 6px;
    padding-right: 180px;
}

#cvLangToggle,
.cv-lang-toggle {
    position: absolute !important;
    right: 20px !important;
    top: 14px !important;
    display: inline-block !important;
    line-height: 0;
    padding: 0;
    background: transparent;
    border: 0;
    z-index: 1000;
}

#cvLangToggle img,
.cv-lang-toggle img {
    width: auto !important;
    height: 1.95em !important;
    max-width: none;
    object-fit: contain;
    border-radius: 2px;
    display: block;
    transform: none !important;
}

#cvLangToggle:hover img,
.cv-lang-toggle:hover img {
    transform: none !important;
}

img:hover {
    transform: none;
}

header h1 {
    color: white;
    font-size: 1.95em;
    margin-bottom: 5px;
    letter-spacing: 0.01em;
    text-align: left;
}

.recherche-title {
    color: rgba(255, 255, 255, 0.92);
    font-size: 1em;
    margin-top: 0;
    text-align: left;
}

footer{
    border-top: 1px solid rgba(255, 255, 255, 0.2);
    background: linear-gradient(135deg, #3f079f 0%, #5f15bb 100%);
    box-shadow: 0px 0px 10px rgba(80, 4, 179, 0.4);
}

footer p{
    width: 90%;
    margin: 0 auto;
    color: #fff;
    text-align: center;
}

footer a{
    color: #fff;
}

/* sections */
section{
    display: flex;
    flex-flow: row wrap;
    justify-content: center;
    width: min(1100px, 92%);
    padding: 14px 0 20px 0;
    margin: 22px auto;
    box-shadow: var(--shadow-soft);
    background-color: var(--surface);
    border: 1px solid var(--line);
    border-radius: 18px;
}

section h2{
    margin: 16px 0;
    width: 90%;
    font-size: 2.05em;
    letter-spacing: 0.01em;
    text-align: left;
    position: relative;
    padding-bottom: 8px;
}

section h2::after{
    content: "";
    position: absolute;
    left: 0;
    bottom: 0;
    width: 64px;
    height: 3px;
    border-radius: 999px;
    background: linear-gradient(90deg, var(--accent), transparent);
}

section > div{
    width: 90%;
}

.photo{
    text-align: center;
    width: 96px;
    height: 96px;
    margin: -10px auto 6px auto;
    border: 3px solid #fff;
    border-radius: 50%;
    overflow: hidden;
    box-shadow: 0 10px 26px rgba(12, 20, 33, 0.24);
    background: #fff;
    display: flex;
    align-items: center;
    justify-content: center;
}
.photo img{
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: 50% 50% !important;
    transform: none !important;
    display: block;
    transition: transform 0.25s ease;
}

.photo:hover img{
    transform: scale(1.16) !important;
}

.prez{
    border-bottom: 2px dashed #ccc;
}

.prez a{
    display: block;
    text-align: center;
    padding: 12px;
    margin: 10px auto 30px auto;
    color: #fff;
    background: linear-gradient(135deg, #e59a2d 0%, #cf7f1d 100%);
    box-shadow: 0 8px 22px rgba(206, 127, 29, 0.32);
    border-radius: 10px;
    font-weight: 600;
}

.contact-felx{
    display: flex;
    flex-flow: row wrap;
    align-items: center;
}

.contact-flex p:first-child{
    flex: 0 0 40%;
}

.contact-flex p:last-child{
    flex: 0 0 60%;
}

.social{
    display: flex;
    justify-content: space-around;
    margin: 10px auto 0px auto;
}

.social img{
    width: 40px;
    height: 40px;
    transition: transform 0.2s ease, filter 0.2s ease;
}

.social a:hover img{
    transform: translateY(-3px);
    filter: saturate(1.15);
}

.exp{
    display: flex;
    flex-flow: row wrap;
    border-bottom: 1px solid var(--line);
    align-items: center;
    padding: 12px 0;
}

.exp-info{
    display: flex;
    flex-flow: column wrap;
}

.exp-logo{
    flex: 0 0 25%;
    max-width: 100px;
}

.exp-info{
    flex: 0 0 70%;
    margin-left: auto;
}

.exp img {
    width: 100%;
    height: auto;
}

.exp-logo--stack .logo-stack{
    position: relative;
    width: 100%;
}

.exp-logo--stack .logo-main{
    width: 100%;
    height: auto;
    display: block;
}

.exp-logo--stack .logo-overlay{
    position: absolute;
    right: -10px;
    bottom: 2px;
    width: 64% !important;
    height: auto !important;
    border-radius: 10px;
    box-shadow: 0 8px 18px rgba(14, 18, 30, 0.28);
    background: transparent;
    padding: 0;
}

.exp h3{
    font-size: 1.2em;
    margin-bottom: 3px;
}

.exp h4{
    font-size: 1em;
    font-weight: normal;
    color: #5d6177;
}

.comp{
    display:flex;
    flex-flow: row wrap;
    align-items: center;
    margin-bottom: 10px;
}

.comp p{
    flex: 0 0 40%;
    margin-bottom: 0;
}

.conteneur-barre{
    flex: 0 0 60%;
    border-radius: 999px;
    background-color: #d8dbe7;
    height: 9px;
    position: relative;
    overflow: visible;
}

.barre{
    display: block;
    height: 100%;
    border-top-left-radius: 999px;
    border-bottom-left-radius: 999px;
    position: relative;
}

.barre p{
    position: absolute;
    right: -44px;
    top: 50%;
    transform: translateY(-50%);
    margin: 0;
    font-size: 0.95em;
    font-weight: 600;
    color: var(--text-soft);
    white-space: nowrap;
}

.c85{
    width: 85%;
    background-color: #4B8;
}

.c70{
    width: 70%;
    background-color: #4B8;
}

.c90{
    width: 90%;
    background-color: #4B8;
}

.c95{
    width: 95%;
    background-color: #4B8;
}

.c100{
    width: 100%;
    background-color: #4B8;
    border-radius: 5px;
}

.c15{
    width: 15%;
    background-color: #4B8;
}

.c10{
    width: 10%;
    background-color: #4B8;
}

.c60{
    width: 60%;
    background-color: #4B8;
}

.c75{
    width: 75%;
    background-color: #4B8;
}

.c80{
    width: 80%;
    background-color: #4B8;
}

.c65{
    width: 65%;
    background-color: #4B8;
}

.c30{
    width: 30%;
    background-color: #4B8;
}

.c40{
    width: 40%;
    background-color: #4B8;
}

.c45{
    width: 45%;
    background-color: #4B8;
}

.c55{
    width: 55%;
    background-color: #4B8;
}

.comp2{
    display: flex;
    flex-flow: row wrap;
    justify-content: space-between;
}

.conteneur-barre2{
    flex: 0 0 100%;
    height: 0.6em;
    margin-bottom: 0.25em;
    border-radius: 999px;
    background-color: #d8dbe7;
}

.interet{
    flex: 0 1 50%;
    display: flex;
    flex-flow: column wrap;
    align-items: center;
    margin-bottom: 20px;
}

.interet img{
    width: 80px;
    height: 80px;
    border-radius: 50%;
    box-shadow: 0px 0px 15px #555;
}

/* Le zoom global sur toutes les images a ete retire pour eviter
   d'impacter le drapeau de langue et les autres icones. */

        /*VERSION BUREAU DU CV*/
@media screen and (min-width: 980px){
    section:first-of-type{
        position: relative;
        padding-top: 72px;
    }

    section{
        width: min(1100px, 88%);
        box-shadow: var(--shadow-soft);
    }
    .prez, .contact{
        flex: 0 0 45%;
    }
    .prez{
        border-bottom: none;
        border-right: 2px solid #ccc;
        padding-right: 20px;
        margin-left: auto;
    }
    .contact{
        padding-left: 20px;
        margin-right: auto;
    }
    .prez a{
        border: 2px solid transparent;
    }
    .prez a:hover{
        color: #fff;
        background: #000;
        border: 2px solid #000;
        box-shadow: 0px 0px 20px rgba(0, 0, 0, 0.35);
    }
    .exp-logo{
        flex: 0 0 10%;
    }
    .exp-info, .exp-desc{
        flex: 0 0 85%;
        margin-left: auto;
    }
    .interet{
        flex: 0 1 25%;
    }

    .exp-desc{
        margin-top: auto;
    }

    /* Keep profile photo centered without breaking the 2-column layout */
    section:first-of-type .photo {
        position: absolute;
        top: -40px;
        left: 50%;
        transform: translateX(-50%);
        z-index: 3;
        width: 124px;
        height: 124px;
        margin: 0;
    }

    .info-recherche {
        padding: 8px;
        margin-bottom: 10px;
    }
}

@media (max-width: 600px) {
    header h1 {
        font-size: 1.3em;
    }
    .recherche-title {
        font-size: 0.95em;
    }
}

@media (max-width: 480px) {
  /* HEADER plus compact */
  header {
    padding: 12px 0;
  }

  .header-content {
    width: 95%;
    margin: 0 auto;
    text-align: center;
    padding-top: 0;
    padding-right: 8px;
  }

  #cvLangToggle,
  .cv-lang-toggle {
    right: 10px;
    top: 8px;
    margin-bottom: 0;
  }

  header h1 {
    font-size: 1.1em;
    margin-top: 22px;
    line-height: 1.3;
  }

  .recherche-title {
    font-size: 0.85em;
  }

  /* SECTIONS plus légères */
  section {
    width: 100%;
    margin: 10px auto;
    box-shadow: none;
    padding-bottom: 15px;
  }

  section h2 {
    width: 92%;
    font-size: 1.1em;
  }

  section > div {
    width: 92%;
  }

  /* PHOTO de profil */
  .photo {
    width: 84px;
    height: 84px;
    margin: -22px auto 6px auto;
    text-align: center;
  }

  .photo img {
    width: 100%;
    height: 100%;
    margin-top: 0;
  }

  /* Présentation & contact en pleine largeur (déjà 90%, on laisse) */
  .prez p {
    font-size: 0.95em;
  }

  .prez a {
    font-size: 0.9em;
    padding: 8px;
  }

  /* CONTACT : empiler les infos proprement */
  .contact-flex {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 2px;
  }

  .contact-flex p:first-child,
  .contact-flex p:last-child {
    flex: 0 0 100%;
  }

  .social {
    justify-content: space-between;
    width: 90%;
  }

  .social img {
    width: 32px;
    height: 32px;
  }

  /* EXPERIENCES : logo au-dessus, texte en dessous */
  .exp {
    flex-direction: column;
    align-items: flex-start;
  }

  .exp-logo {
    flex: 0 0 100%;
    max-width: 120px;
    margin-bottom: 8px;
  }

  .exp-logo img {
    width: 100%;
    height: auto;
  }

  .exp-logo--stack .logo-overlay {
    width: 58% !important;
    right: -6px;
    bottom: 0;
  }

  .exp-info {
    flex: 0 0 100%;
    margin-left: 0;
  }

  .exp h3 {
    font-size: 1.05em;
  }

  .exp h4 {
    font-size: 0.9em;
  }

  .exp p {
    font-size: 0.9em;
  }

  /* COMPÉTENCES */
  .comp {
    flex-direction: column;
  }

  .comp p {
    flex: 0 0 100%;
    margin-bottom: 4px;
    font-size: 0.9em;
  }

  .conteneur-barre {
    flex: 0 0 100%;
  }

  .comp2 p {
    font-size: 0.9em;
  }

  /* CENTRES D’INTÉRÊT : 2 par ligne */
  .interet {
    flex: 0 0 50%;
  }

  .interet img {
    width: 70px;
    height: 70px;
  }

  .interet figcaption {
    font-size: 0.85em;
    text-align: center;
  }

  /* IMAGES : éviter que le zoom casse tout sur mobile */
  img {
    max-width: 100%;
    height: auto;
  }

  img:hover {
    transform: none; /* on désactive le zoom au survol sur mobile */
  }
}

/* Responsive overhaul */
@media (max-width: 1024px) {
  .header-content {
    width: 94%;
    padding-right: 110px;
  }

  header h1 {
    font-size: 1.6rem;
    line-height: 1.25;
  }

  .recherche-title {
    font-size: 1rem;
  }

  section {
    width: min(95%, 960px);
    margin: 16px auto;
    padding: 12px 0 16px;
  }

  section h2 {
    font-size: 1.6rem;
  }

  .prez,
  .contact {
    flex: 0 0 100%;
    max-width: none;
    margin: 0 auto;
    padding: 0;
  }

  .prez {
    border-right: 0;
    border-bottom: 1px solid var(--line);
    padding-bottom: 14px;
    margin-bottom: 10px;
  }

  .contact {
    padding-left: 0;
  }

  .photo {
    width: 88px;
    height: 88px;
    margin: -16px auto 8px;
  }

  .exp-logo {
    max-width: 120px;
    flex: 0 0 120px;
  }

  .exp-info {
    flex: 1 1 calc(100% - 140px);
  }
}

@media (max-width: 768px) {
  header {
    padding: 14px 0;
  }

  .header-content {
    width: 94%;
    padding-right: 52px;
  }

  #cvLangToggle,
  .cv-lang-toggle {
    right: 12px !important;
    top: 10px !important;
  }

  #cvLangToggle img,
  .cv-lang-toggle img {
    height: 1.25em !important;
  }

  header h1 {
    font-size: 1.35rem;
    text-align: left;
    margin-right: 8px;
  }

  .recherche-title {
    font-size: 0.95rem;
  }

  section {
    width: 95%;
    border-radius: 14px;
    padding: 10px 0 14px;
  }

  section h2 {
    width: 92%;
    font-size: 1.35rem;
  }

  section > div {
    width: 92%;
  }

  .photo {
    width: 82px;
    height: 82px;
    margin: -10px auto 6px;
  }

  .prez p,
  .contact p,
  .exp p {
    font-size: 0.98rem;
    line-height: 1.55;
  }

  .exp {
    flex-direction: column;
    align-items: flex-start;
    gap: 8px;
  }

  .exp-logo {
    max-width: 120px;
    margin-bottom: 2px;
  }

  .exp-info {
    flex: 0 0 100%;
    margin-left: 0;
  }

  .exp-logo--stack .logo-overlay {
    width: 52% !important;
    right: -6px;
    bottom: 2px;
  }

  .comp {
    display: block;
    margin-bottom: 12px;
  }

  .comp p {
    display: block;
    width: 100%;
    margin-bottom: 6px;
  }

  .conteneur-barre {
    width: calc(100% - 48px);
    margin-right: 48px;
  }

  .barre p {
    right: -44px;
    top: 50%;
    transform: translateY(-50%);
  }

  .social {
    justify-content: flex-start;
    gap: 22px;
    width: 100%;
  }

  .social img {
    width: 34px;
    height: 34px;
  }

  .interet {
    flex: 0 0 50%;
  }
}

@media (max-width: 560px) {
  .header-content {
    padding-right: 44px;
  }

  header h1 {
    font-size: 1.15rem;
  }

  .recherche-title {
    font-size: 0.86rem;
  }

  #cvLangToggle img,
  .cv-lang-toggle img {
    height: 1.05em !important;
  }

  section {
    width: 100%;
    border-radius: 0;
    border-left: 0;
    border-right: 0;
    margin: 10px 0;
    box-shadow: none;
  }

  section h2 {
    font-size: 1.2rem;
  }

  .photo {
    width: 74px;
    height: 74px;
    margin: -6px auto 6px;
  }

  .comp p {
    font-size: 0.92rem;
  }

  .conteneur-barre {
    width: 100%;
    margin-right: 0;
  }

  .barre p {
    position: static;
    display: inline-block;
    margin-left: 8px;
    transform: none;
  }

  .comp2 {
    gap: 4px;
  }

  .interet img {
    width: 66px;
    height: 66px;
  }

  .exp-logo--stack .logo-overlay {
    width: 56% !important;
    right: -8px;
    bottom: 0;
  }
}

/* Final layout fix for experience/education rows */
.exp {
  display: grid;
  grid-template-columns: minmax(74px, 110px) 1fr;
  column-gap: 16px;
  row-gap: 8px;
  align-items: start;
}

.exp-logo {
  max-width: none;
  width: 100%;
  margin: 0;
}

.exp-logo img {
  width: 100%;
  max-width: 100%;
  height: auto;
  object-fit: contain;
}

.exp-info {
  min-width: 0;
  width: 100%;
}

.exp h3,
.exp h4,
.exp p {
  max-width: 100%;
  overflow-wrap: anywhere;
}

.exp h3 {
  font-size: 1.05rem;
  line-height: 1.3;
}

.exp h4 {
  font-size: 0.98rem;
  line-height: 1.35;
}

.exp.exp--mobile-side {
  grid-template-rows: auto auto;
}

.exp.exp--mobile-side .exp-logo {
  grid-column: 1;
  grid-row: 1 / span 2;
}

.exp.exp--mobile-side .exp-info {
  grid-column: 2;
  grid-row: 1;
}

.exp.exp--mobile-side > p {
  grid-column: 2;
  grid-row: 2;
  margin-top: 4px;
}

#cv-degree1-name,
#cv-degree1-date,
#cv-degree2-name,
#cv-degree2-date {
  position: relative;
  top: 36px;
}

@media (max-width: 768px) {
  .exp {
    grid-template-columns: 1fr;
  }

  .exp-logo {
    width: 96px;
    max-width: 96px;
    margin-bottom: 4px;
  }

  .exp h3 {
    font-size: 1rem;
  }

  .exp h4 {
    font-size: 0.92rem;
  }
}

/* About section alignment + larger profile photo */
section:first-of-type .prez {
  padding-left: 28px;
  padding-right: 28px;
}

section:first-of-type .prez h2 {
  text-align: center;
}

section:first-of-type .prez h2::after {
  left: 50%;
  transform: translateX(-50%);
}

section:first-of-type .prez p {
  max-width: 720px;
  margin: 0 auto;
}

section:first-of-type .prez #cv-download {
  max-width: 720px;
  margin: 14px auto 30px;
}

section:first-of-type .contact {
  padding-left: 28px;
  padding-right: 28px;
}

section:first-of-type .photo {
  width: 124px;
  height: 124px;
  margin: 6px auto 10px;
}

@media (max-width: 1024px) {
  section:first-of-type .prez {
    padding-left: 22px;
    padding-right: 22px;
  }

  section:first-of-type .contact {
    padding-left: 22px;
    padding-right: 22px;
  }

  section:first-of-type .photo {
    width: 120px;
    height: 120px;
    margin: 2px auto 10px;
  }
}

@media (max-width: 768px) {
  section:first-of-type .prez {
    padding-left: 16px;
    padding-right: 16px;
  }

  section:first-of-type .contact {
    padding-left: 16px;
    padding-right: 16px;
  }

  section:first-of-type .photo {
    width: 106px;
    height: 106px;
    margin: 0 auto 8px;
  }
}

@media (max-width: 560px) {
  section:first-of-type .photo {
    width: 92px;
    height: 92px;
    margin: 0 auto 8px;
  }
}

/* Skills spacing: keep a clearer gap between label and progress bar */
#cv-skills-title + .comp,
#cv-skills-title ~ .comp {
  margin-bottom: 16px;
}

#cv-skills-title + .comp p,
#cv-skills-title ~ .comp p {
  margin-bottom: 8px;
}

#cv-skills-title + .comp .conteneur-barre,
#cv-skills-title ~ .comp .conteneur-barre {
  margin-top: 6px;
}

@media (max-width: 768px) {
  #cv-skills-title + .comp,
  #cv-skills-title ~ .comp {
    margin-bottom: 14px;
  }

  #cv-skills-title + .comp p,
  #cv-skills-title ~ .comp p {
    margin-bottom: 6px;
  }
}

/* Skills percentages: place values outside the progress track */
#cv-skills-title + .comp,
#cv-skills-title ~ .comp {
  display: grid;
  grid-template-columns: 1fr auto;
  column-gap: 12px;
  row-gap: 8px;
  align-items: end;
}

#cv-skills-title + .comp > p,
#cv-skills-title ~ .comp > p {
  grid-column: 1 / -1;
  margin-bottom: 0;
}

#cv-skills-title + .comp .conteneur-barre,
#cv-skills-title ~ .comp .conteneur-barre {
  grid-column: 1;
  margin-top: 0;
}

#cv-skills-title + .comp .skill-pct,
#cv-skills-title ~ .comp .skill-pct {
  grid-column: 2;
  align-self: center;
  justify-self: start;
  margin: 0;
  font-size: 0.92em;
  line-height: 1;
  color: var(--text-soft);
  font-weight: 600;
}

@media (max-width: 560px) {
  #cv-skills-title + .comp .skill-pct,
  #cv-skills-title ~ .comp .skill-pct {
    font-size: 0.86em;
  }
}

@media (max-width: 768px) {
  .exp.exp--mobile-side {
    grid-template-columns: 86px 1fr;
    column-gap: 12px;
    align-items: start;
    row-gap: 6px;
  }

  .exp.exp--mobile-side .exp-logo {
    grid-column: 1;
    grid-row: 1;
    width: 86px;
    max-width: 86px;
    margin: 0;
  }

  .exp.exp--mobile-side .exp-info {
    grid-column: 2;
    grid-row: 1;
    margin: 0;
    margin-right: 8px;
  }

  .exp.exp--mobile-side > p {
    grid-column: 1 / -1;
    grid-row: 2;
    margin-top: 8px;
    margin-right: 8px;
  }

  #cv-degree1-name,
  #cv-degree1-date,
  #cv-degree2-name,
  #cv-degree2-date {
    top: 26px;
  }
}
