/* GLOBAL */
:root{
  --bg1:#0f172a;
  --bg2:#1e293b;
  --panel:#1e293b;
  --panel2:#243047;
  --header:#0b1120;
  --text:#e2e8f0;
  --muted:#94a3b8;
  --accent:#3b82f6;

  --premium1:#0b1225;
  --premium2:#0a1020;
  --premiumBorder: rgba(255,255,255,.08);
}

body{
  margin: 0;
  font-family: 'Segoe UI', sans-serif;
  background: linear-gradient(135deg, var(--bg1), var(--bg2));
  color: var(--text);
}

.container{
  width: 90%;
  max-width: 1200px;
  margin: auto;
}

/* HEADER */
.header{
  background: var(--header);
  padding: 20px 0;
  position: sticky;
  top: 0;
  z-index: 100;
  border-bottom: 1px solid rgba(255,255,255,.06);
}

.nav{
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 16px;
}

.nav a{
  color: var(--muted);
  margin-left: 20px;
  text-decoration: none;
}

.nav a:hover{ color: var(--accent); }

.logo{
  font-weight: bold;
  font-size: 1.5rem;
  margin: 0;
}

/* HERO */
.hero{ padding: 70px 0 60px; }

.hero-grid{
  display: grid;
  grid-template-columns: 1fr 350px;
  gap: 40px;
  align-items: center;
}

.kicker{
  color: var(--muted);
  margin: 0 0 10px;
  letter-spacing: .2px;
}

.hero-content h2{
  font-size: 2rem;
  margin: 0 0 12px;
}

.subtitle{
  color: var(--muted);
  margin: 0 0 18px;
  line-height: 1.6;
}

.buttons .btn{
  margin-right: 10px;
  margin-top: 10px;
}

/* METRICS */
.metrics{
  display: flex;
  gap: 14px;
  margin: 18px 0 6px;
  flex-wrap: wrap;
}

.metric{
  background: linear-gradient(180deg, rgba(255,255,255,.05), rgba(255,255,255,.03));
  border: 1px solid rgba(255,255,255,.08);
  border-radius: 12px;
  padding: 12px 16px;
  min-width: 130px;
}

.metric-value{
  font-size: 1.2rem;
  font-weight: 700;
  color: #93c5fd;
}

.metric-label{
  margin-top: 4px;
  color: var(--muted);
  font-size: .85rem;
}

.highlights{
  list-style: none;
  padding: 0;
  margin-top: 18px;
}

.highlights li{ margin-bottom: 10px; }

/* PHOTO HERO */
.photo-card{
  background: var(--panel2);
  padding: 18px;
  border-radius: 14px;
  text-align: center;
  border: 1px solid rgba(255,255,255,.06);
  box-shadow: 0 10px 30px rgba(0,0,0,.35);
}

.photo-card img{
  width: 100%;
  border-radius: 12px;
  display: block;
}

.photo-card p{
  margin: 10px 0 0;
  color: var(--muted);
}

/* SECTIONS */
.section{ padding: 70px 0; }

.section.dark{
  background: var(--header);
  border-top: 1px solid rgba(255,255,255,.06);
  border-bottom: 1px solid rgba(255,255,255,.06);
}

h2{ margin: 0 0 28px; }

/* GRID */
.cards-grid{
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 18px;
}

/* CARDS */
.card{
  background: var(--panel);
  padding: 20px;
  border-radius: 12px;
  transition: .35s ease;
  border: 1px solid rgba(255,255,255,.06);
  line-height: 1.6;
}

.card:hover{
  transform: translateY(-4px);
  background: var(--panel2);
  border-color: rgba(255,255,255,.12);
}

.card h3{
  margin: 0 0 8px;
  font-size: 1rem;
  font-weight: 700;
  color: var(--text);
}

.card span{
  color: var(--muted);
  font-size: .9rem;
  display: block;
  margin-bottom: 4px;
}

.card ul{
  margin: 12px 0 0;
  padding-left: 18px;
  color: var(--text);
  opacity: .92;
}

.card ul li{
  margin-bottom: 7px;
  line-height: 1.55;
}

.card p{
  color: var(--text);
  opacity: .92;
  line-height: 1.6;
  margin: 0 0 10px;
}

.card p:last-child{ margin-bottom: 0; }

