/* ============================
   Sidebar base
============================ */
.sidebar{
  width: 380px;
  background: #F8F9FA;
  padding: 32px;
  height: 100%;
  flex-shrink: 0;

  overflow-y: auto;
  overflow-x: hidden;
}

/* scrollbar fine */
.sidebar::-webkit-scrollbar{ width: 6px; }
.sidebar::-webkit-scrollbar-track{ background: transparent; }
.sidebar::-webkit-scrollbar-thumb{ background: #cbd5e1; border-radius: 3px; }
.sidebar::-webkit-scrollbar-thumb:hover{ background: #94a3b8; }


/* ============================
   Profile header
============================ */
.profile-pic{
  width: 128px;
  height: 128px;
  border-radius: 50%;
  border: 4px solid #fff;
  box-shadow: 0 4px 6px rgba(0,0,0,.10);
  background: linear-gradient(135deg, #60a5fa 0%, #1A4587 100%);
  display: flex;
  align-items: center;
  justify-content: center;
  color: #fff;
  font-size: 48px;
  font-weight: 700;
  margin-bottom: 24px;
}

.name{
  font-size: 28px;
  font-weight: 700;
  color: #1a1a1a;
  margin-bottom: 8px;
}

.title{
  color: #4a5568;
  margin-bottom: 4px;
}

.location{
  color: #9ca3af;
  font-size: 14px;
  margin-bottom: 10px;
}


/* ============================
   KPI line (inline, no card)
============================ */
.sidebar-kpis{
  margin: 6px 0 18px 0;
  font-size: 13px;
  line-height: 1.6;

  display: flex;
  flex-wrap: wrap;
  align-items: center;

  /* fallback color */
  color: #1A4587;
}

.kpi-text{
  font-weight: 400; /* pas gras */
  display: inline-block;
}

.kpi-separator{
  margin: 0 8px;
  color: #d1d5db;
}

/* dégradé + reflet qui traverse en continu (style vidéo) */
.kpi-sweep{
  position: relative;
  display: inline-block;

  color: transparent;
  -webkit-background-clip: text;
  background-clip: text;

  background-image:
    /* base gradient bleu */
    linear-gradient(90deg,
      #1A4587 0%,
      #2563eb 35%,
      #60a5fa 55%,
      #1A4587 100%
    ),
    /* bande "shine" */
    linear-gradient(110deg,
      rgba(255,255,255,0) 0%,
      rgba(255,255,255,0) 42%,
      rgba(255,255,255,.95) 50%,
      rgba(255,255,255,0) 58%,
      rgba(255,255,255,0) 100%
    );

  background-size: 140% 100%, 260% 100%;
  background-position: 0% 50%, -160% 50%;
  background-repeat: no-repeat;
  background-blend-mode: screen;

  animation:
    kpiShine 2.3s linear infinite,
    kpiBreath 7.5s ease-in-out infinite;
}

.kpi-sweep.delay-1{ animation-delay: .35s, 0s; }
.kpi-sweep.delay-2{ animation-delay: .70s, 0s; }

@keyframes kpiShine{
  0%   { background-position: 0% 50%, -160% 50%; }
  100% { background-position: 0% 50%,  160% 50%; }
}

@keyframes kpiBreath{
  0%,100% { background-size: 140% 100%, 260% 100%; }
  50%     { background-size: 180% 100%, 260% 100%; }
}

@media (prefers-reduced-motion: reduce){
  .kpi-sweep{
    animation: none;
    background-position: 0% 50%, 0% 50%;
  }
}


/* ============================
   Social
============================ */
.social-icons{
  display: flex;
  gap: 12px;
  align-items: center;
  margin-bottom: 26px;
}

.social-icons svg{
  width: 20px;
  height: 20px;
  color: #666;
  cursor: pointer;
  transition: color .2s;
}
.social-icons svg:hover{ color: #3b82f6; }

.email-btn{
  padding: 6px 12px;
  border: 1px solid #9ca3af;
  border-radius: 20px;
  font-size: 12px;
  color: #666;
  background: transparent;
  cursor: pointer;
  margin-left: 8px;
}
.email-btn:hover{ background: #e5e7eb; }


/* ============================
   About
============================ */
.about-text{
  color: #4a5568;
  font-size: 14px;
  line-height: 1.6;
  margin-bottom: 26px;
}


/* ============================
   Certifications
============================ */
.certifs{
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 26px;
}

.certif-badge{
  padding: 8px 12px;
  background: #1A4587;
  color: #dbeafe;
  border-radius: 20px;
  font-size: 14px;
  font-weight: 500;
}


/* ============================
   Skills
============================ */
.skills{
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 22px;
}

.skill-badge{
  padding: 6px 10px;
  background: #dbeafe;
  color: #1A4587;
  border-radius: 20px;
  font-size: 12.5px; /* légèrement réduit */
  font-weight: 500;
}

/* mini-titre discret */
.skills-label{
  font-size: 12px;
  font-weight: 600;
  color: #6b7280;
  margin-bottom: 6px;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}


/* ============================
   Photo path (CSS is in /styles/)
   -> image is in /images/
============================ */
:root{  
  --profile-photo-url: url("../images/Profil.png");
}


/* ============================
   Premium 3D Coin Avatar (DA ↔ Photo)
============================ */
.profile-pic,
.mobile-topbar-avatar{
  perspective: 1100px;
  transform-style: preserve-3d;
  overflow: hidden;
  position: relative;
}

.avatar-coin{
  width: 100%;
  height: 100%;
  position: relative;
  transform-style: preserve-3d;

  /* 3s DA + 3s photo = 6s */
  animation: coinSpinTimed 6s infinite cubic-bezier(.4,0,.2,1);
  will-change: transform;
}

/* pause hover */
.profile-pic:hover .avatar-coin,
.mobile-topbar-avatar:hover .avatar-coin{
  animation-play-state: paused;
}

/* pause via JS */
.avatar-coin.paused{ animation-play-state: paused; }

.avatar-face{
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;

  backface-visibility: hidden;
  -webkit-backface-visibility: hidden;
  border-radius: inherit;
  overflow: hidden;
}

/* front DA */
.avatar-face.front{
  color: #fff;
  font-weight: 900;
  letter-spacing: .02em;
  text-shadow: 0 2px 10px rgba(0,0,0,.25);
}

/* back photo */
.avatar-face.back{
  transform: rotateY(180deg);
  background-image: var(--profile-photo-url);
  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;
}

/* gloss sweep synced with 6s */
.avatar-face::after{
  content: "";
  position: absolute;
  inset: -40%;
  background: linear-gradient(
    120deg,
    rgba(255,255,255,0) 35%,
    rgba(255,255,255,.35) 45%,
    rgba(255,255,255,0) 55%
  );
  transform: translateX(-55%) rotate(10deg);
  opacity: .50;
  pointer-events: none;
  mix-blend-mode: screen;
  animation: glossTimed 6s infinite ease-in-out;
}

/* edge highlight */
.avatar-face::before{
  content:"";
  position:absolute;
  inset:0;
  border-radius: inherit;
  box-shadow:
    inset 0 0 0 1px rgba(255,255,255,.25),
    inset 0 10px 25px rgba(255,255,255,.10),
    inset 0 -10px 25px rgba(0,0,0,.12);
  pointer-events:none;
}

/* shadow under coin */
.profile-pic::after,
.mobile-topbar-avatar::after{
  content:"";
  position:absolute;
  left: 10%;
  right: 10%;
  bottom: -10%;
  height: 35%;
  border-radius: 999px;
  background: radial-gradient(closest-side, rgba(0,0,0,.22), rgba(0,0,0,0));
  filter: blur(6px);
  opacity: .55;
  transform: translateZ(-1px);
  transition: opacity .2s ease;
  pointer-events:none;
}

.profile-pic:hover::after,
.mobile-topbar-avatar:hover::after{
  opacity: .75;
}

/* timing: 3s front, spin, 3s back, spin back */
@keyframes coinSpinTimed{
  0%   { transform: rotateX(10deg) rotateY(0deg); }
  40%  { transform: rotateX(10deg) rotateY(0deg); }
  50%  { transform: rotateX(10deg) rotateY(180deg); }
  90%  { transform: rotateX(10deg) rotateY(180deg); }
  100% { transform: rotateX(10deg) rotateY(360deg); }
}

@keyframes glossTimed{
  0%, 40%   { transform: translateX(-55%) rotate(10deg); }
  50%       { transform: translateX(10%) rotate(10deg); }
  90%       { transform: translateX(10%) rotate(10deg); }
  100%      { transform: translateX(55%) rotate(10deg); }
}

@media (max-width: 1024px){
  .avatar-face::after{ opacity: .45; }
}


/* ============================
   Mobile: sidebar visible as FIRST section inside content
============================ */
@media (max-width: 1024px){
  /* cache la colonne #sidebar (à gauche) */
  #sidebar{ display: none !important; }

  /* sidebar déplacée dans le content */
  .sidebar{
    position: static !important;
    transform: none !important;

    width: 100% !important;
    height: auto !important;

    overflow: visible !important;

    padding: 20px;
    border-radius: 16px;
    margin-bottom: 16px;

    border: 1px solid #e5e7eb;
    box-shadow: 0 6px 14px rgba(0,0,0,.08);
    background: #F8F9FA;
  }

  .profile-pic{
    width: 84px;
    height: 84px;
    font-size: 34px;
    margin-bottom: 14px;
  }

  .name{ font-size: 22px; }
}

/* ============================
   Certifications premium (bleu identité)
============================ */

.certifs{
  display: flex;
  flex-direction: column;
  gap: 12px;
  margin-bottom: 26px;
}

.certif-item{
  display: flex;
  align-items: center;
  gap: 12px;

  padding: 10px 14px;

  background: #1A4587;
  border-radius: 28px;   /* bien arrondi */

  transition: 0.25s ease;
}

.certif-item:hover{
  transform: translateX(4px);
  box-shadow: 0 6px 18px rgba(26, 69, 135, 0.35);
}

/* cercle logo */
.certif-logo{
  width: 30px;
  height: 30px;
  border-radius: 50%;

  background: white;
  background-size: 65%;
  background-position: center;
  background-repeat: no-repeat;

  flex-shrink: 0;
}

/* texte */
.certif-text{
  font-size: 14px;
  color: #dbeafe;
  font-weight: 500;
  line-height: 1.4;
}


/* Microsoft Fabric */
.certif-logo.fabric{
  background-image: url("../images/certifs/fabric.png");
}

/* Power BI */
.certif-logo.powerbi{
  background-image: url("../images/certifs/powerbi.png");
}

/* Azure */
.certif-logo.azure{
  background-image: url("../images/certifs/azure.png");
}

/* Google Analytics */
.certif-logo.ga{
  background-image: url("../images/certifs/google.png");
}