
/* =================== Professional Theme (Light/Neutral) ===================
   Design goals: clean, accessible, corporate look. Calm colors, ample whitespace,
   clear hierarchy, consistent components, print-friendly structure.
=============================================================================*/

/* Reset & Base */
* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
html, body { height: 100%; }
body {
  margin: 0;
  font-family: Inter, system-ui, -apple-system, Segoe UI, Roboto, "Helvetica Neue", Arial;
  color: #0f172a; /* slate-900 */
  background: #f7fafc; /* slate-50 like */
  line-height: 1.6;
}

/* Color system */
:root{
  --bg: #f7fafc;
  --surface: #ffffff;
  --elev: #ffffff;
  --muted: #475569;    /* slate-600 */
  --text: #0f172a;     /* slate-900 */
  --brand: #2563eb;    /* blue-600 */
  --brand-600: #2563eb;
  --brand-700: #1d4ed8;
  --accent: #0ea5e9;   /* sky-500 */
  --ok: #16a34a;
  --warn: #f59e0b;
  --err: #dc2626;
  --border: #e2e8f0;
  --radius: 14px;
  --shadow: 0 10px 24px rgba(2, 6, 23, .06);
}

.container { width: min(1120px, 92vw); margin: 0 auto; }
.section { padding: 72px 0; }
.section h2 { font-size: clamp(1.4rem, 2.5vw, 2rem); margin: 0 0 10px; }
.lead { color: var(--muted); font-size: 1.05rem; }