/* ── CARTE PERFORMANCES (pleine largeur) ── */
.card-perf{
  grid-column: 1 / -1;
  background: var(--panel);
  border: 1px solid rgba(255,255,255,.08);
  border-radius: 12px;
  padding: 28px 32px;
  transition: .35s ease;
}

.card-perf:hover{
  background: var(--panel2);
  border-color: rgba(255,255,255,.14);
}

.perf-header{
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 22px;
  flex-wrap: wrap;
}

.perf-badge{
  background: linear-gradient(135deg, #00e5a0 0%, #00b4d8 100%);
  color: #0b1120;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: .08em;
  text-transform: uppercase;
  padding: 4px 10px;
  border-radius: 4px;
  white-space: nowrap;
}

.perf-header h3{
  margin: 0;
  font-size: 1.05rem;
  font-weight: 700;
  color: var(--text);
}

/* KPI strip — couleurs cohérentes avec le site */
.kpi-strip{
  display: flex;
  gap: 14px;
  flex-wrap: wrap;
  margin-bottom: 24px;
}

.kpi{
  flex: 1 1 130px;
  background: rgba(255,255,255,.04);
  border: 1px solid rgba(255,255,255,.08);
  border-radius: 10px;
  padding: 16px 18px;
  text-align: center;
}

.kpi-val{
  font-size: 1.8rem;
  font-weight: 700;
  line-height: 1;
}

.kpi-val.green  { color: #34d399; }
.kpi-val.blue   { color: #93c5fd; }
.kpi-val.purple { color: #c4b5fd; }

.kpi-label{
  font-size: 0.73rem;
  color: var(--muted);
  margin-top: 7px;
  text-transform: uppercase;
  letter-spacing: .06em;
  line-height: 1.4;
}

/* Graphe cliquable */
.graph-preview-wrap{
  position: relative;
  cursor: zoom-in;
  border-radius: 8px;
  overflow: hidden;
  border: 1px solid rgba(255,255,255,.08);
  transition: border-color .2s, box-shadow .2s;
}

.graph-preview-wrap:hover{
  border-color: #34d399;
  box-shadow: 0 0 20px rgba(52, 211, 153, .15);
}

.graph-preview-wrap img{
  width: 100%;
  display: block;
  border-radius: 7px;
}

.graph-zoom-hint{
  position: absolute;
  bottom: 12px;
  right: 14px;
  background: rgba(0,0,0,.72);
  backdrop-filter: blur(6px);
  color: #e2e8f0;
  font-size: 0.72rem;
  padding: 5px 10px;
  border-radius: 6px;
  display: flex;
  align-items: center;
  gap: 5px;
  pointer-events: none;
  opacity: 0;
  transition: opacity .2s;
}

.graph-preview-wrap:hover .graph-zoom-hint{
  opacity: 1;
}

/* LIGHTBOX */
#lb-overlay{
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,.92);
  backdrop-filter: blur(10px);
  z-index: 9999;
  align-items: center;
  justify-content: center;
  padding: 20px;
}

#lb-overlay.active{ display: flex; }

#lb-overlay img{
  max-width: 100%;
  max-height: 90vh;
  border-radius: 10px;
  box-shadow: 0 24px 64px rgba(0,0,0,.7);
  animation: lbIn .25s cubic-bezier(.16,1,.3,1);
}

@keyframes lbIn{
  from { opacity: 0; transform: scale(.94); }
  to   { opacity: 1; transform: scale(1); }
}

#lb-close{
  position: fixed;
  top: 16px;
  right: 20px;
  width: 38px;
  height: 38px;
  border-radius: 50%;
  background: rgba(255,255,255,.12);
  border: none;
  color: #fff;
  font-size: 1.4rem;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background .2s;
  line-height: 1;
}

#lb-close:hover{ background: rgba(255,255,255,.25); }

#lb-caption{
  position: fixed;
  bottom: 20px;
  left: 50%;
  transform: translateX(-50%);
  color: #94a3b8;
  font-size: .78rem;
  text-align: center;
  white-space: nowrap;
}

/* REVEAL ANIMATION — corrigé : pas de décalage au chargement */
.reveal{
  opacity: 0;
  transform: translateY(20px);
  transition: opacity .5s ease, transform .5s ease;
}

