/* style.css */

:root{
  --bg: #ffffff;
  --muted: #6b7280;
  --text: #0f172a;
  --accent: #8e8e93; 
  --card: rgba(255, 255, 255, 0.7); 
  --glass: rgba(255,255,255,0.8); 
  --shadow: 0 10px 30px rgba(15,23,42,0.08); 
  --radius: 14px;
  --container-width: 1100px;
}

/* Mode Sombre */
body.theme-dark {
  --bg: #1e1e1e;
  --text: #f0f0f0; 
  --muted: #a0a0a0;
  --accent: #bbbbbb;
  --card: rgba(44, 44, 44, 0.7);
  --glass: rgba(44,44,44,0.6);
  --shadow: 0 10px 30px rgba(0,0,0,0.5);
}


body.theme-dark .site-header {
  background:linear-gradient(180deg, rgba(30,30,30,0.9), rgba(30,30,30,0.8));
  border-bottom:1px solid rgba(240,240,240,0.08);
}
body.theme-dark .card {
  background: var(--card);
}
body.theme-dark .skill .bar > i{
  background: linear-gradient(90deg, #bbbbbb, #a0a0a0);
}
body.theme-dark .timeline{
  border-left:2px solid rgba(240,240,240,0.06);
}
body.theme-dark .testimonial{
  background:linear-gradient(180deg,#2c2c2c,#3a3a3a);
}
body.theme-dark .input, body.theme-dark textarea{
  background: rgba(58, 58, 58, 0.6); 
  border: 1px solid rgba(240,240,240,0.1);
  color: var(--text);
  backdrop-filter: blur(8px);
}
body.theme-dark .site-footer{
    border-top:1px solid rgba(240,240,240,0.04);
}
body.theme-dark .social svg{
    fill: var(--muted);
}

body.theme-dark .btn{
  background: linear-gradient(var(--bg), var(--bg)) padding-box,
              linear-gradient(90deg, 
                #ff0080, #ff4d00, #ffaa00, #00ff88, #00d4ff, #0088ff, #8800ff, #ff0080 
              ) border-box;
  background-size: 100% 100%, 400% 100%; 
  color: var(--text);
}


*{box-sizing:border-box}
html,body{height:100%}
body{
  margin:0;
  font-family:'Inter',system-ui,-apple-system,Segoe UI,Roboto,"Helvetica Neue",Arial;
  color:var(--text);
  background:var(--bg);
  -webkit-font-smoothing:antialiased;
  -moz-osx-font-smoothing:grayscale;
  line-height:1.45;
  -webkit-tap-highlight-color: transparent;
}

.container{
  max-width:var(--container-width);
  margin:0 auto;
  padding:0 28px;
}

.site-header{
  position:fixed;
  top:0;
  left:0;
  right:0;
  backdrop-filter: blur(12px) saturate(180%); 
  background:linear-gradient(180deg, rgba(255,255,255,0.9), rgba(255,255,255,0.8));
  border-bottom:1px solid rgba(15,23,42,0.08);
  z-index:1000;
  height:60px;
  transform: translateZ(0);
  will-change: transform; 
}

.header-inner{
  max-width:var(--container-width);
  margin:0 auto;
  padding:0 28px;
  height:100%;
  display:flex;
  align-items:center;
  justify-content:space-between;
  transform: translateZ(0);
}

.nav-list{
  display:flex;
  gap:8px;
  list-style:none;
  margin:0;
  padding:0;
  align-items:center;
  flex-shrink:0;
  transform: translateZ(0);
}

.nav-list li{
  transform: translateZ(0);
}

.nav-list a{
  color:var(--muted);
  text-decoration:none;
  font-weight:400; 
  font-size:14px;
  padding:8px 14px;
  border-radius:8px;
  white-space: nowrap;
  
  font-feature-settings: "liga" 0;
  font-variation-settings: 'wght' 400;
  
  display: inline-block; 
  position: relative; 
  will-change: transform, font-weight; 
  transform: translateZ(0); 
  backface-visibility: hidden; 
}

.nav-list a:hover{
  background: linear-gradient(90deg, 
    #ff0080,
    #ff4d00,
    #ffaa00,
    #00ff88,
    #00d4ff,
    #0088ff,
    #8800ff,
    #ff0080
  );
  background-size: 400% 100%;
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  animation: rgb-cycle 3s linear infinite;
  color: transparent; 
  
  font-weight: 400; 
  font-variation-settings: 'wght' 400;
}

.nav-list a.active{
  background: linear-gradient(90deg, 
    #ff0080,
    #ff4d00,
    #ffaa00,
    #00ff88,
    #00d4ff,
    #0088ff,
    #8800ff,
    #ff0080
  );
  background-size: 400% 100%;
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  animation: rgb-cycle 3s linear infinite;
  
  font-weight: 600;
  font-variation-settings: 'wght' 600;
  
  background-color: transparent; 
  color: transparent; 
}

.header-controls {
  display: flex;
  align-items: center;
  gap: 8px; 
}

.theme-toggle{
  background:none;
  border:0;
  padding:8px;
  border-radius:10px;
  cursor:pointer;
  color:var(--text);
  transition: transform 0.2s ease, color 0.2s ease;
}

.theme-toggle:hover {
  color: var(--accent);
  transform: scale(1.05);
}

/* --- STYLES DES BOUTONS DE LANGUE (FR/EN) --- */

.lang-button {
  height: 32px;
  padding: 0 8px;
  border-radius: 10px;
  cursor: pointer;
  font-size: 14px;
  font-weight: 600;
  line-height: 32px;
  flex-shrink: 0;
  transition: transform 0.2s ease, opacity 0.3s ease, box-shadow 0.3s ease, background 0.2s ease, border 0.2s ease;

  border: 1px solid transparent; 
  background: var(--bg);
  color: var(--text);
  opacity: 0.8;
}

.lang-button:hover {
  transform: translateY(-1px);
  box-shadow: 0 4px 8px rgba(15, 23, 42, 0.05);
  opacity: 1;
}


.lang-fr.active {
  opacity: 1;
  color: var(--text);
  border: 1px solid transparent; 
  
  background-image: linear-gradient(var(--bg), var(--bg)), 
                    linear-gradient(90deg, 
                      #0059b3 0%, #0059b3 33.3%, 
                      #ffffff 33.3%, #ffffff 66.6%, 
                      #cc0000 66.6%, #cc0000 100%
                    );
  background-origin: border-box;
  background-clip: padding-box, border-box;
}

body.theme-dark .lang-fr.active {
  background-image: linear-gradient(var(--bg), var(--bg)), 
                    linear-gradient(90deg, 
                      #007aff 0%, #007aff 33.3%, 
                      #f0f0f0 33.3%, #f0f0f0 66.6%, 
                      #ff4040 66.6%, #ff4040 100% 
                    );
}

.lang-en.active {
  opacity: 1;
  border: 1px solid var(--text); 
  background: var(--bg);
  color: var(--text);
  box-shadow: none; 
}
body.theme-dark .lang-en.active {
  border: 1px solid var(--text); 
  background: var(--bg);
  color: var(--text);
}

.skill-tag {
  display: inline-block;
  padding: 4px 8px;
  font-size: 13px;
  font-weight: 500;
  border-radius: 6px;
  margin-bottom: 4px;
  
  background: var(--bg); 
  color: var(--text);
  border: 1px solid rgba(15, 23, 42, 0.1); 
  
  position: relative;
  z-index: 1;
  transition: transform 0.3s ease, box-shadow 0.3s ease;

  background-image: linear-gradient(var(--bg), var(--bg)),
                    linear-gradient(90deg, transparent, transparent);
  background-origin: border-box;
  background-clip: padding-box, border-box;
  background-size: 100% 100%, 400% 100%;
  border-width: 1px;
}

.skill-tag:hover {
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(15, 23, 42, 0.1);

  border-color: transparent;
  background-image: linear-gradient(var(--bg), var(--bg)), 
                    linear-gradient(90deg, 
                      #ff0080, #ff4d00, #ffaa00, #00ff88, #00d4ff, #0088ff, #8800ff, #ff0080 
                    );
  background-origin: border-box;
  background-clip: padding-box, border-box;
  animation: btn-gradient 6s linear infinite;
}

.timeline-item {
  position: relative;
}

.timeline-item.timeline-bullet::before {
  content: '';
  position: absolute;
  left: -22px; 
  top: 8px; 
  width: 8px;
  height: 8px;
  background: var(--text);
  border-radius: 50%;
  z-index: 2;
  box-shadow: 0 0 0 3px var(--bg);
}

body.theme-dark .timeline-item.timeline-bullet::before {
  background: var(--text);
  box-shadow: 0 0 0 3px var(--bg);
}

.theme-toggle svg {
    width: 20px;
    height: 20px;
    display: block; 
    flex-shrink: 0;
}

/* Mobile toggle */
.mobile-toggle{
  display:none;
  background:none;
  border:0;
  padding:8px;
  border-radius:10px;
  color:var(--text); 
}

.main-content{
  max-width: var(--container-width);
  margin: 0 auto;
  padding: 90px 28px 80px 28px;
  min-height:70vh;
  transition: opacity 0.3s cubic-bezier(0.25, 0.46, 0.45, 0.94);
}

.section{
  background:transparent;
  margin:18px 0;
  padding: 0 0 24px 0;
  border-radius:12px;
  position:relative;
}

.h1 {
  font-size:34px;
  margin:0 0 8px 0;
  font-weight:700;
  text-align: left;
  color: var(--text);
}

.section .h2,
.h2{
  font-size:20px;
  margin:0 0 12px 0;
  font-weight:700;
  color:var(--text);
  letter-spacing: 0.5px;
  text-align: left;
}

.card h3,
.card .h3,
h3, .h3{
  font-size:18px;
  margin:0 0 8px 0;
  font-weight:600;
  color:var(--text);
}

@keyframes rgb-cycle {
  0% { 
    background-position: 0% 50%;
  }
  100% { 
    background-position: 400% 50%;
  }
}

.card{
  background: var(--card); 
  backdrop-filter: blur(12px);
  border-radius:14px;
  box-shadow:var(--shadow);

  transition: transform 0.3s cubic-bezier(0.25, 0.46, 0.45, 0.94), box-shadow 0.3s ease; 
  padding: 18px 20px;
  position: relative; 
  
  border: 1px solid rgba(142, 142, 147, 0.3);
}

.card:hover{
  transform:translateY(-6px);
  box-shadow: 0 12px 40px rgba(15,23,42,0.12);
  background: var(--card); 
  border: 1px solid rgba(142, 142, 147, 0.3);
  animation: none;
}

.card.engagement:hover,
.card.engagement.open {
  border: 2px solid transparent;
  background: linear-gradient(var(--bg), var(--bg)) padding-box,
              linear-gradient(90deg, #ff0080, #ff4d00, #ffaa00, #00ff88, #00d4ff, #0088ff, #8800ff, #ff0080) border-box;
  background-size: 100% 100%, 400% 100%;
  animation: btn-gradient 6s linear infinite;
  transform: translateY(-4px);
}

.muted{color:var(--muted); font-size:14px}

.hero{
  display:flex;
  gap:36px;
  align-items:center;
  justify-content:space-between;
  padding:36px;
  background: transparent;
  border-radius:18px;
  box-shadow: none;
  border: none;
}

.hero-right {
  width: 280px; 
  height: 380px;
  
  flex-shrink: 0;
  border-radius: 24px;
  box-shadow: var(--shadow);
  overflow: hidden;
  position: relative;

  display: flex;
  justify-content: center;
  align-items: center;
  background: var(--card); 
}

.hero-image {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  position: static; 
  transform: none;
  border-radius: 0;
  box-shadow: none;
}

@media (max-width:900px){

  .hero-right {
    width: 100%;
    height: auto; 
    order: -1; 
    margin-bottom: 24px;

    box-shadow: none;
    border-radius: 0;
    background: transparent;
    overflow: visible;
  }
  
  .hero-image {
    width: 70%;
    max-width: 280px; 
    height: auto;
    margin: 0 auto; 
    display: block;

    border-radius: 24px;
    box-shadow: var(--shadow);
  }
}

.hero-left{flex:1;min-width:0}
.hero-title{
  font-size:28px;
  font-weight:700;
  margin-bottom:8px;
  color: var(--text);
}
.hero-sub{color:var(--muted);margin-bottom:18px}
.cta-row{display:flex; gap:12px; align-items:center}

.btn{
  display:inline-flex;
  align-items:center;
  gap:10px;
  padding:12px 24px;
  border-radius:12px;
  border:2px solid transparent;
  font-weight:600;
  text-decoration:none;
  cursor:pointer;

  background: linear-gradient(var(--bg), var(--bg)) padding-box, 
              linear-gradient(90deg, 
                #ff0080,    /* Rose magenta */
                #ff4d00,    /* Orange rouge */
                #ffaa00,    /* Orange jaune */
                #00ff88,    /* Vert menthe */
                #00d4ff,    /* Cyan */
                #0088ff,    /* Bleu */
                #8800ff,    /* Violet */
                #ff0080     /* Retour au rose pour boucle */
              ) border-box;
  background-size: 100% 100%, 400% 100%;
  color: var(--text);
  position: relative;
  transition: transform 0.3s ease;
  animation: btn-gradient 6s linear infinite;
  will-change: background-position;
}

.btn:hover {
  transform: translateY(-2px);
}

@keyframes btn-gradient {
  0% { 
    background-position: 0% 50%, 0% 50%; 
  }
  100% { 
    background-position: 0% 50%, 400% 50%; 
  }
}

.btn-primary, .btn-ghost {
}

.grid{
  display:grid;
  grid-template-columns:repeat(auto-fit,minmax(240px,1fr));
  gap:18px;
  margin-top:18px;
}

.timeline{border-left:2px solid rgba(15,23,42,0.06);padding-left:18px}
.timeline-item{margin-bottom:18px;padding-left:8px}
.timeline-item .muted{font-size:13px}

.skill{
  display:flex;align-items:center;gap:12px;margin-bottom:12px;
}
.skill .label{width:160px;font-weight:600}
.skill .bar{
  flex:1;
  background:rgba(15,23,42,0.06);
  height:12px;
  border-radius:999px;
  position:relative;
  overflow: hidden;
}
.skill .bar > i{
  position:absolute;
  left:0;
  top:0;
  bottom:0;
  border-radius:999px;
  background: linear-gradient(90deg, #8e8e93, #6b7280);
  width:0%;
}

.testimonial{
  padding:18px 20px;
  border-radius:12px;
  background:linear-gradient(180deg,#fff,#fbfbfe);
  box-shadow:var(--shadow)
}
.testimonial .quote{font-style:italic;color:var(--muted)}

.contact-form{display:grid;gap:12px;max-width:680px}
.input, textarea{
  padding:12px;
  border-radius:12px;
  border:1px solid rgba(15,23,42,0.1);
  font-size:15px;
  width:100%;
  outline:none;
  
  background: rgba(255, 255, 255, 0.6);
  backdrop-filter: blur(8px); 
  transition: all 0.3s ease;
}

.input:focus, textarea:focus{
  border-color: #007aff; 
  box-shadow: 0 0 0 3px rgba(0, 122, 255, 0.2);
}

textarea{min-height:140px;resize:vertical}
.form-row{display:flex;gap:12px}

.site-footer{border-top:1px solid rgba(15,23,42,0.04);padding:22px 0;background:transparent}
.footer-inner{
  display:flex;
  justify-content:space-between;
  align-items:center;
  gap:12px;
  max-width: var(--container-width);
  margin: 0 auto;
  padding: 0 28px;
}
.socials{display:flex;gap:12px}

.socials-icon {
  width: 24px;
  height: 24px;
}
.social svg{
  width: 24px;
  height: 24px;
  fill:var(--muted);
}

.page-loader{
  position:fixed;inset:0;pointer-events:none;opacity:0;transition:opacity .28s ease;background:linear-gradient(90deg, rgba(142, 142, 147, 0.06), rgba(255,255,255,0));
}
.page-loader.active{opacity:1;pointer-events:auto}

a{color:var(--accent)}
small{color:var(--muted)}

.cv-top-btn-mobile {
  display: none; 
}

@media (max-width:900px){
  .nav-list{display:none} 

  .mobile-toggle{display:block}
  
  .main-content {
    padding: 90px 18px 80px 18px; 
  }
  
  .container {
    padding: 0; 
  }
  
  .header-inner {
    padding: 0 18px;
  }
  
  .hero{
    flex-direction:column;
    align-items:flex-start;
    padding: 18px; 
  }
  
  .hero-right {
    width: 100%;
    order: -1; 
    margin-bottom: 18px;
    height: auto; 
    justify-content: center; 
  }
  
  .hero-image {
    width: 80%; 
    max-width: 240px; 
    height: auto;
    transform: none; 
    margin: 0 auto; 
  }

  .site-footer .footer-inner {
    flex-direction: column;
    align-items: flex-start;
    padding: 0 18px;
    justify-content: space-between;
  }
  .site-footer .socials {
    margin-top: 8px;
  }
  
  .main-content .grid {
    grid-template-columns: 1fr !important;
    padding: 0 18px; 
    width: auto; 
  }

  .cta-row.mobile-stack {
    flex-direction: column;
    width: 100%;
  }
  
  .cta-row.mobile-stack .btn {
    width: 100%; 
    margin-bottom: 8px; 
    justify-content: center; 
  }

  .cta-row.mobile-stack .mobile-full-width {
    width: 100%;
    margin-top: 0; 
  }

  .nav-list.open {
    display: flex;
    position: fixed;
    top: 60px;
    left: 0;
    right: 0;
    flex-direction: column;
    background: var(--bg);
    border-top: 1px solid rgba(15,23,42,0.08);
    box-shadow: var(--shadow);
    padding: 10px 0 20px 0;
    max-height: calc(100vh - 60px);
    overflow-y: auto;
    z-index: 999;
  }
  
  .nav-list li {
    width: 100%;
  }
  
  .nav-list a {
    display: block;
    padding: 14px 28px;
    border-radius: 0; 
    text-align: left;
    font-size: 16px;
    font-weight: 500;
  }

  .nav-list a:hover {
    background: transparent !important;
    color: var(--text);
    animation: none;
  }
  
  .nav-list a.active {
    background: var(--card);
    -webkit-text-fill-color: var(--text);
    color: var(--text);
    animation: none;
    font-weight: 600;
  }
  
  .cv-top-btn-mobile {
    display: block; 
    margin-bottom: 18px; 
    padding: 0 18px; 
  }
  .cv-top-btn-mobile .btn {
    width: 100%;
    justify-content: center;
  }

  aside .download-cv-box {
    display: none;
  }

  .footer-inner{flex-direction:column;align-items:flex-start}
}

@keyframes rgb-scroll-loop {
  0% {
    background-position: 0% 50%, 0% 50%; 
  }
  100% {
    background-position: 0% 50%, 200% 50%;
  }
}

.rgb-highlight {
  border: 2px solid transparent !important;

  background-image: linear-gradient(var(--bg), var(--bg)), 
                    linear-gradient(90deg, #ff0080, #ff4d00, #ffaa00, #00ff88, #00d4ff, #0088ff, #8800ff, #ff0080) !important;

  background-size: 100% 100%, 200% 100% !important;

  background-clip: padding-box, border-box !important;
  background-origin: padding-box, border-box !important;

  animation: rgb-scroll-loop 3s linear infinite !important;
  
  box-shadow: 0 8px 20px rgba(15, 23, 42, 0.15) !important;
}