/* Header / Navbar */
.navbar {
  position: sticky; top: 0; z-index: 40;
  background: rgba(255,255,255,.9);
  backdrop-filter: blur(8px);
  border-bottom: 1px solid var(--border);
}
.navbar .inner {
  height: 68px;
  display: flex; align-items: center; justify-content: space-between;
  width: min(1120px, 92vw); margin: 0 auto;
}
.brand { display: flex; align-items: center; gap: 10px; font-weight: 700; letter-spacing: .2px; color: var(--text); text-decoration: none; }
.brand img { width: 28px; height: 28px; }
.nav-links { display: flex; gap: 6px; align-items: center; }
.nav-links a {
  text-decoration: none; color: var(--text); padding: 10px 12px; border-radius: 10px; font-weight: 600;
}
.nav-links a:hover, .nav-links a.active { background: #eef2ff; color: var(--brand); }
.menu-btn { display: none; border: 1px solid var(--border); background: #fff; padding: 8px 10px; border-radius: 10px; }

@media (max-width: 820px){
  .menu-btn { display: block; }
  .nav-links { display: none; position: absolute; top: 68px; left: 0; right: 0; background: #ffffff; border-bottom: 1px solid var(--border); padding: 8px; }
  .nav-links.open { display: grid; gap: 4px; }
}

/* ===== Menu déroulant "Plus ▾" ===== */
.dropdown {
  position: relative;
  display: inline-block;
}

.dropbtn {
  background: none;
  border: none;
  color: var(--text);
  font-weight: 600;
  cursor: pointer;
  padding: 8px 10px;
  font-size: 1rem;
  transition: color .2s ease;
}

.dropbtn:hover { color: var(--brand); }

.dropdown-content {
  display: none;
  position: absolute;
  background-color: var(--surface);
  box-shadow: 0 4px 12px rgba(0,0,0,0.15);
  border-radius: 10px;
  min-width: 180px;
  z-index: 50;
  border: 1px solid var(--border);
}

.dropdown-content a {
  color: var(--text);
  padding: 10px 14px;
  text-decoration: none;
  display: block;
  border-bottom: 1px solid var(--border);
  font-weight: 500;
}

.dropdown-content a:last-child { border-bottom: none; }

.dropdown-content a:hover {
  background-color: var(--elev);
  color: var(--brand);
}

/* affichage au survol */
.dropdown:hover .dropdown-content {
  display: block;
}

/* Hero */
.hero {
  background: linear-gradient(180deg, #f8fafc, #ffffff);
  border-bottom: 1px solid var(--border);
  padding: 78px 0 54px;
}
.hero .wrap { display: grid; grid-template-columns: 1.1fr .9fr; gap: 24px; align-items: center; }
@media (max-width: 900px){ .hero .wrap { grid-template-columns: 1fr; } }
.kicker { display: inline-block; font-size: 12px; letter-spacing: .2px; color: #334155; background: #e2e8f0; padding: 5px 10px; border-radius: 999px; }
.h1 { font-weight: 800; font-size: clamp(2rem, 3.5vw, 2.8rem); line-height: 1.15; margin: 10px 0 8px; }
.subtitle { color: var(--muted); font-size: 1.05rem; }

.cta { margin-top: 18px; display: flex; gap: 10px; flex-wrap: wrap; }
.btn {
  border: 1px solid var(--border); background: #ffffff; color: var(--text);
  padding: 10px 16px; border-radius: 10px; text-decoration: none; font-weight: 700; box-shadow: var(--shadow);
}
.btn:hover { transform: translateY(-1px); }
.btn.primary { background: var(--brand); color: #fff; border-color: var(--brand-700); }
.btn.ghost { background: #fff; color: var(--brand); border-color: #cbd5e1; }

.hero .card {
  background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); padding: 20px; box-shadow: var(--shadow);
}

/* Cards / Grid */
.grid { display: grid; gap: 16px; }
.grid.cols-3 { grid-template-columns: repeat(3, minmax(0,1fr)); }
.grid.cols-2 { grid-template-columns: repeat(2, minmax(0,1fr)); }
@media (max-width: 900px){ .grid.cols-3 { grid-template-columns: 1fr 1fr; } }
@media (max-width: 630px){ .grid.cols-3, .grid.cols-2 { grid-template-columns: 1fr; } }

.card {
  background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius);
  padding: 18px; box-shadow: var(--shadow);
}
.card h3 { margin: 0 0 6px; }
.card p { color: var(--muted); }

.badges { display: flex; gap: 8px; flex-wrap: wrap; margin-top: 8px; }
.badge { font-size: 12px; padding: 5px 10px; border: 1px solid #cbd5e1; color: #334155; background: #f1f5f9; border-radius: 999px; }

/* Liens action dans les cartes */
.card-link {
  display: inline-block;
  color: var(--brand);
  text-decoration: none;
  font-weight: 700;
  border-bottom: 1px solid transparent;
}
.card-link:hover { border-color: var(--brand); }

/* Icones statut (si tu veux) */
.status-dot { display:inline-block; width:10px; height:10px; border-radius:50%; margin-right:6px; }
.status-green { background:#16a34a; } .status-amber { background:#f59e0b; } .status-red { background:#dc2626; }

/* Tables */
.table-wrap { overflow: auto; border: 1px solid var(--border); border-radius: 12px; background: #fff; }
table { width: 100%; border-collapse: collapse; min-width: 780px; }
th, td { padding: 12px 14px; border-bottom: 1px solid #e5e7eb; text-align: left; }
th { background: #f8fafc; font-weight: 700; color: #111827; }
tbody tr:hover { background: #f9fafb; }

/* Accordion (Réalisations) */
.accordion { display: grid; gap: 10px; }
.accordion .item { border: 1px solid var(--border); border-radius: 12px; background: #fff; overflow: hidden; }
.accordion .head { display: flex; justify-content: space-between; align-items: center; padding: 14px; cursor: pointer; }
.accordion .body { padding: 14px; display: none; border-top: 1px solid var(--border); background: #fcfcfc; }
.accordion .item.open .body { display: block; }

/* Profile / Timeline (Candidat) */
.profile { display: grid; grid-template-columns: 200px 1fr; gap: 18px; align-items: center; }
.profile img { width: 180px; height: 180px; border-radius: 16px; object-fit: cover; border: 1px solid var(--border); background: #fff; }
@media (max-width: 680px){ .profile { grid-template-columns: 1fr; } }
.timeline { border-left: 2px dashed #cbd5e1; padding-left: 16px; margin-left: 6px; display: grid; gap: 12px; }
.timeline .entry { background: #fff; border: 1px solid var(--border); border-radius: 12px; padding: 12px; box-shadow: var(--shadow); }

/* KPIs / Org (Entreprise) */
.kpis { display: grid; grid-template-columns: repeat(4, minmax(0,1fr)); gap: 12px; }
.kpi { background: #fff; border: 1px solid var(--border); border-radius: 12px; padding: 16px; text-align: center; box-shadow: var(--shadow); }
.kpi .big { font-size: 1.5rem; font-weight: 800; color: var(--brand); }
@media (max-width: 820px){ .kpis { grid-template-columns: 1fr 1fr; } }
.org { display: grid; gap: 10px; }
.org .node { padding: 10px 12px; border-radius: 10px; background: #eef2ff; border: 1px solid #c7d2fe; color: #1e3a8a; }

/* Footer */
footer {
  padding: 28px 0; border-top: 1px solid var(--border); color: #334155; background: #ffffffe6; backdrop-filter: blur(6px);
}
footer .row { display: flex; justify-content: space-between; align-items: center; gap: 12px; }
footer a { color: var(--brand); text-decoration: none; }
footer a:hover { text-decoration: underline; }

/* Utilities */
.muted { color: var(--muted); }
.mt-2 { margin-top: 8px; } .mt-3 { margin-top: 12px; } .mt-4 { margin-top: 16px; } .mt-6 { margin-top: 24px; }
hr.sep { border: none; border-top: 1px solid var(--border); margin: 18px 0; }

/* Print tweaks */
@media print {
  .navbar, footer, .cta { display: none !important; }
  body { background: #fff; }
  .section { padding: 0; }
}

/* === Compétences (meters) === */
.skills-grid .skill { margin: 12px 0; }
.skills-grid .skill .row {
  display: flex; align-items: center; justify-content: space-between;
  font-weight: 600; color: var(--text);
}
.skills-grid .skill .lvl { color: var(--muted); font-weight: 600; }

.meter {
  --h: 10px;
  background: #e5e7eb; border: 1px solid var(--border);
  border-radius: 999px; height: var(--h); overflow: hidden; margin-top: 6px;
}
.theme-dark .meter { background: #0f172a; }
.meter > span {
  display: block; height: 100%;
  background: linear-gradient(90deg, var(--brand), var(--accent));
  border-right: 1px solid rgba(255,255,255,.6);
  transition: width .6s ease;
}

/* ====== Formulaire ====== */
.form .field { margin-bottom: 14px; }
.form label { display:block; font-weight:700; margin-bottom:6px; color: var(--text); }
.form input, .form textarea {
  width: 100%; padding: 10px 12px; border: 1px solid var(--border); border-radius: 10px;
  background: var(--surface); color: var(--text);
}
.form input:focus, .form textarea:focus { outline: 2px solid #c7d2fe; border-color: #93c5fd; }

/* ====== Galerie ====== */
.gallery-grid {
  display: grid; gap: 12px;
  grid-template-columns: repeat(3, minmax(0,1fr));
}
@media (max-width: 900px){ .gallery-grid { grid-template-columns: 1fr 1fr; } }
@media (max-width: 600px){ .gallery-grid { grid-template-columns: 1fr; } }
.g-item img {
  width: 100%; height: 220px; object-fit: cover; border-radius: 12px;
  border: 1px solid var(--border); background: #fff; display:block;
  transition: transform .2s ease, box-shadow .2s ease;
}
.g-item img:hover { transform: translateY(-2px); box-shadow: var(--shadow); }

/* Lightbox CSS-only (hash) */
.lightbox {
  position: fixed; inset: 0; background: rgba(0,0,0,.75); display: none; align-items: center; justify-content: center;
  padding: 24px; z-index: 60;
}
.lightbox:target { display: flex; }
.lightbox img { max-width: 90vw; max-height: 80vh; border-radius: 12px; border: 4px solid #fff; }
.lightbox .caption { color: #fff; margin-top: 10px; text-align: center; }
.lightbox .close {
  position: absolute; top: 18px; right: 18px; color: #fff; font-size: 28px; text-decoration: none; font-weight: 900;
}

/* ====== Animations (Light UX) ====== */
[data-animate] { opacity: 0; transform: translateY(12px); will-change: transform, opacity; }
[data-animate].in { opacity: 1; transform: translateY(0); transition: opacity .5s ease, transform .5s ease; }

/* ====== Footer enrichi & Back-to-top ====== */
footer .links a { color: var(--brand); text-decoration: none; }
footer .links a:hover { text-decoration: underline; }

.back-to-top{
  position: fixed; right: 16px; bottom: 16px; z-index: 50;
  display: none; align-items: center; justify-content: center;
  width: 44px; height: 44px; border-radius: 999px;
  border: 1px solid var(--border); background: var(--surface); color: var(--text);
  box-shadow: var(--shadow); cursor: pointer;
}
.back-to-top.show{ display: inline-flex; }

/* Statistiques: petits renforcements visuels */
#stats .card ul { padding-left: 18px; }
#stats .card li { margin: 6px 0; }

/* Bouton export si tu veux le distinguer */
#exportPdfBtn { cursor: pointer; }