.reveal.show{
  opacity: 1;
  transform: translateY(0);
}

/* BUTTONS */
.btn{
  display: inline-block;
  padding: 12px 18px;
  border-radius: 10px;
  text-decoration: none;
  font-weight: 600;
  border: 1px solid transparent;
  transition: .2s ease;
}

.primary{ background: #2563eb; color: white; }
.primary:hover{ background: #1d4ed8; }

.secondary{
  border: 1px solid #2563eb;
  color: #93c5fd;
  background: rgba(37,99,235,.08);
}
.secondary:hover{
  background: #2563eb;
  color: white;
}

.ghost{
  border: 1px solid rgba(255,255,255,.18);
  color: var(--text);
  background: rgba(255,255,255,.06);
}
.ghost:hover{ background: rgba(255,255,255,.10); }

/* CONTACT */
.section.contact{
  background: radial-gradient(1200px 500px at 20% 10%, rgba(59,130,246,.16), transparent 60%),
              linear-gradient(180deg, var(--premium1), var(--premium2));
  border-top: 1px solid var(--premiumBorder);
}

.contact-card{
  background: rgba(255,255,255,.04);
  border: 1px solid rgba(255,255,255,.10);
  border-radius: 16px;
  padding: 26px;
}

.contact-line{
  margin: 8px 0;
  color: var(--muted);
}

.contact-line a{
  color: var(--text);
  text-decoration: none;
  border-bottom: 1px dashed rgba(255,255,255,.25);
}

.contact-line a:hover{
  color: #93c5fd;
  border-bottom-color: rgba(147,197,253,.7);
}

.contact-actions{
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
  margin-top: 16px;
}

/* FOOTER */
.site-footer{
  padding: 18px 0;
  background: linear-gradient(180deg, #070b16, #050814);
  border-top: 1px solid rgba(255,255,255,.08);
}

.footer-inner{
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
}

.site-footer p{
  margin: 0;
  color: rgba(226,232,240,.70);
}

.back-top{
  text-decoration: none;
  color: rgba(226,232,240,.75);
}
.back-top:hover{ color: #93c5fd; }

/* RESPONSIVE */
@media (max-width: 900px){
  .hero-grid{ grid-template-columns: 1fr; }
  .hero-photo{ order: -1; max-width: 280px; margin: auto; }
  .nav{ flex-wrap: wrap; }
  .nav a{ margin-left: 0; margin-right: 14px; }
  .metrics{ justify-content: center; }
  .card-perf{ padding: 20px; }
  .kpi-strip{ gap: 10px; }
}

@media (max-width: 500px){
  .hero-content h2{ font-size: 1.5rem; }
  .kpi-val{ font-size: 1.4rem; }
  .cards-grid{ grid-template-columns: 1fr; }
}

/* ───────────────────────────── */
/* AJOUT : EXPERIENCES COMPACTES */
/* ───────────────────────────── */

#experiences .exp-list{
  max-height: 180px;               /* hauteur visible */
  overflow: hidden;
  position: relative;
  transition: max-height .35s ease;
  margin-bottom: 10px;
}

/* Dégradé bas (pour indiquer qu'il y a du texte) */
#experiences .exp-list::after{
  content:"";
  position:absolute;
  left:0;
  right:0;
  bottom:0;
  height:60px;
  background: linear-gradient(to bottom, rgba(30,41,59,0), rgba(30,41,59,1));
  pointer-events:none;
}

/* Ouvert */
#experiences .card.expanded .exp-list{
  max-height: 1200px;
}
#experiences .card.expanded .exp-list::after{
  display:none;
}

/* Bouton Voir plus / moins */
#experiences .exp-toggle{
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin-top: 6px;
  padding: 8px 12px;
  border-radius: 10px;
  font-size: .85rem;
  cursor: pointer;
  background: rgba(255,255,255,.06);
  border: 1px solid rgba(255,255,255,.10);
  color: var(--text);
  transition: background .2s ease, border-color .2s ease, transform .1s ease;
}

#experiences .exp-toggle:hover{
  background: rgba(255,255,255,.10);
  border-color: rgba(59,130,246,.55);
}
#experiences .exp-toggle:active{ transform: scale(.98); }

/* Micro-compact sur les bullets */
#experiences .card ul li{ line-height: 1.5; }
